Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 157 additions & 0 deletions sale_order_merge/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
=================
Merge sale orders
=================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:134a9cebed41e691e1bd638ecf29ea46cd65f85d10d0193632e5d33e29feaf9c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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-OCA%2Fsale--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/sale-workflow/tree/17.0/sale_order_merge
:alt: OCA/sale-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_order_merge
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows the sale employee to merge draft or confirmed orders
from the same customer.

When orders are merged, draft invoices and unprocessed outgoing pickings
will be merged as well.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you must go to the main sales order you want to
merge with other sales orders. If there are any candidates, you will see
a "Merge" button in the header of the sales order form. Clicking this
button will open a window with all preselected mergeable sales orders.
Delete the orders you do not want to merge and click the "Merge" button
in the footer of the pop-up window. The main window will update with the
updated main sales order.

The merge criteria are defined as follows:
------------------------------------------

- Same customer, shipping address, warehouse, and company.
- Orders must be in "Draft" status.
- You can also merge confirmed orders if you enable the Merge Order
Confirmation setting. |MERGE_ORDER_CONFIRM|

Merging from the form view
--------------------------

1. Go to Sales

2. Create a new sales order and save

3. If there are any sales orders that match the merge criteria mentioned
above, a Merge button will be enabled.

|SHOW_BTN_MERGE_FORM|

4. Pressing the Merge button displays a wizard in which you can select
the target sales order and whether you want to remove it from those
ready to be merged.

|WIZARD_MERGE|

5. Press the Merge button to perform the merge. Keep in mind that this
process will run all the validations performed in the normal
workflow.

Merging from the tree view
--------------------------

1. Go to Sales

2. Select all the orders you want to merge and then select Merge
selected orders from the actions menu.

|MENU_MERGE_TREE|

3. If, when you press this menu, there are orders that do not meet the
criteria, an exception will be thrown with the details so you can
correct them.

|ERROR_CRITERIA|

4. Repeat steps 4 and 5 from the previous section.

The criteria can be easily extended in a custom module using the
\_get_merge_domain method of the sale.order model.

.. |MERGE_ORDER_CONFIRM| image:: https://raw.githubusercontent.com/OCA/sale-workflow/17.0/sale_order_merge/static/img/readme/MERGE_ORDER_CONFIRM.png
.. |SHOW_BTN_MERGE_FORM| image:: https://raw.githubusercontent.com/OCA/sale-workflow/17.0/sale_order_merge/static/img/readme/SHOW_BTN_MERGE_FORM.png
.. |WIZARD_MERGE| image:: https://raw.githubusercontent.com/OCA/sale-workflow/17.0/sale_order_merge/static/img/readme/WIZARD_MERGE.png
.. |MENU_MERGE_TREE| image:: https://raw.githubusercontent.com/OCA/sale-workflow/17.0/sale_order_merge/static/img/readme/MENU_MERGE_TREE.png
.. |ERROR_CRITERIA| image:: https://raw.githubusercontent.com/OCA/sale-workflow/17.0/sale_order_merge/static/img/readme/ERROR_CRITERIA.png

Known issues / Roadmap
======================

- Orders with an invoice exception or a picking exception cannot be
merged.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/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 <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_order_merge%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Opener B.V.

Contributors
------------

- Stefan Rijnhart stefan@opener.amsterdam
- `Binhex <https://www.binhex.cloud/>`__:

- Edilio Escalona Almira e.escalona@binhex.cloud

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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

