Friday, August 20, 2021
2 changes · master
Resolved issues and error corrections
Social form views now prevent clicks on engagement statistic buttons that do not open any action, avoiding a crash introduced after a recent interface update. Campaign forms also hide the engagement statistic when it is zero, keeping the view cleaner for users.
Original PR description
Since the latest OWL refactoring, stat-buttons "button" DOM element in form views cannot be defined without an associated action (it will crash on click). In the social module, we have 2 engagement fields for statistics, on social.posts and on social.campaigns. The engagement statistics are displayed using the style of a stat-button in those models' form views, but have no associated action. To fix the issue, we now mark the buttons as "disabled" so the click action will not trigger anything. We also took this opportunity to hide that statistic in the campaign form view when the value is 0. Task-2618108
Adds a test to ensure tax reports calculate taxable bases correctly when one tax affects the base for another and appears across multiple invoice lines. This helps prevent overstated tax bases and supports more reliable tax reporting.
Original PR description
The fix is on the related community branch. This is just adding a test for it.
1) Let's consider then following taxes
- tax 1, 42%, affecting the base
- tax 2, 10%
2) Create an invoice with the following lines, and post it:
- price=100, taxes=tax1
- price=100, taxes=tax2
- price=100, taxes=tax1+tax2
=> The tax details should compute the following amounts:
- base amount of tax 1: 200
- tax amount for tax 1: 84
- base amount of tax 2: 242
- tax amount for tax 2: 24.2
Before this fix, the base amount for tax 1 wasn't computed properly, and gave 300 instead of 200. This was because the same tax line (the one from tax1 with no tax_ids) was matching two different base lines: the one with tax1 and tax2, and the one with only tax1