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

[16.0][ADD] l10n_it_intrastat: added company rule on intrastat line #4500

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 l10n_it_intrastat/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"uom",
],
"data": [
"security/intrastat_rules.xml",
"security/ir.model.access.csv",
"security/rules.xml",
"data/account.intrastat.transaction.nature.csv",
Expand Down
16 changes: 16 additions & 0 deletions l10n_it_intrastat/security/intrastat_rules.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" ?>
<odoo noupdate="1">

<record id="account_invoice_intrastat_multi_company_rule" model="ir.rule">
<field name="name">Intrastat Line Multi Company Rule</field>
<field
name="model_id"
ref="l10n_it_intrastat.model_account_invoice_intrastat"
/>
<field name="global" eval="True" />
<field
name="domain_force"
>['|',('company_id','=',False),('company_id','in',company_ids)]</field>
</record>

</odoo>
20 changes: 20 additions & 0 deletions l10n_it_intrastat/views/account.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@
<field name="transport_code_id" />
<field name="weight_kg" />
<field name="amount_currency" sum="Total" />
<field
name="company_id"
groups="base.group_multi_company"
optional="show"
/>
</tree>
</field>
</record>
Expand Down Expand Up @@ -156,6 +161,10 @@
<field name="supply_method" />
<field name="payment_method" />
<field name="country_payment_id" />
<field
name="company_id"
groups="base.group_multi_company"
/>
</group>
</group>
</form>
Expand All @@ -180,6 +189,11 @@
<field name="weight_kg" />
<field name="additional_units" />
<field name="amount_currency" sum="Total" />
<field
name="company_id"
groups="base.group_multi_company"
optional="show"
/>
</tree>
</field>
</record>
Expand Down Expand Up @@ -217,6 +231,12 @@
string="Nomenclature Code"
domain="[]"
context="{'group_by':'intrastat_code_id'}"
/>
<filter
name="group_by_company"
string="Company"
domain="[]"
context="{'group_by':'company_id'}"
/>
</group>
</search>
Expand Down
Loading