changeset e285967fc8c2 in modules/stock_package_shipping:default
details: 
https://hg.tryton.org/modules/stock_package_shipping?cmd=changeset;node=e285967fc8c2
description:
        Add model, record and records attribute on Wizard

        issue9421
        review309861012
diffstat:

 stock.py |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (16 lines):

diff -r aaebaed5b567 -r e285967fc8c2 stock.py
--- a/stock.py  Mon May 04 12:32:36 2020 +0200
+++ b/stock.py  Tue Jul 07 23:56:10 2020 +0200
@@ -204,9 +204,7 @@
     start = StateTransition()
 
     def transition_start(self):
-        pool = Pool()
-        ShipmentOut = pool.get('stock.shipment.out')
-        shipment = ShipmentOut(Transaction().context['active_id'])
-        method_name = 'validate_packing_%' % shipment.carrier.shipping_service
-        getattr(shipment, method_name)()
+        shipping_service = self.record.carrier.shipping_service
+        method_name = 'validate_packing_%' % shipping_service
+        getattr(self.record, method_name)()
         return 'end'

Reply via email to