issue12702.diff [sale] [purchase] No compute unit_price when change the product

This commit is contained in:
Raimon Esteve 2023-11-03 10:28:20 +01:00
parent a568100d25
commit 3a04933e03
2 changed files with 27 additions and 0 deletions

25
issue12702.diff Normal file
View File

@ -0,0 +1,25 @@
diff --git a/tryton/modules/purchase/purchase.py b/tryton/modules/purchase/purchase.py
index 0bc42b126a..9d4a6a4a20 100644
--- a/tryton/modules/purchase/purchase.py
+++ b/tryton/modules/purchase/purchase.py
@@ -1333,7 +1333,7 @@ class Line(sequence_ordered(), ModelSQL, ModelView):
and self.product_supplier not in product_suppliers):
self.product_supplier = None
- self.unit_price = self.compute_unit_price()
+ self.unit_price = self.compute_unit_price()
self.amount = self.on_change_with_amount()
diff --git a/tryton/modules/sale/sale.py b/tryton/modules/sale/sale.py
index f412dbc85b..32c65db2fd 100644
--- a/tryton/modules/sale/sale.py
+++ b/tryton/modules/sale/sale.py
@@ -1328,7 +1328,7 @@ class SaleLine(TaxableMixin, sequence_ordered(), ModelSQL, ModelView):
self.unit = self.product.sale_uom
self.unit_digits = self.product.sale_uom.digits
- self.unit_price = self.compute_unit_price()
+ self.unit_price = self.compute_unit_price()
self.amount = self.on_change_with_amount()

2
series
View File

@ -81,3 +81,5 @@ strftime_format.diff # [ir] Fix problem with strftime format, reducing the time
counterpart_party_payment_clearing.diff # [account_payment_clearing] Add the possiblity to have a party in the counterpart move when reconcile on a payment.
issue12319.diff # [sale_advance_payment] Only create an advance line if the invoice dont have already one.
issue12702.diff # [sale] [purchase] No compute unit_price when change the product