From 56a4d39ecdc81a1c64c141140bcc699bb1021d5e Mon Sep 17 00:00:00 2001 From: Maksym Yankin Date: Fri, 5 Aug 2022 15:36:56 +0300 Subject: [PATCH 1/7] [ADD][15.0] purchase_sale_stock_inter_company --- purchase_sale_stock_inter_company/README.rst | 93 ++++++++ purchase_sale_stock_inter_company/__init__.py | 1 + .../__manifest__.py | 18 ++ purchase_sale_stock_inter_company/i18n/de.po | 79 +++++++ purchase_sale_stock_inter_company/i18n/es.po | 161 ++++++++++++++ purchase_sale_stock_inter_company/i18n/fr.po | 162 ++++++++++++++ .../i18n/fr_FR.po | 163 ++++++++++++++ purchase_sale_stock_inter_company/i18n/it.po | 150 +++++++++++++ .../i18n/purchase_sale_inter_company.pot | 206 ++++++++++++++++++ .../purchase_sale_stock_inter_company.pot | 73 +++++++ purchase_sale_stock_inter_company/i18n/sl.po | 162 ++++++++++++++ .../i18n/zh_CN.po | 81 +++++++ .../models/__init__.py | 4 + .../models/purchase_order.py | 35 +++ .../models/res_company.py | 18 ++ .../models/res_config.py | 20 ++ .../models/stock_picking.py | 57 +++++ .../readme/CONFIGURE.rst | 6 + .../readme/CONTRIBUTORS.rst | 17 ++ .../readme/DESCRIPTION.rst | 8 + .../readme/ROADMAP.rst | 1 + .../static/description/icon.png | Bin 0 -> 3735 bytes .../tests/__init__.py | 1 + .../test_inter_company_purchase_sale_stock.py | 71 ++++++ .../views/res_config_view.xml | 21 ++ 25 files changed, 1608 insertions(+) create mode 100644 purchase_sale_stock_inter_company/README.rst create mode 100644 purchase_sale_stock_inter_company/__init__.py create mode 100644 purchase_sale_stock_inter_company/__manifest__.py create mode 100644 purchase_sale_stock_inter_company/i18n/de.po create mode 100644 purchase_sale_stock_inter_company/i18n/es.po create mode 100644 purchase_sale_stock_inter_company/i18n/fr.po create mode 100644 purchase_sale_stock_inter_company/i18n/fr_FR.po create mode 100644 purchase_sale_stock_inter_company/i18n/it.po create mode 100644 purchase_sale_stock_inter_company/i18n/purchase_sale_inter_company.pot create mode 100644 purchase_sale_stock_inter_company/i18n/purchase_sale_stock_inter_company.pot create mode 100644 purchase_sale_stock_inter_company/i18n/sl.po create mode 100644 purchase_sale_stock_inter_company/i18n/zh_CN.po create mode 100644 purchase_sale_stock_inter_company/models/__init__.py create mode 100644 purchase_sale_stock_inter_company/models/purchase_order.py create mode 100644 purchase_sale_stock_inter_company/models/res_company.py create mode 100644 purchase_sale_stock_inter_company/models/res_config.py create mode 100644 purchase_sale_stock_inter_company/models/stock_picking.py create mode 100644 purchase_sale_stock_inter_company/readme/CONFIGURE.rst create mode 100644 purchase_sale_stock_inter_company/readme/CONTRIBUTORS.rst create mode 100644 purchase_sale_stock_inter_company/readme/DESCRIPTION.rst create mode 100644 purchase_sale_stock_inter_company/readme/ROADMAP.rst create mode 100644 purchase_sale_stock_inter_company/static/description/icon.png create mode 100644 purchase_sale_stock_inter_company/tests/__init__.py create mode 100644 purchase_sale_stock_inter_company/tests/test_inter_company_purchase_sale_stock.py create mode 100644 purchase_sale_stock_inter_company/views/res_config_view.xml diff --git a/purchase_sale_stock_inter_company/README.rst b/purchase_sale_stock_inter_company/README.rst new file mode 100644 index 00000000000..537b4ed6507 --- /dev/null +++ b/purchase_sale_stock_inter_company/README.rst @@ -0,0 +1,93 @@ +.. 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 + +================================= +Purchase Sale Stock Inter Company +================================= + +This module is useful if there are multiple companies in the same Odoo database and those companies sell goods or services among themselves. +It allows to create a sale order in company A from a purchase order in company B. + +Imagine you have company A and company B in the same Odoo database: + +* Company A purchase goods from company B. +* Company A will create a purchase order with company B as supplier. +* This module automate the creation of the sale order in company B with company A as customer. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +To configure this module, you need to: +#. go to the menu *General Settings > Companies > Companies*. +#. Select one of the companies. +#. Go to the tab *Inter-Company* then the group *Purchase To Sale*. +#. If you check the option *Sale Auto Validation* in the configuration of company B, then when you validate a *Purchase Order* in company A with company B as supplier, the *Sale Order* will be automatically validated in company B with company A as customer. + +Known issues / Roadmap +====================== + +* If you want also to have different warehouses for your sales orders you can install `stock` and `purchase_sale_stock_inter_company` will be auto installed. + +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 +~~~~~~~ + +* Odoo SA +* Akretion +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* Odoo S.A. (original module `inter_company_rules`) +* Andrea Stirpe +* Adria Gil Sorribes +* Christopher Ormaza +* `Akretion `: + + * Chafique Delli + * Alexis de Lattre + * David Beal +* `Tecnativa `: + + * Jairo Llopis + * David Vidal + * Pedro M. Baeza +* `Camptocamp `: + + * Maksym Yankin + +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/multi-company `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/purchase_sale_stock_inter_company/__init__.py b/purchase_sale_stock_inter_company/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/purchase_sale_stock_inter_company/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/purchase_sale_stock_inter_company/__manifest__.py b/purchase_sale_stock_inter_company/__manifest__.py new file mode 100644 index 00000000000..38a82cba0ac --- /dev/null +++ b/purchase_sale_stock_inter_company/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2013-Today Odoo SA +# Copyright 2016-2019 Chafique DELLI @ Akretion +# Copyright 2018-2019 Tecnativa - Carlos Dauden +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Inter Company Module for Purchase to Sale Order with warehouse", + "summary": "Intercompany PO/SO rules", + "version": "15.0.1.0.0", + "category": "Purchase Management", + "website": "https://github.com/OCA/multi-company", + "author": "Odoo SA, Akretion, Tecnativa, Odoo Community Association (OCA)", + "license": "AGPL-3", + "installable": True, + "auto_install": True, + "depends": ["purchase_sale_inter_company", "stock"], + "data": ["views/res_config_view.xml"], +} diff --git a/purchase_sale_stock_inter_company/i18n/de.po b/purchase_sale_stock_inter_company/i18n/de.po new file mode 100644 index 00000000000..efb3ed87da4 --- /dev/null +++ b/purchase_sale_stock_inter_company/i18n/de.po @@ -0,0 +1,79 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_sale_stock_inter_company +# +# Translators: +# Rudolf Schnapka , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-08-05 13:15+0000\n" +"PO-Revision-Date: 2017-04-22 02:48+0000\n" +"Last-Translator: Rudolf Schnapka , 2017\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"Language: de\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: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_res_company +msgid "Companies" +msgstr "Unternehmen" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_company__warehouse_id +msgid "" +"Default value to set on Sale Orders that will be created based on Purchase " +"Orders made to this company" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_config_settings__warehouse_id +msgid "" +"Default value to set on Sale Orders that will be created based on Purchase " +"Orders made to this company." +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_stock_picking__intercompany_picking_id +msgid "Intercompany Picking" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_purchase_order +msgid "Purchase Order" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: code:addons/purchase_sale_stock_inter_company/models/stock_picking.py:0 +#, python-format +msgid "" +"There's no corresponding line in PO %(po)s for assigning qty from " +"%(pick_name)s for product %(product)s" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_stock_picking +msgid "Transfer" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company__warehouse_id +msgid "Warehouse For Sale Orders" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings__warehouse_id +msgid "Warehouse for Sale Orders" +msgstr "" + +#~ msgid "Invoice" +#~ msgstr "Rechnung" diff --git a/purchase_sale_stock_inter_company/i18n/es.po b/purchase_sale_stock_inter_company/i18n/es.po new file mode 100644 index 00000000000..3fd2eb3b4c8 --- /dev/null +++ b/purchase_sale_stock_inter_company/i18n/es.po @@ -0,0 +1,161 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_sale_stock_inter_company +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-08-05 13:15+0000\n" +"PO-Revision-Date: 2021-03-09 10:45+0000\n" +"Last-Translator: Ana Suárez \n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_res_company +msgid "Companies" +msgstr "Compañías" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_res_config_settings +msgid "Config Settings" +msgstr "Ajustes Configuración" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_company__warehouse_id +msgid "" +"Default value to set on Sale Orders that will be created based on Purchase " +"Orders made to this company" +msgstr "" +"Valor por defecto a establecer en pedidos de venta que serán creados en base " +"a pedidos de compra realizados a esta compañía" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_config_settings__warehouse_id +msgid "" +"Default value to set on Sale Orders that will be created based on Purchase " +"Orders made to this company." +msgstr "" +"Valor por defecto a establecer en pedidos de venta que serán creados en base " +"a pedidos de compra realizados a esta compañía." + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_stock_picking__intercompany_picking_id +msgid "Intercompany Picking" +msgstr "Albarán intercompañía" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_purchase_order +msgid "Purchase Order" +msgstr "Pedido de compra" + +#. module: purchase_sale_stock_inter_company +#: code:addons/purchase_sale_stock_inter_company/models/stock_picking.py:0 +#, fuzzy, python-format +msgid "" +"There's no corresponding line in PO %(po)s for assigning qty from " +"%(pick_name)s for product %(product)s" +msgstr "" +"No hay una línea correspondiente en el pedido de compra %s para asignar " +"cantidad desde %(pick_name)s para el producto %(product)s" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_stock_picking +msgid "Transfer" +msgstr "Transferir" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company__warehouse_id +msgid "Warehouse For Sale Orders" +msgstr "Almacén para pedidos de venta" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings__warehouse_id +msgid "Warehouse for Sale Orders" +msgstr "Almacén para pedidos de venta" + +#~ msgid "Create Sale Orders when buying to this company" +#~ msgstr "Crear pedido de venta al comprar a esta compañía" + +#~ msgid "" +#~ "Generate a Sale Order when a Purchase Order with this company as supplier " +#~ "is created.\n" +#~ " The intercompany user must at least be Sale User." +#~ msgstr "" +#~ "Generar un pedido de venta cuando se cree un pedido de compra con esta " +#~ "compañía como proveedor.\n" +#~ "El usuario intercompañía debe ser al menos Usuario de Ventas." + +#~ msgid "Intercompany Sale User" +#~ msgstr "Usuario de venta intercompañía" + +#~ msgid "Journal Entries" +#~ msgstr "Asientos contables" + +#~ msgid "Purchase/Sale" +#~ msgstr "Compra/Venta" + +#~ msgid "Sale Orders Auto Validation" +#~ msgstr "Auto confirmar pedidos de venta" + +#~ msgid "Sale from purchase" +#~ msgstr "Venta desde compra" + +#~ msgid "Sales Order" +#~ msgstr "Pedido de venta" + +#~ msgid "Sales Order Line" +#~ msgstr "Línea de pedido de venta" + +#~ msgid "Source Purchase Order" +#~ msgstr "Pedido de compra de origen" + +#~ msgid "Source Purchase Order Line" +#~ msgstr "Línea pedido de compra origen" + +#~ msgid "This vendor bill is related with: {}" +#~ msgstr "Esta factura de proveedor está relacionada con: {}" + +#~ msgid "" +#~ "User used to create the sales order arising from a purchase order in " +#~ "another company." +#~ msgstr "" +#~ "El usuario solía crear los pedidos de venta que surgen de un pedido de " +#~ "compra en otra compañía." + +#~ msgid "" +#~ "When a Sale Order is created by a multi company rule for this company, it " +#~ "will automatically validate it." +#~ msgstr "" +#~ "Cuando un pedido de venta es creado por una regla intercompañía para esta " +#~ "compañía, este sera confirmado automáticamente." + +#~ msgid "You can't cancel an order that is %s" +#~ msgstr "No puede cancelar un pedido que es %s" + +#~ msgid "" +#~ "You cannot create SO from PO because product '%s' is not intercompany" +#~ msgstr "" +#~ "No puede crear pedido de venta desde pedido de compra porque el producto " +#~ "'%s' no es intercompañía" + +#~ msgid "" +#~ "You cannot create SO from PO because sale price list currency is " +#~ "different than purchase price list currency." +#~ msgstr "" +#~ "No puede crear pedido de venta desde pedido de compra porque la moneda de " +#~ "la tarifa de venta es distinta de la moneda de la tarifa de compra." + +#~ msgid "Invoice" +#~ msgstr "Factura" + +#~ msgid "Quotation" +#~ msgstr "Presupuesto" diff --git a/purchase_sale_stock_inter_company/i18n/fr.po b/purchase_sale_stock_inter_company/i18n/fr.po new file mode 100644 index 00000000000..03204d4d5f9 --- /dev/null +++ b/purchase_sale_stock_inter_company/i18n/fr.po @@ -0,0 +1,162 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_sale_stock_inter_company +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-08-05 13:15+0000\n" +"PO-Revision-Date: 2017-10-19 00:51+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\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: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_res_company +msgid "Companies" +msgstr "Sociétés" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_company__warehouse_id +msgid "" +"Default value to set on Sale Orders that will be created based on Purchase " +"Orders made to this company" +msgstr "" +"Valeur par défaut mise sur les commandes de vente créés à partir des " +"commandes d'achat faite à cette société" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_config_settings__warehouse_id +msgid "" +"Default value to set on Sale Orders that will be created based on Purchase " +"Orders made to this company." +msgstr "" +"Valeur par défaut mise sur les commandes de vente créés à partir des " +"commandes d'achat faite à cette société." + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_stock_picking__intercompany_picking_id +msgid "Intercompany Picking" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_purchase_order +msgid "Purchase Order" +msgstr "Bon de commande" + +#. module: purchase_sale_stock_inter_company +#: code:addons/purchase_sale_stock_inter_company/models/stock_picking.py:0 +#, python-format +msgid "" +"There's no corresponding line in PO %(po)s for assigning qty from " +"%(pick_name)s for product %(product)s" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_stock_picking +msgid "Transfer" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company__warehouse_id +msgid "Warehouse For Sale Orders" +msgstr "Entrepôt pour les commandes de vente" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings__warehouse_id +#, fuzzy +msgid "Warehouse for Sale Orders" +msgstr "Entrepôt pour les commandes de vente" + +#, fuzzy +#~ msgid "Purchase/Sale" +#~ msgstr "Achat vers Vente" + +#~ msgid "Sale Orders Auto Validation" +#~ msgstr "Auto Validation des commandes de vente" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Commande de ventes" + +#~ msgid "Sales Order Line" +#~ msgstr "Ligne de commandes de vente" + +#~ msgid "Source Purchase Order" +#~ msgstr "Commande d'achat source" + +#~ msgid "Source Purchase Order Line" +#~ msgstr "Ligne de commande d'achat source" + +#~ msgid "" +#~ "When a Sale Order is created by a multi company rule for this company, it " +#~ "will automatically validate it." +#~ msgstr "" +#~ "Quand une commande de vente est créé en mode multi-société pour cette " +#~ "société, elle sera automatiquement validé." + +#~ msgid "" +#~ "You cannot create SO from PO because product '%s' is not intercompany" +#~ msgstr "" +#~ "Vous ne pouvez pas créer la SO à partir de la PO car le produit '%s' " +#~ "n'est pas multi-société" + +#, fuzzy +#~ msgid "" +#~ "You cannot create SO from PO because sale price list currency is " +#~ "different than purchase price list currency." +#~ msgstr "" +#~ "Vous ne pouvez pas créer la SO à partir de la PO car la devise sur la " +#~ "liste de prix de vente est différente de la devise sur la liste de prix " +#~ "d'achat." + +#~ msgid "Invoice" +#~ msgstr "Facture" + +#~ msgid "" +#~ "Configure correct warehouse for company (%s) in Menu: Settings/companies/" +#~ "companies" +#~ msgstr "" +#~ "Configurez correctement l'entrepôt pour la société (%s) dans le Menu: " +#~ "Configuration/sociétés/sociétés" + +#~ msgid "Output - A" +#~ msgstr "Output - A" + +#~ msgid "Output - B" +#~ msgstr "Output - B" + +#~ msgid "Sale Auto Validation" +#~ msgstr "Auto Validation de la commande de vente" + +#~ msgid "Stock - A" +#~ msgstr "Stock - A" + +#~ msgid "Stock - B" +#~ msgstr "Stock - B" + +#~ msgid "" +#~ "When a Sale Order is created by a multi company rule for this company, it " +#~ "will automatically validate it" +#~ msgstr "" +#~ "Quand une commande de vente est créé en mode multi-société pour cette " +#~ "société, elle sera automatiquement validé" + +#~ msgid "" +#~ "{'invisible':['|', ('invoice_method','in', ['picking', 'manual', " +#~ "'intercompany']), '|', ('state','!=', 'approved'), ('invoiced','=',True)]}" +#~ msgstr "" +#~ "{'invisible':['|', ('invoice_method','in', ['picking', 'manual', " +#~ "'intercompany']), '|', ('state','!=', 'approved'), ('invoiced','=',True)]}" diff --git a/purchase_sale_stock_inter_company/i18n/fr_FR.po b/purchase_sale_stock_inter_company/i18n/fr_FR.po new file mode 100644 index 00000000000..26132ec15fd --- /dev/null +++ b/purchase_sale_stock_inter_company/i18n/fr_FR.po @@ -0,0 +1,163 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_sale_stock_inter_company +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-08-05 13:15+0000\n" +"PO-Revision-Date: 2017-10-19 00:51+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: French (France) (https://www.transifex.com/oca/teams/23907/" +"fr_FR/)\n" +"Language: fr_FR\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: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_res_company +msgid "Companies" +msgstr "Sociétés" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_company__warehouse_id +msgid "" +"Default value to set on Sale Orders that will be created based on Purchase " +"Orders made to this company" +msgstr "" +"Valeur par défaut mise sur les commandes de vente créés à partir des " +"commandes d'achat faite à cette société" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_config_settings__warehouse_id +msgid "" +"Default value to set on Sale Orders that will be created based on Purchase " +"Orders made to this company." +msgstr "" +"Valeur par défaut mise sur les commandes de vente créés à partir des " +"commandes d'achat faite à cette société." + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_stock_picking__intercompany_picking_id +msgid "Intercompany Picking" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_purchase_order +msgid "Purchase Order" +msgstr "Commande d'achat" + +#. module: purchase_sale_stock_inter_company +#: code:addons/purchase_sale_stock_inter_company/models/stock_picking.py:0 +#, python-format +msgid "" +"There's no corresponding line in PO %(po)s for assigning qty from " +"%(pick_name)s for product %(product)s" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_stock_picking +msgid "Transfer" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company__warehouse_id +msgid "Warehouse For Sale Orders" +msgstr "Entrepôt pour les commandes de vente" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings__warehouse_id +#, fuzzy +msgid "Warehouse for Sale Orders" +msgstr "Entrepôt pour les commandes de vente" + +#, fuzzy +#~ msgid "Purchase/Sale" +#~ msgstr "Achat vers Vente" + +#~ msgid "Sale Orders Auto Validation" +#~ msgstr "Auto Validation des commandes de vente" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Commandes de vente" + +#~ msgid "Sales Order Line" +#~ msgstr "Ligne de commandes de vente" + +#~ msgid "Source Purchase Order" +#~ msgstr "Commande d'achat source" + +#~ msgid "Source Purchase Order Line" +#~ msgstr "Ligne de commande d'achat source" + +#~ msgid "" +#~ "When a Sale Order is created by a multi company rule for this company, it " +#~ "will automatically validate it." +#~ msgstr "" +#~ "Quand une commande de vente est créé en mode inter-société pour cette " +#~ "société, elle sera automatiquement validé." + +#~ msgid "" +#~ "You cannot create SO from PO because product '%s' is not intercompany" +#~ msgstr "" +#~ "Vous ne pouvez pas créer la SO à partir de la PO car le produit '%s' " +#~ "n'est pas multi-société" + +#, fuzzy +#~ msgid "" +#~ "You cannot create SO from PO because sale price list currency is " +#~ "different than purchase price list currency." +#~ msgstr "" +#~ "Vous ne pouvez pas créer la SO à partir de la PO car la devise sur la " +#~ "liste de prix de vente est différente de la devise sur la liste de prix " +#~ "d'achat." + +#~ msgid "Invoice" +#~ msgstr "Facture" + +#~ msgid "" +#~ "Configure correct warehouse for company (%s) in Menu: Settings/companies/" +#~ "companies" +#~ msgstr "" +#~ "Configurez correctement l'entrepôt pour la société (%s) dans le Menu: " +#~ "Configuration/sociétés/sociétés" + +#~ msgid "Output - A" +#~ msgstr "Output - A" + +#~ msgid "Output - B" +#~ msgstr "Output - B" + +#~ msgid "Sale Auto Validation" +#~ msgstr "Auto Validation de la commande de vente" + +#~ msgid "Stock - A" +#~ msgstr "Stock - A" + +#~ msgid "Stock - B" +#~ msgstr "Stock - B" + +#~ msgid "" +#~ "When a Sale Order is created by a multi company rule for this company, it " +#~ "will automatically validate it" +#~ msgstr "" +#~ "Quand une commande de vente est créé en mode inter-société pour cette " +#~ "société, elle sera automatiquement validé" + +#~ msgid "" +#~ "{'invisible':['|', ('invoice_method','in', ['picking', 'manual', " +#~ "'intercompany']), '|', ('state','!=', 'approved'), ('invoiced','=',True)]}" +#~ msgstr "" +#~ "{'invisible':['|', ('invoice_method','in', ['picking', 'manual', " +#~ "'intercompany']), '|', ('state','!=', 'approved'), ('invoiced','=',True)]}" diff --git a/purchase_sale_stock_inter_company/i18n/it.po b/purchase_sale_stock_inter_company/i18n/it.po new file mode 100644 index 00000000000..c530d4396cc --- /dev/null +++ b/purchase_sale_stock_inter_company/i18n/it.po @@ -0,0 +1,150 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_sale_stock_inter_company +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-08-05 13:15+0000\n" +"PO-Revision-Date: 2020-02-20 13:13+0000\n" +"Last-Translator: Lorenzo Battistini \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 3.10\n" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_res_company +msgid "Companies" +msgstr "Aziende" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_res_config_settings +msgid "Config Settings" +msgstr "Impostazioni di configurazione" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_company__warehouse_id +msgid "" +"Default value to set on Sale Orders that will be created based on Purchase " +"Orders made to this company" +msgstr "" +"Valore predefinito da impostare sugli ordini di vendita che verranno creati " +"sulla base degli ordini di acquisto fatti a questa azienda" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_config_settings__warehouse_id +msgid "" +"Default value to set on Sale Orders that will be created based on Purchase " +"Orders made to this company." +msgstr "" +"Valore predefinito da impostare sugli ordini di vendita che verranno creati " +"sulla base degli ordini di acquisto fatti a questa azienda." + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_stock_picking__intercompany_picking_id +msgid "Intercompany Picking" +msgstr "Prelievo interaziendale" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_purchase_order +msgid "Purchase Order" +msgstr "Ordine d'acquisto" + +#. module: purchase_sale_stock_inter_company +#: code:addons/purchase_sale_stock_inter_company/models/stock_picking.py:0 +#, fuzzy, python-format +msgid "" +"There's no corresponding line in PO %(po)s for assigning qty from " +"%(pick_name)s for product %(product)s" +msgstr "" +"Non c'è una riga corrisponde nell'ordine d'acquisto %s per assegnare la " +"quantità da %(pick_name)s per il prodotto %(product)s" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_stock_picking +msgid "Transfer" +msgstr "Trasferire" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company__warehouse_id +msgid "Warehouse For Sale Orders" +msgstr "Magazzino per gli ordini di vendita" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings__warehouse_id +msgid "Warehouse for Sale Orders" +msgstr "Magazzino per gli ordini di vendita" + +#~ msgid "Create Sale Orders when buying to this company" +#~ msgstr "Creare ordini di vendita quando si acquista da questa azienda" + +#~ msgid "" +#~ "Generate a Sale Order when a Purchase Order with this company as supplier " +#~ "is created.\n" +#~ " The intercompany user must at least be Sale User." +#~ msgstr "" +#~ "Generare un ordine di vendita quando un ordine d'acquisto viene creato " +#~ "con questa azienda come fornitore.\n" +#~ " L'utente interaziendale deve essere almeno un utente vendite." + +#, fuzzy +#~ msgid "Intercompany Sale User" +#~ msgstr "Utente interaziendale" + +#, fuzzy +#~ msgid "Purchase/Sale" +#~ msgstr "Ordine d'acquisto" + +#~ msgid "Sale Orders Auto Validation" +#~ msgstr "Validazione automatica ordini di vendita" + +#~ msgid "Sale from purchase" +#~ msgstr "Vendita da acquisto" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Ordine di vendita" + +#~ msgid "Sales Order Line" +#~ msgstr "Riga ordini di vendita" + +#~ msgid "Source Purchase Order" +#~ msgstr "Ordine d'acquisto di origine" + +#~ msgid "Source Purchase Order Line" +#~ msgstr "Riga ordine d'acquisto di origine" + +#~ msgid "This vendor bill is related with: {}" +#~ msgstr "Questa fattura fornitore è relativa a: {}" + +#~ msgid "" +#~ "When a Sale Order is created by a multi company rule for this company, it " +#~ "will automatically validate it." +#~ msgstr "" +#~ "Quando un ordine di vendita viene creato da una regola multi azienda per " +#~ "questa azienda, verrà automaticamente validato." + +#~ msgid "You can't cancel an order that is %s" +#~ msgstr "Impossibile annullare un ordine che è %s" + +#~ msgid "" +#~ "You cannot create SO from PO because product '%s' is not intercompany" +#~ msgstr "" +#~ "Impossibile creare l'ordine di vendita dall'ordine d'acquisto perchè il " +#~ "prodotto '%s' non è interaziendale" + +#~ msgid "" +#~ "You cannot create SO from PO because sale price list currency is " +#~ "different than purchase price list currency." +#~ msgstr "" +#~ "Impossibile creare l'ordine di vendita dall'ordine d'acquisto perchè la " +#~ "valuta del listino di vendita è diversa dalla valuta del listino " +#~ "d'acquisto." + +#~ msgid "Invoice" +#~ msgstr "Fattura" diff --git a/purchase_sale_stock_inter_company/i18n/purchase_sale_inter_company.pot b/purchase_sale_stock_inter_company/i18n/purchase_sale_inter_company.pot new file mode 100644 index 00000000000..6bffb11001b --- /dev/null +++ b/purchase_sale_stock_inter_company/i18n/purchase_sale_inter_company.pot @@ -0,0 +1,206 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_sale_stock_inter_company +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.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_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_res_company +msgid "Companies" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company__so_from_po +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings__so_from_po +msgid "Create Sale Orders when buying to this company" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_company__warehouse_id +msgid "" +"Default value to set on Sale Orders that will be created based on Purchase " +"Orders made to this company" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_config_settings__warehouse_id +msgid "" +"Default value to set on Sale Orders that will be created based on Purchase " +"Orders made to this company." +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_account_move__display_name +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_purchase_order__display_name +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company__display_name +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings__display_name +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_sale_order__display_name +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_sale_order_line__display_name +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_stock_picking__display_name +msgid "Display Name" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_company__so_from_po +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_config_settings__so_from_po +msgid "" +"Generate a Sale Order when a Purchase Order with this company as supplier is created.\n" +" The intercompany user must at least be Sale User." +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_account_move__id +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_purchase_order__id +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company__id +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings__id +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_sale_order__id +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_sale_order_line__id +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_stock_picking__id +msgid "ID" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_stock_picking__intercompany_picking_id +msgid "Intercompany Picking" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company__intercompany_sale_user_id +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings__intercompany_sale_user_id +msgid "Intercompany Sale User" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_account_move +msgid "Journal Entry" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_account_move____last_update +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_purchase_order____last_update +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company____last_update +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings____last_update +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_sale_order____last_update +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_sale_order_line____last_update +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_stock_picking____last_update +msgid "Last Modified on" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_purchase_order +msgid "Purchase Order" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model_terms:ir.ui.view,arch_db:purchase_sale_stock_inter_company.res_config_settings_view_form +msgid "Purchase/Sale" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company__sale_auto_validation +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings__sale_auto_validation +msgid "Sale Orders Auto Validation" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model_terms:ir.ui.view,arch_db:purchase_sale_stock_inter_company.res_config_settings_view_form +msgid "Sale from purchase" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_sale_order +msgid "Sales Order" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_sale_order__auto_purchase_order_id +msgid "Source Purchase Order" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_sale_order_line__auto_purchase_line_id +msgid "Source Purchase Order Line" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: code:addons/purchase_sale_stock_inter_company/models/stock_picking.py:0 +#, python-format +msgid "" +"There's no corresponding line in PO %s for assigning qty from %s for product" +" %s" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: code:addons/purchase_sale_stock_inter_company/models/account_move.py:0 +#, python-format +msgid "This vendor bill is related with: {}" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_stock_picking +msgid "Transfer" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_config_settings__intercompany_sale_user_id +msgid "" +"User used to create the sales order arising from a purchase order in another" +" company." +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company__warehouse_id +msgid "Warehouse For Sale Orders" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings__warehouse_id +msgid "Warehouse for Sale Orders" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_company__sale_auto_validation +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_config_settings__sale_auto_validation +msgid "" +"When a Sale Order is created by a multi company rule for this company, it " +"will automatically validate it." +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: code:addons/purchase_sale_stock_inter_company/models/purchase_order.py:0 +#, python-format +msgid "You can't cancel an order that is %s" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: code:addons/purchase_sale_stock_inter_company/models/purchase_order.py:0 +#, python-format +msgid "You cannot create SO from PO because product '%s' is not intercompany" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: code:addons/purchase_sale_stock_inter_company/models/purchase_order.py:0 +#, python-format +msgid "" +"You cannot create SO from PO because sale price list currency is different " +"than purchase price list currency." +msgstr "" diff --git a/purchase_sale_stock_inter_company/i18n/purchase_sale_stock_inter_company.pot b/purchase_sale_stock_inter_company/i18n/purchase_sale_stock_inter_company.pot new file mode 100644 index 00000000000..6613d1d4ebf --- /dev/null +++ b/purchase_sale_stock_inter_company/i18n/purchase_sale_stock_inter_company.pot @@ -0,0 +1,73 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_sale_stock_inter_company +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-08-05 13:15+0000\n" +"PO-Revision-Date: 2022-08-05 13:15+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: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_res_company +msgid "Companies" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_company__warehouse_id +msgid "" +"Default value to set on Sale Orders that will be created based on Purchase " +"Orders made to this company" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_config_settings__warehouse_id +msgid "" +"Default value to set on Sale Orders that will be created based on Purchase " +"Orders made to this company." +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_stock_picking__intercompany_picking_id +msgid "Intercompany Picking" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_purchase_order +msgid "Purchase Order" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: code:addons/purchase_sale_stock_inter_company/models/stock_picking.py:0 +#, python-format +msgid "" +"There's no corresponding line in PO %(po)s for assigning qty from " +"%(pick_name)s for product %(product)s" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_stock_picking +msgid "Transfer" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company__warehouse_id +msgid "Warehouse For Sale Orders" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings__warehouse_id +msgid "Warehouse for Sale Orders" +msgstr "" diff --git a/purchase_sale_stock_inter_company/i18n/sl.po b/purchase_sale_stock_inter_company/i18n/sl.po new file mode 100644 index 00000000000..707c144f468 --- /dev/null +++ b/purchase_sale_stock_inter_company/i18n/sl.po @@ -0,0 +1,162 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_sale_stock_inter_company +# +# Translators: +# Matjaž Mozetič , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-08-05 13:15+0000\n" +"PO-Revision-Date: 2017-10-19 00:51+0000\n" +"Last-Translator: Matjaž Mozetič , 2017\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_res_company +msgid "Companies" +msgstr "Družbe" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_company__warehouse_id +msgid "" +"Default value to set on Sale Orders that will be created based on Purchase " +"Orders made to this company" +msgstr "" +"Privzeta vrednost nastavljena na prodajnih nalogih, ki bo ustvarjena na " +"podlagi nabavnih nalogov za to družbo." + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_config_settings__warehouse_id +msgid "" +"Default value to set on Sale Orders that will be created based on Purchase " +"Orders made to this company." +msgstr "" +"Privzeta vrednost nastavljena na prodajnih nalogih, ki bo ustvarjena na " +"podlagi nabavnih nalogov za to družbo." + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_stock_picking__intercompany_picking_id +msgid "Intercompany Picking" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_purchase_order +msgid "Purchase Order" +msgstr "Nabavni nalog" + +#. module: purchase_sale_stock_inter_company +#: code:addons/purchase_sale_stock_inter_company/models/stock_picking.py:0 +#, python-format +msgid "" +"There's no corresponding line in PO %(po)s for assigning qty from " +"%(pick_name)s for product %(product)s" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_stock_picking +msgid "Transfer" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company__warehouse_id +msgid "Warehouse For Sale Orders" +msgstr "Skladišče za prodajne naloge" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings__warehouse_id +#, fuzzy +msgid "Warehouse for Sale Orders" +msgstr "Skladišče za prodajne naloge" + +#, fuzzy +#~ msgid "Purchase/Sale" +#~ msgstr "Nabava v prodajo" + +#~ msgid "Sale Orders Auto Validation" +#~ msgstr "Samodejno overjanje prodajnih nalogov" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Prodajni nalog" + +#~ msgid "Sales Order Line" +#~ msgstr "Postavka prodajnega naloga" + +#~ msgid "Source Purchase Order" +#~ msgstr "Izvorni nabavni nalog" + +#~ msgid "Source Purchase Order Line" +#~ msgstr "Postavka izvornega prodajnega naloga" + +#~ msgid "" +#~ "When a Sale Order is created by a multi company rule for this company, it " +#~ "will automatically validate it." +#~ msgstr "" +#~ "Ko se ustvari prodajni nalog iz pravila konsolidiranja za to družbo, se " +#~ "le-ta samodejno overi." + +#~ msgid "" +#~ "You cannot create SO from PO because product '%s' is not intercompany" +#~ msgstr "" +#~ "Prodajnega naloga ni mogoče ustvariti na osnovi nabavnega, ker proizvoda " +#~ "'%s' ni v sklopu strukturiranih družb." + +#, fuzzy +#~ msgid "" +#~ "You cannot create SO from PO because sale price list currency is " +#~ "different than purchase price list currency." +#~ msgstr "" +#~ "Prodajnega naloga ni mogoče ustvariti na osnovi nabavnega, ker je valuta " +#~ "prodajnega cenika drugačna od valute nabavnega." + +#~ msgid "Invoice" +#~ msgstr "Račun" + +#~ msgid "" +#~ "Configure correct warehouse for company (%s) in Menu: Settings/companies/" +#~ "companies" +#~ msgstr "" +#~ "Nastavite pravilno skladišče za družbo (%s) v meniju: Nastavitve/Družbe/" +#~ "Družbe" + +#~ msgid "Output - A" +#~ msgstr "Izhod - A" + +#~ msgid "Output - B" +#~ msgstr "Izhod - B" + +#~ msgid "Sale Auto Validation" +#~ msgstr "Samodejno overjanje prodaje" + +#~ msgid "Stock - A" +#~ msgstr "Zaloga - A" + +#~ msgid "Stock - B" +#~ msgstr "Zaloga - B" + +#~ msgid "" +#~ "When a Sale Order is created by a multi company rule for this company, it " +#~ "will automatically validate it" +#~ msgstr "" +#~ "Ko se ustvari prodajni nalog iz pravila konsolidiranja za to družbo, se " +#~ "le-ta samodejno overi" + +#~ msgid "" +#~ "{'invisible':['|', ('invoice_method','in', ['picking', 'manual', " +#~ "'intercompany']), '|', ('state','!=', 'approved'), ('invoiced','=',True)]}" +#~ msgstr "" +#~ "{'invisible':['|', ('invoice_method','in', ['picking', 'manual', " +#~ "'intercompany']), '|', ('state','!=', 'approved'), ('invoiced','=',True)]}" diff --git a/purchase_sale_stock_inter_company/i18n/zh_CN.po b/purchase_sale_stock_inter_company/i18n/zh_CN.po new file mode 100644 index 00000000000..b5c116f3f58 --- /dev/null +++ b/purchase_sale_stock_inter_company/i18n/zh_CN.po @@ -0,0 +1,81 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_sale_stock_inter_company +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-08-05 13:15+0000\n" +"PO-Revision-Date: 2020-04-07 18:19+0000\n" +"Last-Translator: Dong \n" +"Language-Team: none\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 3.10\n" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_res_company +msgid "Companies" +msgstr "公司" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_res_config_settings +msgid "Config Settings" +msgstr "配置设定" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_company__warehouse_id +msgid "" +"Default value to set on Sale Orders that will be created based on Purchase " +"Orders made to this company" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_config_settings__warehouse_id +msgid "" +"Default value to set on Sale Orders that will be created based on Purchase " +"Orders made to this company." +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_stock_picking__intercompany_picking_id +msgid "Intercompany Picking" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_purchase_order +msgid "Purchase Order" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: code:addons/purchase_sale_stock_inter_company/models/stock_picking.py:0 +#, python-format +msgid "" +"There's no corresponding line in PO %(po)s for assigning qty from " +"%(pick_name)s for product %(product)s" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model,name:purchase_sale_stock_inter_company.model_stock_picking +msgid "Transfer" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company__warehouse_id +msgid "Warehouse For Sale Orders" +msgstr "" + +#. module: purchase_sale_stock_inter_company +#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings__warehouse_id +msgid "Warehouse for Sale Orders" +msgstr "" + +#~ msgid "Create Sale Orders when buying to this company" +#~ msgstr "当关联公司向该公司采购时自动创建销售订单" + +#~ msgid "Purchase/Sale" +#~ msgstr "公司间交易" diff --git a/purchase_sale_stock_inter_company/models/__init__.py b/purchase_sale_stock_inter_company/models/__init__.py new file mode 100644 index 00000000000..fd0b2e801f8 --- /dev/null +++ b/purchase_sale_stock_inter_company/models/__init__.py @@ -0,0 +1,4 @@ +from . import purchase_order +from . import res_company +from . import res_config +from . import stock_picking diff --git a/purchase_sale_stock_inter_company/models/purchase_order.py b/purchase_sale_stock_inter_company/models/purchase_order.py new file mode 100644 index 00000000000..58af79ef6f5 --- /dev/null +++ b/purchase_sale_stock_inter_company/models/purchase_order.py @@ -0,0 +1,35 @@ +# Copyright 2013-Today Odoo SA +# Copyright 2016-2019 Chafique DELLI @ Akretion +# Copyright 2018-2019 Tecnativa - Carlos Dauden +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import models + + +class PurchaseOrder(models.Model): + _inherit = "purchase.order" + + def _prepare_sale_order_data( + self, name, partner, dest_company, direct_delivery_address + ): + new_order = super()._prepare_sale_order_data( + name, partner, dest_company, direct_delivery_address + ) + delivery_address = ( + direct_delivery_address + or self.picking_type_id.warehouse_id.partner_id + or False + ) + if delivery_address: + new_order.update({"partner_shipping_id": delivery_address.id}) + if "warehouse_id" in new_order: + new_order.update( + { + "warehouse_id": ( + dest_company.warehouse_id.company_id == dest_company + and dest_company.warehouse_id.id + or False + ) + } + ) + return new_order diff --git a/purchase_sale_stock_inter_company/models/res_company.py b/purchase_sale_stock_inter_company/models/res_company.py new file mode 100644 index 00000000000..2ee88f5b1a2 --- /dev/null +++ b/purchase_sale_stock_inter_company/models/res_company.py @@ -0,0 +1,18 @@ +# Copyright 2013-Today Odoo SA +# Copyright 2016-2019 Chafique DELLI @ Akretion +# Copyright 2018-2019 Tecnativa - Carlos Dauden +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ResCompany(models.Model): + + _inherit = "res.company" + + warehouse_id = fields.Many2one( + "stock.warehouse", + string="Warehouse For Sale Orders", + help="Default value to set on Sale Orders that " + "will be created based on Purchase Orders made to this company", + ) diff --git a/purchase_sale_stock_inter_company/models/res_config.py b/purchase_sale_stock_inter_company/models/res_config.py new file mode 100644 index 00000000000..d1fad81c6a9 --- /dev/null +++ b/purchase_sale_stock_inter_company/models/res_config.py @@ -0,0 +1,20 @@ +# Copyright 2013-Today Odoo SA +# Copyright 2016-2019 Chafique DELLI @ Akretion +# Copyright 2018-2019 Tecnativa - Carlos Dauden +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class InterCompanyRulesConfig(models.TransientModel): + + _inherit = "res.config.settings" + + warehouse_id = fields.Many2one( + comodel_name="stock.warehouse", + related="company_id.warehouse_id", + string="Warehouse for Sale Orders", + help="Default value to set on Sale Orders that will be created " + "based on Purchase Orders made to this company.", + readonly=False, + ) diff --git a/purchase_sale_stock_inter_company/models/stock_picking.py b/purchase_sale_stock_inter_company/models/stock_picking.py new file mode 100644 index 00000000000..ee0a030b3da --- /dev/null +++ b/purchase_sale_stock_inter_company/models/stock_picking.py @@ -0,0 +1,57 @@ +# Copyright 2018 Tecnativa - Carlos Dauden +# Copyright 2018 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import _, fields, models +from odoo.exceptions import UserError + + +class StockPicking(models.Model): + _inherit = "stock.picking" + + intercompany_picking_id = fields.Many2one(comodel_name="stock.picking") + + def action_done(self): + # Only DropShip pickings + po_picks = self.browse() + for pick in self.filtered( + lambda x: x.location_dest_id.usage == "customer" + ).sudo(): + purchase = pick.sale_id.auto_purchase_order_id + if not purchase: + continue + purchase.picking_ids.write({"intercompany_picking_id": pick.id}) + for move_line in pick.move_line_ids: + qty_done = move_line.qty_done + sale_line_id = move_line.move_id.sale_line_id + po_move_lines = sale_line_id.auto_purchase_line_id.move_ids.mapped( + "move_line_ids" + ) + for po_move_line in po_move_lines: + if po_move_line.product_qty >= qty_done: + po_move_line.qty_done = qty_done + qty_done = 0.0 + else: + po_move_line.qty_done = po_move_line.product_qty + qty_done -= po_move_line.product_qty + po_picks |= po_move_line.picking_id + if qty_done and po_move_lines: + po_move_lines[-1:].qty_done += qty_done + elif not po_move_lines: + raise UserError( + _( + "There's no corresponding line in PO %(po)s for assigning " + "qty from %(pick_name)s for product %(product)s" + ) + % ( + { + "po": purchase.name, + "pick_name": pick.name, + "product": move_line.product_id.name, + } + ) + ) + # Transfer dropship pickings + for po_pick in po_picks.sudo(): + po_pick.with_company(po_pick.company_id.id).action_done() + return super(StockPicking, self).action_done() diff --git a/purchase_sale_stock_inter_company/readme/CONFIGURE.rst b/purchase_sale_stock_inter_company/readme/CONFIGURE.rst new file mode 100644 index 00000000000..3b460143981 --- /dev/null +++ b/purchase_sale_stock_inter_company/readme/CONFIGURE.rst @@ -0,0 +1,6 @@ +TTo configure this module, you need to: +#. go to the menu *General Settings > Companies > Companies*. +#. Select one of the companies. +#. Go to the tab *Inter-Company* then the group *Purchase To Sale*. +#. Select the *Warehouse For Sale Orders*, it is the warehouse that will be used to automatically generate the sale order in the other company. +#. If you check the option *Sale Auto Validation* in the configuration of company B, then when you validate a *Purchase Order* in company A with company B as supplier, the *Sale Order* will be automatically validated in company B with company A as customer. diff --git a/purchase_sale_stock_inter_company/readme/CONTRIBUTORS.rst b/purchase_sale_stock_inter_company/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..d34882913d6 --- /dev/null +++ b/purchase_sale_stock_inter_company/readme/CONTRIBUTORS.rst @@ -0,0 +1,17 @@ +* Odoo S.A. (original module `inter_company_rules`) +* Andrea Stirpe +* Adria Gil Sorribes +* Christopher Ormaza +* `Akretion `: + + * Chafique Delli + * Alexis de Lattre + * David Beal +* `Tecnativa `: + + * Jairo Llopis + * David Vidal + * Pedro M. Baeza +* `Camptocamp `: + + * Maksym Yankin diff --git a/purchase_sale_stock_inter_company/readme/DESCRIPTION.rst b/purchase_sale_stock_inter_company/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..aa645c6dce7 --- /dev/null +++ b/purchase_sale_stock_inter_company/readme/DESCRIPTION.rst @@ -0,0 +1,8 @@ +This module is useful if there are multiple companies in the same Odoo database and those companies sell goods or services among themselves. +It allows to create a sale order in company A from a purchase order in company B. + +Imagine you have company A and company B in the same Odoo database: + +* Company A purchase goods from company B. +* Company A will create a purchase order with company B as supplier. +* This module automate the creation of the sale order in company B with company A as customer. diff --git a/purchase_sale_stock_inter_company/readme/ROADMAP.rst b/purchase_sale_stock_inter_company/readme/ROADMAP.rst new file mode 100644 index 00000000000..4b18b518c5b --- /dev/null +++ b/purchase_sale_stock_inter_company/readme/ROADMAP.rst @@ -0,0 +1 @@ +* This module is auto installed if `purchase_sale_inter_company` and `stock` are installed diff --git a/purchase_sale_stock_inter_company/static/description/icon.png b/purchase_sale_stock_inter_company/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..b3de330666df26b26f9648d86c9f12b1dc6fc699 GIT binary patch literal 3735 zcmV;I4ruX-P)>L)?%Vsvh5!5a`nq}h$%^~Qh$b^t{o%p==gR%+ z)A^q^{_fxwCr$j>w)(Vd$;;CI^X2==oBPI=`mkgD-M=9(QW`2xWo&^BAxiwwr~n&B zOH^)IVR+`}>hJLKiH@D<>FoQ$i215fb$gAbs86R2P1HI$iHvHDO^Pqrus|T~`Tn2kNHVa#$nwaGfz8qTN1F#&qn|aJ z8I5FNSw==iMn*(4Z)Uh=VEe=Jt#3Q9Bq>Ov-3wA%f{Bu+QDlZc119iH`Rerj&Oj z`zNKC_v#ZRUZv-5uCCTG!8-y5VXqfUM+2wjFJY~wTJ2ac0B8PiqL?k*?EiVarr7mgELzTcU|k0duc zCx$x^J9cuTCXexjhmasQPeNz9t|Oi8|1{{OWyjGbw>IL&W7*r2C{2kQ|EX@Hm|-h-gtEH zFpIIClDO_==fYNz8=s`jI$9IaG8$L=FU;z6dl9;=G5RqTcZytCH!fUZU88D)7o-s{ z?@71rSE7-yc6V`_ri0{Xj!0gT%IhI^RCsv|9MwZ$B2pbEyO`i;ixiU%D-H6uw3UzF zm}MQrA5t+?FC--oT`>ZyDOa@5IopJ0vWtq*=w3t~7x3FnvT6j3uyO#FdT}cWpW}?* zpi2ngSxciZ0&~Z`ZnmcU+0_yFapuznhX%1k2L0`JNc&= zi3DOO5>JB&;TukJIi$47#z_&`jt0$hi-UM4k|U8ch{wX#cIXyMorDDWpR`?=&-Z(d zi7ar0P|wmm(abcCxKbi_yZilNl|(0=RPM^qRWy z@&q8MNU{E?(PYt>WgY2VjrAt1As2Qnvx!SXBvkNP~gZLOY@=H7IAM7 zkp){otf&nwEkT;j;sq$}(ASheGRJ(;rmGyl{B}-S3Ob#|JbT*|RcO(*m}!yd$pyqATxl};Gi>M!LJ1O&7~ibs6}L>?^QkBKaFHw|GAT{XAE*)SFz} z%I6Miq8h~)ek5@!dLyjuGA%q9TY4R7CepuyyO0z9eG5YrgnBDm z>k8p)G2^Q;4#r-PmB=+~yn^uNPNkay;msWgu|pqLQ*g9QeLI|o_9Q8LA#f&9AiVke zt4cp^3WTpyC+}z<2rY**B@I_I2OOPOI#_W6ZOkVg7EHEr9!m$@_nyA)R$e5 z4r`N;2QTzD0dc~+-~Xe~m#QNOC@noSNk=&;90qYq2Ed8NLt)4}UmZ6)w7SIo!Z_b)1a zl_lqGgq~Iz;~+m%0Cszp8Q@E$vyV2ySl^lY!LThPj)w9>G+GJO@$jG<4Z_6Hb~ULh z-CJ53h=^*}K1ELRa#y3dUf>0z7C>gG8*L8_@H7V%2V@%|pIzu>rt6>e z#qFB#I?x^6y%A1zcU++rV0uBvzS=V0m+kH|XnuH*7NPDy^!^+1)s7Z9zBN@v{eR!R zE$aSZH^=|_CrBSP#-Z4Q;KBr-y4 z?S%Z94p5q9^FwsP2#gs8_3#oS2YrgHUDPlhAYb`<<7&*VN8*ZxXw; ze}w5YEjgVg!kdpeg8I^YuYALH1wRdn$9f&ARx9N|JS0hn44q)d+dQRC&CxFn zUwB%rGL7V?(`G^Rym9#bPM?tXNMWn8AA0+vIV(+{A3mgt7l&gf{8aWa8l0Yx?>szo zqCHfcr-!jOUvsCSO5B7ynk4bEVJG|#ad@UF`Q~*O(VN# z2$x5w`D6@PRU9yymY)E-Ktf-OaDeCKk`x&)OBc96LTjz*ZNg%&J7Hy)#w8MJdYgeW ze_}#jH7~kILTjUkxO|GD%V9O~yG+9Tplc1p!@ue&&V>?Man~~-Yr0fI-ClfwghxZX zT*BHJ5x*W`enRXoO=v~3hwXnULd*BM9?AMr2${cmwxwP=q3*MIFOYEeyD7giA@ix^ zIS%I~5L$lzn^wOtA&VPc%WBk%CuANcga3fe%OqsOv29iHoP;;WAY}dMQGK5SC;XuG zlx&$0_`GbpqS)0nRxsh)f3%)-E&*PDI~JkEPX%aR;;#!iKcR%L@84L~=f9O3^&9l+ zn1B}FrZId}|J?D8j^M{(=vz?2xBv31gHIgjcK85TZ9nQ<`blRX;p=z*^wHGr^6kxP zfT=iHclT%l|6ON(x-cHBHie(%h7!Jh`}(1m{&ejeR=bDP4^lP<(*C%gspmK2+txzXb27A`DF+Vp&>lK451-3gy)xp@QS_s@4b4W zB-6Y5&*!F*Nk+&U`r*C4fR90+STe$^b2sX!k`jKnxO&AiBqhAMdidO`bGIC-210<& z-Eyc5p&`6{8A3yN`7(rt@bYB{4dLa>5dI$%YW)1cdG+RfN5YG&t4a0H4e|X8Ds+6h z>QGj@dND-|BO@atBO@atBO@atBO@atBcoqd{{y!1^S?QmT?POE002ovPDHLkV1n&) BKy?5B literal 0 HcmV?d00001 diff --git a/purchase_sale_stock_inter_company/tests/__init__.py b/purchase_sale_stock_inter_company/tests/__init__.py new file mode 100644 index 00000000000..5d0b65d96f4 --- /dev/null +++ b/purchase_sale_stock_inter_company/tests/__init__.py @@ -0,0 +1 @@ +from . import test_inter_company_purchase_sale_stock diff --git a/purchase_sale_stock_inter_company/tests/test_inter_company_purchase_sale_stock.py b/purchase_sale_stock_inter_company/tests/test_inter_company_purchase_sale_stock.py new file mode 100644 index 00000000000..493e8d91bca --- /dev/null +++ b/purchase_sale_stock_inter_company/tests/test_inter_company_purchase_sale_stock.py @@ -0,0 +1,71 @@ +# Copyright 2013-Today Odoo SA +# Copyright 2019-2019 Chafique DELLI @ Akretion +# Copyright 2018-2019 Tecnativa - Carlos Dauden +# Copyright 2020 ForgeFlow S.L. (https://www.forgeflow.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + + +from odoo.addons.purchase_sale_inter_company.tests.test_inter_company_purchase_sale import ( + TestPurchaseSaleInterCompany, +) + + +class TestPurchaseSaleStockInterCompany(TestPurchaseSaleInterCompany): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.StockLocation = cls.env["stock.location"] + cls.StockWarehouse = cls.env["stock.warehouse"] + cls.location_stock_company_a = cls.StockLocation.create( + {"name": "Stock - a", "usage": "internal", "company_id": cls.company_a.id} + ) + cls.location_output_company_a = cls.StockLocation.create( + {"name": "Output - a", "usage": "internal", "company_id": cls.company_a.id} + ) + cls.warehouse_company_a = cls.StockWarehouse.create( + { + "name": "purchase warehouse - a", + "code": "CMPa", + "wh_input_stock_loc_id": cls.location_stock_company_a.id, + "lot_stock_id": cls.location_stock_company_a.id, + "wh_output_stock_loc_id": cls.location_output_company_a.id, + "partner_id": cls.partner_company_a.id, + "company_id": cls.company_a.id, + } + ) + cls.location_stock_company_b = cls.StockLocation.create( + {"name": "Stock - b", "usage": "internal", "company_id": cls.company_b.id} + ) + cls.location_output_company_b = cls.StockLocation.create( + {"name": "Output - b", "usage": "internal", "company_id": cls.company_b.id} + ) + cls.warehouse_company_b = cls.StockWarehouse.create( + { + "name": "purchase warehouse - b", + "code": "CMPb", + "wh_input_stock_loc_id": cls.location_stock_company_b.id, + "lot_stock_id": cls.location_stock_company_b.id, + "wh_output_stock_loc_id": cls.location_output_company_b.id, + "partner_id": cls.partner_company_b.id, + "company_id": cls.company_b.id, + } + ) + cls.company_a.warehouse_id = cls.warehouse_company_a + cls.company_b.warehouse_id = cls.warehouse_company_b + + def test_purchase_sale_stock_inter_company(self): + self.purchase_company_a.notes = "Test note" + # Confirm the purchase of company A + self.purchase_company_a.with_user(self.user_company_a).button_approve() + # Check sale order created in company B + sales = ( + self.env["sale.order"] + .with_user(self.user_company_b) + .search([("auto_purchase_order_id", "=", self.purchase_company_a.id)]) + ) + self.assertEqual( + sales.partner_shipping_id, + self.purchase_company_a.picking_type_id.warehouse_id.partner_id, + ) + warehouse_b = self.StockWarehouse.search([("name", "=", "Company B")]) + self.assertEqual(sales.warehouse_id, warehouse_b) diff --git a/purchase_sale_stock_inter_company/views/res_config_view.xml b/purchase_sale_stock_inter_company/views/res_config_view.xml new file mode 100644 index 00000000000..f6445f26df7 --- /dev/null +++ b/purchase_sale_stock_inter_company/views/res_config_view.xml @@ -0,0 +1,21 @@ + + + + res.config.settings + + + + + + + From 661abc955f739a12e9e9da2558148c10c88061a8 Mon Sep 17 00:00:00 2001 From: JasminSForgeFlow Date: Tue, 3 Jan 2023 14:16:36 +0530 Subject: [PATCH 2/7] [15.0][IMP] purchase_sale_stock_inter_company: Update v14 latest changes and test cases --- .../i18n/purchase_sale_inter_company.pot | 206 ------------------ .../models/purchase_order.py | 17 +- .../test_inter_company_purchase_sale_stock.py | 89 ++++---- 3 files changed, 50 insertions(+), 262 deletions(-) delete mode 100644 purchase_sale_stock_inter_company/i18n/purchase_sale_inter_company.pot diff --git a/purchase_sale_stock_inter_company/i18n/purchase_sale_inter_company.pot b/purchase_sale_stock_inter_company/i18n/purchase_sale_inter_company.pot deleted file mode 100644 index 6bffb11001b..00000000000 --- a/purchase_sale_stock_inter_company/i18n/purchase_sale_inter_company.pot +++ /dev/null @@ -1,206 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * purchase_sale_stock_inter_company -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 14.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_sale_stock_inter_company -#: model:ir.model,name:purchase_sale_stock_inter_company.model_res_company -msgid "Companies" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model,name:purchase_sale_stock_inter_company.model_res_config_settings -msgid "Config Settings" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company__so_from_po -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings__so_from_po -msgid "Create Sale Orders when buying to this company" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_company__warehouse_id -msgid "" -"Default value to set on Sale Orders that will be created based on Purchase " -"Orders made to this company" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_config_settings__warehouse_id -msgid "" -"Default value to set on Sale Orders that will be created based on Purchase " -"Orders made to this company." -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_account_move__display_name -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_purchase_order__display_name -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company__display_name -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings__display_name -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_sale_order__display_name -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_sale_order_line__display_name -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_stock_picking__display_name -msgid "Display Name" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_company__so_from_po -#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_config_settings__so_from_po -msgid "" -"Generate a Sale Order when a Purchase Order with this company as supplier is created.\n" -" The intercompany user must at least be Sale User." -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_account_move__id -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_purchase_order__id -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company__id -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings__id -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_sale_order__id -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_sale_order_line__id -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_stock_picking__id -msgid "ID" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_stock_picking__intercompany_picking_id -msgid "Intercompany Picking" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company__intercompany_sale_user_id -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings__intercompany_sale_user_id -msgid "Intercompany Sale User" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model,name:purchase_sale_stock_inter_company.model_account_move -msgid "Journal Entry" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_account_move____last_update -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_purchase_order____last_update -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company____last_update -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings____last_update -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_sale_order____last_update -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_sale_order_line____last_update -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_stock_picking____last_update -msgid "Last Modified on" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model,name:purchase_sale_stock_inter_company.model_purchase_order -msgid "Purchase Order" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model_terms:ir.ui.view,arch_db:purchase_sale_stock_inter_company.res_config_settings_view_form -msgid "Purchase/Sale" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company__sale_auto_validation -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings__sale_auto_validation -msgid "Sale Orders Auto Validation" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model_terms:ir.ui.view,arch_db:purchase_sale_stock_inter_company.res_config_settings_view_form -msgid "Sale from purchase" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model,name:purchase_sale_stock_inter_company.model_sale_order -msgid "Sales Order" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model,name:purchase_sale_stock_inter_company.model_sale_order_line -msgid "Sales Order Line" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_sale_order__auto_purchase_order_id -msgid "Source Purchase Order" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_sale_order_line__auto_purchase_line_id -msgid "Source Purchase Order Line" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: code:addons/purchase_sale_stock_inter_company/models/stock_picking.py:0 -#, python-format -msgid "" -"There's no corresponding line in PO %s for assigning qty from %s for product" -" %s" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: code:addons/purchase_sale_stock_inter_company/models/account_move.py:0 -#, python-format -msgid "This vendor bill is related with: {}" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model,name:purchase_sale_stock_inter_company.model_stock_picking -msgid "Transfer" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_config_settings__intercompany_sale_user_id -msgid "" -"User used to create the sales order arising from a purchase order in another" -" company." -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_company__warehouse_id -msgid "Warehouse For Sale Orders" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model.fields,field_description:purchase_sale_stock_inter_company.field_res_config_settings__warehouse_id -msgid "Warehouse for Sale Orders" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_company__sale_auto_validation -#: model:ir.model.fields,help:purchase_sale_stock_inter_company.field_res_config_settings__sale_auto_validation -msgid "" -"When a Sale Order is created by a multi company rule for this company, it " -"will automatically validate it." -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: code:addons/purchase_sale_stock_inter_company/models/purchase_order.py:0 -#, python-format -msgid "You can't cancel an order that is %s" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: code:addons/purchase_sale_stock_inter_company/models/purchase_order.py:0 -#, python-format -msgid "You cannot create SO from PO because product '%s' is not intercompany" -msgstr "" - -#. module: purchase_sale_stock_inter_company -#: code:addons/purchase_sale_stock_inter_company/models/purchase_order.py:0 -#, python-format -msgid "" -"You cannot create SO from PO because sale price list currency is different " -"than purchase price list currency." -msgstr "" diff --git a/purchase_sale_stock_inter_company/models/purchase_order.py b/purchase_sale_stock_inter_company/models/purchase_order.py index 58af79ef6f5..3b8ca05d7eb 100644 --- a/purchase_sale_stock_inter_company/models/purchase_order.py +++ b/purchase_sale_stock_inter_company/models/purchase_order.py @@ -22,14 +22,11 @@ def _prepare_sale_order_data( ) if delivery_address: new_order.update({"partner_shipping_id": delivery_address.id}) - if "warehouse_id" in new_order: - new_order.update( - { - "warehouse_id": ( - dest_company.warehouse_id.company_id == dest_company - and dest_company.warehouse_id.id - or False - ) - } - ) + warehouse = ( + dest_company.warehouse_id.company_id == dest_company + and dest_company.warehouse_id + or False + ) + if warehouse: + new_order.update({"warehouse_id": warehouse.id}) return new_order diff --git a/purchase_sale_stock_inter_company/tests/test_inter_company_purchase_sale_stock.py b/purchase_sale_stock_inter_company/tests/test_inter_company_purchase_sale_stock.py index 493e8d91bca..5ae0e207565 100644 --- a/purchase_sale_stock_inter_company/tests/test_inter_company_purchase_sale_stock.py +++ b/purchase_sale_stock_inter_company/tests/test_inter_company_purchase_sale_stock.py @@ -12,60 +12,57 @@ class TestPurchaseSaleStockInterCompany(TestPurchaseSaleInterCompany): @classmethod - def setUpClass(cls): - super().setUpClass() - cls.StockLocation = cls.env["stock.location"] - cls.StockWarehouse = cls.env["stock.warehouse"] - cls.location_stock_company_a = cls.StockLocation.create( - {"name": "Stock - a", "usage": "internal", "company_id": cls.company_a.id} - ) - cls.location_output_company_a = cls.StockLocation.create( - {"name": "Output - a", "usage": "internal", "company_id": cls.company_a.id} - ) - cls.warehouse_company_a = cls.StockWarehouse.create( + def _create_warehouse(cls, code, company): + address = cls.env["res.partner"].create({"name": f"{code} address"}) + return cls.env["stock.warehouse"].create( { - "name": "purchase warehouse - a", - "code": "CMPa", - "wh_input_stock_loc_id": cls.location_stock_company_a.id, - "lot_stock_id": cls.location_stock_company_a.id, - "wh_output_stock_loc_id": cls.location_output_company_a.id, - "partner_id": cls.partner_company_a.id, - "company_id": cls.company_a.id, + "name": f"Warehouse {code}", + "code": code, + "partner_id": address.id, + "company_id": company.id, } ) - cls.location_stock_company_b = cls.StockLocation.create( - {"name": "Stock - b", "usage": "internal", "company_id": cls.company_b.id} - ) - cls.location_output_company_b = cls.StockLocation.create( - {"name": "Output - b", "usage": "internal", "company_id": cls.company_b.id} + + @classmethod + def setUpClass(cls): + super().setUpClass() + # Configure 2 Warehouse per company + cls.warehouse_a = cls.env["stock.warehouse"].search( + [("company_id", "=", cls.company_a.id)] ) - cls.warehouse_company_b = cls.StockWarehouse.create( - { - "name": "purchase warehouse - b", - "code": "CMPb", - "wh_input_stock_loc_id": cls.location_stock_company_b.id, - "lot_stock_id": cls.location_stock_company_b.id, - "wh_output_stock_loc_id": cls.location_output_company_b.id, - "partner_id": cls.partner_company_b.id, - "company_id": cls.company_b.id, - } + cls.warehouse_b = cls._create_warehouse("CA-WB", cls.company_a) + + cls.warehouse_c = cls.env["stock.warehouse"].search( + [("company_id", "=", cls.company_b.id)] ) - cls.company_a.warehouse_id = cls.warehouse_company_a - cls.company_b.warehouse_id = cls.warehouse_company_b + cls.warehouse_d = cls._create_warehouse("CB-WD", cls.company_b) + cls.company_b.warehouse_id = cls.warehouse_c + + def test_deliver_to_warehouse_a(self): + self.purchase_company_a.picking_type_id = self.warehouse_a.in_type_id + sale = self._approve_po() + self.assertEqual(self.warehouse_a.partner_id, sale.partner_shipping_id) + + def test_deliver_to_warehouse_b(self): + self.purchase_company_a.picking_type_id = self.warehouse_b.in_type_id + sale = self._approve_po() + self.assertEqual(self.warehouse_b.partner_id, sale.partner_shipping_id) + + def test_send_from_warehouse_c(self): + self.company_b.warehouse_id = self.warehouse_c + sale = self._approve_po() + self.assertEqual(sale.warehouse_id, self.warehouse_c) + + def test_send_from_warehouse_d(self): + self.company_b.warehouse_id = self.warehouse_d + sale = self._approve_po() + self.assertEqual(sale.warehouse_id, self.warehouse_d) def test_purchase_sale_stock_inter_company(self): self.purchase_company_a.notes = "Test note" - # Confirm the purchase of company A - self.purchase_company_a.with_user(self.user_company_a).button_approve() - # Check sale order created in company B - sales = ( - self.env["sale.order"] - .with_user(self.user_company_b) - .search([("auto_purchase_order_id", "=", self.purchase_company_a.id)]) - ) + sale = self._approve_po() self.assertEqual( - sales.partner_shipping_id, + sale.partner_shipping_id, self.purchase_company_a.picking_type_id.warehouse_id.partner_id, ) - warehouse_b = self.StockWarehouse.search([("name", "=", "Company B")]) - self.assertEqual(sales.warehouse_id, warehouse_b) + self.assertEqual(sale.warehouse_id, self.warehouse_c) From 62be018eddbe07612754a167146fa12fdd6d41e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miquel=20Ra=C3=AFch?= Date: Wed, 8 Feb 2023 11:30:01 +0100 Subject: [PATCH 3/7] [IMP] purchase_sale_stock_inter_company: reflect purpose of module --- purchase_sale_stock_inter_company/__manifest__.py | 4 ++-- purchase_sale_stock_inter_company/readme/CONFIGURE.rst | 6 ------ .../readme/CONTRIBUTORS.rst | 8 +------- .../readme/DESCRIPTION.rst | 10 +++------- purchase_sale_stock_inter_company/readme/ROADMAP.rst | 1 - 5 files changed, 6 insertions(+), 23 deletions(-) delete mode 100644 purchase_sale_stock_inter_company/readme/CONFIGURE.rst delete mode 100644 purchase_sale_stock_inter_company/readme/ROADMAP.rst diff --git a/purchase_sale_stock_inter_company/__manifest__.py b/purchase_sale_stock_inter_company/__manifest__.py index 38a82cba0ac..c6d90bdfe25 100644 --- a/purchase_sale_stock_inter_company/__manifest__.py +++ b/purchase_sale_stock_inter_company/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Inter Company Module for Purchase to Sale Order with warehouse", - "summary": "Intercompany PO/SO rules", + "summary": "Intercompany PO/SO rules with warehouse", "version": "15.0.1.0.0", "category": "Purchase Management", "website": "https://github.com/OCA/multi-company", @@ -13,6 +13,6 @@ "license": "AGPL-3", "installable": True, "auto_install": True, - "depends": ["purchase_sale_inter_company", "stock"], + "depends": ["purchase_sale_inter_company", "sale_stock", "purchase_stock"], "data": ["views/res_config_view.xml"], } diff --git a/purchase_sale_stock_inter_company/readme/CONFIGURE.rst b/purchase_sale_stock_inter_company/readme/CONFIGURE.rst deleted file mode 100644 index 3b460143981..00000000000 --- a/purchase_sale_stock_inter_company/readme/CONFIGURE.rst +++ /dev/null @@ -1,6 +0,0 @@ -TTo configure this module, you need to: -#. go to the menu *General Settings > Companies > Companies*. -#. Select one of the companies. -#. Go to the tab *Inter-Company* then the group *Purchase To Sale*. -#. Select the *Warehouse For Sale Orders*, it is the warehouse that will be used to automatically generate the sale order in the other company. -#. If you check the option *Sale Auto Validation* in the configuration of company B, then when you validate a *Purchase Order* in company A with company B as supplier, the *Sale Order* will be automatically validated in company B with company A as customer. diff --git a/purchase_sale_stock_inter_company/readme/CONTRIBUTORS.rst b/purchase_sale_stock_inter_company/readme/CONTRIBUTORS.rst index d34882913d6..ffaa6f9b2d0 100644 --- a/purchase_sale_stock_inter_company/readme/CONTRIBUTORS.rst +++ b/purchase_sale_stock_inter_company/readme/CONTRIBUTORS.rst @@ -1,16 +1,10 @@ -* Odoo S.A. (original module `inter_company_rules`) -* Andrea Stirpe * Adria Gil Sorribes -* Christopher Ormaza * `Akretion `: * Chafique Delli - * Alexis de Lattre - * David Beal + * Pierrick Brun * `Tecnativa `: - * Jairo Llopis - * David Vidal * Pedro M. Baeza * `Camptocamp `: diff --git a/purchase_sale_stock_inter_company/readme/DESCRIPTION.rst b/purchase_sale_stock_inter_company/readme/DESCRIPTION.rst index aa645c6dce7..45c36685e42 100644 --- a/purchase_sale_stock_inter_company/readme/DESCRIPTION.rst +++ b/purchase_sale_stock_inter_company/readme/DESCRIPTION.rst @@ -1,8 +1,4 @@ -This module is useful if there are multiple companies in the same Odoo database and those companies sell goods or services among themselves. -It allows to create a sale order in company A from a purchase order in company B. +This module considers the propagation of the warehouse into the sale orders. -Imagine you have company A and company B in the same Odoo database: - -* Company A purchase goods from company B. -* Company A will create a purchase order with company B as supplier. -* This module automate the creation of the sale order in company B with company A as customer. +This module is a glue module and is auto installed if `purchase_sale_inter_company`, `sale_stock` and `purchase_stock` modules are installed. +Full purpose description can be found in `purchase_sale_inter_company`. diff --git a/purchase_sale_stock_inter_company/readme/ROADMAP.rst b/purchase_sale_stock_inter_company/readme/ROADMAP.rst deleted file mode 100644 index 4b18b518c5b..00000000000 --- a/purchase_sale_stock_inter_company/readme/ROADMAP.rst +++ /dev/null @@ -1 +0,0 @@ -* This module is auto installed if `purchase_sale_inter_company` and `stock` are installed From 1724adc0d2bea7264f2a2dc3f3741b7346da0459 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Fri, 10 Feb 2023 11:17:11 +0000 Subject: [PATCH 4/7] [UPD] Update purchase_sale_stock_inter_company.pot --- .../i18n/purchase_sale_stock_inter_company.pot | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/purchase_sale_stock_inter_company/i18n/purchase_sale_stock_inter_company.pot b/purchase_sale_stock_inter_company/i18n/purchase_sale_stock_inter_company.pot index 6613d1d4ebf..31eb558fb90 100644 --- a/purchase_sale_stock_inter_company/i18n/purchase_sale_stock_inter_company.pot +++ b/purchase_sale_stock_inter_company/i18n/purchase_sale_stock_inter_company.pot @@ -4,10 +4,8 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 15.0+e\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-08-05 13:15+0000\n" -"PO-Revision-Date: 2022-08-05 13:15+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" From e411ad6b50b59a73bbbd0f30d4e6e264b9f84f64 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Fri, 10 Feb 2023 11:21:12 +0000 Subject: [PATCH 5/7] [UPD] README.rst --- purchase_sale_stock_inter_company/README.rst | 73 ++- .../static/description/index.html | 436 ++++++++++++++++++ 2 files changed, 470 insertions(+), 39 deletions(-) create mode 100644 purchase_sale_stock_inter_company/static/description/index.html diff --git a/purchase_sale_stock_inter_company/README.rst b/purchase_sale_stock_inter_company/README.rst index 537b4ed6507..cc9c3217fae 100644 --- a/purchase_sale_stock_inter_company/README.rst +++ b/purchase_sale_stock_inter_company/README.rst @@ -1,46 +1,47 @@ -.. 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 - -================================= -Purchase Sale Stock Inter Company -================================= - -This module is useful if there are multiple companies in the same Odoo database and those companies sell goods or services among themselves. -It allows to create a sale order in company A from a purchase order in company B. - -Imagine you have company A and company B in the same Odoo database: - -* Company A purchase goods from company B. -* Company A will create a purchase order with company B as supplier. -* This module automate the creation of the sale order in company B with company A as customer. +============================================================== +Inter Company Module for Purchase to Sale Order with warehouse +============================================================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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-OCA%2Fmulti--company-lightgray.png?logo=github + :target: https://github.com/OCA/multi-company/tree/15.0/purchase_sale_stock_inter_company + :alt: OCA/multi-company +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/multi-company-15-0/multi-company-15-0-purchase_sale_stock_inter_company + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/133/15.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module considers the propagation of the warehouse into the sale orders. + +This module is a glue module and is auto installed if `purchase_sale_inter_company`, `sale_stock` and `purchase_stock` modules are installed. +Full purpose description can be found in `purchase_sale_inter_company`. **Table of contents** .. contents:: :local: -Configuration -============= - -To configure this module, you need to: -#. go to the menu *General Settings > Companies > Companies*. -#. Select one of the companies. -#. Go to the tab *Inter-Company* then the group *Purchase To Sale*. -#. If you check the option *Sale Auto Validation* in the configuration of company B, then when you validate a *Purchase Order* in company A with company B as supplier, the *Sale Order* will be automatically validated in company B with company A as customer. - -Known issues / Roadmap -====================== - -* If you want also to have different warehouses for your sales orders you can install `stock` and `purchase_sale_stock_inter_company` will be auto installed. - 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -57,19 +58,13 @@ Authors Contributors ~~~~~~~~~~~~ -* Odoo S.A. (original module `inter_company_rules`) -* Andrea Stirpe * Adria Gil Sorribes -* Christopher Ormaza * `Akretion `: * Chafique Delli - * Alexis de Lattre - * David Beal + * Pierrick Brun * `Tecnativa `: - * Jairo Llopis - * David Vidal * Pedro M. Baeza * `Camptocamp `: @@ -88,6 +83,6 @@ 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/multi-company `_ project on GitHub. +This module is part of the `OCA/multi-company `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/purchase_sale_stock_inter_company/static/description/index.html b/purchase_sale_stock_inter_company/static/description/index.html new file mode 100644 index 00000000000..f7a2213c1ba --- /dev/null +++ b/purchase_sale_stock_inter_company/static/description/index.html @@ -0,0 +1,436 @@ + + + + + + +Inter Company Module for Purchase to Sale Order with warehouse + + + +
+

