From 8e64d6c31700b9042e8869ae8b87f2f39f873153 Mon Sep 17 00:00:00 2001 From: sergio-teruel Date: Tue, 13 Dec 2022 21:50:25 +0100 Subject: [PATCH] [MIG] stock_picking_batch_extended_account_sale_type: Migration to v15.0 --- ...k_picking_batch_extended_account_sale_type | 1 + .../setup.py | 6 + .../README.rst | 85 ++++ .../__manifest__.py | 2 +- .../models/stock_batch_picking.py | 2 +- .../readme/CONTRIBUTORS.rst | 4 + .../readme/DESCRIPTION.rst | 2 + .../static/description/index.html | 426 ++++++++++++++++++ ...icking_batch_extended_account_sale_type.py | 2 +- 9 files changed, 527 insertions(+), 3 deletions(-) create mode 120000 setup/stock_picking_batch_extended_account_sale_type/odoo/addons/stock_picking_batch_extended_account_sale_type create mode 100644 setup/stock_picking_batch_extended_account_sale_type/setup.py create mode 100644 stock_picking_batch_extended_account_sale_type/README.rst create mode 100644 stock_picking_batch_extended_account_sale_type/readme/CONTRIBUTORS.rst create mode 100644 stock_picking_batch_extended_account_sale_type/readme/DESCRIPTION.rst create mode 100644 stock_picking_batch_extended_account_sale_type/static/description/index.html diff --git a/setup/stock_picking_batch_extended_account_sale_type/odoo/addons/stock_picking_batch_extended_account_sale_type b/setup/stock_picking_batch_extended_account_sale_type/odoo/addons/stock_picking_batch_extended_account_sale_type new file mode 120000 index 000000000000..ca6d7f876134 --- /dev/null +++ b/setup/stock_picking_batch_extended_account_sale_type/odoo/addons/stock_picking_batch_extended_account_sale_type @@ -0,0 +1 @@ +../../../../stock_picking_batch_extended_account_sale_type \ No newline at end of file diff --git a/setup/stock_picking_batch_extended_account_sale_type/setup.py b/setup/stock_picking_batch_extended_account_sale_type/setup.py new file mode 100644 index 000000000000..28c57bb64031 --- /dev/null +++ b/setup/stock_picking_batch_extended_account_sale_type/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/stock_picking_batch_extended_account_sale_type/README.rst b/stock_picking_batch_extended_account_sale_type/README.rst new file mode 100644 index 000000000000..b2639b5db81c --- /dev/null +++ b/stock_picking_batch_extended_account_sale_type/README.rst @@ -0,0 +1,85 @@ +============================================== +Stock batch picking extended account sale type +============================================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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%2Fstock--logistics--workflow-lightgray.png?logo=github + :target: https://github.com/OCA/stock-logistics-workflow/tree/15.0/stock_picking_batch_extended_account_sale_type + :alt: OCA/stock-logistics-workflow +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/stock-logistics-workflow-15-0/stock-logistics-workflow-15-0-stock_picking_batch_extended_account_sale_type + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/154/15.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extends stock_picking_batch_extended_account module to allow to set +auto invoice from batch picking in sale order type. + +**Table of contents** + +.. contents:: + :local: + +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 +~~~~~~~ + +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* `Tecnativa `_: + + * Carlos Dauden + * Sergio Teruel + +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. + +.. |maintainer-ernestotejeda| image:: https://github.com/ernestotejeda.png?size=40px + :target: https://github.com/ernestotejeda + :alt: ernestotejeda + +Current `maintainer `__: + +|maintainer-ernestotejeda| + +This module is part of the `OCA/stock-logistics-workflow `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_picking_batch_extended_account_sale_type/__manifest__.py b/stock_picking_batch_extended_account_sale_type/__manifest__.py index ab89e81caf27..f13479fc038c 100644 --- a/stock_picking_batch_extended_account_sale_type/__manifest__.py +++ b/stock_picking_batch_extended_account_sale_type/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Stock batch picking extended account sale type", "summary": "Generates invoices when batch is set to Done state", - "version": "13.0.1.0.0", + "version": "15.0.1.0.0", "author": "Tecnativa, Odoo Community Association (OCA)", "maintainers": ["ernestotejeda"], "development_status": "Beta", diff --git a/stock_picking_batch_extended_account_sale_type/models/stock_batch_picking.py b/stock_picking_batch_extended_account_sale_type/models/stock_batch_picking.py index 7e6f96fa4148..36ba9433f9c9 100644 --- a/stock_picking_batch_extended_account_sale_type/models/stock_batch_picking.py +++ b/stock_picking_batch_extended_account_sale_type/models/stock_batch_picking.py @@ -7,7 +7,7 @@ class StockBatchPicking(models.Model): _inherit = "stock.picking.batch" def _get_domain_picking_to_invoice(self): - domain = super(StockBatchPicking, self)._get_domain_picking_to_invoice() + domain = super()._get_domain_picking_to_invoice() return [ "|", "&", diff --git a/stock_picking_batch_extended_account_sale_type/readme/CONTRIBUTORS.rst b/stock_picking_batch_extended_account_sale_type/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000000..0763b4b67d40 --- /dev/null +++ b/stock_picking_batch_extended_account_sale_type/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* `Tecnativa `_: + + * Carlos Dauden + * Sergio Teruel diff --git a/stock_picking_batch_extended_account_sale_type/readme/DESCRIPTION.rst b/stock_picking_batch_extended_account_sale_type/readme/DESCRIPTION.rst new file mode 100644 index 000000000000..0b47b5fc0d68 --- /dev/null +++ b/stock_picking_batch_extended_account_sale_type/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module extends stock_picking_batch_extended_account module to allow to set +auto invoice from batch picking in sale order type. diff --git a/stock_picking_batch_extended_account_sale_type/static/description/index.html b/stock_picking_batch_extended_account_sale_type/static/description/index.html new file mode 100644 index 000000000000..cfcbcd81d65c --- /dev/null +++ b/stock_picking_batch_extended_account_sale_type/static/description/index.html @@ -0,0 +1,426 @@ + + + + + + +Stock batch picking extended account sale type + + + +
+

Stock batch picking extended account sale type

+ + +

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

+

This module extends stock_picking_batch_extended_account module to allow to set +auto invoice from batch picking in sale order type.

+

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

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+
    +
  • Tecnativa:
      +
    • Carlos Dauden
    • +
    • Sergio Teruel
    • +
    +
  • +
+
+
+

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.

+

Current maintainer:

+

ernestotejeda

+

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

+

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

+
+
+
+ + diff --git a/stock_picking_batch_extended_account_sale_type/tests/test_stock_picking_batch_extended_account_sale_type.py b/stock_picking_batch_extended_account_sale_type/tests/test_stock_picking_batch_extended_account_sale_type.py index 3a781bf4d8a9..f64357f7dd58 100644 --- a/stock_picking_batch_extended_account_sale_type/tests/test_stock_picking_batch_extended_account_sale_type.py +++ b/stock_picking_batch_extended_account_sale_type/tests/test_stock_picking_batch_extended_account_sale_type.py @@ -31,6 +31,6 @@ def test_create_invoice_from_bp_sale_type(self): move_lines.qty_done = 1.0 bp = self._create_batch_picking(pickings) bp.action_assign() - bp.action_transfer() + bp.action_done() self.assertFalse(self.order1.invoice_ids) self.assertTrue(self.order2.invoice_ids)