From 02a951ab3605d105eb5142d89860a62542278408 Mon Sep 17 00:00:00 2001 From: BojanOD Date: Tue, 13 Dec 2022 19:00:47 +0100 Subject: [PATCH 1/6] [15.0][ADD] Purchase Merge --- purchase_merge/README.rst | 89 ++++ purchase_merge/__init__.py | 1 + purchase_merge/__manifest__.py | 18 + purchase_merge/readme/CONTRIBUTORS.rst | 4 + purchase_merge/readme/DESCRIPTION.rst | 18 + purchase_merge/readme/USAGE.rst | 3 + purchase_merge/security/ir.model.access.csv | 2 + purchase_merge/static/description/index.html | 447 ++++++++++++++++++ purchase_merge/tests/__init__.py | 4 + purchase_merge/tests/test_purchase_merge.py | 83 ++++ purchase_merge/wizard/__init__.py | 1 + purchase_merge/wizard/purchase_merge.py | 225 +++++++++ .../wizard/purchase_merge_views.xml | 58 +++ 13 files changed, 953 insertions(+) create mode 100644 purchase_merge/README.rst create mode 100644 purchase_merge/__init__.py create mode 100644 purchase_merge/__manifest__.py create mode 100644 purchase_merge/readme/CONTRIBUTORS.rst create mode 100644 purchase_merge/readme/DESCRIPTION.rst create mode 100644 purchase_merge/readme/USAGE.rst create mode 100644 purchase_merge/security/ir.model.access.csv create mode 100644 purchase_merge/static/description/index.html create mode 100644 purchase_merge/tests/__init__.py create mode 100644 purchase_merge/tests/test_purchase_merge.py create mode 100644 purchase_merge/wizard/__init__.py create mode 100644 purchase_merge/wizard/purchase_merge.py create mode 100644 purchase_merge/wizard/purchase_merge_views.xml diff --git a/purchase_merge/README.rst b/purchase_merge/README.rst new file mode 100644 index 00000000000..f4447bd2e83 --- /dev/null +++ b/purchase_merge/README.rst @@ -0,0 +1,89 @@ +============== +Purchase Merge +============== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-BojanOD%2Fpurchase--workflow-lightgray.png?logo=github + :target: https://github.com/BojanOD/purchase-workflow/tree/15.0/purchase_merge + :alt: BojanOD/purchase-workflow + +|badge1| |badge2| |badge3| + +This module adds a wizard to merge purchase order. + + +A wizard that can be called from tree view of purchase orders. +If merge criteria are validate: +All lines of all PO are "transferred" to the first one and some information like 'origin' and 'partner_ref' are concatenated. +We post a message on the chatter to indicate when the merge operation occurs and what were the PO concerned. +The empty PO are "canceled" + +Merge criteria: +* PO are from the same supplier +* PO are in state 'draft' +* PO have the same +#. currency +#. picking type +#. incoterms +#. payment terms +#. fiscal position + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +#. Merge purchase order with required criteria + +Known issues / Roadmap +====================== + +* it could be improved by using [https://github.com/OCA/openupgradelib/blob/master/openupgradelib/openupgrade_merge_records.py](https://github.com/OCA/openupgradelib/blob/master/openupgradelib/openupgrade_merge_records.py) + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Camptocamp + +Contributors +~~~~~~~~~~~~ + +* `Camptocamp `_: + + * Thomas Nowicki + * Bojan Anchev + +Maintainers +~~~~~~~~~~~ + +This module is part of the `BojanOD/purchase-workflow `_ project on GitHub. + +You are welcome to contribute. diff --git a/purchase_merge/__init__.py b/purchase_merge/__init__.py new file mode 100644 index 00000000000..40272379f72 --- /dev/null +++ b/purchase_merge/__init__.py @@ -0,0 +1 @@ +from . import wizard diff --git a/purchase_merge/__manifest__.py b/purchase_merge/__manifest__.py new file mode 100644 index 00000000000..c787de54338 --- /dev/null +++ b/purchase_merge/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2022 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +{ + "name": "Purchase Merge", + "summary": "Wizard to merge purchase with required conditions", + "version": "15.0.1.0.0", + "author": "Camptocamp, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/purchase-workflow", + "license": "AGPL-3", + "category": "Purchase", + "depends": ["purchase_order_approved"], + "data": [ + "security/ir.model.access.csv", + "wizard/purchase_merge_views.xml", + ], + "external_dependencies": {"python": ["openupgradelib"]}, + "installable": True, +} diff --git a/purchase_merge/readme/CONTRIBUTORS.rst b/purchase_merge/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..397451e41a0 --- /dev/null +++ b/purchase_merge/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* `Camptocamp `_: + + * Thomas Nowicki + * Bojan Anchev diff --git a/purchase_merge/readme/DESCRIPTION.rst b/purchase_merge/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..42c1ab3a3c9 --- /dev/null +++ b/purchase_merge/readme/DESCRIPTION.rst @@ -0,0 +1,18 @@ +This module adds a wizard to merge purchase order. + + +A wizard that can be called from tree view of purchase orders. +If merge criteria are validate: +All lines of all PO are "transferred" to the first one and some information like 'origin' and 'partner_ref' are concatenated. +We post a message on the chatter to indicate when the merge operation occurs and what were the PO concerned. +The empty PO are "canceled" + +Merge criteria: +* PO are from the same supplier +* PO are in state 'draft' +* PO have the same +#. currency +#. picking type +#. incoterms +#. payment terms +#. fiscal position diff --git a/purchase_merge/readme/USAGE.rst b/purchase_merge/readme/USAGE.rst new file mode 100644 index 00000000000..170a180c702 --- /dev/null +++ b/purchase_merge/readme/USAGE.rst @@ -0,0 +1,3 @@ +To use this module, you need to: + +#. Merge purchase order with required criteria diff --git a/purchase_merge/security/ir.model.access.csv b/purchase_merge/security/ir.model.access.csv new file mode 100644 index 00000000000..4f6a01ff899 --- /dev/null +++ b/purchase_merge/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_purchase_merge_automatic_wizard_user,access_purchase_merge_automatic_wizard_user,model_purchase_merge_automatic_wizard,purchase.group_purchase_user,1,1,1,1 diff --git a/purchase_merge/static/description/index.html b/purchase_merge/static/description/index.html new file mode 100644 index 00000000000..3ec240b87ec --- /dev/null +++ b/purchase_merge/static/description/index.html @@ -0,0 +1,447 @@ + + + + + + +Purchase Merge + + + +
+

