Fix: Prevent incorrect vendor bill line revaluation during credit note creation by restricting the logic to vendor invoices.
This commit is contained in:
parent
64cac68586
commit
b09d75d7c5
14
.gitignore
vendored
Normal file
14
.gitignore
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
# Python
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# Odoo
|
||||
*.po
|
||||
.ipynb_checkpoints/
|
||||
|
||||
# Editors
|
||||
.vscode/
|
||||
.idea/
|
||||
*.swp
|
||||
*.swo
|
||||
@ -238,6 +238,10 @@ For issues, questions, or contributions, please contact your system administrato
|
||||
|
||||
## Changelog
|
||||
|
||||
### Version 17.0.1.1.0
|
||||
- Fix: Prevent incorrect revaluation entries (STJ) on Vendor Bills when creating Credit Notes (Reversal).
|
||||
- Fix: Restricted revaluation logic to strictly apply only when manually editing Vendor Bills, excluding system-triggered updates during reversals.
|
||||
|
||||
### Version 17.0.1.0.0
|
||||
- Initial release
|
||||
- Direct editing of price_subtotal on vendor bill lines
|
||||
|
||||
Binary file not shown.
@ -117,7 +117,10 @@ class AccountMoveLine(models.Model):
|
||||
if 'price_unit' in vals or 'quantity' in vals:
|
||||
for line in self:
|
||||
# Only for vendor bills and if linked to a PO line
|
||||
if line.move_id.move_type in ('in_invoice', 'in_refund') and line.purchase_line_id:
|
||||
# Fix: Do not sync if triggered by Credit Note creation (Reversal Wizard)
|
||||
if line.move_id.move_type == 'in_invoice' and \
|
||||
line.purchase_line_id and \
|
||||
self.env.context.get('active_model') != 'account.move.reversal':
|
||||
po_line = line.purchase_line_id
|
||||
|
||||
# 1. Sync Price
|
||||
|
||||
Loading…
Reference in New Issue
Block a user