account-invoicing icon indicating copy to clipboard operation
account-invoicing copied to clipboard

[15.0][FIX] account_invoice_fixed_discount: _recompute_tax_lines

Open ao-landoo opened this issue 2 years ago • 8 comments

Fixes function _recompute_tax_lines, which is iterating invoice_line_ids instead of line_ids

This issue was also found on account_invoice_triple_discount module and fixed on this PR: https://github.com/OCA/account-invoicing/pull/1238

ao-landoo avatar Jul 04 '23 11:07 ao-landoo

@adrienpeiffer @pedrobaeza account_invoice_triple_invoice and account_invoice_fixed_discount are in conflict on tests as both modules are installed. They are calling the same function (_recompute_tax_lines), and modifying lines' price_unit field both at the same time, so tests are failing.

Any idea what could be done?

ao-landoo avatar Jul 04 '23 11:07 ao-landoo

@adrienpeiffer @pedrobaeza could you check if you like the solution I applied? I think it's the best solution possible for the issue

ao-landoo avatar Jul 05 '23 12:07 ao-landoo

About the solution, is inhibiting one of the 2 methods, so it doesn't seem correct. They shouldn't act and interfere if no global or fixed discount AFAIK.

Please don't add empty lines inside the method.

pedrobaeza avatar Jul 05 '23 13:07 pedrobaeza

Both modules are incompatible, it does not work properly if you install both of them. As runboat installs all modules on the repo, tests were not passing. This is why I applied this solution.

ao-landoo avatar Jul 06 '23 06:07 ao-landoo

@LoisRForgeFlow @MiquelRForgeFlow any help here to go ahead or close it?

rafaelbn avatar Aug 03 '23 21:08 rafaelbn

Please @eantones could you review this PR?

rafaelbn avatar Aug 30 '23 15:08 rafaelbn

FYI (related to my request): An example of how passing explicitly the needed arguments besides the kwargs is important: https://github.com/odoo/odoo/commit/49b91e47c6c24e0023110365e7f9084a2c13ca5a

MiquelRForgeFlow avatar Sep 04 '23 13:09 MiquelRForgeFlow

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

github-actions[bot] avatar Oct 20 '24 12:10 github-actions[bot]