Skip to Content
Menu
This question has been flagged
1387 Views

i click to menuitem then function return the ir.window and retrun function for open View Line.


XML CODE:

 <record id="action_account_standard_report" model="ir.actions.server">
<field name="name">Partner Report</field>
<field name="model_id" ref="account_standard_report.model_account_report_standard_ledger"/>
<field name="state">code</field>
<field name="code">action = model.leave_filter_act()</field>
</record>

<menuitem id="menu_account_standard_report" name="General Report" sequence="0" parent="account.menu_finance_reports" action="action_account_standard_report" groups="account.group_account_user"/>


PY CODE

def leave_filter_act(self):

return {

'name': _("Partner Report"),
'type': 'ir.actions.act_window',
'res_model': 'account.report.standard.ledger',
'view_type': 'form',
'view_mode': 'form',
'context': {'default_ledger_type':'partner'},
'function' : 'action_view_lines()',
'target': 'current',

}

i wanted to return this function 'function' : 'action_view_lines()' with the ir.window.
Avatar
Discard