Files
odoo_source/addons/l10n_fr_pos_cert/__init__.py
T
Pierre Masereel 82e06a9f50 [FIX] l10n_fr_pos_cert: inalterability check report
We've added a repport that guarantee that the blockchain of hash has not
been altered. It recompute the hash and check that they are the same as
the one stored.

TASK-ID: 47990
2019-10-01 10:02:50 +00:00

17 lines
610 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import models
from . import report
from odoo import api, SUPERUSER_ID
def _setup_inalterability(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
# enable ping for this module
env['publisher_warranty.contract'].update_notification(cron_mode=True)
fr_companies = env['res.company'].search([('partner_id.country_id.code', 'in', env['res.company']._get_unalterable_country())])
if fr_companies:
fr_companies._create_secure_sequence(['l10n_fr_pos_cert_sequence_id'])