-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1890 from VoicuStefan2001/17.0
[17.0][UPD] deltatech_Sale_commission modify based on percentage rules
- Loading branch information
Showing
6 changed files
with
79 additions
and
1 deletion.
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
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,11 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class SaleMarginReport(models.Model): | ||
_name = "sale.commission.condition" | ||
_description = "Commission condition" | ||
|
||
sequence = fields.Integer(string="Sequence", default=10) | ||
percentage = fields.Float(string="Percentage", required=True, default=0.0, digits=(12, 3)) | ||
less_than_days = fields.Integer(string="Less Than Days", required=True, default=0) | ||
# maximum_days = fields.Integer(string="Maximum Days", required=True, default=0) |
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
35 changes: 35 additions & 0 deletions
35
deltatech_sale_commission/views/commission_condition_view.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,35 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
|
||
|
||
<record id="view_commission_conditions_tree" model="ir.ui.view"> | ||
<field name="name">Commission Conditions</field> | ||
<field name="model">sale.commission.condition</field> | ||
<field name="arch" type="xml"> | ||
<tree editable="top"> | ||
<field name="sequence" widget="handle" /> | ||
<field name="percentage" /> | ||
<field name="less_than_days" /> | ||
<!-- <field name="maximum_days" />--> | ||
</tree> | ||
</field> | ||
</record> | ||
|
||
|
||
<record id="action_commission_conditions" model="ir.actions.act_window"> | ||
<field name="name">Commission Conditions</field> | ||
<field name="res_model">sale.commission.condition</field> | ||
<field name="view_mode">tree</field> | ||
</record> | ||
|
||
<menuitem | ||
name="Commission Conditions" | ||
id="menu_commission_conditions" | ||
action="action_commission_conditions" | ||
parent="sale.menu_sale_config" | ||
groups="sales_team.group_sale_manager" | ||
/> | ||
|
||
|
||
|
||
</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