Skip to content

Commit c6b85f6

Browse files
[18.0][5862][ADD] sale_pricelist_from_commitment_date (#121)
[18.0][5862][ADD] sale_pricelist_from_commitment_date (#121)
1 parent 69b66b6 commit c6b85f6

22 files changed

Lines changed: 1060 additions & 0 deletions
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
.. image:: https://odoo-community.org/readme-banner-image
2+
:target: https://odoo-community.org/get-involved?utm_source=readme
3+
:alt: Odoo Community Association
4+
5+
===================================
6+
Sale Pricelist From Commitment Date
7+
===================================
8+
9+
..
10+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11+
!! This file is generated by oca-gen-addon-readme !!
12+
!! changes will be overwritten. !!
13+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14+
!! source digest: sha256:f7cb9a3371d9e916481865df469b90de09062e21e5d03d9af3d450927153ab7c
15+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16+
17+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
18+
:target: https://odoo-community.org/page/development-status
19+
:alt: Beta
20+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
21+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
22+
:alt: License: AGPL-3
23+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github
24+
:target: https://github.com/OCA/sale-workflow/tree/18.0/sale_pricelist_from_commitment_date
25+
:alt: OCA/sale-workflow
26+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27+
:target: https://translation.odoo-community.org/projects/sale-workflow-18-0/sale-workflow-18-0-sale_pricelist_from_commitment_date
28+
:alt: Translate me on Weblate
29+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=18.0
31+
:alt: Try me on Runboat
32+
33+
|badge1| |badge2| |badge3| |badge4| |badge5|
34+
35+
When the sale order commitment date is set, this date is used by
36+
pricelist to compute price unit instead of using order date.
37+
38+
This module also provides configuration options to enhance the Delivery
39+
Date field visibility and requirement. The Delivery Date field can be
40+
displayed in header (after the Quotation/Order Date field) for better
41+
visibility, and can optionally be made mandatory on sales orders.
42+
43+
**Table of contents**
44+
45+
.. contents::
46+
:local:
47+
48+
Configuration
49+
=============
50+
51+
Go to Sales → Configuration → Settings to configure the following
52+
options:
53+
54+
**Show Delivery Date in Header**
55+
56+
- Display the Delivery Date field in header (after the Quotation/Order
57+
Date field) on the sales order form for better visibility.
58+
59+
**Require Delivery Date**
60+
61+
- Make the Delivery Date field mandatory on sales orders.
62+
63+
Bug Tracker
64+
===========
65+
66+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/issues>`_.
67+
In case of trouble, please check there if your issue has already been reported.
68+
If you spotted it first, help us to smash it by providing a detailed and welcomed
69+
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_pricelist_from_commitment_date%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
70+
71+
Do not contact contributors directly about support or help with technical issues.
72+
73+
Credits
74+
=======
75+
76+
Authors
77+
-------
78+
79+
* Camptocamp
80+
81+
Contributors
82+
------------
83+
84+
- Julien Coux <[email protected]>
85+
- Quartile <https://www.quartile.co>
86+
87+
- Yoshi Tashiro
88+
- Aung Ko Ko Lin
89+
90+
Maintainers
91+
-----------
92+
93+
This module is maintained by the OCA.
94+
95+
.. image:: https://odoo-community.org/logo.png
96+
:alt: Odoo Community Association
97+
:target: https://odoo-community.org
98+
99+
OCA, or the Odoo Community Association, is a nonprofit organization whose
100+
mission is to support the collaborative development of Odoo features and
101+
promote its widespread use.
102+
103+
This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/18.0/sale_pricelist_from_commitment_date>`_ project on GitHub.
104+
105+
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).
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 2021 Camptocamp
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
{
4+
"name": "Sale Pricelist From Commitment Date",
5+
"summary": "Use sale order commitment date to compute line price from pricelist",
6+
"version": "18.0.1.0.0",
7+
"category": "Sale",
8+
"website": "https://github.com/OCA/sale-workflow",
9+
"author": "Camptocamp, Odoo Community Association (OCA)",
10+
"license": "AGPL-3",
11+
"depends": ["sale"],
12+
"data": [
13+
"views/res_config_settings_views.xml",
14+
"views/sale_order_views.xml",
15+
],
16+
"installable": True,
17+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * sale_pricelist_from_commitment_date
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 16.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2023-12-18 20:10+0000\n"
10+
"Last-Translator: Ivorra78 <[email protected]>\n"
11+
"Language-Team: none\n"
12+
"Language: es\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 4.17\n"
18+
19+
#. module: sale_pricelist_from_commitment_date
20+
#: model:ir.model,name:sale_pricelist_from_commitment_date.model_product_pricelist
21+
msgid "Pricelist"
22+
msgstr "Lista de Precios"
23+
24+
#. module: sale_pricelist_from_commitment_date
25+
#: model:ir.model,name:sale_pricelist_from_commitment_date.model_product_pricelist_item
26+
msgid "Pricelist Rule"
27+
msgstr "Regla de la lista de Precios"
28+
29+
#. module: sale_pricelist_from_commitment_date
30+
#: model:ir.model,name:sale_pricelist_from_commitment_date.model_sale_order_line
31+
msgid "Sales Order Line"
32+
msgstr "Línea de Orden de Venta"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * sale_pricelist_from_commitment_date
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 16.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2024-12-31 15:06+0000\n"
10+
"Last-Translator: samibc2c <[email protected]>\n"
11+
"Language-Team: none\n"
12+
"Language: fr\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n > 1;\n"
17+
"X-Generator: Weblate 5.6.2\n"
18+
19+
#. module: sale_pricelist_from_commitment_date
20+
#: model:ir.model,name:sale_pricelist_from_commitment_date.model_product_pricelist
21+
msgid "Pricelist"
22+
msgstr "Liste de prix"
23+
24+
#. module: sale_pricelist_from_commitment_date
25+
#: model:ir.model,name:sale_pricelist_from_commitment_date.model_product_pricelist_item
26+
msgid "Pricelist Rule"
27+
msgstr "Règle de liste de prix"
28+
29+
#. module: sale_pricelist_from_commitment_date
30+
#: model:ir.model,name:sale_pricelist_from_commitment_date.model_sale_order_line
31+
msgid "Sales Order Line"
32+
msgstr "Ligne de bon de commande"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * sale_pricelist_from_commitment_date
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 16.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2023-12-07 18:33+0000\n"
10+
"Last-Translator: mymage <[email protected]>\n"
11+
"Language-Team: none\n"
12+
"Language: it\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 4.17\n"
18+
19+
#. module: sale_pricelist_from_commitment_date
20+
#: model:ir.model,name:sale_pricelist_from_commitment_date.model_product_pricelist
21+
msgid "Pricelist"
22+
msgstr "Listino prezzi"
23+
24+
#. module: sale_pricelist_from_commitment_date
25+
#: model:ir.model,name:sale_pricelist_from_commitment_date.model_product_pricelist_item
26+
msgid "Pricelist Rule"
27+
msgstr "Regola listino prezzi"
28+
29+
#. module: sale_pricelist_from_commitment_date
30+
#: model:ir.model,name:sale_pricelist_from_commitment_date.model_sale_order_line
31+
msgid "Sales Order Line"
32+
msgstr "Riga ordine di vendita"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * sale_pricelist_from_commitment_date
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 16.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: \n"
10+
"Language-Team: \n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: \n"
14+
"Plural-Forms: \n"
15+
16+
#. module: sale_pricelist_from_commitment_date
17+
#: model:ir.model,name:sale_pricelist_from_commitment_date.model_product_pricelist
18+
msgid "Pricelist"
19+
msgstr ""
20+
21+
#. module: sale_pricelist_from_commitment_date
22+
#: model:ir.model,name:sale_pricelist_from_commitment_date.model_product_pricelist_item
23+
msgid "Pricelist Rule"
24+
msgstr ""
25+
26+
#. module: sale_pricelist_from_commitment_date
27+
#: model:ir.model,name:sale_pricelist_from_commitment_date.model_sale_order_line
28+
msgid "Sales Order Line"
29+
msgstr ""
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
2+
3+
from . import sale_order_line
4+
from . import sale_order
5+
from . import res_company
6+
from . import res_config_settings
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright 2026 Quartile (https://www.quartile.co)
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
from odoo import fields, models
5+
6+
7+
class ResCompany(models.Model):
8+
_inherit = "res.company"
9+
10+
sale_require_commitment_date = fields.Boolean()
11+
sale_commitment_date_in_header = fields.Boolean()
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2026 Quartile (https://www.quartile.co)
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
from odoo import fields, models
5+
6+
7+
class ResConfigSettings(models.TransientModel):
8+
_inherit = "res.config.settings"
9+
10+
sale_require_commitment_date = fields.Boolean(
11+
related="company_id.sale_require_commitment_date",
12+
readonly=False,
13+
)
14+
sale_commitment_date_in_header = fields.Boolean(
15+
related="company_id.sale_commitment_date_in_header",
16+
readonly=False,
17+
)

0 commit comments

Comments
 (0)