Skip to content

Commit

Permalink
[MIG] sale_stock_picking_invoicing: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rvalyi authored and mbcosta committed Jan 14, 2025
1 parent 3fcae30 commit e02e713
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 28 deletions.
5 changes: 5 additions & 0 deletions sale_stock_picking_invoicing/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion sale_stock_picking_invoicing/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions sale_stock_picking_invoicing/readme/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -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)
~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
41 changes: 24 additions & 17 deletions sale_stock_picking_invoicing/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -384,16 +384,17 @@ <h1 class="title">Sales Stock Picking Invocing</h1>
<li><a class="reference internal" href="#usage" id="toc-entry-3">Usage</a></li>
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-4">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#changelog" id="toc-entry-5">Changelog</a><ul>
<li><a class="reference internal" href="#section-1" id="toc-entry-6">15.0.1.0.0 (2024-10-25)</a></li>
<li><a class="reference internal" href="#section-2" id="toc-entry-7">14.0.1.0.0 (2024-03-12)</a></li>
<li><a class="reference internal" href="#section-1" id="toc-entry-6">16.0.1.0.0 (2025-01-14)</a></li>
<li><a class="reference internal" href="#section-2" id="toc-entry-7">15.0.1.0.0 (2024-10-25)</a></li>
<li><a class="reference internal" href="#section-3" id="toc-entry-8">14.0.1.0.0 (2024-03-12)</a></li>
</ul>
</li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-8">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-9">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-10">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-11">Contributors</a></li>
<li><a class="reference internal" href="#other-credits" id="toc-entry-12">Other credits</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-13">Maintainers</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-9">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-10">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-11">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-12">Contributors</a></li>
<li><a class="reference internal" href="#other-credits" id="toc-entry-13">Other credits</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-14">Maintainers</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -428,36 +429,42 @@ <h1><a class="toc-backref" href="#toc-entry-4">Known issues / Roadmap</a></h1>
<div class="section" id="changelog">
<h1><a class="toc-backref" href="#toc-entry-5">Changelog</a></h1>
<div class="section" id="section-1">
<h2><a class="toc-backref" href="#toc-entry-6">15.0.1.0.0 (2024-10-25)</a></h2>
<h2><a class="toc-backref" href="#toc-entry-6">16.0.1.0.0 (2025-01-14)</a></h2>
<ul class="simple">
<li>Migration to version 15.0 .</li>
<li>Migration to version 16.0</li>
</ul>
</div>
<div class="section" id="section-2">
<h2><a class="toc-backref" href="#toc-entry-7">14.0.1.0.0 (2024-03-12)</a></h2>
<h2><a class="toc-backref" href="#toc-entry-7">15.0.1.0.0 (2024-10-25)</a></h2>
<ul class="simple">
<li>Migration to version 15.0 .</li>
</ul>
</div>
<div class="section" id="section-3">
<h2><a class="toc-backref" href="#toc-entry-8">14.0.1.0.0 (2024-03-12)</a></h2>
<ul class="simple">
<li>[ADD] Module sale_stock_picking_invoicing based in l10n_br_sale_stock <a class="reference external" href="https://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_sale_stock">https://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_sale_stock</a> .</li>
</ul>
</div>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-8">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#toc-entry-9">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-invoicing/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/account-invoicing/issues/new?body=module:%20sale_stock_picking_invoicing%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-9">Credits</a></h1>
<h1><a class="toc-backref" href="#toc-entry-10">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-10">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-11">Authors</a></h2>
<ul class="simple">
<li>Akretion</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-11">Contributors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-12">Contributors</a></h2>
<ul class="simple">
<li><a class="reference external" href="https://akretion.com">Akretion</a>:<ul>
<li>Renato Lima &lt;<a class="reference external" href="mailto:renato.lima&#64;akretion.com.br">renato.lima&#64;akretion.com.br</a>&gt;</li>
Expand All @@ -472,14 +479,14 @@ <h2><a class="toc-backref" href="#toc-entry-11">Contributors</a></h2>
</ul>
</div>
<div class="section" id="other-credits">
<h2><a class="toc-backref" href="#toc-entry-12">Other credits</a></h2>
<h2><a class="toc-backref" href="#toc-entry-13">Other credits</a></h2>
<p>The development of this module has been financially supported by:</p>
<ul class="simple">
<li>Aketion - www.akretion.com</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-13">Maintainers</a></h2>
<h2><a class="toc-backref" href="#toc-entry-14">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
Expand Down
9 changes: 6 additions & 3 deletions sale_stock_picking_invoicing/tests/test_sale_stock.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand All @@ -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)
Expand Down
15 changes: 8 additions & 7 deletions sale_stock_picking_invoicing/wizards/stock_invoice_onshipping.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand All @@ -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",
Expand All @@ -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]
Expand Down

0 comments on commit e02e713

Please sign in to comment.