Purchase Merge

+ + +

Beta License: AGPL-3 BojanOD/purchase-workflow

+

This module adds a wizard to merge purchase order.

+

A wizard that can be called from tree view of purchase orders. +If merge criteria are validate: +All lines of all PO are “transferred” to the first one and some information like ‘origin’ and ‘partner_ref’ are concatenated. +We post a message on the chatter to indicate when the merge operation occurs and what were the PO concerned. +The empty PO are “canceled”

+

Merge criteria: +* PO are from the same supplier +* PO are in state ‘draft’ +* PO have the same +#. currency +#. picking type +#. incoterms +#. payment terms +#. fiscal position

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  1. Merge purchase order with required criteria
  2. +
+
+ +
+

Bug Tracker

+

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

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Camptocamp
  • +
+
+ +
+

Maintainers

+

This module is part of the BojanOD/purchase-workflow project on GitHub.

+

You are welcome to contribute.

+
+
+
+ + diff --git a/purchase_merge/tests/__init__.py b/purchase_merge/tests/__init__.py new file mode 100644 index 00000000000..e15c404b9dd --- /dev/null +++ b/purchase_merge/tests/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2022 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import test_purchase_merge diff --git a/purchase_merge/tests/test_purchase_merge.py b/purchase_merge/tests/test_purchase_merge.py new file mode 100644 index 00000000000..94477714ffd --- /dev/null +++ b/purchase_merge/tests/test_purchase_merge.py @@ -0,0 +1,83 @@ +from odoo.exceptions import UserError +from odoo.tests import common + + +class TestPurchaseMerge(common.TransactionCase): + @classmethod + def setUpClass(cls): + super(TestPurchaseMerge, cls).setUpClass() + cls.PurchaseMerge = cls.env["purchase.merge.automatic.wizard"] + cls.product_1 = cls.env["product.product"].create({"name": "Product 1"}) + cls.product_2 = cls.env["product.product"].create({"name": "Product 2"}) + cls.partner = cls.env["res.partner"].create({"name": "Partner"}) + cls.PurchaseOrder = cls.env["purchase.order"] + cls.purchase_order_1 = cls.PurchaseOrder.create( + { + "partner_id": cls.partner.id, + "order_line": [ + (0, 0, {"product_id": cls.product_1.id, "price_unit": 10}) + ], + } + ) + cls.purchase_order_2 = cls.PurchaseOrder.create( + { + "partner_id": cls.partner.id, + "order_line": [ + (0, 0, {"product_id": cls.product_2.id, "price_unit": 10}) + ], + } + ) + + def test_count_purchase_order_lines(self): + self.purchase_merge_1 = self.PurchaseMerge.create( + { + "purchase_ids": [ + (6, 0, [self.purchase_order_1.id, self.purchase_order_2.id]) + ], + "dst_purchase_id": self.purchase_order_2.id, + } + ) + self.purchase_merge_1.action_merge() + self.purchase_order_line_1 = len(self.purchase_order_2.order_line) + self.assertEqual(self.purchase_order_line_1, 2) + + def test_purchase_ids(self): + self.purchase_merge_2 = self.PurchaseMerge.create( + { + "dst_purchase_id": self.purchase_order_2.id, + } + ) + self.assertEqual(self.purchase_merge_2.action_merge(), False) + + def test_default_purchase_ids(self): + context = { + "active_ids": [self.purchase_order_1.id, self.purchase_order_2.id], + "active_model": self.PurchaseOrder._name, + } + self.purchase_merge_3 = self.PurchaseMerge.with_context(**context).create({}) + self.assertEqual(len(self.purchase_merge_3.dst_purchase_id), 1) + self.assertEqual(len(self.purchase_merge_3.purchase_ids), 2) + + def test_purchase_order_states(self): + self.purchase_order_3 = self.env["purchase.order"].create( + { + "partner_id": self.partner.id, + "order_line": [ + (0, 0, {"product_id": self.product_2.id, "price_unit": 10}) + ], + } + ) + self.purchase_order_3.write({"state": "sent"}) + self.purchase_merge_4 = self.PurchaseMerge.create( + { + "purchase_ids": [ + (6, 0, [self.purchase_order_1.id, self.purchase_order_3.id]) + ], + "dst_purchase_id": self.purchase_order_3.id, + } + ) + with self.assertRaisesRegex( + UserError, + r"You can't merge purchase orders that aren't in draft state like: .+", + ): + self.purchase_merge_4._check_state(self.purchase_merge_4.purchase_ids) diff --git a/purchase_merge/wizard/__init__.py b/purchase_merge/wizard/__init__.py new file mode 100644 index 00000000000..9be1a1429d5 --- /dev/null +++ b/purchase_merge/wizard/__init__.py @@ -0,0 +1 @@ +from . import purchase_merge diff --git a/purchase_merge/wizard/purchase_merge.py b/purchase_merge/wizard/purchase_merge.py new file mode 100644 index 00000000000..682fa432bd0 --- /dev/null +++ b/purchase_merge/wizard/purchase_merge.py @@ -0,0 +1,225 @@ +# Copyright 2022 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from openupgradelib import openupgrade_merge_records + +from odoo import _, api, fields, models +from odoo.exceptions import ValidationError + + +class MergePurchaseAutomatic(models.TransientModel): + """ + The idea behind this wizard is to create a list of potential purchases + to merge. We use two objects, the first one is the wizard for + the end-user. And the second will contain the purchase list to merge. + """ + + _name = "purchase.merge.automatic.wizard" + + purchase_ids = fields.Many2many("purchase.order") + dst_purchase_id = fields.Many2one( + comodel_name="purchase.order", + string="Destination", + ) + + @api.model + def default_get(self, fields_list): + res = super(MergePurchaseAutomatic, self).default_get(fields_list) + active_ids = self.env.context.get("active_ids") + purchase_orders = self.purchase_ids.browse(active_ids) + self._check_all_values(purchase_orders) + if ( + self.env.context.get("active_model") == "purchase.order" + and len(active_ids) >= 1 + ): + res["purchase_ids"] = [(6, 0, active_ids)] + res["dst_purchase_id"] = self._get_ordered_purchase(active_ids)[-1].id + return res + + # ---------------------------------------- + # Check method + # ---------------------------------------- + + def _check_all_values(self, purchase_orders): + """Contain all check method""" + self._check_state(purchase_orders) + self._check_content(purchase_orders) + + def _check_state(self, purchase_orders): + non_draft_po = purchase_orders.filtered(lambda p: p.state != "draft") + if non_draft_po: + po_names = non_draft_po.mapped("name") + raise ValidationError( + _( + "You can't merge purchase orders that aren't in draft state like: {}" + ).format(po_names) + ) + + def _check_content(self, purchase_orders): + error_messages = [] + + currencies = purchase_orders.currency_id + if len(currencies) > 1: + error_messages.append( + _( + "You can't merge purchase orders with different currencies: %s", + ", ".join(currencies.mapped("name")), + ) + ) + picking_types = purchase_orders.picking_type_id + if len(picking_types) > 1: + error_messages.append( + _( + "You can't merge purchase orders with different picking types: %s", + ", ".join(picking_types.mapped("name")), + ) + ) + + incoterms = purchase_orders.incoterm_id + if len(incoterms) > 1: + error_messages.append( + _( + "You can't merge purchase orders with different incoterms: %s", + ", ".join(incoterms.mapped("name")), + ) + ) + + payment_terms = purchase_orders.payment_term_id + if len(payment_terms) > 1: + error_messages.append( + _( + "You can't merge purchase orders with different payment terms: %s", + ", ".join(payment_terms.mapped("name")), + ) + ) + + fiscal_positions = purchase_orders.fiscal_position_id + if len(fiscal_positions) > 1: + error_messages.append( + _( + "You can't merge purchase orders with different fiscal positions: %s", + ", ".join(fiscal_positions.mapped("name")), + ) + ) + + suppliers = purchase_orders.partner_id + if len(suppliers) > 1: + error_messages.append( + _( + "You can't merge purchase orders with different suppliers: %s", + ", ".join(suppliers.mapped("name")), + ) + ) + + if error_messages: + raise ValidationError("\n".join(error_messages)) + + # ---------------------------------------- + # Update method + # ---------------------------------------- + + @api.model + def _update_values(self, src_purchase, dst_purchase): + """Update values of dst_purchase with the ones from the src_purchase. + :param src_purchase : recordset of source purchase.order + :param dst_purchase : record of destination purchase.order + """ + # merge all order lines + set origin and partner_ref + dst_purchase.write(self._get_update_values(src_purchase, dst_purchase)) + for po in src_purchase: + self._add_message("to", [dst_purchase.name], po) + + po_names = src_purchase.mapped("name") + self._add_message("from", po_names, dst_purchase) + + @api.model + def _get_update_values(self, src_purchase, dst_purchase): + """Generate values of dst_purchase with the ones from the src_purchase. + :param src_purchase : recordset of source purchase.order + :param dst_purchase : record of destination purchase.order + """ + # initialize destination origin and partner_ref + origin = {dst_purchase.origin or ""} + origin.update({x.origin for x in src_purchase if x.origin}) + + partner_ref = {dst_purchase.partner_ref or ""} + partner_ref.update({x.partner_ref for x in src_purchase if x.partner_ref}) + + # Generate destination origin and partner_ref + src_order_line = src_purchase.mapped("order_line") + + return { + "order_line": [(4, line, 0) for line in src_order_line.ids], + "origin": ", ".join(origin), + "partner_ref": ", ".join(partner_ref), + } + + def _add_message(self, way, po_name, po): + """Send a message post with to advise the po about the merge. + :param way : choice between 'from' or 'to' + :param po_name : list of purchase order name to add in the body + :param po_name : the po where the message will be posted + """ + subject = "Merge purchase order" + body = _("This purchase order lines have been merged {} : {}").format( + way, " ,".join(po_name) + ) + + po.message_post(body=body, subject=subject, content_subtype="plaintext") + + def _merge(self, purchases, dst_purchase=None): + """private implementation of merge purchase + :param purchases : ids of purchase to merge + :param dst_purchase : record of destination purchase.order + """ + if len(purchases) < 2: + return + record_ids = purchases - dst_purchase + openupgrade_merge_records.merge_records( + env=self.env, + model_name=self._name, + record_ids=record_ids.ids, + target_record_id=dst_purchase.id, + ) + self._check_all_values(purchases) + + # remove dst_purchase from purchases to merge + if dst_purchase and dst_purchase in purchases: + src_purchase = purchases - dst_purchase + else: + dst_purchase = self.purchase_ids[-1] + src_purchase = self.purchase_ids[:-1] + # call sub methods to do the merge + self._update_values(src_purchase, dst_purchase) + + # cancel source purchase, since they are merged + src_purchase.button_cancel() + + # ---------------------------------------- + # Helpers + # ---------------------------------------- + + @api.model + def _get_ordered_purchase(self, purchase_ids): + """Helper returns a `purchase.order` recordset ordered by create_date + :param purchase_ids : list of purchase ids to sort + """ + return ( + self.env["purchase.order"] + .browse(purchase_ids) + .sorted( + key=lambda p: (p.create_date or ""), + reverse=True, + ) + ) + + # ---------------------------------------- + # Actions + # ---------------------------------------- + + def action_merge(self): + """Merge Quotation button. Merge the selected purchases.""" + if not self.purchase_ids: + return False + self._merge(self.purchase_ids, self.dst_purchase_id) + return True diff --git a/purchase_merge/wizard/purchase_merge_views.xml b/purchase_merge/wizard/purchase_merge_views.xml new file mode 100644 index 00000000000..c07d003aade --- /dev/null +++ b/purchase_merge/wizard/purchase_merge_views.xml @@ -0,0 +1,58 @@ + + + + purchase.merge.automatic.wizard.form + purchase.merge.automatic.wizard + +
+ + +

