diff --git a/addons/account_edi/__manifest__.py b/addons/account_edi/__manifest__.py index 172cd41faf3af..b04d8945b7eab 100644 --- a/addons/account_edi/__manifest__.py +++ b/addons/account_edi/__manifest__.py @@ -14,6 +14,7 @@ 'category': 'Accounting/Accounting', 'depends' : ['account'], 'data': [ + 'security/account_edi_document_security.xml', 'security/ir.model.access.csv', 'views/account_edi_document_views.xml', 'views/account_move_views.xml', diff --git a/addons/account_edi/models/account_edi_document.py b/addons/account_edi/models/account_edi_document.py index 22ecd8e1e0484..96ae687f9ebe3 100644 --- a/addons/account_edi/models/account_edi_document.py +++ b/addons/account_edi/models/account_edi_document.py @@ -39,6 +39,7 @@ class AccountEdiDocument(models.Model): name = fields.Char(related='attachment_id.name') edi_format_name = fields.Char(string='Format Name', related='edi_format_id.name') edi_content = fields.Binary(compute='_compute_edi_content', compute_sudo=True) + company_id = fields.Many2one(related="move_id.company_id") _sql_constraints = [ ( diff --git a/addons/account_edi/security/account_edi_document_security.xml b/addons/account_edi/security/account_edi_document_security.xml new file mode 100644 index 0000000000000..bd228b095e4c3 --- /dev/null +++ b/addons/account_edi/security/account_edi_document_security.xml @@ -0,0 +1,13 @@ + + + + + + + Electronic Document for an account.move multi-company + + [('company_id', 'in', company_ids + [False])] + + + + diff --git a/doc/cla/individual/dreinabinovo.md b/doc/cla/individual/dreinabinovo.md new file mode 100644 index 0000000000000..cf8da95edd1ad --- /dev/null +++ b/doc/cla/individual/dreinabinovo.md @@ -0,0 +1,11 @@ +Spain, 2024-05-15 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +David Reina Agrasar dreina@binovo.es https://github.com/dreinabinovo