Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
9000 Vizualizări

what i'm doing pls correct me where i'm wrong

```

<record id="action_view_account_process_adjustments" model="ir.actions.act_window">

 <field name="name">Process Adjustment</field> 

 <field name="type">ir.actions.act_window</field> 

 <field name="res_model">invoice.process.adjustment</field> 

 <field name="view_type">form</field> <field name="view_mode">form</field> 

 <field name="context">{'parent_obj': self.id}</field> 

 <field name="view_id" ref="invoices_process_adjustment_wizard"/> 

 <field name="target">new</field> </record>

```


i want current account.move id into my opend wizard form and how to get in py file 

Imagine profil
Abandonează
Cel mai bun răspuns

Hi Usman Farzand,
you can call wizard on a button click and pass ID,Try like below

def action_method(self):

return {
'name': self.name,
'res_model': 'wizard_model_name',
'type': 'ir.actions.act_window',
'context': {'current_id': self.id},
'view_mode': 'form',
'view_type': 'form',
'target': 'new',
}


Imagine profil
Abandonează
Autor

how i can get value in py file of current_id pls

try like below:

amount = context.get('current_id')

you can call paren form like:

c_obj = self.env['obj.obj'].browse([(self._context['current_id'])])

self.env.context.get('active_id')

Related Posts Răspunsuri Vizualizări Activitate
2
sept. 20
6101
1
sept. 19
6542
2
sept. 23
4639
2
sept. 22
4396
0
ian. 21
3190