mirror of
https://github.com/NaN-tic/trytond-patches.git
synced 2023-12-14 06:03:03 +01:00
42 lines
1.7 KiB
Diff
42 lines
1.7 KiB
Diff
diff -r faa466e4506c trytond/trytond/modules/sale/sale.py
|
|
--- a/trytond/trytond/modules/sale/sale.py Tue Oct 17 09:29:45 2017 +0200
|
|
+++ b/trytond/trytond/modules/sale/sale.py Tue Oct 17 09:42:58 2017 +0200
|
|
@@ -1228,10 +1228,6 @@
|
|
def on_change_unit(self):
|
|
self.on_change_quantity()
|
|
|
|
- @fields.depends(methods=['quantity'])
|
|
- def on_change_taxes(self):
|
|
- self.on_change_quantity()
|
|
-
|
|
@fields.depends('type', 'quantity', 'unit_price', 'unit',
|
|
'_parent_sale.currency')
|
|
def on_change_with_amount(self):
|
|
diff -r af073a6350d3 trytond/trytond/modules/purchase/purchase.py
|
|
--- a/trytond/trytond/modules/purchase/purchase.py Tue Oct 17 09:29:56 2017 +0200
|
|
+++ b/trytond/trytond/modules/purchase/purchase.py Tue Oct 17 09:43:25 2017 +0200
|
|
@@ -1132,10 +1132,6 @@
|
|
def on_change_unit(self):
|
|
self.on_change_quantity()
|
|
|
|
- @fields.depends(methods=['quantity'])
|
|
- def on_change_taxes(self):
|
|
- self.on_change_quantity()
|
|
-
|
|
@fields.depends('type', 'quantity', 'unit_price', 'unit',
|
|
'_parent_purchase.currency')
|
|
def on_change_with_amount(self):
|
|
diff -r 38b54301d632 trytond/trytond/modules/sale_price_list/sale.py
|
|
--- a/trytond/trytond/modules/sale_price_list/sale.py Mon May 02 17:35:25 2016 +0200
|
|
+++ b/trytond/trytond/modules/sale_price_list/sale.py Tue Oct 17 09:59:30 2017 +0200
|
|
@@ -51,3 +51,9 @@
|
|
if self.sale and getattr(self.sale, 'price_list', None):
|
|
context['price_list'] = self.sale.price_list.id
|
|
return context
|
|
+
|
|
+ @fields.depends(methods=['quantity'])
|
|
+ def on_change_taxes(self):
|
|
+ if self.sale.price_list and self.sale.price_list.tax_included:
|
|
+ self.on_change_quantity()
|
|
+
|