From 1602e240aee8337788924836f45f467f9f620865 Mon Sep 17 00:00:00 2001 From: Alexandre Fayolle Date: Wed, 1 Sep 2021 09:44:27 +0200 Subject: [PATCH] [FIX] agreement_stock: bump version to solve a pypi upload issue --- .../README.rst | 92 ++++ .../__init__.py | 2 + .../__manifest__.py | 23 + .../data/agreement.parameter.value.csv | 15 + .../models/__init__.py | 2 + .../models/agreement.py | 47 ++ .../models/sale_order.py | 9 + .../readme/CONTRIBUTORS.rst | 1 + .../readme/DESCRIPTION.rst | 4 + .../static/description/index.html | 433 ++++++++++++++++++ .../tools.py | 6 + .../views/agreement.xml | 63 +++ agreement_stock/__manifest__.py | 2 +- 13 files changed, 698 insertions(+), 1 deletion(-) create mode 100644 agreement_sale_condition_delivery_planning/README.rst create mode 100644 agreement_sale_condition_delivery_planning/__init__.py create mode 100644 agreement_sale_condition_delivery_planning/__manifest__.py create mode 100644 agreement_sale_condition_delivery_planning/data/agreement.parameter.value.csv create mode 100644 agreement_sale_condition_delivery_planning/models/__init__.py create mode 100644 agreement_sale_condition_delivery_planning/models/agreement.py create mode 100644 agreement_sale_condition_delivery_planning/models/sale_order.py create mode 100644 agreement_sale_condition_delivery_planning/readme/CONTRIBUTORS.rst create mode 100644 agreement_sale_condition_delivery_planning/readme/DESCRIPTION.rst create mode 100644 agreement_sale_condition_delivery_planning/static/description/index.html create mode 100644 agreement_sale_condition_delivery_planning/tools.py create mode 100644 agreement_sale_condition_delivery_planning/views/agreement.xml diff --git a/agreement_sale_condition_delivery_planning/README.rst b/agreement_sale_condition_delivery_planning/README.rst new file mode 100644 index 000000000..8d1a6ffcc --- /dev/null +++ b/agreement_sale_condition_delivery_planning/README.rst @@ -0,0 +1,92 @@ +============================= +Agreement Partner Preferences +============================= + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png + :target: https://odoo-community.org/page/development-status + :alt: Alpha +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github + :target: https://github.com/OCA/contract/tree/12.0/agreement_partner_preference + :alt: OCA/contract +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_partner_preference + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/110/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module builds on the agreement_sale_condition module. It allows setting a +preferred agreement type on a customer, and some preferences on the +partner. These preferences are defined in a special type of agreement. The +intent is that additional modules can add fields on an agreement which are m2o +on agreement parameter values. The values of customer preferences are meant to +be used in combination of the value of the template agreement of the agreement +type when the sale order is confirmed. + +.. IMPORTANT:: + This is an alpha version, the data model and design can change at any time without warning. + Only for development or testing purpose, do not use in production. + `More details on development status `_ + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Camptocamp + +Contributors +~~~~~~~~~~~~ + +* Alexandre Fayolle + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +.. |maintainer-gurneyalex| image:: https://github.com/gurneyalex.png?size=40px + :target: https://github.com/gurneyalex + :alt: gurneyalex + +Current `maintainer `__: + +|maintainer-gurneyalex| + +This module is part of the `OCA/contract `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/agreement_sale_condition_delivery_planning/__init__.py b/agreement_sale_condition_delivery_planning/__init__.py new file mode 100644 index 000000000..e47d26c5d --- /dev/null +++ b/agreement_sale_condition_delivery_planning/__init__.py @@ -0,0 +1,2 @@ +from . import tools +from . import models diff --git a/agreement_sale_condition_delivery_planning/__manifest__.py b/agreement_sale_condition_delivery_planning/__manifest__.py new file mode 100644 index 000000000..63efac0d3 --- /dev/null +++ b/agreement_sale_condition_delivery_planning/__manifest__.py @@ -0,0 +1,23 @@ +# Copyright 2019 Camptocamp +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Agreement Sale Conditions: Delivery Planning", + "summary": "Manage conditions related to delivery planning in agreements", + "version": "12.0.1.0.0", + # see https://odoo-community.org/page/development-status + "development_status": "Alpha", + "category": "Sale", + "author": "Camptocamp, Odoo Community Association (OCA)", + "maintainers": ["gurneyalex"], + "license": "AGPL-3", + "application": False, + "installable": True, + "preloadable": True, + "depends": [ + "agreement_sale_condition_base", + ], + "data": [ + 'data/agreement.parameter.value.csv', + "views/agreement.xml", + ], +} diff --git a/agreement_sale_condition_delivery_planning/data/agreement.parameter.value.csv b/agreement_sale_condition_delivery_planning/data/agreement.parameter.value.csv new file mode 100644 index 000000000..523b2be41 --- /dev/null +++ b/agreement_sale_condition_delivery_planning/data/agreement.parameter.value.csv @@ -0,0 +1,15 @@ +id,sequence,parameter,code,name +value_req_so_delivery_lead_time_next_day,30,req_so_delivery_lead_time,next_day,Order entry day + 1 +value_req_so_delivery_lead_time_week_day,31,req_so_delivery_lead_time,week_day,Defined delivery sequence (fixed week day) +value_req_so_delivery_lead_time_fixed_date,32,req_so_delivery_lead_time,fixed_date,Defined day of delivery (non repetitive) +value_req_so_delivery_lead_time_same_day,33,req_so_delivery_lead_time,same_day,Same day (Flash delivery) +value_req_so_transport_chosen_by_company,38,req_so_transport,chosen_by_company,Chosen by Company +value_req_so_transport_post,39,req_so_transport,post,Post +value_req_so_transport_pickup,41,req_so_transport,pickup,Pick Up +value_req_cust_delivery_window_before9,23,req_cust_delivery_window,before9,Before 9:00 +value_req_cust_delivery_window_day,24,req_cust_delivery_window,day,Between 8:00 and 17:00 +value_req_cust_delivery_window_morning,25,req_cust_delivery_window,morning,Morning (8:00 to 12:00) +value_req_cust_delivery_window_afternoon,26,req_cust_delivery_window,afternoon,Afternonon (13:00 to 17:00) +value_req_cust_delivery_window_custom,27,req_cust_delivery_window,custom,Specific 1h slot +value_req_cust_preadvice_email_seller,28,req_cust_preadvice,email_seller,"Electronically, by Company" +value_req_cust_preadvice_phone_transporter,29,req_cust_preadvice,phone_transporter,"By phone, by Transporter" diff --git a/agreement_sale_condition_delivery_planning/models/__init__.py b/agreement_sale_condition_delivery_planning/models/__init__.py new file mode 100644 index 000000000..0a9283ff2 --- /dev/null +++ b/agreement_sale_condition_delivery_planning/models/__init__.py @@ -0,0 +1,2 @@ +from . import agreement +from . import sale_order diff --git a/agreement_sale_condition_delivery_planning/models/agreement.py b/agreement_sale_condition_delivery_planning/models/agreement.py new file mode 100644 index 000000000..27e3f0fc3 --- /dev/null +++ b/agreement_sale_condition_delivery_planning/models/agreement.py @@ -0,0 +1,47 @@ +# Copyright 2019 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo import api, fields, models + + +class Agreement(models.Model): + _inherit = 'agreement' + + req_so_delivery_lead_time = fields.Many2one( + 'agreement.parameter.value', + string='Order kept open', + domain=[ + ('parameter', '=', + 'req_so_delivery_lead_time') + ], + ) + req_so_transport = fields.Many2one( + 'agreement.parameter.value', + string='Back order shipment', + domain=[ + ('parameter', '=', 'req_so_transport') + ], + ) + req_cust_delivery_window = fields.Many2one( + 'agreement.parameter.value', + string='Partial deliveries', + domain=[('parameter', '=', 'req_cust_delivery_window')], + ) + req_cust_preadvice = fields.Many2one( + 'agreement.parameter.value', + string='Partial deliveries', + domain=[('parameter', '=', 'req_cust_preadvice')], + ) + + @api.model + def _get_customer_agreement_fields(self): + return super()._get_customer_agreement_fields() + [ + 'req_cust_preadvice', + 'req_cust_delivery_window', + ] + + @api.model + def _get_sale_agreement_fields(self): + return super()._get_sale_agreement_fields() + [ + 'req_so_transport', + 'req_so_delivery_lead_time', + ] diff --git a/agreement_sale_condition_delivery_planning/models/sale_order.py b/agreement_sale_condition_delivery_planning/models/sale_order.py new file mode 100644 index 000000000..29f6652a0 --- /dev/null +++ b/agreement_sale_condition_delivery_planning/models/sale_order.py @@ -0,0 +1,9 @@ +# Copyright 2019 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo import api, models + + +class SaleOrder(models.Model): + _inherit = "sale.order" + + # XXX diff --git a/agreement_sale_condition_delivery_planning/readme/CONTRIBUTORS.rst b/agreement_sale_condition_delivery_planning/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..8785f72c0 --- /dev/null +++ b/agreement_sale_condition_delivery_planning/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Alexandre Fayolle diff --git a/agreement_sale_condition_delivery_planning/readme/DESCRIPTION.rst b/agreement_sale_condition_delivery_planning/readme/DESCRIPTION.rst new file mode 100644 index 000000000..ca746177b --- /dev/null +++ b/agreement_sale_condition_delivery_planning/readme/DESCRIPTION.rst @@ -0,0 +1,4 @@ +This module builds on the agreement_sale_condition_base module. + +It allows defining conditions and preferences related to delivery planning + diff --git a/agreement_sale_condition_delivery_planning/static/description/index.html b/agreement_sale_condition_delivery_planning/static/description/index.html new file mode 100644 index 000000000..7e8d0a368 --- /dev/null +++ b/agreement_sale_condition_delivery_planning/static/description/index.html @@ -0,0 +1,433 @@ + + + + + + +Agreement Partner Preferences + + + +
+

