-
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.
[NEW] account_payment_term_manual_purchase
- Loading branch information
Showing
20 changed files
with
209 additions
and
0 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
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,23 @@ | ||
# Copyright 2024 KMEE | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "Sale Payment Term Manual", | ||
"summary": """ | ||
Review the payment term installments before confirm the sale order and copy the due date to the invoice.""", | ||
"version": "14.0.1.0.0", | ||
"license": "AGPL-3", | ||
"author": "KMEE,Odoo Community Association (OCA)", | ||
"website": "https://github.com/KMEE/kmee-odoo-addons", | ||
"depends": [ | ||
"purchase", | ||
"account_payment_term_manual", | ||
], | ||
"data": [ | ||
"security/purchase_payment_term_manual.xml", | ||
"views/purchase_order.xml", | ||
], | ||
"demo": [ | ||
"demo/purchase_payment_term_manual.xml", | ||
], | ||
} |
12 changes: 12 additions & 0 deletions
12
account_payment_term_manual_purchase/demo/purchase_payment_term_manual.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,12 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- Copyright 2024 KMEE | ||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> | ||
<odoo noupdate="1"> | ||
|
||
<!-- TODO | ||
<record model="purchase.payment.term.manual" id="purchase_payment_term_manual_demo_1"> | ||
<field name="name">...</field> | ||
</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,2 @@ | ||
from . import purchase_payment_term_manual | ||
from . import purchase_order |
15 changes: 15 additions & 0 deletions
15
account_payment_term_manual_purchase/models/purchase_order.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,15 @@ | ||
# Copyright 2024 KMEE | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class PurchaseOrder(models.Model): | ||
|
||
_inherit = "purchase.order" | ||
|
||
manual_payment_term_ids = fields.One2many( | ||
"purchase.payment.term.manual", | ||
"purchase_order_id", | ||
string="Manual Payment Terms", | ||
) |
17 changes: 17 additions & 0 deletions
17
account_payment_term_manual_purchase/models/purchase_payment_term_manual.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,17 @@ | ||
# Copyright 2024 KMEE | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class PurchasePaymentTermManual(models.Model): | ||
|
||
_name = "purchase.payment.term.manual" | ||
_inherit = "account.payment.term.manual.mixin" | ||
|
||
purchase_order_id = fields.Many2one("purchase.order") | ||
currency_id = fields.Many2one( | ||
"res.currency", | ||
related="purchase_order_id.currency_id", | ||
readonly=True, | ||
) |
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,8 @@ | ||
[ This file is optional, it should explain how to configure | ||
the module before using it; it is aimed at advanced users. ] | ||
|
||
To configure this module, you need to: | ||
|
||
- Go to ... | ||
|
||
![alternative description]()../static/description/image.png) |
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,13 @@ | ||
[ This file is optional but strongly suggested to allow end-users to evaluate the | ||
module's usefulness in their context. ] | ||
|
||
It should explain the “why” of the module: | ||
|
||
- in which context or use cases this module can be useful (practical examples are welcome!). | ||
- what is the business requirement that generated the need to develop this module | ||
|
||
It can also inform on related modules: | ||
|
||
- modules it depends on and their features | ||
- other modules that can work well together with this one | ||
- suggested setups where the module is useful (eg: multicompany, multi-website) |
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,2 @@ | ||
- Firstname Lastname <[email protected]> (optional company website url) | ||
- Second Person <[email protected]> (optional company website url) |
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,7 @@ | ||
[ This file is optional and contains additional credits, other than | ||
authors, contributors, and maintainers. ] | ||
|
||
The development of this module has been financially supported by: | ||
|
||
- Company 1 name | ||
- Company 2 name |
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,5 @@ | ||
[ This file must be max 2-3 paragraphs, and is required. ] | ||
|
||
This module extends the functionality of ... to support ... | ||
and to allow you to ... | ||
|
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 @@ | ||
[ The change log. The goal of this file is to help readers | ||
understand changes between version. The primary audience is | ||
end users and integrators. Purely technical changes such as | ||
code refactoring must not be mentioned here. | ||
|
||
This file may contain ONE level of section titles, underlined | ||
with the ~ (tilde) character. Other section markers are | ||
forbidden and will likely break the structure of the README.rst | ||
or other documents where this fragment is included. ] | ||
|
||
## 11.0.x.y.z (YYYY-MM-DD) | ||
|
||
- [BREAKING] Breaking changes come first. | ||
([#70](https://github.com/OCA/repo/issues/70)) | ||
- [ADD] New feature. | ||
([#74](https://github.com/OCA/repo/issues/74)) | ||
- [FIX] Correct this. | ||
([#71](https://github.com/OCA/repo/issues/71)) | ||
|
||
## 11.0.x.y.z (YYYY-MM-DD) | ||
|
||
- ... |
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,7 @@ | ||
[ This file must only be present if there are very specific | ||
installation instructions, such as installing non-python | ||
dependencies. The audience is systems administrators. ] | ||
|
||
To install this module, you need to: | ||
|
||
1. Do this ... |
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,5 @@ | ||
[ Enumerate known caveats and future potential improvements. | ||
It is mostly intended for end-users, and can also help | ||
potential new contributors discovering new features to implement. ] | ||
|
||
- ... |
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 @@ | ||
[ This file must be present and contains the usage instructions | ||
for end-users. As all other rst files included in the README, | ||
it MUST NOT contain reStructuredText sections | ||
only body text (paragraphs, lists, tables, etc). Should you need | ||
a more elaborate structure to explain the addon, please create a | ||
Sphinx documentation (which may include this file as a "quick start" | ||
section). ] | ||
|
||
To use this module, you need to: | ||
|
||
1. Go to ... |
22 changes: 22 additions & 0 deletions
22
account_payment_term_manual_purchase/security/purchase_payment_term_manual.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 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- Copyright 2024 KMEE | ||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> | ||
<odoo> | ||
|
||
<record | ||
model="ir.model.access" | ||
id="purchase_payment_term_manual_access_name" | ||
> <!-- TODO acl id --> | ||
<field | ||
name="name" | ||
>purchase.payment.term.manual access name</field> <!-- TODO acl name --> | ||
<field name="model_id" ref="model_purchase_payment_term_manual" /> | ||
<!-- TODO review and adapt --> | ||
<field name="group_id" ref="base.group_user" /> | ||
<field name="perm_read" eval="1" /> | ||
<field name="perm_create" eval="0" /> | ||
<field name="perm_write" eval="0" /> | ||
<field name="perm_unlink" eval="0" /> | ||
</record> | ||
|
||
</odoo> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions
30
account_payment_term_manual_purchase/views/purchase_order.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,30 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- Copyright 2024 KMEE | ||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> | ||
<odoo> | ||
|
||
<record id="view_order_form" model="ir.ui.view"> | ||
<field name="name">purchase.order.form</field> | ||
<field name="model">purchase.order</field> | ||
<field name="inherit_id" ref="purchase.purchase_order_form" /> | ||
<field name="arch" type="xml"> | ||
<notebook position="inside"> | ||
<page string="Payment Terms" groups="account.group_account_invoice"> | ||
<field name="manual_payment_term_ids"> | ||
<tree editable="bottom"> | ||
<field name="date_maturity" /> | ||
<field name="amount" /> | ||
<field | ||
name="purchase_order_id" | ||
invisible="1" | ||
force_save="1" | ||
/> | ||
<field name="currency_id" invisible="1" /> | ||
</tree> | ||
</field> | ||
</page> | ||
</notebook> | ||
</field> | ||
</record> | ||
|
||
</odoo> |
1 change: 1 addition & 0 deletions
1
setup/account_payment_term_manual_purchase/odoo/addons/account_payment_term_manual_purchase
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 @@ | ||
../../../../account_payment_term_manual_purchase |
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,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |