From d9f3d5dcff088c55ac653275146109f20aa97a2f Mon Sep 17 00:00:00 2001 From: "chafique.delli" Date: Mon, 13 Feb 2023 12:10:37 +0100 Subject: [PATCH] [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