Go to matching action

This commit is contained in:
2026-05-17 09:58:37 +02:00
parent 3877ff0b6f
commit ff75f9ab33
2 changed files with 16 additions and 3 deletions

View File

@@ -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"

View File

@@ -195,7 +195,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="action" ref="act_matching"/>
</record>
<record model="ir.action.wizard" id="act_go_matching">
<field name="name">Go to matching</field>
<field name="name">🔗 Go to matching</field>
<field name="wiz_name">lot.go_matching</field>
<field name="model">lot.report</field>
</record>