diff --git a/modules/purchase_trade/lot.py b/modules/purchase_trade/lot.py index e678c56..3b867dd 100755 --- a/modules/purchase_trade/lot.py +++ b/modules/purchase_trade/lot.py @@ -2888,10 +2888,12 @@ class LotMatching(Wizard): return 'reload' -class LotGoMatching(LotMatching): +class LotGoMatching(Wizard): "Go to matching" __name__ = "lot.go_matching" + start = StateTransition() + match = StateView( 'lot.matching.start', 'purchase_trade.go_matching_view_form', [ @@ -2899,13 +2901,24 @@ class LotGoMatching(LotMatching): Button("Match", 'matching', 'tryton-ok', default=True), ]) + matching = StateTransition() + + def transition_start(self): + return 'match' + def default_match(self, fields): context = Transaction().context - values = self._selected_matching_defaults( + values = LotMatching._selected_matching_defaults( context.get('active_ids') or []) values['qt_type'] = 'all' return values + def transition_matching(self): + return LotMatching.transition_matching(self) + + def end(self): + return 'reload' + class LotMatchingStart(ModelView): "Matching" diff --git a/modules/purchase_trade/lot.xml b/modules/purchase_trade/lot.xml index 097680d..e54f579 100755 --- a/modules/purchase_trade/lot.xml +++ b/modules/purchase_trade/lot.xml @@ -195,7 +195,7 @@ this repository contains the full copyright notices and license terms. --> - Go to matching + 🔗 Go to matching lot.go_matching lot.report