Skip to content

Commit

Permalink
Merge PR #187 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by legalsylvain
  • Loading branch information
github-grap-bot committed Feb 19, 2025
2 parents 6c166fc + 3e51126 commit adc4419
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
1 change: 1 addition & 0 deletions recurring_consignment/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"demo/product_product.xml",
"demo/product_pricelist.xml",
"demo/account_move.xml",
"demo/ir_property.xml",
],
"post_init_hook": "create_consignor_sequence",
"installable": True,
Expand Down
23 changes: 23 additions & 0 deletions recurring_consignment/demo/ir_property.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2015 - Today: GRAP (http://www.grap.coop)
@author: Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo noupdate="1">

<!-- Partner Properties -->
<record id="property_account_receivable" model="ir.property">
<field name="name">property_account_receivable_id</field>
<field name="company_id" ref="company"/>
<field name="fields_id" ref="account.field_res_partner__property_account_receivable_id"/>
<field name="value" eval="'account.account,'+str(account_receivable)"/>
</record>

<record id="property_account_payable" model="ir.property">
<field name="name">property_account_payable_id</field>
<field name="company_id" ref="company"/>
<field name="fields_id" ref="account.field_res_partner__property_account_payable_id"/>
<field name="value" eval="'account.account,'+str(account_payable)"/>
</record>
</odoo>
5 changes: 5 additions & 0 deletions recurring_consignment/demo/product_product.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<record id="commission_product_vat_20" model="product.product" context="{'allowed_company_ids': [ref('recurring_consignment.company')]}">
<field name="name">Commission (20% Price Excl)</field>
<field name="detailed_type">service</field>
<field name="company_id" ref="recurring_consignment.company"/>
<field name="uom_id" ref="uom.product_uom_unit"/>
<field name="uom_po_id" ref="uom.product_uom_unit"/>
<field name="fiscal_classification_id" ref="fiscal_classification_20_vat_exclude"/>
Expand All @@ -24,6 +25,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<!-- Product from Consignor #1 -->
<record id="consigned_product_consignor_1_vat_5_A" model="product.product">
<field name="name">My Consigned Product A (VAT 5% - Consignor 1)</field>
<field name="company_id" ref="recurring_consignment.company"/>
<field name="uom_id" ref="uom.product_uom_unit"/>
<field name="uom_po_id" ref="uom.product_uom_unit"/>
<field name="consignor_partner_id" ref="consignor_1"/>
Expand All @@ -32,6 +34,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

<record id="consigned_product_consignor_1_vat_5_B" model="product.product">
<field name="name">My Consigned Product B (VAT 5% - Consignor 1)</field>
<field name="company_id" ref="recurring_consignment.company"/>
<field name="uom_id" ref="uom.product_uom_unit"/>
<field name="uom_po_id" ref="uom.product_uom_unit"/>
<field name="consignor_partner_id" ref="consignor_1"/>
Expand All @@ -40,6 +43,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

<record id="consigned_product_consignor_1_vat_20_C" model="product.product">
<field name="name">My Consigned Product C (VAT 20% - Consignor 1)</field>
<field name="company_id" ref="recurring_consignment.company"/>
<field name="uom_id" ref="uom.product_uom_unit"/>
<field name="uom_po_id" ref="uom.product_uom_unit"/>
<field name="consignor_partner_id" ref="consignor_1"/>
Expand All @@ -48,6 +52,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

<record id="consigned_product_consignor_1_vat_20_D" model="product.product">
<field name="name">My Consigned Product D (VAT 20% - Consignor 1)</field>
<field name="company_id" ref="recurring_consignment.company"/>
<field name="uom_id" ref="uom.product_uom_unit"/>
<field name="uom_po_id" ref="uom.product_uom_unit"/>
<field name="consignor_partner_id" ref="consignor_1"/>
Expand Down
2 changes: 1 addition & 1 deletion recurring_consignment/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def action_post(self):
def _recurring_consigment_mark_as_paid(self):
# The first time a commission invoice is posted, create
# a Miscellanious Operation to transfer amount from 'Receivable' account
# to 'Receiable / Payable' account
# to 'Receivable / Payable' account
# and mark the invoice as paid

for move in self:
Expand Down

0 comments on commit adc4419

Please sign in to comment.