Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] purchase_ux: compute tax_ids if fiscal_position is setted on invoice #163

Open
wants to merge 2 commits into
base: 13.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion purchase_ux/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Purchase UX',
'version': "13.0.1.3.0",
'version': "13.0.1.4.0",
'category': 'Purchases',
'sequence': 14,
'summary': '',
Expand All @@ -31,6 +31,7 @@
'depends': [
'purchase',
'account_ux',
'account_fiscal_position_update',
],
'data': [
'wizards/purchase_change_currency_views.xml',
Expand Down
2 changes: 2 additions & 0 deletions purchase_ux/models/purchase_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ def _compute_invoice_qty(self):
lines = AccountInvoiceLine.search([
('move_id', '=', invoice_id),
('purchase_line_id', '=', rec.id)])
for line in lines:
line.move_id.fiscal_position_change()
invoice_qty = -1.0 * sum(
lines.mapped('quantity')) if AccountInvoice.browse(
invoice_id).type == 'in_refund' else sum(
Expand Down