changeset 9b78ba030c62 in modules/stock_shipment_cost:default
details: 
https://hg.tryton.org/modules/stock_shipment_cost?cmd=changeset&node=9b78ba030c62
description:
        Set default value from context for stock reporting margin context

        issue11765
        review419891003
diffstat:

 stock_reporting_margin.py |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r 377d963bd74b -r 9b78ba030c62 stock_reporting_margin.py
--- a/stock_reporting_margin.py Wed Sep 14 19:15:48 2022 +0200
+++ b/stock_reporting_margin.py Sun Oct 09 13:30:06 2022 +0200
@@ -26,3 +26,7 @@
     __name__ = 'stock.reporting.margin.context'
 
     include_shipment_cost = fields.Boolean("Include Shipment Cost")
+
+    @classmethod
+    def default_include_shipment_cost(cls):
+        return Transaction().context.get('include_shipment_cost', False)

Reply via email to