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

[FIX] recurring_consigment: set company on new consignors, to avoid error when creating consigment invoice #154

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,33 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<record id="fiscal_classification_5_vat_include" model="account.product.fiscal.classification">
<field name="name">Tax Group 05% (5% VAT Incl.)</field>
<field name="sale_tax_ids" eval="[(4, ref('vat_5_include'))]"/>
<field name="company_id" ref="company"/>
</record>

<record id="fiscal_classification_20_vat_exclude" model="account.product.fiscal.classification">
<field name="name">Tax Group 20% (20% VAT Excl.)</field>
<field name="sale_tax_ids" eval="[(4, ref('vat_20_exclude'))]"/>
<field name="company_id" ref="company"/>
</record>

<record id="fiscal_classification_5_consignor_1" model="account.product.fiscal.classification">
<field name="name">Tax Group 05% (Consignor 1)</field>
<field name="consignor_partner_id" ref="consignor_1"/>
<field name="sale_tax_ids" eval="[(4, ref('tax_5_consignor_1'))]"/>
<field name="company_id" ref="company"/>
</record>

<record id="fiscal_classification_20_consignor_1" model="account.product.fiscal.classification">
<field name="name">Tax Group 20% (Consignor 1)</field>
<field name="consignor_partner_id" ref="consignor_1"/>
<field name="sale_tax_ids" eval="[(4, ref('tax_20_consignor_1'))]"/>
<field name="company_id" ref="company"/>
</record>

<record id="fiscal_classification_0_consignor_2" model="account.product.fiscal.classification">
<field name="name">Tax Group 00% (Consignor 2)</field>
<field name="consignor_partner_id" ref="consignor_2"/>
<field name="company_id" ref="company"/>
</record>

</odoo>
1 change: 1 addition & 0 deletions recurring_consignment/wizards/consignor_create_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,5 @@ def _prepare_partner(self, sequence, account):
"consignment_account_id": account.id,
"consignment_commission": self.commission_rate,
"is_consignor": True,
"company_id": self.env.company.id,
}
Loading