From e02e7133ac413a05902a23edf40464cdf5bd26fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Valyi?= Date: Sun, 1 Dec 2024 01:35:31 +0000 Subject: [PATCH] [MIG] sale_stock_picking_invoicing: Migration to 16.0 --- sale_stock_picking_invoicing/README.rst | 5 +++ sale_stock_picking_invoicing/__manifest__.py | 2 +- .../readme/HISTORY.rst | 5 +++ .../static/description/index.html | 41 +++++++++++-------- .../tests/test_sale_stock.py | 9 ++-- .../wizards/stock_invoice_onshipping.py | 15 +++---- 6 files changed, 49 insertions(+), 28 deletions(-) diff --git a/sale_stock_picking_invoicing/README.rst b/sale_stock_picking_invoicing/README.rst index 9232725d008..3abc85a3ebb 100644 --- a/sale_stock_picking_invoicing/README.rst +++ b/sale_stock_picking_invoicing/README.rst @@ -78,6 +78,11 @@ Known issues / Roadmap Changelog ========= +16.0.1.0.0 (2025-01-14) +~~~~~~~~~~~~~~~~~~~~~~~ + +* Migration to version 16.0 + 15.0.1.0.0 (2024-10-25) ~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/sale_stock_picking_invoicing/__manifest__.py b/sale_stock_picking_invoicing/__manifest__.py index 495540eb2dd..8a7b3267eca 100644 --- a/sale_stock_picking_invoicing/__manifest__.py +++ b/sale_stock_picking_invoicing/__manifest__.py @@ -10,7 +10,7 @@ "license": "AGPL-3", "author": "Akretion, Odoo Community Association (OCA)", "website": "https://github.com/OCA/account-invoicing", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "maintainers": ["mbcosta", "renatonlima"], "depends": [ "sale_management", diff --git a/sale_stock_picking_invoicing/readme/HISTORY.rst b/sale_stock_picking_invoicing/readme/HISTORY.rst index 3e569d02c54..2b5105cde13 100644 --- a/sale_stock_picking_invoicing/readme/HISTORY.rst +++ b/sale_stock_picking_invoicing/readme/HISTORY.rst @@ -1,3 +1,8 @@ +16.0.1.0.0 (2025-01-14) +~~~~~~~~~~~~~~~~~~~~~~~ + +* Migration to version 16.0 + 15.0.1.0.0 (2024-10-25) ~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/sale_stock_picking_invoicing/static/description/index.html b/sale_stock_picking_invoicing/static/description/index.html index c355dffd62e..65b7f6b1ff0 100644 --- a/sale_stock_picking_invoicing/static/description/index.html +++ b/sale_stock_picking_invoicing/static/description/index.html @@ -384,16 +384,17 @@

Sales Stock Picking Invocing

  • Usage
  • Known issues / Roadmap
  • Changelog
  • -
  • Bug Tracker
  • -
  • Credits @@ -428,20 +429,26 @@

    Known issues / Roadmap

    Changelog

    -

    15.0.1.0.0 (2024-10-25)

    +

    16.0.1.0.0 (2025-01-14)

      -
    • Migration to version 15.0 .
    • +
    • Migration to version 16.0
    -

    14.0.1.0.0 (2024-03-12)

    +

    15.0.1.0.0 (2024-10-25)

    +
      +
    • Migration to version 15.0 .
    • +
    +
    +
    +

    14.0.1.0.0 (2024-03-12)

    -

    Bug Tracker

    +

    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 to smash it by providing a detailed and welcomed @@ -449,15 +456,15 @@

    Bug Tracker

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

    -

    Credits

    +

    Credits

    -

    Authors

    +

    Authors

    • Akretion
    -

    Other credits

    +

    Other credits

    The development of this module has been financially supported by:

    • Aketion - www.akretion.com
    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association diff --git a/sale_stock_picking_invoicing/tests/test_sale_stock.py b/sale_stock_picking_invoicing/tests/test_sale_stock.py index 39838d4f891..1aad801b364 100644 --- a/sale_stock_picking_invoicing/tests/test_sale_stock.py +++ b/sale_stock_picking_invoicing/tests/test_sale_stock.py @@ -130,7 +130,7 @@ def test_01_sale_stock_return(self): stock_picking = self.so.picking_ids # compare sale.order.line with stock.move - stock_move = stock_picking.move_lines + stock_move = stock_picking.move_ids sale_order_line = self.so.order_line sm_fields = [key for key in self.env["stock.move"]._fields.keys()] @@ -169,7 +169,7 @@ def test_picking_sale_order_product_and_service(self): "sale_stock_picking_invoicing.main_company-sale_order_2" ) # Necessary to get the currency - sale_order_2.onchange_partner_id() + # sale_order_2.onchange_partner_id() sale_order_2.action_confirm() # Method to create invoice in sale order should work only # for lines where products are of TYPE Service @@ -262,6 +262,9 @@ def test_picking_sale_order_product_and_service(self): "__last_update", # Field sequence add in creation of Invoice "sequence", + "currency_id", + "analytic_precision", + "display_type", ] common_fields = list(set(acl_fields) & set(sol_fields) - set(skipped_fields)) @@ -284,7 +287,7 @@ def test_picking_sale_order_product_and_service(self): picking_devolution = self.return_picking_wizard(picking) self.assertEqual(picking_devolution.invoice_state, "2binvoiced") - for line in picking_devolution.move_lines: + for line in picking_devolution.move_ids: self.assertEqual(line.invoice_state, "2binvoiced") self.picking_move_state(picking_devolution) diff --git a/sale_stock_picking_invoicing/wizards/stock_invoice_onshipping.py b/sale_stock_picking_invoicing/wizards/stock_invoice_onshipping.py index 6b759099dcb..13324416605 100644 --- a/sale_stock_picking_invoicing/wizards/stock_invoice_onshipping.py +++ b/sale_stock_picking_invoicing/wizards/stock_invoice_onshipping.py @@ -160,12 +160,12 @@ def _get_invoice_line_values(self, moves, invoice_values, invoice): if move.sale_line_id: # Vals informed in any case values["sale_line_ids"] = [(6, 0, moves.sale_line_id.ids)] - values[ - "analytic_account_id" - ] = moves.sale_line_id.order_id.analytic_account_id.id - values["analytic_tag_ids"] = [ - (6, 0, moves.sale_line_id.analytic_tag_ids.ids) - ] + # values[ + # "analytic_account_id" + # ] = moves.sale_line_id.order_id.analytic_account_id.id + # values["analytic_tag_ids"] = [ + # (6, 0, moves.sale_line_id.analytic_tag_ids.ids) + # ] # Refund case don't get values from Sale Line Dict # TODO: Should get any value? if self._get_invoice_type() != "out_refund": @@ -178,7 +178,6 @@ def _get_invoice_line_values(self, moves, invoice_values, invoice): # Fields to remove vals_to_remove = { - "display_type", "name", "product_id", "product_uom_id", @@ -191,6 +190,8 @@ def _get_invoice_line_values(self, moves, invoice_values, invoice): # another fields "__last_update", "display_name", + "currency_id", + "analytic_precision", } sale_line_values_rm = { k: sale_line_values[k]