[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
This commit is contained in:
Nikunj Ladava
2018-05-02 09:54:58 +02:00
committed by qdp-odoo
parent cae950e826
commit 95a90689aa
2 changed files with 3 additions and 0 deletions
@@ -3,6 +3,7 @@
<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>
@@ -12,6 +13,7 @@
<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",
@@ -8,6 +8,7 @@
<field name="name">Pos Orders Inalterability Check</field>
<field name="model_id" ref="point_of_sale.model_pos_order"/>
<field name="type">ir.actions.server</field>
<field name="state">code</field>
<field name="code">
action = env['pos.order']._check_hash_integrity(env.user.company_id.id)
</field>