Skip to content

Commit c27c2d7

Browse files
committed
[15.0][ADD] purchase_invoice_plan_isolated_rfq
1 parent 4634cdc commit c27c2d7

11 files changed

Lines changed: 578 additions & 0 deletions

File tree

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
====================================
2+
Purchase Invoice Plan - Isolated RFQ
3+
====================================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:552357866a3a8cf13f4acc1a0c97e64809a73bd924046197a3b3084057622c12
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Alpha
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github
20+
:target: https://github.com/OCA/purchase-workflow/tree/15.0/purchase_invoice_plan_isolated_rfq
21+
:alt: OCA/purchase-workflow
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/purchase-workflow-15-0/purchase-workflow-15-0-purchase_invoice_plan_isolated_rfq
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/purchase-workflow&target_branch=15.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module will serve as a bridge between invoice plan the RFQ and PO processes in an isolated manner.
32+
33+
.. IMPORTANT::
34+
This is an alpha version, the data model and design can change at any time without warning.
35+
Only for development or testing purpose, do not use in production.
36+
`More details on development status <https://odoo-community.org/page/development-status>`_
37+
38+
**Table of contents**
39+
40+
.. contents::
41+
:local:
42+
43+
Bug Tracker
44+
===========
45+
46+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/purchase-workflow/issues>`_.
47+
In case of trouble, please check there if your issue has already been reported.
48+
If you spotted it first, help us to smash it by providing a detailed and welcomed
49+
`feedback <https://github.com/OCA/purchase-workflow/issues/new?body=module:%20purchase_invoice_plan_isolated_rfq%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
50+
51+
Do not contact contributors directly about support or help with technical issues.
52+
53+
Credits
54+
=======
55+
56+
Authors
57+
~~~~~~~
58+
59+
* Ecosoft
60+
61+
Contributors
62+
~~~~~~~~~~~~
63+
64+
* Saran Lim. <saranl@ecosoft.co.th>
65+
66+
Maintainers
67+
~~~~~~~~~~~
68+
69+
This module is maintained by the OCA.
70+
71+
.. image:: https://odoo-community.org/logo.png
72+
:alt: Odoo Community Association
73+
:target: https://odoo-community.org
74+
75+
OCA, or the Odoo Community Association, is a nonprofit organization whose
76+
mission is to support the collaborative development of Odoo features and
77+
promote its widespread use.
78+
79+
.. |maintainer-Saran440| image:: https://github.com/Saran440.png?size=40px
80+
:target: https://github.com/Saran440
81+
:alt: Saran440
82+
83+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
84+
85+
|maintainer-Saran440|
86+
87+
This module is part of the `OCA/purchase-workflow <https://github.com/OCA/purchase-workflow/tree/15.0/purchase_invoice_plan_isolated_rfq>`_ project on GitHub.
88+
89+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
2+
3+
from . import models
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2023 Ecosoft Co., Ltd (http://ecosoft.co.th/)
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
3+
4+
{
5+
"name": "Purchase Invoice Plan - Isolated RFQ",
6+
"summary": "Add invoice plan to new po from isolated rfq",
7+
"version": "15.0.1.0.0",
8+
"author": "Ecosoft, Odoo Community Association (OCA)",
9+
"license": "AGPL-3",
10+
"website": "https://github.com/OCA/purchase-workflow",
11+
"category": "Purchase",
12+
"depends": ["purchase_invoice_plan", "purchase_isolated_rfq"],
13+
"data": [],
14+
"installable": True,
15+
"maintainers": ["Saran440"],
16+
"development_status": "Alpha",
17+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
2+
3+
from . import purchase
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright 2023 Ecosoft Co., Ltd (http://ecosoft.co.th/)
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
3+
4+
from odoo import models
5+
6+
7+
class PurchaseOrder(models.Model):
8+
_inherit = "purchase.order"
9+
10+
def _update_value_order_from_rfq(self, order):
11+
order = super()._update_value_order_from_rfq(order)
12+
if self.use_invoice_plan:
13+
invoice_plans = []
14+
for plan in self.invoice_plan_ids:
15+
vals = {
16+
"installment": plan.installment,
17+
"plan_date": plan.plan_date,
18+
"invoice_type": plan.invoice_type,
19+
"percent": plan.percent,
20+
}
21+
invoice_plans.append((0, 0, vals))
22+
order.write(
23+
{
24+
"use_invoice_plan": self.use_invoice_plan,
25+
"invoice_plan_ids": invoice_plans,
26+
}
27+
)
28+
return order
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* Saran Lim. <saranl@ecosoft.co.th>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This module will serve as a bridge between invoice plan the RFQ and PO processes in an isolated manner.
9.23 KB
Loading

0 commit comments

Comments
 (0)