diff --git a/.eslintrc.yml b/.eslintrc.yml
index 9429bc688a..fed88d70d2 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -22,6 +22,7 @@ globals:
odoo: readonly
openerp: readonly
owl: readonly
+ luxon: readonly
# Styling is handled by Prettier, so we only need to enable AST rules;
# see https://github.com/OCA/maintainer-quality-tools/pull/618#issuecomment-558576890
diff --git a/.gitignore b/.gitignore
index 9c283fd41f..0090721f5d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@ __pycache__/
*.py[cod]
/.venv
/.pytest_cache
+/.ruff_cache
# C extensions
*.so
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index afdbf942c5..3d992eb5e6 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -45,6 +45,11 @@ repos:
- id: oca-update-pre-commit-excluded-addons
- id: oca-fix-manifest-website
args: ["https://github.com/avanzosc/odoo-addons"]
+ - repo: https://github.com/OCA/odoo-pre-commit-hooks
+ rev: v0.0.25
+ hooks:
+ - id: oca-checks-odoo-module
+ - id: oca-checks-po
- repo: https://github.com/myint/autoflake
rev: v2.3.1
hooks:
diff --git a/account_asset_line_menu/views/account_asset_line_views.xml b/account_asset_line_menu/views/account_asset_line_views.xml
index f66422ef51..7b59811cea 100644
--- a/account_asset_line_menu/views/account_asset_line_views.xml
+++ b/account_asset_line_menu/views/account_asset_line_views.xml
@@ -5,7 +5,6 @@
account.asset.line
diff --git a/account_invoice_product_customer_code/report/account_invoice_report.xml b/account_invoice_product_customer_code/report/account_invoice_report.xml
index 094e3ff073..ae1fc41f8e 100644
--- a/account_invoice_product_customer_code/report/account_invoice_report.xml
+++ b/account_invoice_product_customer_code/report/account_invoice_report.xml
@@ -1,6 +1,10 @@
-
+
diff --git a/account_invoice_usability/views/account_move_views.xml b/account_invoice_usability/views/account_move_views.xml
index 44e3cad5e2..de6147dcf2 100644
--- a/account_invoice_usability/views/account_move_views.xml
+++ b/account_invoice_usability/views/account_move_views.xml
@@ -3,6 +3,7 @@
account.move
+ 100
diff --git a/base_import_wizard/README.rst b/base_import_wizard/README.rst
new file mode 100644
index 0000000000..fdcb6cd2e4
--- /dev/null
+++ b/base_import_wizard/README.rst
@@ -0,0 +1,39 @@
+==================
+Base Import Wizard
+==================
+
+.. |badge1| 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
+
+|badge1|
+
+Base abstract module for implementing different import wizards.
+
+**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 to smash it by providing a detailed and welcomed
+feedback.
+
+Do not contact contributors directly about support or help with technical issues.
+
+Credits
+=======
+
+Authors
+~~~~~~~
+
+* AvanzOSC
+
+Contributors
+~~~~~~~~~~~~
+
+* Oihane Crucelaegui
diff --git a/base_location_usability/views/res_city_zip_views.xml b/base_location_usability/views/res_city_zip_views.xml
index eb16fe5867..8affdaed2f 100644
--- a/base_location_usability/views/res_city_zip_views.xml
+++ b/base_location_usability/views/res_city_zip_views.xml
@@ -1,57 +1,55 @@
-
-
- res.city.zip
-
-
-
-
-
-
+
+ res.city.zip
+
+
+
+
+
-
+
+
-
- res.city.zip
-
-
-
-
-
-
-
-
-
-
-
+
+ res.city.zip
+
+
+
+
+
+
+
+
+
+
-
+
+
-
- res.city.zip
-
-
-
-
-
-
+
+ res.city.zip
+
+
+
+
+
-
-
+
+
diff --git a/contacts_import_wizard/README.rst b/contacts_import_wizard/README.rst
new file mode 100644
index 0000000000..87fe450cbd
--- /dev/null
+++ b/contacts_import_wizard/README.rst
@@ -0,0 +1,40 @@
+======================
+Contacts Import Wizard
+======================
+
+.. |badge1| 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
+
+|badge1|
+
+Module to import contacts, it allows to create / update contacts.
+
+**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 to smash it by providing a detailed and welcomed
+feedback.
+
+Do not contact contributors directly about support or help with technical issues.
+
+Credits
+=======
+
+Authors
+~~~~~~~
+
+* AvanzOSC
+
+Contributors
+~~~~~~~~~~~~
+
+* Oihane Crucelaegui
+* Ana Juaristi
diff --git a/event_registration_sale_line_contract/README.rst b/event_registration_sale_line_contract/README.rst
new file mode 100644
index 0000000000..f836bb8481
--- /dev/null
+++ b/event_registration_sale_line_contract/README.rst
@@ -0,0 +1,28 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
+ :alt: License: AGPL-3
+
+=====================================
+Event registration sale line contract
+=====================================
+
+* In event registration 2 new fields, sale contract line, and sale contract.
+
+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 smash it by providing detailed and welcomed feedback.
+
+Do not contact contributors directly about support or help with technical issues.
+
+Credits
+=======
+
+Contributors
+------------
+
+* Berezi Amubieta
+* Alfredo de la Fuente
diff --git a/event_registration_sale_line_contract/__init__.py b/event_registration_sale_line_contract/__init__.py
new file mode 100644
index 0000000000..0650744f6b
--- /dev/null
+++ b/event_registration_sale_line_contract/__init__.py
@@ -0,0 +1 @@
+from . import models
diff --git a/event_registration_sale_line_contract/__manifest__.py b/event_registration_sale_line_contract/__manifest__.py
new file mode 100644
index 0000000000..9166abf1ae
--- /dev/null
+++ b/event_registration_sale_line_contract/__manifest__.py
@@ -0,0 +1,19 @@
+# Copyright 2021 Alfredo de la Fuente - AvanzOSC
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+{
+ "name": "Event Registration Sale Line Contract",
+ "version": "16.0.1.0.0",
+ "author": "Avanzosc",
+ "website": "https://github.com/avanzosc/odoo-addons",
+ "category": "Marketing/Events",
+ "depends": [
+ "event_sale",
+ "sale_order_line_contract",
+ ],
+ "data": [
+ "views/event_registration_views.xml",
+ ],
+ "license": "AGPL-3",
+ "installable": True,
+ "auto_install": True,
+}
diff --git a/event_registration_sale_line_contract/i18n/es.po b/event_registration_sale_line_contract/i18n/es.po
new file mode 100644
index 0000000000..8810f34f89
--- /dev/null
+++ b/event_registration_sale_line_contract/i18n/es.po
@@ -0,0 +1,49 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * event_registration_sale_line_contract
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 14.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-05-25 12:40+0000\n"
+"PO-Revision-Date: 2021-05-25 12:40+0000\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: event_registration_sale_line_contract
+#: model:ir.model.fields,field_description:event_registration_sale_line_contract.field_event_registration__contract_id
+#: model_terms:ir.ui.view,arch_db:event_registration_sale_line_contract.view_registration_search
+msgid "Contract"
+msgstr "Contrato"
+
+#. module: event_registration_sale_line_contract
+#: model:ir.model.fields,field_description:event_registration_sale_line_contract.field_event_registration__contract_line_id
+#: model_terms:ir.ui.view,arch_db:event_registration_sale_line_contract.view_registration_search
+msgid "Contract line"
+msgstr "Línea contrato"
+
+#. module: event_registration_sale_line_contract
+#: model:ir.model.fields,field_description:event_registration_sale_line_contract.field_event_registration__display_name
+msgid "Display Name"
+msgstr "Nombre mostrado"
+
+#. module: event_registration_sale_line_contract
+#: model:ir.model,name:event_registration_sale_line_contract.model_event_registration
+msgid "Event Registration"
+msgstr "Registro de eventos"
+
+#. module: event_registration_sale_line_contract
+#: model:ir.model.fields,field_description:event_registration_sale_line_contract.field_event_registration__id
+msgid "ID"
+msgstr ""
+
+#. module: event_registration_sale_line_contract
+#: model:ir.model.fields,field_description:event_registration_sale_line_contract.field_event_registration____last_update
+msgid "Last Modified on"
+msgstr "Última modificación el"
+
diff --git a/event_registration_sale_line_contract/i18n/even_registration_sale_line_contract.pot b/event_registration_sale_line_contract/i18n/even_registration_sale_line_contract.pot
new file mode 100644
index 0000000000..8aab7fa29e
--- /dev/null
+++ b/event_registration_sale_line_contract/i18n/even_registration_sale_line_contract.pot
@@ -0,0 +1,48 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * event_registration_sale_line_contract
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 14.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-05-25 12:40+0000\n"
+"PO-Revision-Date: 2021-05-25 12:40+0000\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: event_registration_sale_line_contract
+#: model:ir.model.fields,field_description:event_registration_sale_line_contract.field_event_registration__contract_id
+#: model_terms:ir.ui.view,arch_db:event_registration_sale_line_contract.view_registration_search
+msgid "Contract"
+msgstr ""
+
+#. module: event_registration_sale_line_contract
+#: model:ir.model.fields,field_description:event_registration_sale_line_contract.field_event_registration__contract_line_id
+#: model_terms:ir.ui.view,arch_db:event_registration_sale_line_contract.view_registration_search
+msgid "Contract line"
+msgstr ""
+
+#. module: event_registration_sale_line_contract
+#: model:ir.model.fields,field_description:event_registration_sale_line_contract.field_event_registration__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: event_registration_sale_line_contract
+#: model:ir.model,name:event_registration_sale_line_contract.model_event_registration
+msgid "Event Registration"
+msgstr ""
+
+#. module: event_registration_sale_line_contract
+#: model:ir.model.fields,field_description:event_registration_sale_line_contract.field_event_registration__id
+msgid "ID"
+msgstr ""
+
+#. module: event_registration_sale_line_contract
+#: model:ir.model.fields,field_description:event_registration_sale_line_contract.field_event_registration____last_update
+msgid "Last Modified on"
+msgstr ""
diff --git a/event_registration_sale_line_contract/models/__init__.py b/event_registration_sale_line_contract/models/__init__.py
new file mode 100644
index 0000000000..6e3268f135
--- /dev/null
+++ b/event_registration_sale_line_contract/models/__init__.py
@@ -0,0 +1,3 @@
+from . import event_registration
+from . import sale_order
+from . import sale_order_line
diff --git a/event_registration_sale_line_contract/models/event_registration.py b/event_registration_sale_line_contract/models/event_registration.py
new file mode 100644
index 0000000000..3bf91cfd5c
--- /dev/null
+++ b/event_registration_sale_line_contract/models/event_registration.py
@@ -0,0 +1,27 @@
+# Copyright 2021 Alfredo de la Fuente - AvanzOSC
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+from odoo import fields, models
+
+
+class EventRegistration(models.Model):
+ _inherit = "event.registration"
+
+ contract_line_id = fields.Many2one(
+ string="Contract line", comodel_name="contract.line"
+ )
+ contract_id = fields.Many2one(
+ string="Contract",
+ comodel_name="contract.contract",
+ related="contract_line_id.contract_id",
+ store=True,
+ )
+
+ def _synchronize_so_line_values(self, so_line):
+ reg_vals = super()._synchronize_so_line_values(so_line)
+ if so_line:
+ reg_vals.update(
+ {
+ "contract_line_id": so_line.contract_line_id.id,
+ }
+ )
+ return reg_vals
diff --git a/event_registration_sale_line_contract/models/sale_order.py b/event_registration_sale_line_contract/models/sale_order.py
new file mode 100644
index 0000000000..34488cc875
--- /dev/null
+++ b/event_registration_sale_line_contract/models/sale_order.py
@@ -0,0 +1,17 @@
+# Copyright 2021 Alfredo de la Fuente - AvanzOSC
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+from odoo import models
+
+
+class SaleOrder(models.Model):
+ _inherit = "sale.order"
+
+ def _action_confirm(self):
+ result = super()._action_confirm()
+ for sale in self:
+ lines = sale.order_line.filtered(
+ lambda x: x.contract_line_id and x.event_id and x.event_ticket_id
+ )
+ if lines:
+ lines._update_event_registration_contract_line()
+ return result
diff --git a/event_registration_sale_line_contract/models/sale_order_line.py b/event_registration_sale_line_contract/models/sale_order_line.py
new file mode 100644
index 0000000000..d6542926e3
--- /dev/null
+++ b/event_registration_sale_line_contract/models/sale_order_line.py
@@ -0,0 +1,19 @@
+# Copyright 2021 Alfredo de la Fuente - AvanzOSC
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+from odoo import models
+
+
+class SaleOrderLine(models.Model):
+ _inherit = "sale.order.line"
+
+ def _update_event_registration_contract_line(self):
+ for line in self:
+ cond = [
+ ("event_id", "=", line.event_id.id),
+ ("event_ticket_id", "=", line.event_ticket_id.id),
+ ("sale_order_line_id", "=", line.id),
+ ("contract_line_id", "=", False),
+ ]
+ registration = self.env["event.registration"].search(cond)
+ if registration and len(registration) == 1:
+ registration.contract_line_id = line.contract_line_id.id
diff --git a/event_registration_sale_line_contract/tests/__init__.py b/event_registration_sale_line_contract/tests/__init__.py
new file mode 100644
index 0000000000..8fd50791a4
--- /dev/null
+++ b/event_registration_sale_line_contract/tests/__init__.py
@@ -0,0 +1 @@
+from . import test_event_registration_sale_line_contract
diff --git a/event_registration_sale_line_contract/tests/test_event_registration_sale_line_contract.py b/event_registration_sale_line_contract/tests/test_event_registration_sale_line_contract.py
new file mode 100644
index 0000000000..ce4dd9c5b1
--- /dev/null
+++ b/event_registration_sale_line_contract/tests/test_event_registration_sale_line_contract.py
@@ -0,0 +1,58 @@
+# Copyright 2021 Alfredo de la Fuente - AvanzOSC
+# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
+from odoo.tests import common, tagged
+
+
+@tagged("post_install", "-at_install")
+class TestEventRegistationSaleLineContract(common.SavepointCase):
+ @classmethod
+ def setUpClass(cls):
+ super().setUpClass()
+ cls.sale_obj = cls.env["sale.order"]
+ cls.registration_obj = cls.env["event.registration"]
+ cls.uom_unit = cls.env.ref("uom.product_uom_unit")
+ cls.event = cls.env.ref("event.event_0")
+ cls.company = cls.env["res.company"]._company_default_get("sale.order")
+ cls.partner = cls.env["res.partner"].create(
+ {
+ "name": "Partner sale order line contract",
+ "user_id": cls.env.ref("base.user_admin").id,
+ }
+ )
+ cls.product = cls.env["product.product"].create(
+ {
+ "name": "Product sale order line contract",
+ "default_code": "Psolc",
+ "uom_id": cls.uom_unit.id,
+ "uom_po_id": cls.uom_unit.id,
+ "recurring_rule_type": "monthly",
+ "recurring_interval": 1,
+ }
+ )
+ sale_line_vals = {
+ "product_id": cls.product.id,
+ "name": cls.product.name,
+ "product_uom_qty": 1,
+ "product_uom": cls.product.uom_id.id,
+ "price_unit": 100,
+ "event_id": cls.event.id,
+ }
+ sale_vals = {
+ "partner_id": cls.partner.id,
+ "partner_invoice_id": cls.partner.id,
+ "partner_shipping_id": cls.partner.id,
+ "company_id": cls.company.id,
+ "order_line": [(0, 0, sale_line_vals)],
+ }
+ cls.sale1 = cls.sale_obj.create(sale_vals)
+
+ def test_event_registration_sale_line_contract(self):
+ self.sale1._action_confirm()
+ self.assertEqual(self.sale1.count_contracts, 1)
+ self.assertEqual(len(self.sale1.contract_ids[0].contract_line_ids), 1)
+ registration_vals = {
+ "event_id": self.event.id,
+ "sale_order_line_id": self.sale1.order_line[0].id,
+ }
+ registration1 = self.registration_obj.create(registration_vals)
+ self.assertEqual(registration1.contract_id, self.sale1.contract_ids[0])
diff --git a/event_registration_sale_line_contract/views/event_registration_views.xml b/event_registration_sale_line_contract/views/event_registration_views.xml
new file mode 100644
index 0000000000..8e10542603
--- /dev/null
+++ b/event_registration_sale_line_contract/views/event_registration_views.xml
@@ -0,0 +1,50 @@
+
+
+
+ event.registration
+
+
+
+
+
+
+
+
+
+ event.registration
+
+
+
+
+
+
+
+
+
+
+
+
+
+ event.registration
+
+
+
+
+
+
+
+
+
diff --git a/machine_manager/demo/machine_model_demo.xml b/machine_manager/demo/machine_model_demo.xml
index ecdc17f5dc..7bc75607a9 100644
--- a/machine_manager/demo/machine_model_demo.xml
+++ b/machine_manager/demo/machine_model_demo.xml
@@ -1,9 +1,7 @@
-
-
-
- Personal Computer
- PC
-
-
-
+
+
+ Personal Computer
+ PC
+
+
diff --git a/machine_manager/demo/machinery_demo.xml b/machine_manager/demo/machinery_demo.xml
index 4e8e0d6703..915ba9aee3 100644
--- a/machine_manager/demo/machinery_demo.xml
+++ b/machine_manager/demo/machinery_demo.xml
@@ -1,30 +1,28 @@
-
-
-
-
- L0004
-
-
-
-
-
-
-
-
- Personal PC
- 800.0
- 2013
- SC234
-
-
-
-
-
-
+
+
+
+ L0004
+
+
+
+
+
+
+
+
+ Personal PC
+ 800.0
+ 2013
+ SC234
+
+
+
+
+
diff --git a/machine_manager/security/machine_manager_security.xml b/machine_manager/security/machine_manager_security.xml
index c4c4d19f50..c20e86d290 100644
--- a/machine_manager/security/machine_manager_security.xml
+++ b/machine_manager/security/machine_manager_security.xml
@@ -1,19 +1,17 @@
-
-
-
- Machine Management
- 20
-
-
- User
-
-
-
- Manager
-
-
-
-
-
-
+
+
+ Machine Management
+ 20
+
+
+ User
+
+
+
+ Manager
+
+
+
+
+
diff --git a/machine_manager/views/machine_model_views.xml b/machine_manager/views/machine_model_views.xml
index f1c472bdd3..3ee3ada99a 100644
--- a/machine_manager/views/machine_model_views.xml
+++ b/machine_manager/views/machine_model_views.xml
@@ -1,30 +1,28 @@
-
-
- machinemodel.tree.view
- machine.model
-
-
-
-
-
-
-
+
+ machinemodel.tree.view
+ machine.model
+
+
+
+
+
+
+
-
- Machine Model
- ir.actions.act_window
- machine.model
- tree
-
-
+
+ Machine Model
+ ir.actions.act_window
+ machine.model
+ tree
+
+
-
-
+
diff --git a/machine_manager/views/machine_views.xml b/machine_manager/views/machine_views.xml
index 672a6d83a4..4f5d3d8455 100644
--- a/machine_manager/views/machine_views.xml
+++ b/machine_manager/views/machine_views.xml
@@ -1,166 +1,158 @@
-
-
-
+
+
-
+
-
+
-
- machine.form.view
- machine
-
-
+
+
-
- machine.tree.view
- machine
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ machine.tree.view
+ machine
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- machine.search.view
- machine
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ machine.search.view
+ machine
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- Machines
- machine
- tree,form
-
+
+ Machines
+ machine
+ tree,form
+
-
-
+
diff --git a/machine_manager/views/product_views.xml b/machine_manager/views/product_views.xml
index e27d5fbe65..7e6aa54111 100644
--- a/machine_manager/views/product_views.xml
+++ b/machine_manager/views/product_views.xml
@@ -1,52 +1,50 @@
-
-
- product.template
-
-
-
-
-
+
+ product.template
+
+
+
+
-
+
+
-
- Machine
- machine
-
- tree,form
- [('product_id', '=', active_id)]
- {'search_default_product_id': active_id, 'default_product_id': active_id}
-
+
+ Machine
+ machine
+
+ tree,form
+ [('product_id', '=', active_id)]
+ {'search_default_product_id': active_id, 'default_product_id': active_id}
+
-
- product.product
-
-
-
-
-
-
-
-
-
-
-
-
- Machines
-
-
-
-
+
+ product.product
+
+
+
+
-
-
+
+
+
+
+
+
+
+ Machines
+
+
+
+
+
+
diff --git a/machine_manager_product_manufacturer/views/machine_views.xml b/machine_manager_product_manufacturer/views/machine_views.xml
index d638e9c3a0..b25ba77bfa 100644
--- a/machine_manager_product_manufacturer/views/machine_views.xml
+++ b/machine_manager_product_manufacturer/views/machine_views.xml
@@ -1,42 +1,39 @@
-
-
- machine
-
-
-
-
-
+
+ machine
+
+
+
+
-
+
+
-
- machine
-
-
-
-
-
+
+ machine
+
+
+
+
-
+
+
-
- machine.search.view
- machine
-
-
-
-
-
-
-
-
+
+ machine
+
+
+
+
-
-
+
+
+
+
+
diff --git a/machine_manager_purchase/views/machine_views.xml b/machine_manager_purchase/views/machine_views.xml
index ef80e3d7e7..2be5c3435d 100644
--- a/machine_manager_purchase/views/machine_views.xml
+++ b/machine_manager_purchase/views/machine_views.xml
@@ -1,69 +1,66 @@
-
-
- machine
-
-
-
-
-
-
-
-
-
-
+
+ machine
+
+
+
+
+
+
+
+
+
-
+
+
-
- machine
-
-
-
-
-
-
-
-
-
+
+ machine
+
+
+
+
+
+
+
+
-
+
+
-
- machine.search.view
- machine
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ machine
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
diff --git a/machine_manager_purchase_account/views/machine_views.xml b/machine_manager_purchase_account/views/machine_views.xml
index 24f50eb6f6..f71a11e13b 100644
--- a/machine_manager_purchase_account/views/machine_views.xml
+++ b/machine_manager_purchase_account/views/machine_views.xml
@@ -1,45 +1,39 @@
-
-
- machine
-
-
-
-
-
+
+ machine
+
+
+
+
-
+
+
-
- machine
-
-
-
-
-
+
+ machine
+
+
+
+
-
+
+
-
- machine.search.view
- machine
-
-
-
-
-
-
-
-
+
+ machine
+
+
+
+
-
-
+
+
+
+
+
diff --git a/partner_contact_type/views/res_partner_type_views.xml b/partner_contact_type/views/res_partner_type_views.xml
index 8e390f1d86..53e65ce2f6 100644
--- a/partner_contact_type/views/res_partner_type_views.xml
+++ b/partner_contact_type/views/res_partner_type_views.xml
@@ -1,11 +1,9 @@
-
- res.partner.type.tree
res.partner.type
-
+
diff --git a/pdf_previewer/README.rst b/pdf_previewer/README.rst
new file mode 100644
index 0000000000..30446fa5d1
--- /dev/null
+++ b/pdf_previewer/README.rst
@@ -0,0 +1,40 @@
+=============
+PDF Previewer
+=============
+
+.. |badge1| 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
+
+|badge1|
+
+Technical module used to preview pdf files.
+
+**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 to smash it by providing a detailed and welcomed
+feedback.
+
+Do not contact contributors directly about support or help with technical issues.
+
+Credits
+=======
+
+Authors
+~~~~~~~
+
+* AvanzOSC
+
+Contributors
+~~~~~~~~~~~~
+
+* Mikel Arregi
+* Oihane Crucelaegui
diff --git a/product_alternative_sale_code/wizard/wiz_generate_alternative_sale_code_view.xml b/product_alternative_sale_code/wizard/wiz_generate_alternative_sale_code_view.xml
index dafe7bcf13..f5fa2df7b0 100644
--- a/product_alternative_sale_code/wizard/wiz_generate_alternative_sale_code_view.xml
+++ b/product_alternative_sale_code/wizard/wiz_generate_alternative_sale_code_view.xml
@@ -1,37 +1,36 @@
+
-
-
- wiz.generate.alternative.sale.code
-
-
-
- You are going to generate alternative sale code in selected products. Are you sure?
-
-
-
-
-
-
- Generate alternative sale code
- wiz.generate.alternative.sale.code
- form
- new
-
-
-
-
-
+
+ wiz.generate.alternative.sale.code
+
+
+
+ You are going to generate alternative sale code in selected products. Are you sure?
+
+
+
+
+
+
+ Generate alternative sale code
+ wiz.generate.alternative.sale.code
+ form
+ new
+
+
+
+
diff --git a/product_auto_reordering_rule/wizard/wiz_create_auto_reordering_rule_view.xml b/product_auto_reordering_rule/wizard/wiz_create_auto_reordering_rule_view.xml
index d40c2d6979..510016a478 100644
--- a/product_auto_reordering_rule/wizard/wiz_create_auto_reordering_rule_view.xml
+++ b/product_auto_reordering_rule/wizard/wiz_create_auto_reordering_rule_view.xml
@@ -1,60 +1,47 @@
+
-
-
- wiz.create.auto.reordering.rule.form
- wiz.create.auto.reordering.rule
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ wiz.create.auto.reordering.rule
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- Create reordering rules
- wiz.create.auto.reordering.rule
-
-
-
+
+ Create reordering rules
+ wiz.create.auto.reordering.rule
+
+
diff --git a/product_category_sale_price/wizard/wiz_change_product_category_sale_price_view.xml b/product_category_sale_price/wizard/wiz_change_product_category_sale_price_view.xml
index 318236e86a..2d65affca7 100644
--- a/product_category_sale_price/wizard/wiz_change_product_category_sale_price_view.xml
+++ b/product_category_sale_price/wizard/wiz_change_product_category_sale_price_view.xml
@@ -1,44 +1,38 @@
+
-
-
- wiz.change.product.category.sale.price
-
-
-
-
-
-
-
-
-
-
- Change product category sale price
- wiz.change.product.category.sale.price
-
- form
- new
-
-
+
+ wiz.change.product.category.sale.price
+
+
+
+
+
+
+
+
+
+
+
+ Change product category sale price
+ wiz.change.product.category.sale.price
+
+ form
+ new
+
+
diff --git a/product_category_sale_price/wizard/wiz_change_product_pvp_manual_view.xml b/product_category_sale_price/wizard/wiz_change_product_pvp_manual_view.xml
index e1b98550cf..f7233e2934 100644
--- a/product_category_sale_price/wizard/wiz_change_product_pvp_manual_view.xml
+++ b/product_category_sale_price/wizard/wiz_change_product_pvp_manual_view.xml
@@ -1,43 +1,38 @@
+
-
-
- wiz.change.product.pvp.manual
-
-
-
-
-
-
-
-
-
-
- Change PsP manual in products
- wiz.change.product.pvp.manual
-
- form
- new
-
-
+
+ wiz.change.product.pvp.manual
+
+
+
+
+
+
+
+
+
-
+
+ Change PsP manual in products
+ wiz.change.product.pvp.manual
+
+ form
+ new
+
+
diff --git a/product_category_sale_price/wizard/wiz_recalculate_product_sale_price_view.xml b/product_category_sale_price/wizard/wiz_recalculate_product_sale_price_view.xml
index 5a105f3a83..bf1354e4f3 100644
--- a/product_category_sale_price/wizard/wiz_recalculate_product_sale_price_view.xml
+++ b/product_category_sale_price/wizard/wiz_recalculate_product_sale_price_view.xml
@@ -1,43 +1,38 @@
+
-
-
- wiz.recalculate.product.sale.price
-
-
-
- You are going to recalculate sale price in selected products. Are you sure?
-
-
-
-
-
-
- Recalculate sale price
- wiz.recalculate.product.sale.price
-
- form
- new
-
-
-
+
+ wiz.recalculate.product.sale.price
+
+
+
+ You are going to recalculate sale price in selected products. Are you sure?
+
+
+
+
+
+
+ Recalculate sale price
+ wiz.recalculate.product.sale.price
+
+ form
+ new
+
+
diff --git a/product_final/models/product_final.py b/product_final/models/product_final.py
index 281cd16acd..6919881f66 100644
--- a/product_final/models/product_final.py
+++ b/product_final/models/product_final.py
@@ -9,8 +9,12 @@ class ProductFinal(models.Model):
_name = "product.final"
_order = "code"
- name = fields.Char(string="Name", required=True)
- code = fields.Char(string="Code", required=True)
+ name = fields.Char(
+ required=True,
+ )
+ code = fields.Char(
+ required=True,
+ )
def name_get(self):
result = []
@@ -39,8 +43,13 @@ def _check_unique_code(self):
if f:
raise UserError(
_(
- 'You are putting the code "%s" to the name "%s", and '
- 'that code already exists for the name "%s".'
+ 'You are putting the code "%(final_code)s" to the name '
+ '"%(final_name)s", and that code already exists for the name '
+ '"%(name)s".'
)
- % (final.code, final.name, f.name)
+ % {
+ "final_code": final.code,
+ "final_name": final.name,
+ "name": f.name,
+ }
)
diff --git a/product_final/models/product_location_exploded.py b/product_final/models/product_location_exploded.py
index 26cb4da10d..a798e57f60 100644
--- a/product_final/models/product_location_exploded.py
+++ b/product_final/models/product_location_exploded.py
@@ -9,9 +9,13 @@ class ProductLocationExploded(models.Model):
_rec_name = "product_final_id"
product_final_id = fields.Many2one(
- comodel_name="product.final", string="Final Product", required=True
+ comodel_name="product.final",
+ string="Final Product",
+ required=True,
)
- position = fields.Char(string="Position")
+ position = fields.Char()
product_id = fields.Many2one(
- comodel_name="product.product", string="Product", required=True
+ comodel_name="product.product",
+ string="Product",
+ required=True,
)
diff --git a/product_import_wizard/README.rst b/product_import_wizard/README.rst
new file mode 100644
index 0000000000..2849a45e16
--- /dev/null
+++ b/product_import_wizard/README.rst
@@ -0,0 +1,39 @@
+=====================
+Product Import Wizard
+=====================
+
+.. |badge1| 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
+
+|badge1|
+
+
+
+**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 to smash it by providing a detailed and welcomed
+feedback.
+
+Do not contact contributors directly about support or help with technical issues.
+
+Credits
+=======
+
+Authors
+~~~~~~~
+
+* AvanzOSC
+
+Contributors
+~~~~~~~~~~~~
+
+* Oihane Crucelaegui
diff --git a/product_price_by_pricelist/views/product_price_by_pricelist_view.xml b/product_price_by_pricelist/views/product_price_by_pricelist_view.xml
index 7b5ca9dc5b..3864cf748c 100644
--- a/product_price_by_pricelist/views/product_price_by_pricelist_view.xml
+++ b/product_price_by_pricelist/views/product_price_by_pricelist_view.xml
@@ -1,10 +1,9 @@
- product.price.by.pricelist.view.tree
product.price.by.pricelist
-
+
@@ -13,7 +12,6 @@
- product.price.by.pricelist.view.search
product.price.by.pricelist
diff --git a/product_sale_configuration/models/product_category_sale_price.py b/product_sale_configuration/models/product_category_sale_price.py
index 6e7b952152..ebd842d287 100644
--- a/product_sale_configuration/models/product_category_sale_price.py
+++ b/product_sale_configuration/models/product_category_sale_price.py
@@ -28,9 +28,13 @@ def _compute_count_products(self):
def name_get(self):
res = []
for price in self:
- name = _("{}: % Increment: {}, Fixed amount: {}").format(
- price.name, price.percentage, price.fixed_amount
- )
+ name = _(
+ "%(price_name)s: % Increment: %(percentage)s, Fixed amount: %(fixed_amount)s"
+ ) % {
+ "price_name": price.name,
+ "percentage": price.percentage,
+ "fixed_amount": price.fixed_amount,
+ }
res.append((price.id, name))
return res
diff --git a/product_second_name/models/product_product.py b/product_second_name/models/product_product.py
index a6e6cb3c75..d81d80e7bb 100644
--- a/product_second_name/models/product_product.py
+++ b/product_second_name/models/product_product.py
@@ -250,4 +250,4 @@ def _ir_cron_name_products_by_language(self):
),
}
)
- self._cr.commit()
+ self._cr.commit() # pylint: disable=E8102
diff --git a/product_supplierinfo_round_purchase_qty/views/product_supplierinfo_view.xml b/product_supplierinfo_round_purchase_qty/views/product_supplierinfo_view.xml
index f6a4afca5a..548c734315 100644
--- a/product_supplierinfo_round_purchase_qty/views/product_supplierinfo_view.xml
+++ b/product_supplierinfo_round_purchase_qty/views/product_supplierinfo_view.xml
@@ -1,26 +1,24 @@
-
-
- product.supplierinfo
-
-
-
-
-
+
+ product.supplierinfo
+
+
+
+
-
+
+
-
- product.supplierinfo
-
-
-
-
-
-
-
-
-
-
+
+ product.supplierinfo
+
+
+
+
+
+
+
+
+
diff --git a/product_template_lineal/views/product_lineal_views.xml b/product_template_lineal/views/product_lineal_views.xml
index 3f92187f71..1502c8158f 100644
--- a/product_template_lineal/views/product_lineal_views.xml
+++ b/product_template_lineal/views/product_lineal_views.xml
@@ -2,10 +2,9 @@
- product_lineal.tree
product.lineal
-
+
diff --git a/purchase_order_line_qty_by_packaging/views/purchase_order_views.xml b/purchase_order_line_qty_by_packaging/views/purchase_order_views.xml
index a461784a62..26d8c1aaf6 100644
--- a/purchase_order_line_qty_by_packaging/views/purchase_order_views.xml
+++ b/purchase_order_line_qty_by_packaging/views/purchase_order_views.xml
@@ -3,6 +3,7 @@
purchase.order
+ 100
- building.section.view.tree
building.section
-
+
@@ -17,7 +16,6 @@
- building.section.view.filter
building.section
diff --git a/res_partner_building_use_section/views/building_use_views.xml b/res_partner_building_use_section/views/building_use_views.xml
index fb18805c0b..82f0503a27 100644
--- a/res_partner_building_use_section/views/building_use_views.xml
+++ b/res_partner_building_use_section/views/building_use_views.xml
@@ -1,10 +1,9 @@
- building.use.view.tree
building.use
-
+
diff --git a/res_partner_building_use_section/views/res_partner_views.xml b/res_partner_building_use_section/views/res_partner_views.xml
index 4ef6fe9f20..31a94426c7 100644
--- a/res_partner_building_use_section/views/res_partner_views.xml
+++ b/res_partner_building_use_section/views/res_partner_views.xml
@@ -44,11 +44,7 @@
-
+
diff --git a/res_partner_business_area/views/res_partner_business_area_views.xml b/res_partner_business_area/views/res_partner_business_area_views.xml
index 50b3d7e1b6..be974d462a 100644
--- a/res_partner_business_area/views/res_partner_business_area_views.xml
+++ b/res_partner_business_area/views/res_partner_business_area_views.xml
@@ -1,31 +1,29 @@
-
-
- res.partner.business.area.tree.view
- res.partner.business.area
-
-
-
-
-
-
+
+ res.partner.business.area.tree.view
+ res.partner.business.area
+
+
+
+
+
+
-
- Business areas
- ir.actions.act_window
- res.partner.business.area
- tree
-
-
+
+ Business areas
+ ir.actions.act_window
+ res.partner.business.area
+ tree
+
+
-
-
+
diff --git a/res_partner_business_area/views/res_partner_views.xml b/res_partner_business_area/views/res_partner_views.xml
index 2a0ca652ed..21fc2a8e34 100644
--- a/res_partner_business_area/views/res_partner_views.xml
+++ b/res_partner_business_area/views/res_partner_views.xml
@@ -1,41 +1,39 @@
-
-
- res.partner
-
-
-
-
-
+
+ res.partner
+
+
+
+
-
+
+
-
- res.partner
-
-
-
-
-
+
+ res.partner
+
+
+
+
-
+
+
-
- res.partner
-
-
-
-
-
-
-
-
+
+ res.partner
+
+
+
+
-
-
+
+
+
+
+
diff --git a/res_partner_market/views/res_partner_market_views.xml b/res_partner_market/views/res_partner_market_views.xml
index a03b5db8bb..3541b4f48f 100644
--- a/res_partner_market/views/res_partner_market_views.xml
+++ b/res_partner_market/views/res_partner_market_views.xml
@@ -1,10 +1,9 @@
- res.partner.market.tree.view
res.partner.market
-
+
diff --git a/res_partner_pick_up_point/README.rst b/res_partner_pick_up_point/README.rst
new file mode 100644
index 0000000000..61f7afea65
--- /dev/null
+++ b/res_partner_pick_up_point/README.rst
@@ -0,0 +1,40 @@
+.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
+ :target: https://www.gnu.org/licenses/agpl
+ :alt: License: AGPL-3
+
+=========================
+Res Partner Pick Up Point
+=========================
+
+This module enhances the functionality of Odoo's Sales Orders by automatically setting the shipping address based on a designated "Pick Up Point" assigned to the customer. If a customer has a specific pick up point defined, that pick up point will be used as the shipping address for their orders.
+
+Usage
+-----
+
+The module achieves this behavior through the following modifications to the `sale.order` model:
+
+- **`onchange_partner_id` method**: This method is triggered whenever the `partner_id` field changes in the Sales Order form. It checks if the customer (`partner_id`) has a `pick_up_point_id` assigned. If so, it sets `partner_shipping_id` to this pick up point.
+
+- **`create` method**: This method is overridden to intercept the creation of new Sales Orders (`sale.order`). If a `partner_id` is provided but `partner_shipping_id` is not specified, it checks if the associated partner (`res.partner`) has a `pick_up_point_id`. If yes, it assigns this pick up point as `partner_shipping_id`.
+
+- **`write` method**: This method is overridden to handle updates to existing Sales Orders. If `partner_id` is included in the update and `partner_shipping_id` is not specified, it checks if the associated partner (`res.partner`) has a `pick_up_point_id`. If yes, it assigns this pick up point as `partner_shipping_id`.
+
+
+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 smash it by providing detailed and welcomed feedback.
+
+Do not contact contributors directly about support or help with technical issues.
+
+Credits
+=======
+
+Contributors
+------------
+
+* Ana Juaristi
+* Unai Beristain
diff --git a/res_partner_pick_up_point/__init__.py b/res_partner_pick_up_point/__init__.py
new file mode 100644
index 0000000000..0650744f6b
--- /dev/null
+++ b/res_partner_pick_up_point/__init__.py
@@ -0,0 +1 @@
+from . import models
diff --git a/res_partner_pick_up_point/__manifest__.py b/res_partner_pick_up_point/__manifest__.py
new file mode 100644
index 0000000000..61a812aca4
--- /dev/null
+++ b/res_partner_pick_up_point/__manifest__.py
@@ -0,0 +1,17 @@
+{
+ "name": "Partner Pick Up Point",
+ "version": "16.0.1.0.0",
+ "category": "Extra Tools",
+ "summary": "Adds a pick up point field to partners and automates its use in sales orders",
+ "author": "AvanzOSC",
+ "license": "AGPL-3",
+ "website": "https://github.com/avanzosc/odoo-addons",
+ "depends": [
+ "base",
+ "sale",
+ ],
+ "data": [
+ "views/res_partner_views.xml",
+ ],
+ "installable": True,
+}
diff --git a/res_partner_pick_up_point/i18n/es.po b/res_partner_pick_up_point/i18n/es.po
new file mode 100644
index 0000000000..d07a2fd515
--- /dev/null
+++ b/res_partner_pick_up_point/i18n/es.po
@@ -0,0 +1,34 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * res_partner_pick_up_point
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 16.0+e\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-07-05 10:22+0000\n"
+"PO-Revision-Date: 2024-07-05 10:22+0000\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: res_partner_pick_up_point
+#: model:ir.model,name:res_partner_pick_up_point.model_res_partner
+msgid "Contact"
+msgstr "Contacto"
+
+#. module: res_partner_pick_up_point
+#: model:ir.model,name:res_partner_pick_up_point.model_sale_order
+msgid "Sales Order"
+msgstr "Pedido de Venta"
+
+#. module: res_partner_pick_up_point
+#: model_terms:ir.ui.view,arch_db:res_partner_pick_up_point.view_partner_form_inherited
+#: model_terms:ir.ui.view,arch_db:res_partner_pick_up_point.view_partner_search_inherited
+#: model:ir.model.fields,field_description:res_partner_pick_up_point.field_res_partner__pick_up_point_id
+#: model:ir.model.fields,field_description:res_partner_pick_up_point.field_res_users__pick_up_point_id
+msgid "Pick Up Point"
+msgstr "Punto de Recogida"
diff --git a/res_partner_pick_up_point/i18n/res_partner_pick_up_point.pot b/res_partner_pick_up_point/i18n/res_partner_pick_up_point.pot
new file mode 100644
index 0000000000..4d62140b57
--- /dev/null
+++ b/res_partner_pick_up_point/i18n/res_partner_pick_up_point.pot
@@ -0,0 +1,38 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * res_partner_pick_up_point
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 16.0+e\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-07-05 10:21+0000\n"
+"PO-Revision-Date: 2024-07-05 10:21+0000\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: res_partner_pick_up_point
+#: model:ir.model,name:res_partner_pick_up_point.model_res_partner
+msgid "Contact"
+msgstr ""
+
+#. module: res_partner_pick_up_point
+#: model_terms:ir.ui.view,arch_db:res_partner_pick_up_point.view_partner_form_inherited
+#: model_terms:ir.ui.view,arch_db:res_partner_pick_up_point.view_partner_search_inherited
+msgid "Pick Up Point"
+msgstr ""
+
+#. module: res_partner_pick_up_point
+#: model:ir.model,name:res_partner_pick_up_point.model_sale_order
+msgid "Sales Order"
+msgstr ""
+
+#. module: res_partner_pick_up_point
+#: model:ir.model.fields,field_description:res_partner_pick_up_point.field_res_partner__pick_up_point_id
+#: model:ir.model.fields,field_description:res_partner_pick_up_point.field_res_users__pick_up_point_id
+msgid "res.partner"
+msgstr ""
diff --git a/res_partner_pick_up_point/models/__init__.py b/res_partner_pick_up_point/models/__init__.py
new file mode 100644
index 0000000000..17c6cc85d0
--- /dev/null
+++ b/res_partner_pick_up_point/models/__init__.py
@@ -0,0 +1,2 @@
+from . import res_partner
+from . import sale_order
diff --git a/res_partner_pick_up_point/models/res_partner.py b/res_partner_pick_up_point/models/res_partner.py
new file mode 100644
index 0000000000..a3fa0bcd9b
--- /dev/null
+++ b/res_partner_pick_up_point/models/res_partner.py
@@ -0,0 +1,10 @@
+from odoo import fields, models
+
+
+class ResPartner(models.Model):
+ _inherit = "res.partner"
+
+ pick_up_point_id = fields.Many2one(
+ "res.partner",
+ "Pick Up Point",
+ )
diff --git a/res_partner_pick_up_point/models/sale_order.py b/res_partner_pick_up_point/models/sale_order.py
new file mode 100644
index 0000000000..a0782feb05
--- /dev/null
+++ b/res_partner_pick_up_point/models/sale_order.py
@@ -0,0 +1,25 @@
+from odoo import api, models
+
+
+class SaleOrder(models.Model):
+ _inherit = "sale.order"
+
+ @api.onchange("partner_id")
+ def onchange_pick_up_point_partner_id(self):
+ if self.partner_id.pick_up_point_id:
+ self.partner_shipping_id = self.partner_id.pick_up_point_id
+
+ @api.model
+ def create(self, values):
+ if "partner_id" in values and not values.get("partner_shipping_id"):
+ partner_id = self.env["res.partner"].browse(values["partner_id"])
+ if partner_id.pick_up_point_id:
+ values["partner_shipping_id"] = partner_id.pick_up_point_id.id
+ return super().create(values)
+
+ def write(self, values):
+ if "partner_id" in values and "partner_shipping_id" not in values:
+ partner_id = self.env["res.partner"].browse(values["partner_id"])
+ if partner_id.pick_up_point_id:
+ values["partner_shipping_id"] = partner_id.pick_up_point_id.id
+ return super().write(values)
diff --git a/res_partner_pick_up_point/views/res_partner_views.xml b/res_partner_pick_up_point/views/res_partner_views.xml
new file mode 100644
index 0000000000..914f23c439
--- /dev/null
+++ b/res_partner_pick_up_point/views/res_partner_views.xml
@@ -0,0 +1,45 @@
+
+
+ res.partner.form.inherited
+ res.partner
+
+
+
+
+
+
+
+
+
+
+
+ res.partner.tree.inherited
+ res.partner
+
+
+
+
+
+
+
+
+
+ res.partner.search.inherited
+ res.partner
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res_partner_state/views/res_partner_state_views.xml b/res_partner_state/views/res_partner_state_views.xml
index 8b6055204a..18b5a383fc 100644
--- a/res_partner_state/views/res_partner_state_views.xml
+++ b/res_partner_state/views/res_partner_state_views.xml
@@ -1,31 +1,28 @@
-
-
- res.partner.state.tree.view
- res.partner.state
-
-
-
-
-
-
+
+ res.partner.state
+
+
+
+
+
+
-
- States
- ir.actions.act_window
- res.partner.state
- tree
-
-
+
+ States
+ ir.actions.act_window
+ res.partner.state
+ tree
+
+
-
-
+
diff --git a/res_partner_state/views/res_partner_views.xml b/res_partner_state/views/res_partner_views.xml
index 5779dcf6ad..c572a56d35 100644
--- a/res_partner_state/views/res_partner_views.xml
+++ b/res_partner_state/views/res_partner_views.xml
@@ -1,41 +1,39 @@
-
-
- res.partner
-
-
-
-
-
+
+ res.partner
+
+
+
+
-
+
+
-
- res.partner
-
-
-
-
-
+
+ res.partner
+
+
+
+
-
+
+
-
- res.partner
-
-
-
-
-
-
-
-
+
+ res.partner
+
+
+
+
-
-
+
+
+
+
+
diff --git a/res_partner_technology/views/res_partner_technology_views.xml b/res_partner_technology/views/res_partner_technology_views.xml
index 95baf04fae..e29d19577f 100644
--- a/res_partner_technology/views/res_partner_technology_views.xml
+++ b/res_partner_technology/views/res_partner_technology_views.xml
@@ -1,31 +1,29 @@
-
-
- res.partner.technology.tree.view
- res.partner.technology
-
-
-
-
-
-
+
+ res.partner.technology.tree.view
+ res.partner.technology
+
+
+
+
+
+
-
- Technologies
- ir.actions.act_window
- res.partner.technology
- tree
-
-
+
+ Technologies
+ ir.actions.act_window
+ res.partner.technology
+ tree
+
+
-
-
+
diff --git a/res_partner_technology/views/res_partner_views.xml b/res_partner_technology/views/res_partner_views.xml
index fdd031eec7..afaa685d7d 100644
--- a/res_partner_technology/views/res_partner_views.xml
+++ b/res_partner_technology/views/res_partner_views.xml
@@ -1,41 +1,39 @@
-
-
- res.partner
-
-
-
-
-
+
+ res.partner
+
+
+
+
-
+
+
-
- res.partner
-
-
-
-
-
+
+ res.partner
+
+
+
+
-
+
+
-
- res.partner
-
-
-
-
-
-
-
-
+
+ res.partner
+
+
+
+
-
-
+
+
+
+
+
diff --git a/setup/event_registration_sale_line_contract/odoo/addons/event_registration_sale_line_contract b/setup/event_registration_sale_line_contract/odoo/addons/event_registration_sale_line_contract
new file mode 120000
index 0000000000..838050fdda
--- /dev/null
+++ b/setup/event_registration_sale_line_contract/odoo/addons/event_registration_sale_line_contract
@@ -0,0 +1 @@
+../../../../event_registration_sale_line_contract
\ No newline at end of file
diff --git a/setup/event_registration_sale_line_contract/setup.py b/setup/event_registration_sale_line_contract/setup.py
new file mode 100644
index 0000000000..28c57bb640
--- /dev/null
+++ b/setup/event_registration_sale_line_contract/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/res_partner_pick_up_point/odoo/addons/res_partner_pick_up_point b/setup/res_partner_pick_up_point/odoo/addons/res_partner_pick_up_point
new file mode 120000
index 0000000000..fbe3d070c5
--- /dev/null
+++ b/setup/res_partner_pick_up_point/odoo/addons/res_partner_pick_up_point
@@ -0,0 +1 @@
+../../../../res_partner_pick_up_point
\ No newline at end of file
diff --git a/setup/res_partner_pick_up_point/setup.py b/setup/res_partner_pick_up_point/setup.py
new file mode 100644
index 0000000000..28c57bb640
--- /dev/null
+++ b/setup/res_partner_pick_up_point/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/stock_automatic_lot_name_creation/odoo/addons/stock_automatic_lot_name_creation b/setup/stock_automatic_lot_name_creation/odoo/addons/stock_automatic_lot_name_creation
new file mode 120000
index 0000000000..84d4bc99c0
--- /dev/null
+++ b/setup/stock_automatic_lot_name_creation/odoo/addons/stock_automatic_lot_name_creation
@@ -0,0 +1 @@
+../../../../stock_automatic_lot_name_creation
\ No newline at end of file
diff --git a/setup/stock_automatic_lot_name_creation/setup.py b/setup/stock_automatic_lot_name_creation/setup.py
new file mode 100644
index 0000000000..28c57bb640
--- /dev/null
+++ b/setup/stock_automatic_lot_name_creation/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/stock_move_line_product_lot_reader/odoo/addons/stock_move_line_product_lot_reader b/setup/stock_move_line_product_lot_reader/odoo/addons/stock_move_line_product_lot_reader
new file mode 120000
index 0000000000..9e95a609ce
--- /dev/null
+++ b/setup/stock_move_line_product_lot_reader/odoo/addons/stock_move_line_product_lot_reader
@@ -0,0 +1 @@
+../../../../stock_move_line_product_lot_reader
\ No newline at end of file
diff --git a/setup/stock_move_line_product_lot_reader/setup.py b/setup/stock_move_line_product_lot_reader/setup.py
new file mode 100644
index 0000000000..28c57bb640
--- /dev/null
+++ b/setup/stock_move_line_product_lot_reader/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/website_sale_cart_line_subtotal/odoo/addons/website_sale_cart_line_subtotal b/setup/website_sale_cart_line_subtotal/odoo/addons/website_sale_cart_line_subtotal
new file mode 120000
index 0000000000..b26b14516a
--- /dev/null
+++ b/setup/website_sale_cart_line_subtotal/odoo/addons/website_sale_cart_line_subtotal
@@ -0,0 +1 @@
+../../../../website_sale_cart_line_subtotal
\ No newline at end of file
diff --git a/setup/website_sale_cart_line_subtotal/setup.py b/setup/website_sale_cart_line_subtotal/setup.py
new file mode 100644
index 0000000000..28c57bb640
--- /dev/null
+++ b/setup/website_sale_cart_line_subtotal/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/website_sale_float_cart_qty/odoo/addons/website_sale_float_cart_qty b/setup/website_sale_float_cart_qty/odoo/addons/website_sale_float_cart_qty
new file mode 120000
index 0000000000..1522a757a5
--- /dev/null
+++ b/setup/website_sale_float_cart_qty/odoo/addons/website_sale_float_cart_qty
@@ -0,0 +1 @@
+../../../../website_sale_float_cart_qty
\ No newline at end of file
diff --git a/setup/website_sale_float_cart_qty/setup.py b/setup/website_sale_float_cart_qty/setup.py
new file mode 100644
index 0000000000..28c57bb640
--- /dev/null
+++ b/setup/website_sale_float_cart_qty/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/website_sale_order_to_cart/odoo/addons/website_sale_order_to_cart b/setup/website_sale_order_to_cart/odoo/addons/website_sale_order_to_cart
new file mode 120000
index 0000000000..3c2c7b74f3
--- /dev/null
+++ b/setup/website_sale_order_to_cart/odoo/addons/website_sale_order_to_cart
@@ -0,0 +1 @@
+../../../../website_sale_order_to_cart
\ No newline at end of file
diff --git a/setup/website_sale_order_to_cart/setup.py b/setup/website_sale_order_to_cart/setup.py
new file mode 100644
index 0000000000..28c57bb640
--- /dev/null
+++ b/setup/website_sale_order_to_cart/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/setup/website_sale_remove_pay_buttons/odoo/addons/website_sale_remove_pay_buttons b/setup/website_sale_remove_pay_buttons/odoo/addons/website_sale_remove_pay_buttons
new file mode 120000
index 0000000000..bad2a6ce3d
--- /dev/null
+++ b/setup/website_sale_remove_pay_buttons/odoo/addons/website_sale_remove_pay_buttons
@@ -0,0 +1 @@
+../../../../website_sale_remove_pay_buttons
\ No newline at end of file
diff --git a/setup/website_sale_remove_pay_buttons/setup.py b/setup/website_sale_remove_pay_buttons/setup.py
new file mode 100644
index 0000000000..28c57bb640
--- /dev/null
+++ b/setup/website_sale_remove_pay_buttons/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)
diff --git a/stock_automatic_lot_name_creation/README.rst b/stock_automatic_lot_name_creation/README.rst
new file mode 100644
index 0000000000..221a0a3c0f
--- /dev/null
+++ b/stock_automatic_lot_name_creation/README.rst
@@ -0,0 +1,45 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
+ :alt: License: AGPL-3
+
+=================================
+Stock Automatic Lot Name Creation
+=================================
+
+Overview
+========
+
+The Stock Automatic Lot Name Creation module enhances the functionality of stock move lines in Odoo by automatically assigning lot names under specific conditions.
+
+Features
+========
+
+- Automatically assigns lot names to stock move lines based on certain criteria.
+- Conditions checked:
+ - If the picking type requires lot creation (`create_lots` is enabled).
+ - If the product is traceable (`product.product.tracking` is set to 'lot').
+ - If the lot name field (`lot_name`) is empty, it assigns a lot name based on the picking name and origin.
+
+
+Usage
+=====
+
+Once installed, the module will automatically handle the assignment of lot names to stock move lines based on the configured conditions.
+
+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 smash it by providing detailed and welcomed feedback.
+
+Credits
+=======
+
+Contributors
+------------
+* Ana Juaristi
+* Unai Beristain
+
+Do not contact contributors directly about support or help with technical issues.
diff --git a/stock_automatic_lot_name_creation/__init__.py b/stock_automatic_lot_name_creation/__init__.py
new file mode 100644
index 0000000000..0650744f6b
--- /dev/null
+++ b/stock_automatic_lot_name_creation/__init__.py
@@ -0,0 +1 @@
+from . import models
diff --git a/stock_automatic_lot_name_creation/__manifest__.py b/stock_automatic_lot_name_creation/__manifest__.py
new file mode 100644
index 0000000000..00a06324b7
--- /dev/null
+++ b/stock_automatic_lot_name_creation/__manifest__.py
@@ -0,0 +1,14 @@
+{
+ "name": "Stock Automatic Lot Name Creation",
+ "version": "16.0.1.0.0",
+ "summary": "Automatically assigns lot names to stock move lines under certain conditions.",
+ "category": "Warehouse",
+ "author": "AvanzOSC",
+ "website": "https://github.com/avanzosc/odoo-addons",
+ "license": "AGPL-3",
+ "depends": [
+ "base",
+ "stock",
+ ],
+ "installable": True,
+}
diff --git a/stock_automatic_lot_name_creation/models/__init__.py b/stock_automatic_lot_name_creation/models/__init__.py
new file mode 100644
index 0000000000..431f51c274
--- /dev/null
+++ b/stock_automatic_lot_name_creation/models/__init__.py
@@ -0,0 +1 @@
+from . import stock_move_line
diff --git a/stock_automatic_lot_name_creation/models/stock_move_line.py b/stock_automatic_lot_name_creation/models/stock_move_line.py
new file mode 100644
index 0000000000..d3947d322c
--- /dev/null
+++ b/stock_automatic_lot_name_creation/models/stock_move_line.py
@@ -0,0 +1,19 @@
+from odoo import api, models
+
+
+class StockMoveLine(models.Model):
+ _inherit = "stock.move.line"
+
+ @api.model_create_multi
+ def create(self, vals_list):
+ for vals in vals_list:
+ picking_id = vals.get("picking_id")
+ product_id = vals.get("product_id")
+ product = self.env["product.product"].browse(product_id)
+
+ if product and product.tracking == "lot" and not vals.get("lot_name"):
+ picking = self.env["stock.picking"].browse(picking_id)
+ origin = picking.origin or ""
+ vals["lot_name"] = f"{picking.name}-{origin}"
+
+ return super().create(vals_list)
diff --git a/stock_lot_origin_global_gap/models/stock_move_line.py b/stock_lot_origin_global_gap/models/stock_move_line.py
index 40d1f83b57..6b63face37 100644
--- a/stock_lot_origin_global_gap/models/stock_move_line.py
+++ b/stock_lot_origin_global_gap/models/stock_move_line.py
@@ -6,8 +6,11 @@
class StockMoveLine(models.Model):
_inherit = "stock.move.line"
- country_id = fields.Many2one(string="Origin", comodel_name="res.country")
- global_gap = fields.Char(string="Global Gap")
+ country_id = fields.Many2one(
+ string="Origin",
+ comodel_name="res.country",
+ )
+ global_gap = fields.Char()
lot_country_id = fields.Many2one(
string="Lot Origin",
comodel_name="res.country",
@@ -16,13 +19,18 @@ class StockMoveLine(models.Model):
related="lot_id.country_id",
)
lot_global_gap = fields.Char(
- string="Lot Global Gap", related="lot_id.ref", copy=False, store=True
+ string="Lot Global Gap",
+ related="lot_id.ref",
+ copy=False,
+ store=True,
)
lot_country_to_print = fields.Text(
- string="Lot Origin OF", compute="_compute_country_global_gap_to_print"
+ string="Lot Origin OF",
+ compute="_compute_country_global_gap_to_print",
)
lot_global_gap_to_print = fields.Text(
- string="Lot Global Gap OF", compute="_compute_country_global_gap_to_print"
+ string="Lot Global Gap OF",
+ compute="_compute_country_global_gap_to_print",
)
lot_country_gloval_gap_of = fields.Text(
string="Lot Origin/Global Gap OF",
diff --git a/stock_move_line_force_done/models/stock_picking.py b/stock_move_line_force_done/models/stock_picking.py
index bd77050b35..1340a30f7d 100644
--- a/stock_move_line_force_done/models/stock_picking.py
+++ b/stock_move_line_force_done/models/stock_picking.py
@@ -9,7 +9,9 @@ class StockPicking(models.Model):
def button_force_done_detailed_operations(self):
move_line_obj = self.env["stock.move.line"]
for picking in self:
- pending_move_lines = picking.move_line_ids.filtered(lambda l: not l.move_id)
+ pending_move_lines = picking.move_line_ids.filtered(
+ lambda ln: not ln.move_id
+ )
pending_move_lines.unlink()
for move in picking.move_ids:
if not move.move_line_ids:
diff --git a/stock_move_line_product_lot_reader/README.rst b/stock_move_line_product_lot_reader/README.rst
new file mode 100644
index 0000000000..d399ac6cde
--- /dev/null
+++ b/stock_move_line_product_lot_reader/README.rst
@@ -0,0 +1,29 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
+ :alt: License: AGPL-3
+
+==================================
+Stock move line product lot reader
+==================================
+
+* In detailed operations of pickings new field "Reader", to read with a reader
+ the "product", or "product lot", separated by a space.
+
+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 smash it by providing detailed and welcomed feedback.
+
+Do not contact contributors directly about support or help with technical issues.
+
+Credits
+=======
+
+Contributors
+------------
+
+* Alfredo de la Fuente
+* Ana Juaristi
diff --git a/stock_move_line_product_lot_reader/__init__.py b/stock_move_line_product_lot_reader/__init__.py
new file mode 100644
index 0000000000..0650744f6b
--- /dev/null
+++ b/stock_move_line_product_lot_reader/__init__.py
@@ -0,0 +1 @@
+from . import models
diff --git a/stock_move_line_product_lot_reader/__manifest__.py b/stock_move_line_product_lot_reader/__manifest__.py
new file mode 100644
index 0000000000..17020154cd
--- /dev/null
+++ b/stock_move_line_product_lot_reader/__manifest__.py
@@ -0,0 +1,15 @@
+# Copyright 2024 Alfredo de la Fuente - AvanzOSC
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+{
+ "name": "Stock Move Line Product Lot Reader",
+ "version": "16.0.1.0.0",
+ "author": "Avanzosc",
+ "website": "https://github.com/avanzosc/odoo-addons",
+ "category": "Inventory",
+ "license": "AGPL-3",
+ "depends": [
+ "stock",
+ ],
+ "data": ["views/stock_move_line_views.xml"],
+ "installable": True,
+}
diff --git a/stock_move_line_product_lot_reader/i18n/ca_ES.po b/stock_move_line_product_lot_reader/i18n/ca_ES.po
new file mode 100644
index 0000000000..eb5f7149cd
--- /dev/null
+++ b/stock_move_line_product_lot_reader/i18n/ca_ES.po
@@ -0,0 +1,49 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * stock_move_line_product_lot_reader
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 16.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-07-04 06:10+0000\n"
+"PO-Revision-Date: 2024-07-04 06:10+0000\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: stock_move_line_product_lot_reader
+#. odoo-python
+#: code:addons/stock_move_line_product_lot_reader/models/stock_move_line.py:0
+#, python-format
+msgid ""
+"Lot: %(lot)s, for product: %(product)s not found. Reader information: "
+"%(reader)s"
+msgstr ""
+
+#. module: stock_move_line_product_lot_reader
+#: model:ir.model,name:stock_move_line_product_lot_reader.model_stock_move_line
+msgid "Product Moves (Stock Move Line)"
+msgstr "Moviment del producte (línia de moviment d'estoc)"
+
+#. module: stock_move_line_product_lot_reader
+#. odoo-python
+#: code:addons/stock_move_line_product_lot_reader/models/stock_move_line.py:0
+#, python-format
+msgid "Product not found, reader information: %(reader)s"
+msgstr ""
+
+#. module: stock_move_line_product_lot_reader
+#: model:ir.model.fields,field_description:stock_move_line_product_lot_reader.field_stock_move_line__reader
+msgid "Reader"
+msgstr ""
+
+#. module: stock_move_line_product_lot_reader
+#. odoo-python
+#: code:addons/stock_move_line_product_lot_reader/models/stock_move_line.py:0
+#, python-format
+msgid "Reader product: %(product)s, not found in stock move."
+msgstr ""
diff --git a/stock_move_line_product_lot_reader/i18n/en_GB.po b/stock_move_line_product_lot_reader/i18n/en_GB.po
new file mode 100644
index 0000000000..08cbae1152
--- /dev/null
+++ b/stock_move_line_product_lot_reader/i18n/en_GB.po
@@ -0,0 +1,49 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * stock_move_line_product_lot_reader
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 16.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-07-04 06:10+0000\n"
+"PO-Revision-Date: 2024-07-04 06:10+0000\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: stock_move_line_product_lot_reader
+#. odoo-python
+#: code:addons/stock_move_line_product_lot_reader/models/stock_move_line.py:0
+#, python-format
+msgid ""
+"Lot: %(lot)s, for product: %(product)s not found. Reader information: "
+"%(reader)s"
+msgstr ""
+
+#. module: stock_move_line_product_lot_reader
+#: model:ir.model,name:stock_move_line_product_lot_reader.model_stock_move_line
+msgid "Product Moves (Stock Move Line)"
+msgstr ""
+
+#. module: stock_move_line_product_lot_reader
+#. odoo-python
+#: code:addons/stock_move_line_product_lot_reader/models/stock_move_line.py:0
+#, python-format
+msgid "Product not found, reader information: %(reader)s"
+msgstr ""
+
+#. module: stock_move_line_product_lot_reader
+#: model:ir.model.fields,field_description:stock_move_line_product_lot_reader.field_stock_move_line__reader
+msgid "Reader"
+msgstr ""
+
+#. module: stock_move_line_product_lot_reader
+#. odoo-python
+#: code:addons/stock_move_line_product_lot_reader/models/stock_move_line.py:0
+#, python-format
+msgid "Reader product: %(product)s, not found in stock move."
+msgstr ""
diff --git a/stock_move_line_product_lot_reader/i18n/es.po b/stock_move_line_product_lot_reader/i18n/es.po
new file mode 100644
index 0000000000..ca5ec7a248
--- /dev/null
+++ b/stock_move_line_product_lot_reader/i18n/es.po
@@ -0,0 +1,51 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * stock_move_line_product_lot_reader
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 16.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-07-04 06:11+0000\n"
+"PO-Revision-Date: 2024-07-04 06:11+0000\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: stock_move_line_product_lot_reader
+#. odoo-python
+#: code:addons/stock_move_line_product_lot_reader/models/stock_move_line.py:0
+#, python-format
+msgid ""
+"Lot: %(lot)s, for product: %(product)s not found. Reader information: "
+"%(reader)s"
+msgstr ""
+"Lote: %(lot)s, para producto: %(product)s no encontrado. Información lector: "
+"%(reader)s"
+
+#. module: stock_move_line_product_lot_reader
+#: model:ir.model,name:stock_move_line_product_lot_reader.model_stock_move_line
+msgid "Product Moves (Stock Move Line)"
+msgstr "Movimientos productos (Stock Move Line)"
+
+#. module: stock_move_line_product_lot_reader
+#. odoo-python
+#: code:addons/stock_move_line_product_lot_reader/models/stock_move_line.py:0
+#, python-format
+msgid "Product not found, reader information: %(reader)s"
+msgstr "Producto no encontrado, información lector: %(reader)s"
+
+#. module: stock_move_line_product_lot_reader
+#: model:ir.model.fields,field_description:stock_move_line_product_lot_reader.field_stock_move_line__reader
+msgid "Reader"
+msgstr "Lector"
+
+#. module: stock_move_line_product_lot_reader
+#. odoo-python
+#: code:addons/stock_move_line_product_lot_reader/models/stock_move_line.py:0
+#, python-format
+msgid "Reader product: %(product)s, not found in stock move."
+msgstr "Producto leido: %(product)s, no encontrado en movimiento de stock."
diff --git a/stock_move_line_product_lot_reader/i18n/fr.po b/stock_move_line_product_lot_reader/i18n/fr.po
new file mode 100644
index 0000000000..3d59d4200d
--- /dev/null
+++ b/stock_move_line_product_lot_reader/i18n/fr.po
@@ -0,0 +1,49 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * stock_move_line_product_lot_reader
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 16.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-07-04 06:10+0000\n"
+"PO-Revision-Date: 2024-07-04 06:10+0000\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: stock_move_line_product_lot_reader
+#. odoo-python
+#: code:addons/stock_move_line_product_lot_reader/models/stock_move_line.py:0
+#, python-format
+msgid ""
+"Lot: %(lot)s, for product: %(product)s not found. Reader information: "
+"%(reader)s"
+msgstr ""
+
+#. module: stock_move_line_product_lot_reader
+#: model:ir.model,name:stock_move_line_product_lot_reader.model_stock_move_line
+msgid "Product Moves (Stock Move Line)"
+msgstr "Mouvements de stock"
+
+#. module: stock_move_line_product_lot_reader
+#. odoo-python
+#: code:addons/stock_move_line_product_lot_reader/models/stock_move_line.py:0
+#, python-format
+msgid "Product not found, reader information: %(reader)s"
+msgstr ""
+
+#. module: stock_move_line_product_lot_reader
+#: model:ir.model.fields,field_description:stock_move_line_product_lot_reader.field_stock_move_line__reader
+msgid "Reader"
+msgstr ""
+
+#. module: stock_move_line_product_lot_reader
+#. odoo-python
+#: code:addons/stock_move_line_product_lot_reader/models/stock_move_line.py:0
+#, python-format
+msgid "Reader product: %(product)s, not found in stock move."
+msgstr ""
diff --git a/stock_move_line_product_lot_reader/i18n/stock_move_line_product_lot_reader.pot b/stock_move_line_product_lot_reader/i18n/stock_move_line_product_lot_reader.pot
new file mode 100644
index 0000000000..57153129c7
--- /dev/null
+++ b/stock_move_line_product_lot_reader/i18n/stock_move_line_product_lot_reader.pot
@@ -0,0 +1,49 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * stock_move_line_product_lot_reader
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 16.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-07-04 06:05+0000\n"
+"PO-Revision-Date: 2024-07-04 06:05+0000\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: stock_move_line_product_lot_reader
+#. odoo-python
+#: code:addons/stock_move_line_product_lot_reader/models/stock_move_line.py:0
+#, python-format
+msgid ""
+"Lot: %(lot)s, for product: %(product)s not found. Reader information: "
+"%(reader)s"
+msgstr ""
+
+#. module: stock_move_line_product_lot_reader
+#: model:ir.model,name:stock_move_line_product_lot_reader.model_stock_move_line
+msgid "Product Moves (Stock Move Line)"
+msgstr ""
+
+#. module: stock_move_line_product_lot_reader
+#. odoo-python
+#: code:addons/stock_move_line_product_lot_reader/models/stock_move_line.py:0
+#, python-format
+msgid "Product not found, reader information: %(reader)s"
+msgstr ""
+
+#. module: stock_move_line_product_lot_reader
+#: model:ir.model.fields,field_description:stock_move_line_product_lot_reader.field_stock_move_line__reader
+msgid "Reader"
+msgstr ""
+
+#. module: stock_move_line_product_lot_reader
+#. odoo-python
+#: code:addons/stock_move_line_product_lot_reader/models/stock_move_line.py:0
+#, python-format
+msgid "Reader product: %(product)s, not found in stock move."
+msgstr ""
diff --git a/stock_move_line_product_lot_reader/models/__init__.py b/stock_move_line_product_lot_reader/models/__init__.py
new file mode 100644
index 0000000000..431f51c274
--- /dev/null
+++ b/stock_move_line_product_lot_reader/models/__init__.py
@@ -0,0 +1 @@
+from . import stock_move_line
diff --git a/stock_move_line_product_lot_reader/models/stock_move_line.py b/stock_move_line_product_lot_reader/models/stock_move_line.py
new file mode 100644
index 0000000000..5bbc138b22
--- /dev/null
+++ b/stock_move_line_product_lot_reader/models/stock_move_line.py
@@ -0,0 +1,66 @@
+# Copyright 2024 Alfredo de la Fuente - AvanzOSC
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+from odoo import _, api, fields, models
+from odoo.exceptions import ValidationError
+
+
+class StockMoveLine(models.Model):
+ _inherit = "stock.move.line"
+
+ reader = fields.Char(copy=False)
+
+ @api.onchange("reader")
+ def onchange_reader(self):
+ if self.reader:
+ pos = self.reader.find(" ")
+ cond = [("default_code", "=", self.reader)]
+ if pos > 0:
+ default_code = self.reader[0:pos]
+ cond = [("default_code", "=", default_code)]
+ product = self.env["product.product"].search(cond, limit=1)
+ if not product:
+ message = _("Product not found, reader information: %(reader)s") % {
+ "reader": self.reader,
+ }
+ raise ValidationError(message)
+ self.product_id = product.id
+ if pos > 0:
+ name = self.reader[pos + 1 : len(self.reader)]
+ cond = [("name", "=", name), ("product_id", "=", product.id)]
+ lot = self.env["stock.lot"].search(cond, limit=1)
+ if not lot:
+ message = _(
+ "Lot: %(lot)s, for product: %(product)s not found. "
+ "Reader information: %(reader)s"
+ ) % {"lot": name, "product": product.name, "reader": self.reader}
+ raise ValidationError(message)
+ self.lot_id = lot.id
+ if "from_stock_picking" in self.env.context and self.env.context.get(
+ "from_stock_picking", False
+ ):
+ stock_move = self.picking_id.move_ids_without_package.filtered(
+ lambda x: x.product_id == product
+ )
+ if not stock_move:
+ message = _(
+ "Reader product: %(product)s, not found in stock move."
+ ) % {
+ "product": product.name,
+ }
+ raise ValidationError(message)
+ self.move_id = stock_move.id
+
+ @api.model_create_multi
+ def create(self, vals_list):
+ for values in vals_list:
+ if (
+ "reader" in values
+ and values.get("reader", False)
+ and "move_id" in values
+ and values.get("move_id", False)
+ and "product_id" not in values
+ ):
+ move = self.env["stock.move"].browse(values.get("move_id", False))
+ values["product_id"] = move.product_id.id
+ lines = super().create(vals_list)
+ return lines
diff --git a/stock_move_line_product_lot_reader/views/stock_move_line_views.xml b/stock_move_line_product_lot_reader/views/stock_move_line_views.xml
new file mode 100644
index 0000000000..50aa27f2f8
--- /dev/null
+++ b/stock_move_line_product_lot_reader/views/stock_move_line_views.xml
@@ -0,0 +1,19 @@
+
+
+
+ stock.move.line
+
+
+
+
+
+
+
+
diff --git a/stock_move_product_customer_code/report/deliveryslip_report.xml b/stock_move_product_customer_code/report/deliveryslip_report.xml
index f1c7f7e4aa..aad2dad158 100644
--- a/stock_move_product_customer_code/report/deliveryslip_report.xml
+++ b/stock_move_product_customer_code/report/deliveryslip_report.xml
@@ -1,6 +1,10 @@
-
+
@@ -9,6 +13,7 @@
diff --git a/stock_move_product_customer_code/report/stockpicking_operations_report.xml b/stock_move_product_customer_code/report/stockpicking_operations_report.xml
index b9d82cce75..e4ef9da138 100644
--- a/stock_move_product_customer_code/report/stockpicking_operations_report.xml
+++ b/stock_move_product_customer_code/report/stockpicking_operations_report.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/stock_picking_batch_grouped_move_line/i18n/es.po b/stock_picking_batch_grouped_move_line/i18n/es.po
index bd248651b0..a9e21aeb9e 100644
--- a/stock_picking_batch_grouped_move_line/i18n/es.po
+++ b/stock_picking_batch_grouped_move_line/i18n/es.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-05-10 06:22+0000\n"
-"PO-Revision-Date: 2024-05-10 06:22+0000\n"
+"POT-Creation-Date: 2024-07-03 14:58+0000\n"
+"PO-Revision-Date: 2024-07-03 14:58+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -33,7 +33,8 @@ msgstr "Cread el"
#. module: stock_picking_batch_grouped_move_line
#: model:ir.model.fields,help:stock_picking_batch_grouped_move_line.field_stock_picking_batch_grouped_move_line__product_uom_id
msgid "Default unit of measure used for all stock operations."
-msgstr "Unidad de medida por defecto usada en todlas las operaciones de stock."
+msgstr ""
+"Unidad de medida por defecto usada en todlas las operaciones de stock."
#. module: stock_picking_batch_grouped_move_line
#: model:ir.model.fields,field_description:stock_picking_batch_grouped_move_line.field_stock_picking_batch_grouped_move_line__location_dest_id
@@ -41,6 +42,7 @@ msgid "Destination location"
msgstr "Ubicación destino"
#. module: stock_picking_batch_grouped_move_line
+#: model:ir.model.fields,field_description:stock_picking_batch_grouped_move_line.field_stock_picking_batch__grouped_move_line_ids
#: model_terms:ir.ui.view,arch_db:stock_picking_batch_grouped_move_line.stock_picking_batch_form
msgid "Detailed operations grouped"
msgstr "Operaciones detalladas agrupadas"
@@ -63,7 +65,7 @@ msgstr "Realizado"
#. module: stock_picking_batch_grouped_move_line
#: model:ir.model.fields,field_description:stock_picking_batch_grouped_move_line.field_stock_picking_batch_grouped_move_line__id
msgid "ID"
-msgstr "ID"
+msgstr ""
#. module: stock_picking_batch_grouped_move_line
#: model:ir.model.fields,field_description:stock_picking_batch_grouped_move_line.field_stock_picking_batch_grouped_move_line____last_update
@@ -102,7 +104,7 @@ msgstr "Producto"
#. module: stock_picking_batch_grouped_move_line
#: model:ir.model.fields,field_description:stock_picking_batch_grouped_move_line.field_stock_picking_batch_grouped_move_line__result_packages
-msgid "Result packages"
+msgid "Result Packages"
msgstr "Paquetes destino"
#. module: stock_picking_batch_grouped_move_line
@@ -115,11 +117,6 @@ msgstr "Ubicación origen"
msgid "Source package"
msgstr "Paquetes fuente"
-#. module: stock_picking_batch_grouped_move_line
-#: model:ir.model.fields,field_description:stock_picking_batch_grouped_move_line.field_stock_picking_batch__grouped_move_line_ids
-msgid "Detailed operations grouped"
-msgstr "Operaciones detalladas agrupadas"
-
#. module: stock_picking_batch_grouped_move_line
#: model:ir.model.fields,field_description:stock_picking_batch_grouped_move_line.field_stock_picking_batch_grouped_move_line__product_uom_id
msgid "UoM"
diff --git a/stock_picking_batch_grouped_move_line/i18n/stock_picking_batch_grouped_move_line.pot b/stock_picking_batch_grouped_move_line/i18n/stock_picking_batch_grouped_move_line.pot
index 0520f33522..b6ca25e016 100644
--- a/stock_picking_batch_grouped_move_line/i18n/stock_picking_batch_grouped_move_line.pot
+++ b/stock_picking_batch_grouped_move_line/i18n/stock_picking_batch_grouped_move_line.pot
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-05-10 06:21+0000\n"
-"PO-Revision-Date: 2024-05-10 06:21+0000\n"
+"POT-Creation-Date: 2024-07-03 14:58+0000\n"
+"PO-Revision-Date: 2024-07-03 14:58+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -41,6 +41,7 @@ msgid "Destination location"
msgstr ""
#. module: stock_picking_batch_grouped_move_line
+#: model:ir.model.fields,field_description:stock_picking_batch_grouped_move_line.field_stock_picking_batch__grouped_move_line_ids
#: model_terms:ir.ui.view,arch_db:stock_picking_batch_grouped_move_line.stock_picking_batch_form
msgid "Detailed operations grouped"
msgstr ""
@@ -102,7 +103,7 @@ msgstr ""
#. module: stock_picking_batch_grouped_move_line
#: model:ir.model.fields,field_description:stock_picking_batch_grouped_move_line.field_stock_picking_batch_grouped_move_line__result_packages
-msgid "Result packages"
+msgid "Result Packages"
msgstr ""
#. module: stock_picking_batch_grouped_move_line
@@ -115,11 +116,6 @@ msgstr ""
msgid "Source package"
msgstr ""
-#. module: stock_picking_batch_grouped_move_line
-#: model:ir.model.fields,field_description:stock_picking_batch_grouped_move_line.field_stock_picking_batch__grouped_move_line_ids
-msgid "Detailed operations grouped"
-msgstr ""
-
#. module: stock_picking_batch_grouped_move_line
#: model:ir.model.fields,field_description:stock_picking_batch_grouped_move_line.field_stock_picking_batch_grouped_move_line__product_uom_id
msgid "UoM"
diff --git a/stock_picking_batch_grouped_move_line/models/stock_picking_batch.py b/stock_picking_batch_grouped_move_line/models/stock_picking_batch.py
index 55e9f9bccb..b5422073cd 100644
--- a/stock_picking_batch_grouped_move_line/models/stock_picking_batch.py
+++ b/stock_picking_batch_grouped_move_line/models/stock_picking_batch.py
@@ -100,7 +100,7 @@ def _compute_stock_move_line_grouped(self):
lines[key]["owners"] = owners
lines[key]["qty_done"] = qty_done
lines[key]["result_packages"] = result_packages
- for key, val in lines.items():
+ for _key, val in lines.items():
grouped += grouped_obj.create(val)
if grouped:
batch.grouped_move_line_ids = [(6, 0, grouped.ids)]
diff --git a/stock_picking_batch_grouped_move_line/models/stock_picking_batch_grouped_move_line.py b/stock_picking_batch_grouped_move_line/models/stock_picking_batch_grouped_move_line.py
index f7fd06eb97..1cb87cacdd 100644
--- a/stock_picking_batch_grouped_move_line/models/stock_picking_batch_grouped_move_line.py
+++ b/stock_picking_batch_grouped_move_line/models/stock_picking_batch_grouped_move_line.py
@@ -9,10 +9,17 @@ class StockPickingWaveGroupedMoveLine(models.Model):
_rec_name = "pickings"
_order = "product_id, pickings"
- pickings = fields.Char(string="Pickings", copy=False)
- packages = fields.Char(string="Source package", copy=False)
+ pickings = fields.Char(
+ copy=False,
+ )
+ packages = fields.Char(
+ string="Source package",
+ copy=False,
+ )
product_id = fields.Many2one(
- string="Product", comodel_name="product.product", copy=False
+ string="Product",
+ comodel_name="product.product",
+ copy=False,
)
product_uom_id = fields.Many2one(
string="UoM",
@@ -21,15 +28,29 @@ class StockPickingWaveGroupedMoveLine(models.Model):
copy=False,
related="product_id.uom_id",
)
- lots = fields.Char(string="Lots/Serial numbers", copy=False)
- owners = fields.Char(string="Owners", copy=False)
+ lots = fields.Char(
+ string="Lots/Serial numbers",
+ copy=False,
+ )
+ owners = fields.Char(
+ copy=False,
+ )
qty_done = fields.Float(
- string="Done", digits="Product Unit of Measure", default=0.0, copy=False
+ string="Done",
+ digits="Product Unit of Measure",
+ default=0.0,
+ copy=False,
)
location_id = fields.Many2one(
- string="Source location", comodel_name="stock.location", copy=False
+ string="Source location",
+ comodel_name="stock.location",
+ copy=False,
)
location_dest_id = fields.Many2one(
- string="Destination location", comodel_name="stock.location", copy=False
+ string="Destination location",
+ comodel_name="stock.location",
+ copy=False,
+ )
+ result_packages = fields.Char(
+ copy=False,
)
- result_packages = fields.Char(string="Result packages", copy=False)
diff --git a/stock_picking_batch_grouped_move_line/views/stock_picking_batch_view.xml b/stock_picking_batch_grouped_move_line/views/stock_picking_batch_view.xml
index 8ba7d9a686..a0e3f26a37 100644
--- a/stock_picking_batch_grouped_move_line/views/stock_picking_batch_view.xml
+++ b/stock_picking_batch_grouped_move_line/views/stock_picking_batch_view.xml
@@ -1,32 +1,30 @@
-
-
- stock.picking.batch
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ stock.picking.batch
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/stock_picking_batch_usability/views/stock_picking_batch_view.xml b/stock_picking_batch_usability/views/stock_picking_batch_view.xml
index 7b3a73e8a0..d7b567bbc0 100644
--- a/stock_picking_batch_usability/views/stock_picking_batch_view.xml
+++ b/stock_picking_batch_usability/views/stock_picking_batch_view.xml
@@ -1,36 +1,28 @@
-
-
- stock.picking.batch
-
-
-
-
-
-
-
-
-
-
+
+ stock.picking.batch
+
+
+
+
+
-
+
+
+
+
+
+
-
- stock.picking.batch
-
-
-
-
-
-
+
+ stock.picking.batch
+
+
+
+
+
-
-
+
+
diff --git a/stock_picking_usability/models/stock_picking.py b/stock_picking_usability/models/stock_picking.py
index b49b5feb4a..d756c6c8b4 100644
--- a/stock_picking_usability/models/stock_picking.py
+++ b/stock_picking_usability/models/stock_picking.py
@@ -14,10 +14,12 @@ def _action_generate_backorder_wizard(self, show_transfers=False):
)
if moves:
for move in moves:
- warning_text = _("Product: {}, quantity not send: {}").format(
- move.product_id.name,
- str(move.product_uom_qty - move.quantity_done),
- )
+ warning_text = _(
+ "Product: %(product_name)s, quantity not send: %(pending_qty)s"
+ ) % {
+ "product_name": move.product_id.name,
+ "pending_qty": str(move.product_uom_qty - move.quantity_done),
+ }
warning = (
warning_text
if not warning
diff --git a/stock_traceability_report/README.rst b/stock_traceability_report/README.rst
new file mode 100644
index 0000000000..4c64742bc2
--- /dev/null
+++ b/stock_traceability_report/README.rst
@@ -0,0 +1,39 @@
+=============
+PDF Previewer
+=============
+
+.. |badge1| 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
+
+|badge1|
+
+
+**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 to smash it by providing a detailed and welcomed
+feedback.
+
+Do not contact contributors directly about support or help with technical issues.
+
+Credits
+=======
+
+Authors
+~~~~~~~
+
+* AvanzOSC
+
+Contributors
+~~~~~~~~~~~~
+
+* Leire Martinez de Santos
+* Ana Juaristi
diff --git a/stock_traceability_report/data/ir_actions_report.xml b/stock_traceability_report/data/ir_actions_report.xml
index 571e829887..ecd7bddc0a 100644
--- a/stock_traceability_report/data/ir_actions_report.xml
+++ b/stock_traceability_report/data/ir_actions_report.xml
@@ -1,21 +1,17 @@
-
-
-
- Traceability Report
- stock.lot
- qweb-pdf
- stock_traceability_report.report_lot_traceability
- stock_traceability_report.report_lot_traceability
- 'Lot traceability - %s' % (object.name)
-
- report
-
-
+
+
+ Traceability Report
+ stock.lot
+ qweb-pdf
+ stock_traceability_report.report_lot_traceability
+ stock_traceability_report.report_lot_traceability
+ 'Lot traceability - %s' % (object.name)
+
+ report
+
diff --git a/survey_input_equipment/views/survey_user_input_views.xml b/survey_input_equipment/views/survey_user_input_views.xml
index ab69ec2d4f..1010f16725 100644
--- a/survey_input_equipment/views/survey_user_input_views.xml
+++ b/survey_input_equipment/views/survey_user_input_views.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/survey_matrix_view_score/__init__.py b/survey_matrix_view_score/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/survey_question_image/views/survey_question_image.xml b/survey_question_image/views/survey_question_image.xml
index c72f75bc88..2aa88361e9 100644
--- a/survey_question_image/views/survey_question_image.xml
+++ b/survey_question_image/views/survey_question_image.xml
@@ -1,19 +1,16 @@
-
-
- Survey Question Form Inherit Image
- survey.question
-
-
-
-
-
-
-
+
+ survey.question
+
+
+
+
+
+
-
-
-
-
+
+
+
+
diff --git a/survey_user_input_domain/views/survey_user_input_form.xml b/survey_user_input_domain/views/survey_user_input_form.xml
index 3da0423e25..03879fb096 100644
--- a/survey_user_input_domain/views/survey_user_input_form.xml
+++ b/survey_user_input_domain/views/survey_user_input_form.xml
@@ -1,23 +1,20 @@
-
-
- survey.user_input.line.view.form
- survey.user_input.line
-
-
-
- "[('question_id', '=', record.suggested_answer_id.question_id)]"
-
+
+ survey.user_input.line
+
+
+
+ "[('question_id', '=', record.suggested_answer_id.question_id)]"
+
-
- "[('question_id', '=', record.matrix_row_id.question_id)]"
-
+
+ "[('question_id', '=', record.matrix_row_id.question_id)]"
-
-
+
+
diff --git a/website_sale_cart_line_subtotal/README.rst b/website_sale_cart_line_subtotal/README.rst
new file mode 100644
index 0000000000..1221a5e21f
--- /dev/null
+++ b/website_sale_cart_line_subtotal/README.rst
@@ -0,0 +1,47 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
+ :alt: License: AGPL-3
+
+===============================
+Website Sale Cart Line Subtotal
+===============================
+
+Overview
+--------
+
+Adds Price Subtotal field to cart lines in website sale.
+
+Features
+--------
+
+- Adds a "Price Subtotal" field to the cart lines in the website sale module.
+- Calculates the subtotal by multiplying the product quantity by the list price.
+
+Usage
+-----
+
+Once installed, the `website_sale_cart_line_subtotal` module will enhance the cart view in the website sale module by displaying the subtotal of each line item based on the product quantity and list price.
+
+Technical Details
+-----------------
+
+- The module extends the `website_sale.cart_lines` view to include a new "Price Subtotal" column.
+- It calculates the subtotal dynamically using Odoo's templating language (QWeb).
+
+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 smash it by providing detailed and welcomed feedback.
+
+Credits
+=======
+
+Contributors
+------------
+* Ana Juaristi
+* Unai Beristain
+
+Do not contact contributors directly about support or help with technical issues.
diff --git a/website_sale_cart_line_subtotal/__init__.py b/website_sale_cart_line_subtotal/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/website_sale_cart_line_subtotal/__manifest__.py b/website_sale_cart_line_subtotal/__manifest__.py
new file mode 100644
index 0000000000..56f25441de
--- /dev/null
+++ b/website_sale_cart_line_subtotal/__manifest__.py
@@ -0,0 +1,16 @@
+{
+ "name": "Website Sale Cart Line Subtotal",
+ "version": "16.0.1.0.0",
+ "license": "AGPL-3",
+ "summary": "Adds Price Subtotal field to cart lines in website sale.",
+ "category": "Website",
+ "author": "AvanzOSC",
+ "website": "https://github.com/avanzosc/odoo-addons",
+ "depends": [
+ "website_sale",
+ ],
+ "data": [
+ "views/website_sale_cart_lines.xml",
+ ],
+ "installable": True,
+}
diff --git a/website_sale_cart_line_subtotal/i18n/es.po b/website_sale_cart_line_subtotal/i18n/es.po
new file mode 100644
index 0000000000..cdfb3cff21
--- /dev/null
+++ b/website_sale_cart_line_subtotal/i18n/es.po
@@ -0,0 +1,21 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * website_sale_cart_line_subtotal
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 16.0+e\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-07-11 14:04+0000\n"
+"PO-Revision-Date: 2024-07-11 14:04+0000\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: website_sale_cart_line_subtotal
+#: model_terms:ir.ui.view,arch_db:website_sale_cart_line_subtotal.website_sale_cart_lines_inherit
+msgid "Price Subtotal"
+msgstr "Subtotal"
diff --git a/website_sale_cart_line_subtotal/i18n/website_sale_cart_line_subtotal.pot b/website_sale_cart_line_subtotal/i18n/website_sale_cart_line_subtotal.pot
new file mode 100644
index 0000000000..f09ecde2c0
--- /dev/null
+++ b/website_sale_cart_line_subtotal/i18n/website_sale_cart_line_subtotal.pot
@@ -0,0 +1,21 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * website_sale_cart_line_subtotal
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 16.0+e\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-07-11 14:03+0000\n"
+"PO-Revision-Date: 2024-07-11 14:03+0000\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: website_sale_cart_line_subtotal
+#: model_terms:ir.ui.view,arch_db:website_sale_cart_line_subtotal.website_sale_cart_lines_inherit
+msgid "Price Subtotal"
+msgstr ""
diff --git a/website_sale_cart_line_subtotal/views/website_sale_cart_lines.xml b/website_sale_cart_line_subtotal/views/website_sale_cart_lines.xml
new file mode 100644
index 0000000000..8fcfe98b23
--- /dev/null
+++ b/website_sale_cart_line_subtotal/views/website_sale_cart_lines.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ Price Subtotal
+
+
+
+
+
+
+
+
diff --git a/website_sale_float_cart_qty/README.rst b/website_sale_float_cart_qty/README.rst
new file mode 100644
index 0000000000..cf5c9736da
--- /dev/null
+++ b/website_sale_float_cart_qty/README.rst
@@ -0,0 +1,54 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
+ :alt: License: AGPL-3
+
+================================
+Website Sale Float Cart Quantity
+================================
+
+Overview
+--------
+
+This module extends the functionality of the `website_sale` module in Odoo by allowing float quantities in the shopping cart instead of integer quantities.
+
+Features
+--------
+
+- Enables users to add fractional quantities of products to the shopping cart.
+- Overrides the `_changeCartQuantity` function from `website_sale` to handle float quantities.
+- Uses `parseFloat` instead of `parseInt` for value conversion on the client-side.
+
+Usage
+-----
+
+- Users can add decimal quantities of products to the shopping cart from the online store.
+
+- Quantities are dynamically updated in the user interface after each quantity change.
+
+Development
+-----------
+
+The `website_sale_float_cart_qty` module uses JavaScript to extend the functionality of Odoo's `website_sale` module. The `website_sale_float_cart_qty.js` file overrides the `_changeCartQuantity` function to handle float quantities and perform server communication via RPC.
+
+Contributions
+-------------
+
+Contributions are welcome! If you want to contribute to the development of this module, feel free to submit a pull request or report issues on the official repository.
+
+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 smash it by providing detailed and welcomed feedback.
+
+Credits
+=======
+
+Contributors
+------------
+* Ana Juaristi
+* Unai Beristain
+
+Do not contact contributors directly about support or help with technical issues.
diff --git a/website_sale_float_cart_qty/__init__.py b/website_sale_float_cart_qty/__init__.py
new file mode 100644
index 0000000000..0650744f6b
--- /dev/null
+++ b/website_sale_float_cart_qty/__init__.py
@@ -0,0 +1 @@
+from . import models
diff --git a/website_sale_float_cart_qty/__manifest__.py b/website_sale_float_cart_qty/__manifest__.py
new file mode 100644
index 0000000000..9ce617421a
--- /dev/null
+++ b/website_sale_float_cart_qty/__manifest__.py
@@ -0,0 +1,18 @@
+{
+ "name": "Website Sale Float Cart Quantity",
+ "summary": "Allow float quantities in cart for website sale module",
+ "version": "16.0.1.0.0",
+ "category": "Website",
+ "license": "LGPL-3",
+ "website": "https://github.com/avanzosc/odoo-addons",
+ "author": "AvanzOSC",
+ "depends": [
+ "website_sale",
+ ],
+ "assets": {
+ "web.assets_frontend": [
+ "website_sale_float_cart_qty/static/src/js/float_qty.js",
+ ],
+ },
+ "installable": True,
+}
diff --git a/website_sale_float_cart_qty/models/__init__.py b/website_sale_float_cart_qty/models/__init__.py
new file mode 100644
index 0000000000..6aacb75313
--- /dev/null
+++ b/website_sale_float_cart_qty/models/__init__.py
@@ -0,0 +1 @@
+from . import sale_order
diff --git a/website_sale_float_cart_qty/models/sale_order.py b/website_sale_float_cart_qty/models/sale_order.py
new file mode 100644
index 0000000000..a6fd01de42
--- /dev/null
+++ b/website_sale_float_cart_qty/models/sale_order.py
@@ -0,0 +1,98 @@
+from odoo import _, fields, models
+from odoo.exceptions import UserError
+
+
+class SaleOrderInherit(models.Model):
+ _inherit = "sale.order"
+
+ cart_quantity = fields.Float(
+ compute="_compute_cart_info",
+ )
+
+ def _cart_update(self, product_id, line_id=None, add_qty=0, set_qty=0, **kwargs):
+ """Add or set product quantity, add_qty can be negative"""
+ self.ensure_one()
+ self = self.with_company(self.company_id)
+
+ if self.state != "draft":
+ self.env["request"].session.pop("sale_order_id", None)
+ self.env["request"].session.pop("website_sale_cart_quantity", None)
+ raise UserError(
+ _(
+ "It is forbidden to modify a sales order which is not in draft status."
+ )
+ )
+
+ product = self.env["product.product"].browse(product_id).exists()
+ if add_qty and (not product or not product._is_add_to_cart_allowed()):
+ raise UserError(
+ _(
+ "The given product does not exist therefore it cannot be added to cart."
+ )
+ )
+
+ if line_id is not False:
+ order_line = self._cart_find_product_line(product_id, line_id, **kwargs)[:1]
+ else:
+ order_line = self.env["sale.order.line"]
+
+ quantity = 0
+ if set_qty:
+ quantity = set_qty
+ elif add_qty:
+ if order_line:
+ quantity = order_line.product_uom_qty + add_qty
+ else:
+ quantity = add_qty
+
+ if quantity > 0:
+ quantity, warning = self._verify_updated_quantity(
+ order_line,
+ product_id,
+ quantity,
+ **kwargs,
+ )
+ else:
+ # If the line will be removed anyway, there is no need to verify
+ # the requested quantity update.
+ warning = ""
+
+ order_line = self._cart_update_order_line(
+ product_id, quantity, order_line, **kwargs
+ )
+
+ if (
+ order_line
+ and order_line.price_unit == 0
+ and self.website_id.prevent_zero_price_sale
+ and product.detailed_type
+ not in self.env["product.template"]._get_product_types_allow_zero_price()
+ ):
+ raise UserError(
+ _(
+ """The given product does not have a price
+ therefore it cannot be added to cart.""",
+ )
+ )
+
+ return {
+ "line_id": order_line.id,
+ "quantity": quantity,
+ "option_ids": list(
+ set(
+ order_line.option_line_ids.filtered(
+ lambda line: line.order_id == order_line.order_id
+ ).ids
+ )
+ ),
+ "warning": warning,
+ }
+
+ def _compute_cart_info(self):
+ for order in self:
+ order.cart_quantity = sum(
+ order.mapped("website_order_line.product_uom_qty")
+ )
+ order.only_services = all(
+ line.product_id.type == "service" for line in order.website_order_line
+ )
diff --git a/website_sale_float_cart_qty/static/src/js/float_qty.js b/website_sale_float_cart_qty/static/src/js/float_qty.js
new file mode 100644
index 0000000000..5ba7dc72c0
--- /dev/null
+++ b/website_sale_float_cart_qty/static/src/js/float_qty.js
@@ -0,0 +1,75 @@
+odoo.define("website_sale_float_cart_qty.float_qty", function (require) {
+ "use strict";
+
+ var publicWidget = require("web.public.widget");
+ var wSaleUtils = require("website_sale.utils");
+ var core = require("web.core");
+ require("website_sale.website_sale");
+
+ publicWidget.registry.WebsiteSale.include({
+ /**
+ * Override the _changeCartQuantity method of WebsiteSale
+ * @param {jQuery} $input - The jQuery object representing the input field.
+ * @param {Number} value - The new value of the input field.
+ * @param {Array} $dom_optional - Array of DOM elements.
+ * @param {Number} line_id - The line ID associated with the cart line.
+ * @param {Array} productIDs - Array of product IDs.
+ */
+
+ _changeCartQuantity: function ($input, value, $dom_optional, line_id, productIDs) {
+ _.each($dom_optional, function (elem) {
+ $(elem).find(".js_quantity").text(value);
+ productIDs.push($(elem).find("span[data-product-id]").data("product-id"));
+ });
+ $input.data("update_change", true);
+
+ $input.val($input.val().replace(",", "."));
+
+ this._rpc({
+ route: "/shop/cart/update_json",
+ params: {
+ line_id: line_id,
+ product_id: parseInt($input.data("product-id"), 10),
+ set_qty: value,
+ },
+ }).then(function (data) {
+ $input.data("update_change", false);
+ var check_value = parseFloat($input.val() || 0, 10);
+ if (isNaN(check_value)) {
+ check_value = 1;
+ }
+ if (value !== check_value) {
+ $input.trigger("change");
+ return;
+ }
+ sessionStorage.setItem("website_sale_cart_quantity", data.cart_quantity);
+ if (!data.cart_quantity) {
+ return (window.location = "/shop/cart");
+ }
+ $input.val(data.quantity);
+ $(".js_quantity[data-line-id=" + line_id + "]")
+ .val(data.quantity)
+ .text(data.quantity);
+
+ wSaleUtils.updateCartNavBar(data);
+ wSaleUtils.showWarning(data.warning);
+ // Propagating the change to the express checkout forms
+ core.bus.trigger("cart_amount_changed", data.amount, data.minor_amount);
+ });
+ },
+
+ _onChangeCartQuantity: function (ev) {
+ var $input = $(ev.currentTarget);
+ if ($input.data("update_change")) {
+ return;
+ }
+ var value = $input.val().replace(",", ".");
+ value = parseFloat(value) || 1;
+ var $dom = $input.closest("tr");
+ var $dom_optional = $dom.nextUntil(":not(.optional_product.info)");
+ var line_id = parseInt($input.data("line-id"), 10);
+ var productIDs = [parseInt($input.data("product-id"), 10)];
+ this._changeCartQuantity($input, value, $dom_optional, line_id, productIDs);
+ },
+ });
+});
diff --git a/website_sale_order_to_cart/README.rst b/website_sale_order_to_cart/README.rst
new file mode 100644
index 0000000000..894f583e80
--- /dev/null
+++ b/website_sale_order_to_cart/README.rst
@@ -0,0 +1,29 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
+ :alt: License: AGPL-3
+
+=================================
+Website Sale Order to Cart Button
+=================================
+
+* Add a button to move the sale order to the cart
+* and another button to set it to Sent state from the website cart
+
+
+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 smash it by providing detailed and welcomed feedback.
+
+Credits
+=======
+
+Contributors
+------------
+* Ana Juaristi
+* Unai Beristain
+
+Do not contact contributors directly about support or help with technical issues.
diff --git a/website_sale_order_to_cart/__init__.py b/website_sale_order_to_cart/__init__.py
new file mode 100644
index 0000000000..91c5580fed
--- /dev/null
+++ b/website_sale_order_to_cart/__init__.py
@@ -0,0 +1,2 @@
+from . import controllers
+from . import models
diff --git a/website_sale_order_to_cart/__manifest__.py b/website_sale_order_to_cart/__manifest__.py
new file mode 100644
index 0000000000..ca2b7f8c47
--- /dev/null
+++ b/website_sale_order_to_cart/__manifest__.py
@@ -0,0 +1,19 @@
+# Copyright 2024 Unai Beristain - AvanzOSC
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+{
+ "name": "Website Sale Order to Cart Button",
+ "version": "16.0.1.0.0",
+ "category": "Sales",
+ "summary": """Add a button to move the sale order to the cart
+ and another button to set it to Sent state from the website cart""",
+ "author": "AvanzOSC",
+ "website": "https://github.com/avanzosc/odoo-addons",
+ "license": "AGPL-3",
+ "depends": ["sale", "website_sale"],
+ "data": [
+ "views/website_templates.xml",
+ "views/sale_order_views.xml",
+ ],
+ "installable": True,
+ "auto_install": False,
+}
diff --git a/website_sale_order_to_cart/controllers/__init__.py b/website_sale_order_to_cart/controllers/__init__.py
new file mode 100644
index 0000000000..12a7e529b6
--- /dev/null
+++ b/website_sale_order_to_cart/controllers/__init__.py
@@ -0,0 +1 @@
+from . import main
diff --git a/website_sale_order_to_cart/controllers/main.py b/website_sale_order_to_cart/controllers/main.py
new file mode 100644
index 0000000000..d5cf40f6b6
--- /dev/null
+++ b/website_sale_order_to_cart/controllers/main.py
@@ -0,0 +1,36 @@
+from odoo import http
+from odoo.http import request
+
+
+class SaleOrderController(http.Controller):
+
+ @http.route("/action_quotation_mark_send", type="http", auth="user", website=True)
+ def action_quotation_mark_send(self, **kwargs):
+ order_id = kwargs.get("order_id")
+ if order_id:
+ sale_order = request.env["sale.order"].sudo().browse(int(order_id))
+ # Only change the order state if the partner_id of the order is the user
+ if sale_order and sale_order.partner_id == request.env.user.partner_id:
+
+ sale_order.action_quotation_mark_send()
+ access_token = sale_order.access_token
+
+ url = "/my/orders/{}?access_token={}".format(
+ sale_order.id, access_token
+ )
+
+ return request.redirect(url)
+
+ return request.redirect("/shop")
+
+ @http.route("/sale_order_to_cart", type="http", auth="user", website=True)
+ def sale_order_to_cart(self, **kwargs):
+ order_id = kwargs.get("order_id")
+ if order_id:
+ sale_order = request.env["sale.order"].sudo().browse(int(order_id))
+ # Only change the order state if the partner_id of the order is the user
+ if sale_order and sale_order.partner_id == request.env.user.partner_id:
+ sale_order.sale_order_to_cart()
+ return request.redirect("/shop/cart")
+
+ return request.redirect("/shop")
diff --git a/website_sale_order_to_cart/i18n/es.po b/website_sale_order_to_cart/i18n/es.po
new file mode 100644
index 0000000000..9d637924fd
--- /dev/null
+++ b/website_sale_order_to_cart/i18n/es.po
@@ -0,0 +1,41 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * website_sale_order_to_cart
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 16.0+e\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-07-10 11:04+0000\n"
+"PO-Revision-Date: 2024-07-10 11:04+0000\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: website_sale_order_to_cart
+#: model_terms:ir.ui.view,arch_db:website_sale_order_to_cart.sale_order_portal_template_inherit
+msgid "Change Order "
+msgstr "Cambiar Pedido "
+
+#. module: website_sale_order_to_cart
+#: model_terms:ir.ui.view,arch_db:website_sale_order_to_cart.sale_order_cart_inherit
+msgid "Confirm Cart "
+msgstr "Confirmar Carro "
+
+#. module: website_sale_order_to_cart
+#: model_terms:ir.ui.view,arch_db:website_sale_order_to_cart.view_sale_order_form_inherit
+msgid "Quotation Mark Sent"
+msgstr "Marcar Presupuesto Enviado"
+
+#. module: website_sale_order_to_cart
+#: model_terms:ir.ui.view,arch_db:website_sale_order_to_cart.view_sale_order_form_inherit
+msgid "Sale Order To Cart"
+msgstr "Pedido de venta al carrito"
+
+#. module: website_sale_order_to_cart
+#: model:ir.model,name:website_sale_order_to_cart.model_sale_order
+msgid "Sales Order"
+msgstr "Pedido de venta"
diff --git a/website_sale_order_to_cart/i18n/website_sale_order_to_cart.pot b/website_sale_order_to_cart/i18n/website_sale_order_to_cart.pot
new file mode 100644
index 0000000000..fac494a2f8
--- /dev/null
+++ b/website_sale_order_to_cart/i18n/website_sale_order_to_cart.pot
@@ -0,0 +1,41 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * website_sale_order_to_cart
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 16.0+e\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-07-10 11:04+0000\n"
+"PO-Revision-Date: 2024-07-10 11:04+0000\n"
+"Last-Translator: \n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: website_sale_order_to_cart
+#: model_terms:ir.ui.view,arch_db:website_sale_order_to_cart.sale_order_portal_template_inherit
+msgid "Change Order "
+msgstr ""
+
+#. module: website_sale_order_to_cart
+#: model_terms:ir.ui.view,arch_db:website_sale_order_to_cart.sale_order_cart_inherit
+msgid "Confirm Cart "
+msgstr ""
+
+#. module: website_sale_order_to_cart
+#: model_terms:ir.ui.view,arch_db:website_sale_order_to_cart.view_sale_order_form_inherit
+msgid "Quotation Mark Sent"
+msgstr ""
+
+#. module: website_sale_order_to_cart
+#: model_terms:ir.ui.view,arch_db:website_sale_order_to_cart.view_sale_order_form_inherit
+msgid "Sale Order To Cart"
+msgstr ""
+
+#. module: website_sale_order_to_cart
+#: model:ir.model,name:website_sale_order_to_cart.model_sale_order
+msgid "Sales Order"
+msgstr ""
diff --git a/website_sale_order_to_cart/models/__init__.py b/website_sale_order_to_cart/models/__init__.py
new file mode 100644
index 0000000000..6aacb75313
--- /dev/null
+++ b/website_sale_order_to_cart/models/__init__.py
@@ -0,0 +1 @@
+from . import sale_order
diff --git a/website_sale_order_to_cart/models/sale_order.py b/website_sale_order_to_cart/models/sale_order.py
new file mode 100644
index 0000000000..d46ba6f8ea
--- /dev/null
+++ b/website_sale_order_to_cart/models/sale_order.py
@@ -0,0 +1,25 @@
+from datetime import datetime
+
+from dateutil.relativedelta import relativedelta
+
+from odoo import models
+
+
+class SaleOrder(models.Model):
+ _inherit = "sale.order"
+
+ def action_quotation_mark_send(self):
+ self.state = "sent"
+ self.user_id = self.partner_id.user_id
+
+ def sale_order_to_cart(self):
+ self.state = "draft"
+ current_website = self.env["website"].get_current_website()
+ if current_website:
+ self.website_id = current_website.id
+
+ abandoned_delay = current_website.cart_abandoned_delay or 1.0
+ abandoned_datetime = datetime.utcnow() - relativedelta(
+ hours=abandoned_delay
+ )
+ self.date_order = abandoned_datetime
diff --git a/website_sale_order_to_cart/views/sale_order_views.xml b/website_sale_order_to_cart/views/sale_order_views.xml
new file mode 100644
index 0000000000..2d8c324a83
--- /dev/null
+++ b/website_sale_order_to_cart/views/sale_order_views.xml
@@ -0,0 +1,64 @@
+
+
+
+ sale.order.form.inherit
+ sale.order
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sale.order.tree.inherit
+ sale.order
+
+
+
+
+
+
+
+
+
+ sale.order.tree.inherit
+ sale.order
+
+
+
+
+
+
+
+
+
+ sale.order.tree.inherit
+ sale.order
+
+
+
+
+
+
+
+
diff --git a/website_sale_order_to_cart/views/website_templates.xml b/website_sale_order_to_cart/views/website_templates.xml
new file mode 100644
index 0000000000..5e8dc5004e
--- /dev/null
+++ b/website_sale_order_to_cart/views/website_templates.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/website_sale_remove_pay_buttons/README.rst b/website_sale_remove_pay_buttons/README.rst
new file mode 100644
index 0000000000..14a817c431
--- /dev/null
+++ b/website_sale_remove_pay_buttons/README.rst
@@ -0,0 +1,42 @@
+.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
+ :target: https://www.gnu.org/licenses/agpl
+ :alt: License: AGPL-3
+
+===============================
+Website Sale Remove Pay Buttons
+===============================
+
+This module customizes the Odoo eCommerce functionality by removing the "Pay Now" and "Continue to Payment" buttons from the shopping cart page. This ensures that customers can only confirm their cart and continue shopping, without proceeding to the payment step directly from the website.
+
+Usage
+-----
+
+The module achieves this behavior through the following modifications to the `website_sale` module templates:
+
+- **Remove 'Pay Now' button**: The button with the ID `o_payment_form_pay` is removed from the DOM using `xpath`.
+- **Remove 'Continue to Payment' button**: The button with the class `btn btn-primary btn-lg btn-block` is removed from the DOM using `xpath`.
+
+Installation
+
+Dependencies
+------------
+
+This module depends on the following Odoo module:
+
+- `website_sale`
+
+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 smash it by providing detailed and welcomed feedback.
+
+Do not contact contributors directly about support or help with technical issues.
+
+Credits
+=======
+
+Contributors
+------------
+
+* Unai Beristain
diff --git a/website_sale_remove_pay_buttons/__init__.py b/website_sale_remove_pay_buttons/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/website_sale_remove_pay_buttons/__manifest__.py b/website_sale_remove_pay_buttons/__manifest__.py
new file mode 100644
index 0000000000..8b47460713
--- /dev/null
+++ b/website_sale_remove_pay_buttons/__manifest__.py
@@ -0,0 +1,16 @@
+{
+ "name": "Website Sale Remove Pay Buttons",
+ "version": "16.0.1.0.0",
+ "category": "Website",
+ "summary": "Remove pay now and continue to payment buttons from website sale",
+ "author": "AvanzOSC",
+ "license": "AGPL-3",
+ "website": "https://github.com/avanzosc/odoo-addons",
+ "depends": [
+ "website_sale",
+ ],
+ "data": [
+ "views/website_sale_templates.xml",
+ ],
+ "installable": True,
+}
diff --git a/website_sale_remove_pay_buttons/views/website_sale_templates.xml b/website_sale_remove_pay_buttons/views/website_sale_templates.xml
new file mode 100644
index 0000000000..e5428f09aa
--- /dev/null
+++ b/website_sale_remove_pay_buttons/views/website_sale_templates.xml
@@ -0,0 +1,22 @@
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+