Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] account_edi: support multi-company #1229

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions addons/account_edi/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions addons/account_edi/models/account_edi_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
(
Expand Down
13 changes: 13 additions & 0 deletions addons/account_edi/security/account_edi_document_security.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>

<data noupdate="1">

<record id="account_edi_document_comp_rule" model="ir.rule">
<field name="name">Electronic Document for an account.move multi-company</field>
<field name="model_id" ref="model_account_edi_document"/>
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
</record>

</data>
</odoo>
11 changes: 11 additions & 0 deletions doc/cla/individual/dreinabinovo.md
Original file line number Diff line number Diff line change
@@ -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 [email protected] https://github.com/dreinabinovo