fix: Prevent incorrect vendor bill line revaluation during credit note creation by restricting logic to vendor bills (in_invoice) and update Odoo compatibility to 19.0.
This commit is contained in:
parent
d10ef65257
commit
865695577c
@ -223,7 +223,7 @@ python customaddons/vendor_bill_editable_totals/tests/run_integration_tests.py
|
||||
|
||||
## Compatibility
|
||||
|
||||
- **Odoo Version:** 17.0
|
||||
- **Odoo Version:** 19.0
|
||||
- **Python Version:** 3.10+
|
||||
- **Database:** PostgreSQL 12+
|
||||
- **License:** LGPL-3
|
||||
@ -238,6 +238,10 @@ For issues, questions, or contributions, please contact your system administrato
|
||||
|
||||
## Changelog
|
||||
|
||||
### Version 19.0.1.0.3
|
||||
- Fix incorrect vendor bill line revaluation during credit note creation
|
||||
- Restrict logic to vendor bills (`in_invoice`) only
|
||||
|
||||
### Version 17.0.1.0.0
|
||||
- Initial release
|
||||
- Direct editing of price_subtotal on vendor bill lines
|
||||
|
||||
@ -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