[ADD]:Added Upstream Patch for l10n_fr_certification

This commit is contained in:
Rutuba Chavda 2018-07-10 11:46:17 +05:30
parent e21726da23
commit 9c3e07fb50
2 changed files with 5 additions and 0 deletions

View File

@ -3,6 +3,7 @@
<field name="name">Data Inalterability Check</field> <field name="name">Data Inalterability Check</field>
<field name="model_id" ref="account.model_account_move"/> <field name="model_id" ref="account.model_account_move"/>
<field name="type">ir.actions.server</field> <field name="type">ir.actions.server</field>
<field name="state">code</field>
<field name="code"> <field name="code">
action = env['account.move']._check_hash_integrity(env.user.company_id.id) action = env['account.move']._check_hash_integrity(env.user.company_id.id)
</field> </field>
@ -12,6 +13,7 @@
<field name="name">Get the certification now!</field> <field name="name">Get the certification now!</field>
<field name="type">ir.actions.server</field> <field name="type">ir.actions.server</field>
<field name="model_id" ref="account.model_res_company"/> <field name="model_id" ref="account.model_res_company"/>
<field name="state">code</field>
<field name="code"> <field name="code">
db_uuid = env['ir.config_parameter'].sudo().get_param('database.uuid') db_uuid = env['ir.config_parameter'].sudo().get_param('database.uuid')
action = {"type": "ir.actions.act_url", action = {"type": "ir.actions.act_url",

View File

@ -30,6 +30,9 @@ class ResCompany(models.Model):
if company._is_accounting_unalterable(): if company._is_accounting_unalterable():
sequence_fields = ['l10n_fr_secure_sequence_id'] sequence_fields = ['l10n_fr_secure_sequence_id']
company._create_secure_sequence(sequence_fields) company._create_secure_sequence(sequence_fields)
# fiscalyear_lock_date can't be set to a prior date
if 'fiscalyear_lock_date' in vals or 'period_lock_date' in vals:
self._check_lock_dates(vals)
return res return res
def _create_secure_sequence(self, sequence_fields): def _create_secure_sequence(self, sequence_fields):