Inter Company Module for Purchase to Sale Order with warehouse

+ + +

Beta License: AGPL-3 OCA/multi-company Translate me on Weblate Try me on Runbot

+

This module considers the propagation of the warehouse into the sale orders.

+

This module is a glue module and is auto installed if purchase_sale_inter_company, sale_stock and purchase_stock modules are installed. +Full purpose description can be found in purchase_sale_inter_company.

+

Table of contents

+ +
+

Bug Tracker

+

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

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Odoo SA
  • +
  • Akretion
  • +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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

+

This module is part of the OCA/multi-company project on GitHub.

+

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

+
+
+
+ + From 18d8518c30962a9f0338c45760925fcb326d911b Mon Sep 17 00:00:00 2001 From: "chafique.delli" Date: Mon, 13 Feb 2023 10:11:40 +0100 Subject: [PATCH 6/7] [IMP] purchase_sale_stock_inter_company: pre-commit stuff --- purchase_sale_stock_inter_company/__manifest__.py | 2 +- .../odoo/addons/purchase_sale_stock_inter_company | 1 + setup/purchase_sale_stock_inter_company/setup.py | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 120000 setup/purchase_sale_stock_inter_company/odoo/addons/purchase_sale_stock_inter_company create mode 100644 setup/purchase_sale_stock_inter_company/setup.py diff --git a/purchase_sale_stock_inter_company/__manifest__.py b/purchase_sale_stock_inter_company/__manifest__.py index c6d90bdfe25..15b28571b3b 100644 --- a/purchase_sale_stock_inter_company/__manifest__.py +++ b/purchase_sale_stock_inter_company/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Inter Company Module for Purchase to Sale Order with warehouse", "summary": "Intercompany PO/SO rules with warehouse", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "category": "Purchase Management", "website": "https://github.com/OCA/multi-company", "author": "Odoo SA, Akretion, Tecnativa, Odoo Community Association (OCA)", diff --git a/setup/purchase_sale_stock_inter_company/odoo/addons/purchase_sale_stock_inter_company b/setup/purchase_sale_stock_inter_company/odoo/addons/purchase_sale_stock_inter_company new file mode 120000 index 00000000000..a451f889f48 --- /dev/null +++ b/setup/purchase_sale_stock_inter_company/odoo/addons/purchase_sale_stock_inter_company @@ -0,0 +1 @@ +../../../../purchase_sale_stock_inter_company \ No newline at end of file diff --git a/setup/purchase_sale_stock_inter_company/setup.py b/setup/purchase_sale_stock_inter_company/setup.py new file mode 100644 index 00000000000..28c57bb6403 --- /dev/null +++ b/setup/purchase_sale_stock_inter_company/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) From dd0f83ef8561f7bf20394b55b9f9618b9d5c39be Mon Sep 17 00:00:00 2001 From: "chafique.delli" Date: Mon, 13 Feb 2023 12:10:37 +0100 Subject: [PATCH 7/7] [MIG] purchase_sale_stock_inter_company: Migration to 16.0 --- purchase_sale_stock_inter_company/README.rst | 19 +++++++--- .../models/stock_picking.py | 6 +-- .../readme/CONFIGURE.rst | 4 ++ .../static/description/index.html | 38 +++++++++++-------- 4 files changed, 44 insertions(+), 23 deletions(-) create mode 100644 purchase_sale_stock_inter_company/readme/CONFIGURE.rst diff --git a/purchase_sale_stock_inter_company/README.rst b/purchase_sale_stock_inter_company/README.rst index cc9c3217fae..f9d95fa9afe 100644 --- a/purchase_sale_stock_inter_company/README.rst +++ b/purchase_sale_stock_inter_company/README.rst @@ -14,13 +14,13 @@ Inter Company Module for Purchase to Sale Order with warehouse :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmulti--company-lightgray.png?logo=github - :target: https://github.com/OCA/multi-company/tree/15.0/purchase_sale_stock_inter_company + :target: https://github.com/OCA/multi-company/tree/16.0/purchase_sale_stock_inter_company :alt: OCA/multi-company .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/multi-company-15-0/multi-company-15-0-purchase_sale_stock_inter_company + :target: https://translation.odoo-community.org/projects/multi-company-16-0/multi-company-16-0-purchase_sale_stock_inter_company :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/133/15.0 + :target: https://runbot.odoo-community.org/runbot/133/16.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -30,6 +30,15 @@ This module considers the propagation of the warehouse into the sale orders. This module is a glue module and is auto installed if `purchase_sale_inter_company`, `sale_stock` and `purchase_stock` modules are installed. Full purpose description can be found in `purchase_sale_inter_company`. + +Configuration +============= + +To configure this module, you need to: +#. Go to the menu *Settings > General Settings*. +#. Go to the tab *Companies / Inter Company OCA features*, in the group *Purchase/Sale*, check the option *Sale from purchase*. +#. Then, select the *Warehouse for Sale Orders*, it is the warehouse that will be used to automatically generate the sale order in the other company. + **Table of contents** .. contents:: @@ -41,7 +50,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -83,6 +92,6 @@ 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/multi-company `_ project on GitHub. +This module is part of the `OCA/multi-company `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/purchase_sale_stock_inter_company/models/stock_picking.py b/purchase_sale_stock_inter_company/models/stock_picking.py index ee0a030b3da..865550f233d 100644 --- a/purchase_sale_stock_inter_company/models/stock_picking.py +++ b/purchase_sale_stock_inter_company/models/stock_picking.py @@ -11,7 +11,7 @@ class StockPicking(models.Model): intercompany_picking_id = fields.Many2one(comodel_name="stock.picking") - def action_done(self): + def _action_done(self): # Only DropShip pickings po_picks = self.browse() for pick in self.filtered( @@ -53,5 +53,5 @@ def action_done(self): ) # Transfer dropship pickings for po_pick in po_picks.sudo(): - po_pick.with_company(po_pick.company_id.id).action_done() - return super(StockPicking, self).action_done() + po_pick.with_company(po_pick.company_id.id)._action_done() + return super()._action_done() diff --git a/purchase_sale_stock_inter_company/readme/CONFIGURE.rst b/purchase_sale_stock_inter_company/readme/CONFIGURE.rst new file mode 100644 index 00000000000..2af5826da5d --- /dev/null +++ b/purchase_sale_stock_inter_company/readme/CONFIGURE.rst @@ -0,0 +1,4 @@ +To configure this module, you need to: +#. Go to the menu *Settings > General Settings*. +#. Go to the tab *Companies / Inter Company OCA features*, in the group *Purchase/Sale*, check the option *Sale from purchase*. +#. Then, select the *Warehouse for Sale Orders*, it is the warehouse that will be used to automatically generate the sale order in the other company. diff --git a/purchase_sale_stock_inter_company/static/description/index.html b/purchase_sale_stock_inter_company/static/description/index.html index f7a2213c1ba..9ae90a2a9ff 100644 --- a/purchase_sale_stock_inter_company/static/description/index.html +++ b/purchase_sale_stock_inter_company/static/description/index.html @@ -3,13 +3,13 @@ - + Inter Company Module for Purchase to Sale Order with warehouse