Agreement Partner Preferences

+ + +

Alpha License: AGPL-3 OCA/contract Translate me on Weblate Try me on Runbot

+

This module builds on the agreement_sale_condition module. It allows setting a +preferred agreement type on a customer, and some preferences on the +partner. These preferences are defined in a special type of agreement. The +intent is that additional modules can add fields on an agreement which are m2o +on agreement parameter values. The values of customer preferences are meant to +be used in combination of the value of the template agreement of the agreement +type when the sale order is confirmed.

+
+

Important

+

This is an alpha version, the data model and design can change at any time without warning. +Only for development or testing purpose, do not use in production. +More details on development status

+
+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Camptocamp
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

Current maintainer:

+

gurneyalex

+

This module is part of the OCA/contract project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/agreement_sale_condition_delivery_planning/tools.py b/agreement_sale_condition_delivery_planning/tools.py new file mode 100644 index 000000000..53f141b2e --- /dev/null +++ b/agreement_sale_condition_delivery_planning/tools.py @@ -0,0 +1,6 @@ +def _default_sequence(self): + maxrec = self.search([], order='sequence desc', limit=1) + if maxrec: + return maxrec.sequence + 10 + else: + return 0 diff --git a/agreement_sale_condition_delivery_planning/views/agreement.xml b/agreement_sale_condition_delivery_planning/views/agreement.xml new file mode 100644 index 000000000..ec95b243c --- /dev/null +++ b/agreement_sale_condition_delivery_planning/views/agreement.xml @@ -0,0 +1,63 @@ + + + + + agreement.form (customer invoicing preferences) + agreement + + + + + + + + + + + + + + + + + + + agreement.form (sale order version) + agreement + + + + + + + + + + + + + + + + + + + + agreement.form (template version) + agreement + + + + + + + + + + + + + + + + diff --git a/agreement_stock/__manifest__.py b/agreement_stock/__manifest__.py index ea7b5ce11..f76d2f34f 100644 --- a/agreement_stock/__manifest__.py +++ b/agreement_stock/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Agreement - Stock", "summary": "Link picking to an agreement", - "version": "14.0.1.0.0", + "version": "14.0.1.0.1", "category": "Contract", "author": "Open Source Integrators, " "Odoo Community Association (OCA)", "website": "https://github.com/OCA/contract",