Skip to content

Commit

Permalink
[FIX] sipreco_purchase: action_generate_expedient fix
Browse files Browse the repository at this point in the history
X-original-commit: a05e3d5
  • Loading branch information
vib-adhoc committed May 16, 2023
1 parent a9d86e7 commit 4f6feae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sipreco_purchase/__manifest__.py
@@ -1,6 +1,6 @@
{
'name': 'Sipreco Purchase Management',
'version': "15.0.1.1.0",
'version': "15.0.1.2.0",
'license': 'AGPL-3',
'author': 'ADHOC SA,Odoo Community Association (OCA)',
'website': 'www.adhoc.com.ar',
Expand Down
2 changes: 1 addition & 1 deletion sipreco_purchase/data/ir_actions_server_data.xml
Expand Up @@ -74,7 +74,7 @@ records.button_confirm()
<field name="binding_model_id" ref="purchase.model_purchase_order"/>
<field name="state">code</field>
<field name="code">
action = self.env["ir.actions.act_window"]._for_xml_id('sipreco_purchase.action_create_expedients_wizard')
action = env["ir.actions.act_window"]._for_xml_id('sipreco_purchase.action_create_expedients_wizard')
purchase_orders = records.filtered(lambda x: x.state in ['purchase', 'done'])
purchase_orders.check_if_expedients_exist()
action['context'] = {'active_ids': purchase_orders.ids}
Expand Down
4 changes: 2 additions & 2 deletions sipreco_purchase/wizards/create_expedients_wizard.py
Expand Up @@ -65,8 +65,8 @@ def confirm(self):
if not expedients or len(expedients) > 1:
action['domain'] = "[('id','in',%s)]" % (expedients.ids)
elif len(expedients) == 1:
res = self.env["ir.actions.actions"]._for_xml_id(
'public_budget.view_public_budget_expedient_form')
res = self.env.ref(
'public_budget.view_public_budget_expedient_form', False)
action['views'] = [(res and res.id or False, 'form')]
action['res_id'] = expedients.id
return action

0 comments on commit 4f6feae

Please sign in to comment.