-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] create invoice specific pay_term and logic
- Loading branch information
1 parent
87c33b9
commit 59e20f2
Showing
9 changed files
with
144 additions
and
106 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# from . import account_payment_term_manual_mixin | ||
from . import account_move | ||
from . import account_payment_term | ||
from . import account_move_payment_term_line | ||
from . import account_move_payment_term |
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
18 changes: 18 additions & 0 deletions
18
account_payment_term_manual/models/account_move_payment_term.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,18 @@ | ||
# Copyright 2024 KMEE | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class AccountPaymentTerm(models.Model): | ||
_inherit = "account.payment.term" | ||
|
||
origin_term_id = fields.Many2one( | ||
comodel_name="account.payment.term", | ||
string="Payment Terms", | ||
required=False, | ||
) | ||
|
||
has_manual_lines = fields.Boolean( | ||
help="Technical field to keep track of manual lines", | ||
) |
26 changes: 0 additions & 26 deletions
26
account_payment_term_manual/models/account_move_payment_term_line.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
22 changes: 0 additions & 22 deletions
22
account_payment_term_manual/security/account_payment_term_manual.xml
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
22 changes: 22 additions & 0 deletions
22
account_payment_term_manual/views/account_payment_term.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,22 @@ | ||
<odoo> | ||
<record model="ir.ui.view" id="account_payment_term_manual_form_view"> | ||
<field | ||
name="name" | ||
>account.payment.term.form (in account_payment_term_manual)</field> | ||
<field name="model">account.payment.term</field> | ||
<field name="inherit_id" ref="account.view_payment_term_form" /> | ||
<field name="arch" type="xml"> | ||
|
||
<xpath expr="//widget[@name='web_ribbon']" position="after"> | ||
<field name="origin_term_id" invisible="1" /> | ||
</xpath> | ||
|
||
<xpath expr="//widget[@name='web_ribbon']" position="attributes"> | ||
<attribute name="attrs">{ | ||
'invisible': ['|', ('active', '=', True),('origin_term_id','!=',False)] | ||
}</attribute> | ||
</xpath> | ||
|
||
</field> | ||
</record> | ||
</odoo> |