diff --git a/setup/stock_picking_report_undelivered_product/odoo/addons/stock_picking_report_undelivered_product b/setup/stock_picking_report_undelivered_product/odoo/addons/stock_picking_report_undelivered_product new file mode 120000 index 0000000..86e497d --- /dev/null +++ b/setup/stock_picking_report_undelivered_product/odoo/addons/stock_picking_report_undelivered_product @@ -0,0 +1 @@ +../../../../stock_picking_report_undelivered_product \ No newline at end of file diff --git a/setup/stock_picking_report_undelivered_product/setup.py b/setup/stock_picking_report_undelivered_product/setup.py new file mode 100644 index 0000000..28c57bb --- /dev/null +++ b/setup/stock_picking_report_undelivered_product/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/stock_picking_report_undelivered_product/README.rst b/stock_picking_report_undelivered_product/README.rst index 0769693..b11cc1b 100644 --- a/stock_picking_report_undelivered_product/README.rst +++ b/stock_picking_report_undelivered_product/README.rst @@ -14,13 +14,13 @@ Stock picking report undelivered products :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--reporting-lightgray.png?logo=github - :target: https://github.com/OCA/stock-logistics-reporting/tree/12.0/stock_picking_report_undelivered_product + :target: https://github.com/OCA/stock-logistics-reporting/tree/13.0/stock_picking_report_undelivered_product :alt: OCA/stock-logistics-reporting .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/stock-logistics-reporting-12-0/stock-logistics-reporting-12-0-stock_picking_report_undelivered_product + :target: https://translation.odoo-community.org/projects/stock-logistics-reporting-13-0/stock-logistics-reporting-13-0-stock_picking_report_undelivered_product :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/151/12.0 + :target: https://runbot.odoo-community.org/runbot/151/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -65,7 +65,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. @@ -98,6 +98,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/stock-logistics-reporting `_ project on GitHub. +This module is part of the `OCA/stock-logistics-reporting `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_picking_report_undelivered_product/__manifest__.py b/stock_picking_report_undelivered_product/__manifest__.py index be63486..692ea76 100644 --- a/stock_picking_report_undelivered_product/__manifest__.py +++ b/stock_picking_report_undelivered_product/__manifest__.py @@ -4,9 +4,9 @@ { "name": "Stock picking report undelivered products", "summary": "Display on picking report delivery slip undelivered products", - "version": "12.0.1.0.0", + "version": "13.0.1.0.0", "author": "Tecnativa,Odoo Community Association (OCA)", - "website": "https://www.tecnativa.com", + "website": "https://github.com/OCA/stock-logistics-reporting", "category": "Warehouse", "license": "AGPL-3", "depends": ["stock"], diff --git a/stock_picking_report_undelivered_product/static/description/index.html b/stock_picking_report_undelivered_product/static/description/index.html index c3892d3..ca4ec8d 100644 --- a/stock_picking_report_undelivered_product/static/description/index.html +++ b/stock_picking_report_undelivered_product/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/stock-logistics-reporting Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/stock-logistics-reporting Translate me on Weblate Try me on Runbot

This module extends the functionality of stock module to allow to display undelivered products in the delivery slip report.

You have three options to display lines:

@@ -414,7 +414,7 @@ completely lines).

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.

@@ -445,7 +445,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

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

-

This module is part of the OCA/stock-logistics-reporting project on GitHub.

+

This module is part of the OCA/stock-logistics-reporting project on GitHub.

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

diff --git a/stock_picking_report_undelivered_product/tests/test_stock_picking_report_undelivered_product.py b/stock_picking_report_undelivered_product/tests/test_stock_picking_report_undelivered_product.py index 568f0d6..7537e71 100644 --- a/stock_picking_report_undelivered_product/tests/test_stock_picking_report_undelivered_product.py +++ b/stock_picking_report_undelivered_product/tests/test_stock_picking_report_undelivered_product.py @@ -11,23 +11,18 @@ class TestStockPickingReportUndeliveredProduct(common.TransactionCase): self.ProductProduct = self.env["product.product"] self.StockPicking = self.env["stock.picking"] self.StockQuant = self.env["stock.quant"] - + self.BackOrderWiz = self.env["stock.backorder.confirmation"] self.warehouse = self.env.ref("stock.warehouse0") self.stock_location = self.env.ref("stock.stock_location_stock") self.customer_location = self.env.ref("stock.stock_location_customers") self.picking_type_out = self.env.ref("stock.picking_type_out") self.partner_display = self.ResPartner.create( - { - "name": "Partner for test display", - "customer": True, - "display_undelivered_in_picking": True, - } + {"name": "Partner for test display", "display_undelivered_in_picking": True} ) self.partner_no_display = self.ResPartner.create( { "name": "Partner for test on display", - "customer": True, "display_undelivered_in_picking": False, } ) @@ -77,14 +72,17 @@ class TestStockPickingReportUndeliveredProduct(common.TransactionCase): line.product_uom_qty = 20.00 return picking_form.save() + def _transfer_picking_no_backorder(self, picking): + # Transfer picking with no create backorder option + backorder_wizard = self.BackOrderWiz.create({"pick_ids": [(4, picking.id)]}) + backorder_wizard.process_cancel_backorder() + def test_displayed_customer(self): picking = self._create_picking(self.partner_display) picking.action_confirm() picking.action_assign() picking.move_line_ids.qty_done = 10.00 - picking.action_done() - # Cancel backorder - picking.backorder_ids.action_cancel() + self._transfer_picking_no_backorder(picking) res = ( self.env["ir.actions.report"] ._get_report_from_name("stock.report_deliveryslip") @@ -97,9 +95,7 @@ class TestStockPickingReportUndeliveredProduct(common.TransactionCase): picking.action_confirm() picking.action_assign() picking.move_line_ids.qty_done = 10.00 - picking.action_done() - # Cancel backorder - picking.backorder_ids.action_cancel() + self._transfer_picking_no_backorder(picking) res = ( self.env["ir.actions.report"] ._get_report_from_name("stock.report_deliveryslip") @@ -115,9 +111,7 @@ class TestStockPickingReportUndeliveredProduct(common.TransactionCase): picking.action_confirm() picking.action_assign() picking.move_line_ids.qty_done = 10.00 - picking.action_done() - # Cancel backorder - picking.backorder_ids.action_cancel() + self._transfer_picking_no_backorder(picking) res = ( self.env["ir.actions.report"] ._get_report_from_name("stock.report_deliveryslip") @@ -161,9 +155,7 @@ class TestStockPickingReportUndeliveredProduct(common.TransactionCase): picking.action_confirm() picking.action_assign() picking.move_line_ids.qty_done = 10.00 - picking.action_done() - # Cancel backorder - picking.backorder_ids.action_cancel() + self._transfer_picking_no_backorder(picking) # Empty setting method field picking.company_id.undelivered_product_slip_report_method = False diff --git a/stock_picking_report_undelivered_product/views/product_views.xml b/stock_picking_report_undelivered_product/views/product_views.xml index fac875c..3f324df 100644 --- a/stock_picking_report_undelivered_product/views/product_views.xml +++ b/stock_picking_report_undelivered_product/views/product_views.xml @@ -1,12 +1,12 @@ - + product.template - + - + diff --git a/stock_picking_report_undelivered_product/views/report_deliveryslip.xml b/stock_picking_report_undelivered_product/views/report_deliveryslip.xml index f9093a2..a220d0e 100644 --- a/stock_picking_report_undelivered_product/views/report_deliveryslip.xml +++ b/stock_picking_report_undelivered_product/views/report_deliveryslip.xml @@ -1,24 +1,41 @@ - + -