-
-
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.
[MIG] sale_commission_partial_settlement: Migration to 16.0
- Loading branch information
Showing
15 changed files
with
267 additions
and
291 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
11 changes: 0 additions & 11 deletions
11
sale_commission_partial_settlement/migrations/14.0.1.0.1/post-migrate.py
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from . import sale_commission | ||
from . import account_move | ||
from . import commission | ||
from . import account_invoice_line_agent | ||
from . import account_invoice_line_agent_partial | ||
from . import account_partial_reconcile | ||
from . import settlement | ||
from . import commission_settlement_line |
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
22 changes: 22 additions & 0 deletions
22
sale_commission_partial_settlement/models/account_invoice_line_agent_partial.py
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,22 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class AccountInvoiceLineAgentPartial(models.Model): | ||
_name = "account.invoice.line.agent.partial" | ||
_description = "Partial agent commissions" | ||
|
||
invoice_line_agent_id = fields.Many2one("account.invoice.line.agent", required=True) | ||
agent_line = fields.Many2many( | ||
comodel_name="commission.settlement.line", | ||
relation="settlement_agent_line_partial_rel", | ||
column1="agent_line_partial_id", | ||
column2="settlement_id", | ||
copy=False, | ||
) | ||
amount = fields.Monetary( | ||
string="Commission Amount", | ||
) | ||
currency_id = fields.Many2one( | ||
related="invoice_line_agent_id.currency_id", | ||
) | ||
settled = fields.Boolean() |
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
Oops, something went wrong.