-
-
Notifications
You must be signed in to change notification settings - Fork 666
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by rousseldenis
- Loading branch information
Showing
19 changed files
with
932 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
============================= | ||
Sale Order Global Stock Route | ||
============================= | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:be5adf2ee53e411848534ea602ea7895819e90f5995d2db4a5a7b24c2d23d974 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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%2Fstock--logistics--workflow-lightgray.png?logo=github | ||
:target: https://github.com/OCA/stock-logistics-workflow/tree/18.0/sale_order_global_stock_route | ||
:alt: OCA/stock-logistics-workflow | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/stock-logistics-workflow-18-0/stock-logistics-workflow-18-0-sale_order_global_stock_route | ||
: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/stock-logistics-workflow&target_branch=18.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module adds the possibility to apply a general route on a | ||
quotation. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Configuration | ||
============= | ||
|
||
To use this module you have to activate the option Settings > Inventory | ||
> Warehouse > Multi-Step Routes | ||
|
||
Usage | ||
===== | ||
|
||
To use this module, you simply need to: | ||
|
||
1. Create a new quotation. | ||
2. Add the products that you need. | ||
3. Change the form route option. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-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/stock-logistics-workflow/issues/new?body=module:%20sale_order_global_stock_route%0Aversion:%2018.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 | ||
------- | ||
|
||
* Tecnativa | ||
|
||
Contributors | ||
------------ | ||
|
||
- `Tecnativa <https://www.tecnativa.com>`__: | ||
|
||
- Carlos Roca | ||
- Sergio Teruel | ||
- Stefan Ungureanu | ||
|
||
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/stock-logistics-workflow <https://github.com/OCA/stock-logistics-workflow/tree/18.0/sale_order_global_stock_route>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright 2020 Tecnativa - Carlos Roca | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "Sale Order Global Stock Route", | ||
"summary": "Add the possibility to choose one warehouse path for an order", | ||
"version": "18.0.1.0.0", | ||
"development_status": "Beta", | ||
"category": "Warehouse", | ||
"website": "https://github.com/OCA/stock-logistics-workflow", | ||
"author": "Tecnativa, Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"installable": True, | ||
"depends": ["sale_stock"], | ||
"data": ["views/sale_order_views.xml"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sale_order_global_stock_route | ||
# | ||
# Translators: | ||
# Carlos Roca <carlos.roca@tecnativa.com>, 2020 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2020-02-24 10:00+0000\n" | ||
"PO-Revision-Date: 2023-10-09 08:12+0000\n" | ||
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n" | ||
"Language-Team: \n" | ||
"Language: es\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" | ||
"X-Generator: Weblate 4.17\n" | ||
|
||
#. module: sale_order_global_stock_route | ||
#: model:ir.model.fields,field_description:sale_order_global_stock_route.field_sale_order__route_id | ||
msgid "Route" | ||
msgstr "Ruta" | ||
|
||
#. module: sale_order_global_stock_route | ||
#: model:ir.model,name:sale_order_global_stock_route.model_sale_order | ||
msgid "Sales Order" | ||
msgstr "Orden de Venta" | ||
|
||
#. module: sale_order_global_stock_route | ||
#: model:ir.model,name:sale_order_global_stock_route.model_sale_order_line | ||
msgid "Sales Order Line" | ||
msgstr "Línea de Orden de Venta" | ||
|
||
#. module: sale_order_global_stock_route | ||
#: model:ir.model.fields,help:sale_order_global_stock_route.field_sale_order__route_id | ||
msgid "" | ||
"When you change this field all the lines will be changed. After use it you " | ||
"will be able to change each line." | ||
msgstr "" | ||
"Cuando cambie este campo todas las líneas serán cambiadas. Después de usarlo " | ||
"podrá cambiar cada línea." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sale_order_global_stock_route | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2023-11-17 09:33+0000\n" | ||
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n" | ||
"Language-Team: none\n" | ||
"Language: it\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" | ||
"X-Generator: Weblate 4.17\n" | ||
|
||
#. module: sale_order_global_stock_route | ||
#: model:ir.model.fields,field_description:sale_order_global_stock_route.field_sale_order__route_id | ||
msgid "Route" | ||
msgstr "Percorso" | ||
|
||
#. module: sale_order_global_stock_route | ||
#: model:ir.model,name:sale_order_global_stock_route.model_sale_order | ||
msgid "Sales Order" | ||
msgstr "Ordine di vendita" | ||
|
||
#. module: sale_order_global_stock_route | ||
#: model:ir.model,name:sale_order_global_stock_route.model_sale_order_line | ||
msgid "Sales Order Line" | ||
msgstr "Riga ordine di vendita" | ||
|
||
#. module: sale_order_global_stock_route | ||
#: model:ir.model.fields,help:sale_order_global_stock_route.field_sale_order__route_id | ||
msgid "" | ||
"When you change this field all the lines will be changed. After use it you " | ||
"will be able to change each line." | ||
msgstr "" | ||
"Quando viene cambiato questo campo tutte le righe saranno cambiate. Dopo " | ||
"averlo usato sarà possibile cambiare ogni riga." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sale_order_global_stock_route | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2023-12-27 14:35+0000\n" | ||
"Last-Translator: Adriano Prado <adrianojprado@gmail.com>\n" | ||
"Language-Team: none\n" | ||
"Language: pt_BR\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" | ||
"X-Generator: Weblate 4.17\n" | ||
|
||
#. module: sale_order_global_stock_route | ||
#: model:ir.model.fields,field_description:sale_order_global_stock_route.field_sale_order__route_id | ||
msgid "Route" | ||
msgstr "Rota" | ||
|
||
#. module: sale_order_global_stock_route | ||
#: model:ir.model,name:sale_order_global_stock_route.model_sale_order | ||
msgid "Sales Order" | ||
msgstr "Pedido de Venda" | ||
|
||
#. module: sale_order_global_stock_route | ||
#: model:ir.model,name:sale_order_global_stock_route.model_sale_order_line | ||
msgid "Sales Order Line" | ||
msgstr "Linha de Pedido de Venda" | ||
|
||
#. module: sale_order_global_stock_route | ||
#: model:ir.model.fields,help:sale_order_global_stock_route.field_sale_order__route_id | ||
msgid "" | ||
"When you change this field all the lines will be changed. After use it you " | ||
"will be able to change each line." | ||
msgstr "" | ||
"Quando você altera este campo, todas as linhas serão alteradas. Após o uso, " | ||
"você poderá alterar cada linha." | ||
|
||
#~ msgid "Sale Order" | ||
#~ msgstr "Pedido de Venda" |
36 changes: 36 additions & 0 deletions
36
sale_order_global_stock_route/i18n/sale_order_global_stock_route.pot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sale_order_global_stock_route | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 17.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: sale_order_global_stock_route | ||
#: model:ir.model.fields,field_description:sale_order_global_stock_route.field_sale_order__route_id | ||
msgid "Route" | ||
msgstr "" | ||
|
||
#. module: sale_order_global_stock_route | ||
#: model:ir.model,name:sale_order_global_stock_route.model_sale_order | ||
msgid "Sales Order" | ||
msgstr "" | ||
|
||
#. module: sale_order_global_stock_route | ||
#: model:ir.model,name:sale_order_global_stock_route.model_sale_order_line | ||
msgid "Sales Order Line" | ||
msgstr "" | ||
|
||
#. module: sale_order_global_stock_route | ||
#: model:ir.model.fields,help:sale_order_global_stock_route.field_sale_order__route_id | ||
msgid "" | ||
"When you change this field all the lines will be changed. After use it you " | ||
"will be able to change each line." | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import sale_order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Copyright 2020 Tecnativa - Carlos Roca | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from odoo import api, fields, models | ||
|
||
|
||
class SaleOrder(models.Model): | ||
_inherit = "sale.order" | ||
|
||
route_id = fields.Many2one( | ||
comodel_name="stock.route", | ||
string="Route", | ||
domain=[("sale_selectable", "=", True)], | ||
help="When you change this field all the lines will be changed." | ||
" After use it you will be able to change each line.", | ||
) | ||
|
||
@api.onchange("route_id") | ||
def _onchange_route_id(self): | ||
"""We could do sale order line route_id field compute store writable. | ||
But this field is created by Odoo so I prefer not modify it. | ||
""" | ||
self.order_line.route_id = self.route_id | ||
|
||
def write(self, vals): | ||
res = super().write(vals) | ||
if "route_id" in vals: | ||
lines = self.mapped("order_line").filtered( | ||
lambda line: line.route_id.id != vals["route_id"] | ||
) | ||
lines.write({"route_id": vals["route_id"]}) | ||
return res | ||
|
||
class SaleOrderLine(models.Model): | ||
_inherit = "sale.order.line" | ||
|
||
@api.onchange("product_id") | ||
def global_stock_route_product_id_change(self): | ||
if self.order_id.route_id: | ||
self.route_id = self.order_id.route_id | ||
|
||
@api.model_create_multi | ||
def create(self, vals_list): | ||
for vals in vals_list: | ||
if not vals.get("route_id", False): | ||
order = self.env["sale.order"].browse(vals["order_id"]) | ||
if order.route_id: | ||
vals["route_id"] = order.route_id.id | ||
return super().create(vals_list) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = ["whool"] | ||
build-backend = "whool.buildapi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
To use this module you have to activate the option Settings \> Inventory | ||
\> Warehouse \> Multi-Step Routes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- [Tecnativa](https://www.tecnativa.com): | ||
|
||
> - Carlos Roca | ||
> - Sergio Teruel | ||
> - Stefan Ungureanu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This module adds the possibility to apply a general route on a | ||
quotation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
To use this module, you simply need to: | ||
|
||
1. Create a new quotation. | ||
2. Add the products that you need. | ||
3. Change the form route option. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.