This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/17.0/sale_order_merge>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions sale_order_merge/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import wizards
23 changes: 23 additions & 0 deletions sale_order_merge/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2016 Opener B.V. - Stefan Rijnhart
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Merge sale orders",
"summary": "Merge sale orders that are confirmed, invoiced or delivered",
"version": "17.0.1.0.0",
"category": "Sales Management",
"website": "https://github.com/OCA/sale-workflow",
"author": "Opener B.V., Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
"sale_stock",
],
"data": [
"security/ir.model.access.csv",
"data/ir_actions_server_data.xml",
"views/sale_order.xml",
"wizards/wizard_sale_order_merge.xml",
"wizards/res_config_settings.xml",
],
}
14 changes: 14 additions & 0 deletions sale_order_merge/data/ir_actions_server_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="action_merge_selected_orders" model="ir.actions.server">
<field name="name">Merge selected orders</field>
<field name="model_id" ref="sale.model_sale_order" />
<field name="binding_model_id" ref="sale.model_sale_order" />
<field name="binding_view_types">list</field>
<field name="state">code</field>
<field name="code">
if records:
action = records.action_button_merge()
</field>
</record>
</odoo>
128 changes: 128 additions & 0 deletions sale_order_merge/i18n/am.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_order_merge
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: sale-workflow (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-11-22 23:35+0000\n"
"PO-Revision-Date: 2016-10-21 21:00+0000\n"
"Last-Translator: <>\n"
"Language-Team: Amharic (http://www.transifex.com/oca/OCA-sale-workflow-8-0/"
"language/am/)\n"
"Language: am\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. module: sale_order_merge
#: field:sale.order,merge_with:0 field:sale.order.merge,mergeable:0
msgid "Can be merged with"
msgstr ""

#. module: sale_order_merge
#: view:sale.order.merge:sale_order_merge.view_sale_order_merge_form
msgid "Cancel"
msgstr "Cancelar"

#. module: sale_order_merge
#: code:addons/sale_order_merge/models/sale_order_merge.py:149
#, python-format
msgid ""
"Cannot merge these orders because their order policies cannot be reconciled."
msgstr ""

#. module: sale_order_merge
#: field:sale.order.merge,create_uid:0
msgid "Created by"
msgstr "Creado por"

#. module: sale_order_merge
#: field:sale.order.merge,create_date:0
msgid "Created on"
msgstr "Creado en"

#. module: sale_order_merge
#: field:sale.order.merge,display_name:0
msgid "Display Name"
msgstr ""

#. module: sale_order_merge
#: field:sale.order,merge_ok:0
msgid "Has candidates to merge with"
msgstr ""

#. module: sale_order_merge
#: field:sale.order.merge,id:0
msgid "ID"
msgstr "ID"

#. module: sale_order_merge
#: field:sale.order.merge,__last_update:0
msgid "Last Modified on"
msgstr ""

#. module: sale_order_merge
#: field:sale.order.merge,write_uid:0
msgid "Last Updated by"
msgstr "Última actualización por"

#. module: sale_order_merge
#: field:sale.order.merge,write_date:0
msgid "Last Updated on"
msgstr "Última actualización en"

#. module: sale_order_merge
#: view:sale.order:sale_order_merge.sale_order_form
#: view:sale.order.merge:sale_order_merge.view_sale_order_merge_form
msgid "Merge"
msgstr ""

#. module: sale_order_merge
#: field:sale.order.merge,sale_order:0
msgid "Merge into"
msgstr ""

#. module: sale_order_merge
#: code:addons/sale_order_merge/models/sale_order.py:69
#: model:ir.model,name:sale_order_merge.model_sale_order_merge
#: view:sale.order.merge:sale_order_merge.view_sale_order_merge_form
#, python-format
msgid "Merge sale orders"
msgstr ""

#. module: sale_order_merge
#: code:addons/sale_order_merge/models/sale_order_merge.py:197
#, python-format
msgid "Merged into %s"
msgstr ""

#. module: sale_order_merge
#: code:addons/sale_order_merge/models/sale_order_merge.py:116
#, python-format
msgid "Merged sale order"
msgstr ""

#. module: sale_order_merge
#: code:addons/sale_order_merge/models/sale_order_merge.py:199
#, python-format
msgid "Order(s) %s merged into this one"
msgstr ""

#. module: sale_order_merge
#: field:sale.order.merge,to_merge:0
msgid "Orders to merge"
msgstr ""

#. module: sale_order_merge
#: model:ir.model,name:sale_order_merge.model_sale_order
msgid "Sales Order"
msgstr ""

#. module: sale_order_merge
#: view:sale.order.merge:sale_order_merge.view_sale_order_merge_form
msgid "or"
msgstr "ወይም"
Loading