+ Selected purchase will be merged together. +

+ + + + + + + + + + + + + +
+
+
+
+
+
+
+ + + Merge Selected Purchase + ir.actions.act_window + purchase.merge.automatic.wizard + form + + new + + +
From 54af494c0f697bef9060baa05eaf4f198351324d Mon Sep 17 00:00:00 2001 From: oca-ci Date: Thu, 23 Mar 2023 17:36:14 +0000 Subject: [PATCH 2/6] [UPD] Update purchase_merge.pot --- purchase_merge/i18n/purchase_merge.pot | 138 +++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 purchase_merge/i18n/purchase_merge.pot diff --git a/purchase_merge/i18n/purchase_merge.pot b/purchase_merge/i18n/purchase_merge.pot new file mode 100644 index 00000000000..1d70fb87532 --- /dev/null +++ b/purchase_merge/i18n/purchase_merge.pot @@ -0,0 +1,138 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_merge +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0\n" +"Report-Msgid-Bugs-To: \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: purchase_merge +#: model_terms:ir.ui.view,arch_db:purchase_merge.purchase_merge_automatic_wizard_form +msgid "Automatic Merge Wizard" +msgstr "" + +#. module: purchase_merge +#: model_terms:ir.ui.view,arch_db:purchase_merge.purchase_merge_automatic_wizard_form +msgid "Cancel" +msgstr "" + +#. module: purchase_merge +#: model:ir.model.fields,field_description:purchase_merge.field_purchase_merge_automatic_wizard__create_uid +msgid "Created by" +msgstr "" + +#. module: purchase_merge +#: model:ir.model.fields,field_description:purchase_merge.field_purchase_merge_automatic_wizard__create_date +msgid "Created on" +msgstr "" + +#. module: purchase_merge +#: model:ir.model.fields,field_description:purchase_merge.field_purchase_merge_automatic_wizard__dst_purchase_id +msgid "Destination" +msgstr "" + +#. module: purchase_merge +#: model:ir.model.fields,field_description:purchase_merge.field_purchase_merge_automatic_wizard__display_name +msgid "Display Name" +msgstr "" + +#. module: purchase_merge +#: model:ir.model.fields,field_description:purchase_merge.field_purchase_merge_automatic_wizard__id +msgid "ID" +msgstr "" + +#. module: purchase_merge +#: model:ir.model.fields,field_description:purchase_merge.field_purchase_merge_automatic_wizard____last_update +msgid "Last Modified on" +msgstr "" + +#. module: purchase_merge +#: model:ir.model.fields,field_description:purchase_merge.field_purchase_merge_automatic_wizard__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: purchase_merge +#: model:ir.model.fields,field_description:purchase_merge.field_purchase_merge_automatic_wizard__write_date +msgid "Last Updated on" +msgstr "" + +#. module: purchase_merge +#: model_terms:ir.ui.view,arch_db:purchase_merge.purchase_merge_automatic_wizard_form +msgid "Merge Purchase" +msgstr "" + +#. module: purchase_merge +#: model:ir.actions.act_window,name:purchase_merge.action_purchase_merge +msgid "Merge Selected Purchase" +msgstr "" + +#. module: purchase_merge +#: model:ir.model.fields,field_description:purchase_merge.field_purchase_merge_automatic_wizard__purchase_ids +#: model_terms:ir.ui.view,arch_db:purchase_merge.purchase_merge_automatic_wizard_form +msgid "Purchase" +msgstr "" + +#. module: purchase_merge +#: model_terms:ir.ui.view,arch_db:purchase_merge.purchase_merge_automatic_wizard_form +msgid "Selected purchase will be merged together." +msgstr "" + +#. module: purchase_merge +#: code:addons/purchase_merge/wizard/purchase_merge.py:0 +#, python-format +msgid "This purchase order lines have been merged {} : {}" +msgstr "" + +#. module: purchase_merge +#: code:addons/purchase_merge/wizard/purchase_merge.py:0 +#, python-format +msgid "You can't merge purchase orders that aren't in draft state like: {}" +msgstr "" + +#. module: purchase_merge +#: code:addons/purchase_merge/wizard/purchase_merge.py:0 +#, python-format +msgid "You can't merge purchase orders with different currencies: %s" +msgstr "" + +#. module: purchase_merge +#: code:addons/purchase_merge/wizard/purchase_merge.py:0 +#, python-format +msgid "You can't merge purchase orders with different fiscal positions: %s" +msgstr "" + +#. module: purchase_merge +#: code:addons/purchase_merge/wizard/purchase_merge.py:0 +#, python-format +msgid "You can't merge purchase orders with different incoterms: %s" +msgstr "" + +#. module: purchase_merge +#: code:addons/purchase_merge/wizard/purchase_merge.py:0 +#, python-format +msgid "You can't merge purchase orders with different payment terms: %s" +msgstr "" + +#. module: purchase_merge +#: code:addons/purchase_merge/wizard/purchase_merge.py:0 +#, python-format +msgid "You can't merge purchase orders with different picking types: %s" +msgstr "" + +#. module: purchase_merge +#: code:addons/purchase_merge/wizard/purchase_merge.py:0 +#, python-format +msgid "You can't merge purchase orders with different suppliers: %s" +msgstr "" + +#. module: purchase_merge +#: model:ir.model,name:purchase_merge.model_purchase_merge_automatic_wizard +msgid "purchase.merge.automatic.wizard" +msgstr "" From 4dcc5843b3ff943aed15631715e4bd61321c8b97 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 23 Mar 2023 17:42:50 +0000 Subject: [PATCH 3/6] [UPD] README.rst --- purchase_merge/README.rst | 39 ++++++++++------- purchase_merge/static/description/index.html | 44 ++++++++++---------- 2 files changed, 46 insertions(+), 37 deletions(-) diff --git a/purchase_merge/README.rst b/purchase_merge/README.rst index f4447bd2e83..986c72b6b88 100644 --- a/purchase_merge/README.rst +++ b/purchase_merge/README.rst @@ -13,11 +13,17 @@ Purchase Merge .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 -.. |badge3| image:: https://img.shields.io/badge/github-BojanOD%2Fpurchase--workflow-lightgray.png?logo=github - :target: https://github.com/BojanOD/purchase-workflow/tree/15.0/purchase_merge - :alt: BojanOD/purchase-workflow - -|badge1| |badge2| |badge3| +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github + :target: https://github.com/OCA/purchase-workflow/tree/15.0/purchase_merge + :alt: OCA/purchase-workflow +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/purchase-workflow-15-0/purchase-workflow-15-0-purchase_merge + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/142/15.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| This module adds a wizard to merge purchase order. @@ -50,18 +56,13 @@ To use this module, you need to: #. Merge purchase order with required criteria -Known issues / Roadmap -====================== - -* it could be improved by using [https://github.com/OCA/openupgradelib/blob/master/openupgradelib/openupgrade_merge_records.py](https://github.com/OCA/openupgradelib/blob/master/openupgradelib/openupgrade_merge_records.py) - Bug Tracker =========== -Bugs are tracked on `GitHub Issues `_. +Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -84,6 +85,16 @@ Contributors Maintainers ~~~~~~~~~~~ -This module is part of the `BojanOD/purchase-workflow `_ project on GitHub. +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/purchase-workflow `_ project on GitHub. -You are welcome to contribute. +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/purchase_merge/static/description/index.html b/purchase_merge/static/description/index.html index 3ec240b87ec..96e5132dd31 100644 --- a/purchase_merge/static/description/index.html +++ b/purchase_merge/static/description/index.html @@ -3,7 +3,7 @@ - + Purchase Merge