Files
odoo_source/addons/l10n_fr_certification/data/account_move.xml
T
Nikunj Ladava 95a90689aa [FIX] l10n_fr{certification,_pos_cert}: Set server actions' 'state' to 'code'
Since these server actions are triggering python code, their 'state' field must explicitely be set to 'code'.
Currently it is taking default value for 'state' field which is, since saas-15, 'object_write' and thus not working as intended.

Was PR #22706
Was task: 1813998
2018-05-02 09:54:58 +02:00

28 lines
1.2 KiB
XML

<odoo>
<record model="ir.actions.server" id="action_check_hash_integrity">
<field name="name">Data Inalterability Check</field>
<field name="model_id" ref="account.model_account_move"/>
<field name="type">ir.actions.server</field>
<field name="state">code</field>
<field name="code">
action = env['account.move']._check_hash_integrity(env.user.company_id.id)
</field>
</record>
<record model="ir.actions.server" id="odoo_french_certification">
<field name="name">Get the certification now!</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="account.model_res_company"/>
<field name="state">code</field>
<field name="code">
db_uuid = env['ir.config_parameter'].sudo().get_param('database.uuid')
action = {"type": "ir.actions.act_url",
"url": "https://www.odoo.com/my/contract/french-certification/db/" + db_uuid,
"target": "new",}
</field>
</record>
<menuitem action="action_check_hash_integrity" id="menu_check_move_integrity_reporting" parent="l10n_fr.account_reports_fr_statements_menu" sequence="90"/>
</odoo>