changeset 6a33d5765140 in modules/purchase:default
details: https://hg.tryton.org/modules/purchase?cmd=changeset&node=6a33d5765140
description:
Remove unnecessary depend on unit
issue11605
review417571003
diffstat:
purchase.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (26 lines):
diff -r 60fe20c8a431 -r 6a33d5765140 purchase.py
--- a/purchase.py Sun Jul 17 00:00:56 2022 +0200
+++ b/purchase.py Sat Jul 30 11:14:26 2022 +0200
@@ -1379,8 +1379,8 @@
if self.product:
return self.product.default_uom_category.id
- @fields.depends('product', 'quantity', 'unit',
- methods=['_get_context_purchase_price'])
+ @fields.depends(
+ 'product', 'quantity', methods=['_get_context_purchase_price'])
def on_change_quantity(self):
Product = Pool().get('product.product')
@@ -1401,8 +1401,9 @@
def on_change_with_summary(self, name=None):
return firstline(self.description or '')
- @fields.depends('type', 'quantity', 'unit_price', 'unit', 'purchase',
- '_parent_purchase.currency')
+ @fields.depends(
+ 'type', 'quantity', 'unit_price',
+ 'purchase', '_parent_purchase.currency')
def on_change_with_amount(self):
if self.type == 'line':
currency = self.purchase.currency if self.purchase else None