-
-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] sale_commission_product_criteria_domain
- Loading branch information
1 parent
42b74fe
commit efbee9c
Showing
20 changed files
with
1,002 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# © 2023 ooops404 | ||
# License AGPL-3 - See https://www.gnu.org/licenses/agpl-3.0.html | ||
{ | ||
"name": "Sale Commission Product Criteria Domain", | ||
"version": "14.0.1.0.0", | ||
"author": "Ilyas," "Ooops404," "Odoo Community Association (OCA)", | ||
"contributors": ["Ilyas"], | ||
"maintainers": ["ilyasProgrammer"], | ||
"website": "https://github.com/OCA/commission", | ||
"category": "Sales Management", | ||
"license": "AGPL-3", | ||
"depends": [ | ||
"sale_commission_product_criteria_discount", | ||
"web_domain_field", | ||
], | ||
"demo": [ | ||
"demo/demo_data.xml", | ||
], | ||
"data": [ | ||
"views/views.xml", | ||
"security/ir.model.access.csv", | ||
], | ||
"application": False, | ||
"installable": True, | ||
"auto_install": False, | ||
} |
154 changes: 154 additions & 0 deletions
154
sale_commission_product_criteria_domain/demo/demo_data.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
<?xml version="1.0" ?> | ||
<odoo> | ||
<!-- Commissions --> | ||
<record id="demo_commission_rules_restrict" model="sale.commission"> | ||
<field name="name">Based on Rules Restricted</field> | ||
<field name="commission_type">product_restricted</field> | ||
</record> | ||
|
||
<!-- Commission Groups --> | ||
<record id="demo_cig_spain" model="commission.items.group"> | ||
<field name="name">Spain</field> | ||
<field | ||
name="commission_ids" | ||
eval="[(6, 0, [ref('sale_commission_product_criteria_domain.demo_commission_rules_restrict')])]" | ||
/> | ||
</record> | ||
|
||
<record id="demo_cig_italy" model="commission.items.group"> | ||
<field name="name">Italy</field> | ||
<field | ||
name="commission_ids" | ||
eval="[(6, 0, [ref('sale_commission_product_criteria_domain.demo_commission_rules_restrict')])]" | ||
/> | ||
</record> | ||
|
||
<!-- Commission Items --> | ||
<record id="demo_crr_item_1" model="commission.item"> | ||
<field name="commission_id" ref="demo_commission_rules_restrict" /> | ||
<field name="sequence" eval="1" /> | ||
<field name="based_on">sol</field> | ||
<field name="applied_on">3_global</field> | ||
<field name="commission_type">fixed</field> | ||
<field name="fixed_amount">10</field> | ||
<field name="group_id" ref="demo_cig_italy" /> | ||
</record> | ||
|
||
<record id="demo_crr_item_2" model="commission.item"> | ||
<field name="commission_id" ref="demo_commission_rules_restrict" /> | ||
<field name="sequence" eval="2" /> | ||
<field name="based_on">sol</field> | ||
<field name="applied_on">2_product_category</field> | ||
<field name="commission_type">fixed</field> | ||
<field name="fixed_amount">20</field> | ||
<field name="categ_id" ref="product.product_category_5" /> | ||
<field name="group_id" ref="demo_cig_spain" /> | ||
</record> | ||
|
||
<record id="demo_crr_item_3" model="commission.item"> | ||
<field name="commission_id" ref="demo_commission_rules_restrict" /> | ||
<field name="sequence" eval="3" /> | ||
<field name="based_on">sol</field> | ||
<field name="applied_on">1_product</field> | ||
<field name="commission_type">percentage</field> | ||
<field name="percent_amount">5</field> | ||
<field | ||
name="product_tmpl_id" | ||
ref="product.product_product_4_product_template" | ||
/> | ||
<field name="group_id" ref="demo_cig_spain" /> | ||
</record> | ||
|
||
<record id="demo_crr_item_4" model="commission.item"> | ||
<field name="commission_id" ref="demo_commission_rules_restrict" /> | ||
<field name="sequence" eval="4" /> | ||
<field name="based_on">sol</field> | ||
<field name="applied_on">0_product_variant</field> | ||
<field name="commission_type">percentage</field> | ||
<field name="percent_amount">15</field> | ||
<field name="product_id" ref="product.product_product_4" /> | ||
<field name="group_id" ref="demo_cig_spain" /> | ||
</record> | ||
|
||
<record id="demo_crr_item_5_disc" model="commission.item"> | ||
<field name="commission_id" ref="demo_commission_rules_restrict" /> | ||
<field name="sequence" eval="1" /> | ||
<field name="based_on">discount</field> | ||
<field name="applied_on">1_product</field> | ||
<field name="commission_type">fixed</field> | ||
<field name="fixed_amount">7.50</field> | ||
<field name="discount_from">10.01</field> | ||
<field name="discount_to">100</field> | ||
<field | ||
name="product_tmpl_id" | ||
ref="product.product_product_11_product_template" | ||
/> | ||
<field name="group_id" ref="demo_cig_italy" /> | ||
</record> | ||
|
||
<record id="demo_crr_item_6_disc" model="commission.item"> | ||
<field name="commission_id" ref="demo_commission_rules_restrict" /> | ||
<field name="sequence" eval="2" /> | ||
<field name="based_on">discount</field> | ||
<field name="applied_on">1_product</field> | ||
<field name="commission_type">fixed</field> | ||
<field name="fixed_amount">15</field> | ||
<field name="discount_from">0</field> | ||
<field name="discount_to">10</field> | ||
<field | ||
name="product_tmpl_id" | ||
ref="product.product_product_1_product_template" | ||
/> | ||
<field name="group_id" ref="demo_cig_spain" /> | ||
</record> | ||
|
||
<!-- Agents --> | ||
<record id="demo_agent_rules_restricted" model="res.partner"> | ||
<field name="name">Agent Rules Restricted</field> | ||
<field name="is_company">True</field> | ||
<field name="agent">True</field> | ||
<field name="commission_id" ref="demo_commission_rules_restrict" /> | ||
<field | ||
name="allowed_commission_group_ids" | ||
eval="[(6, 0, [ref('sale_commission_product_criteria_domain.demo_cig_italy')])]" | ||
/> | ||
</record> | ||
|
||
<!-- Azure --> | ||
<record id="base.res_partner_12" model="res.partner"> | ||
<field name="apply_commission_restrictions" eval="True" /> | ||
<field | ||
name="agent_ids" | ||
eval="[(6, 0, [ref('sale_commission_product_criteria_domain.demo_agent_rules_restricted')])]" | ||
/> | ||
</record> | ||
<record id="cia_azure" model="commission.item.agent"> | ||
<field name="partner_id" ref="base.res_partner_12" /> | ||
<field | ||
name="group_ids" | ||
eval="[(6, 0, [ref('sale_commission_product_criteria_domain.demo_cig_spain')])]" | ||
/> | ||
<field name="agent_id" ref="demo_agent_rules_restricted" /> | ||
</record> | ||
|
||
<!-- Deco --> | ||
<record id="base.res_partner_2" model="res.partner"> | ||
<field name="apply_commission_restrictions" eval="True" /> | ||
<field | ||
name="agent_ids" | ||
eval="[(6, 0, [ref('sale_commission_product_criteria_domain.demo_agent_rules_restricted')])]" | ||
/> | ||
</record> | ||
<record id="cia_deco" model="commission.item.agent"> | ||
<field name="partner_id" ref="base.res_partner_2" /> | ||
<field | ||
name="group_ids" | ||
eval="[(6, 0, [ref('sale_commission_product_criteria_domain.demo_cig_italy')])]" | ||
/> | ||
<field | ||
name="agent_id" | ||
ref="sale_commission_product_criteria_domain.demo_agent_rules_restricted" | ||
/> | ||
</record> | ||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from . import commission | ||
from . import commission_group | ||
from . import partner |
Oops, something went wrong.