Skip to content

Commit d98d278

Browse files
committed
[MIG] sale_stock_restocking_fee_invoicing: migration to v18
1 parent 8e5e91f commit d98d278

File tree

12 files changed

+28
-33
lines changed

12 files changed

+28
-33
lines changed

sale_stock_restocking_fee_invoicing/README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ Sale Stock Restocking Fee Invoicing
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--workflow-lightgray.png?logo=github
20-
:target: https://github.com/OCA/stock-logistics-workflow/tree/17.0/sale_stock_restocking_fee_invoicing
20+
:target: https://github.com/OCA/stock-logistics-workflow/tree/18.0/sale_stock_restocking_fee_invoicing
2121
:alt: OCA/stock-logistics-workflow
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/stock-logistics-workflow-17-0/stock-logistics-workflow-17-0-sale_stock_restocking_fee_invoicing
23+
:target: https://translation.odoo-community.org/projects/stock-logistics-workflow-18-0/stock-logistics-workflow-18-0-sale_stock_restocking_fee_invoicing
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-workflow&target_branch=17.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-workflow&target_branch=18.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -86,7 +86,7 @@ Bug Tracker
8686
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-workflow/issues>`_.
8787
In case of trouble, please check there if your issue has already been reported.
8888
If you spotted it first, help us to smash it by providing a detailed and welcomed
89-
`feedback <https://github.com/OCA/stock-logistics-workflow/issues/new?body=module:%20sale_stock_restocking_fee_invoicing%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
89+
`feedback <https://github.com/OCA/stock-logistics-workflow/issues/new?body=module:%20sale_stock_restocking_fee_invoicing%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
9090

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

@@ -118,6 +118,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
118118
mission is to support the collaborative development of Odoo features and
119119
promote its widespread use.
120120

121-
This module is part of the `OCA/stock-logistics-workflow <https://github.com/OCA/stock-logistics-workflow/tree/17.0/sale_stock_restocking_fee_invoicing>`_ project on GitHub.
121+
This module is part of the `OCA/stock-logistics-workflow <https://github.com/OCA/stock-logistics-workflow/tree/18.0/sale_stock_restocking_fee_invoicing>`_ project on GitHub.
122122

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

sale_stock_restocking_fee_invoicing/__manifest__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
"name": "Sale Stock Restocking Fee Invoicing",
66
"summary": """
77
On demand charge restocking fee for accepting returned goods .""",
8-
"version": "17.0.1.0.0",
8+
"version": "18.0.1.0.0",
99
"license": "AGPL-3",
1010
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
1111
"website": "https://github.com/OCA/stock-logistics-workflow",
1212
"depends": ["sale", "stock", "sale_stock", "stock_account", "stock_picking_kind"],
1313
"data": [
1414
"data/product_product.xml",
15-
"views/res_company_views.xml",
1615
"views/res_partner_views.xml",
1716
"views/stock_move_views.xml",
1817
"views/res_config_settings_views.xml",
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<odoo noupdate="1">
3-
43
<record id="product_restocking_fee" model="product.product">
54
<field name="name">Restocking fee</field>
65
<field name="list_price">100</field>
@@ -10,5 +9,4 @@
109
<field name="invoice_policy">order</field>
1110
<field name="company_id" eval="False" />
1211
</record>
13-
1412
</odoo>

sale_stock_restocking_fee_invoicing/models/res_config_settings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ class ResConfigSettings(models.TransientModel):
1515
"charged for returning goods. In the case where fees are to "
1616
"be applied, the product specified here is added to the sale"
1717
" order to charge these fees.",
18-
default=lambda self: self.env.user.company_id.restocking_fee_product_id,
1918
readonly=False,
2019
)

sale_stock_restocking_fee_invoicing/static/description/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ <h1 class="title">Sale Stock Restocking Fee Invoicing</h1>
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370370
!! source digest: sha256:07e5efd90d8616b084a70da14dd71d6a644f6a10e9df957c458bc6fa7d244fb2
371371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/stock-logistics-workflow/tree/17.0/sale_stock_restocking_fee_invoicing"><img alt="OCA/stock-logistics-workflow" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--workflow-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/stock-logistics-workflow-17-0/stock-logistics-workflow-17-0-sale_stock_restocking_fee_invoicing"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-workflow&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/stock-logistics-workflow/tree/18.0/sale_stock_restocking_fee_invoicing"><img alt="OCA/stock-logistics-workflow" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--workflow-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/stock-logistics-workflow-18-0/stock-logistics-workflow-18-0-sale_stock_restocking_fee_invoicing"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-workflow&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373373
<p>This module extends the functionality of the stock picking return wizard
374374
to allow you to charge restocking fee in case of return of goods by a
375375
customer.</p>
@@ -433,7 +433,7 @@ <h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
433433
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-workflow/issues">GitHub Issues</a>.
434434
In case of trouble, please check there if your issue has already been reported.
435435
If you spotted it first, help us to smash it by providing a detailed and welcomed
436-
<a class="reference external" href="https://github.com/OCA/stock-logistics-workflow/issues/new?body=module:%20sale_stock_restocking_fee_invoicing%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
436+
<a class="reference external" href="https://github.com/OCA/stock-logistics-workflow/issues/new?body=module:%20sale_stock_restocking_fee_invoicing%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
437437
<p>Do not contact contributors directly about support or help with technical issues.</p>
438438
</div>
439439
<div class="section" id="credits">
@@ -461,7 +461,7 @@ <h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
461461
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
462462
mission is to support the collaborative development of Odoo features and
463463
promote its widespread use.</p>
464-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-workflow/tree/17.0/sale_stock_restocking_fee_invoicing">OCA/stock-logistics-workflow</a> project on GitHub.</p>
464+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-workflow/tree/18.0/sale_stock_restocking_fee_invoicing">OCA/stock-logistics-workflow</a> project on GitHub.</p>
465465
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
466466
</div>
467467
</div>

sale_stock_restocking_fee_invoicing/tests/test_stock_return_picking.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,20 @@ def setUpClass(cls):
2020
)
2121

2222
cls.product_1 = cls.env["product.product"].create(
23-
{"name": "test product 1", "list_price": 20, "type": "product"}
23+
{
24+
"name": "test product 1",
25+
"list_price": 20,
26+
"type": "consu",
27+
"is_storable": True,
28+
}
2429
)
2530
cls.product_2 = cls.env["product.product"].create(
26-
{"name": "test product 2", "list_price": 30, "type": "product"}
31+
{
32+
"name": "test product 2",
33+
"list_price": 30,
34+
"type": "consu",
35+
"is_storable": True,
36+
}
2737
)
2838
cls.so = cls.env["sale.order"].create(
2939
{
@@ -73,7 +83,7 @@ def _create_return_wizard(self):
7383

7484
def _create_return_picking(self):
7585
wizard = self._create_return_wizard()
76-
res = wizard.create_returns()
86+
res = wizard.action_create_returns_all()
7787
return self.env["stock.picking"].browse(res["res_id"])
7888

7989
def test_00(self):
@@ -174,7 +184,7 @@ def test_04(self):
174184
self.assertEqual(2, len(self.so.order_line))
175185
wizard = self._create_return_wizard()
176186
wizard.product_return_moves[0].charge_restocking_fee = False
177-
res = wizard.create_returns()
187+
res = wizard.action_create_returns_all()
178188
picking = self.env["stock.picking"].browse(res["res_id"])
179189
self.assertEqual(2, len(self.so.order_line))
180190
self._process_picking(picking)
@@ -199,7 +209,7 @@ def test_05(self):
199209
self.assertEqual(2, len(self.so.order_line))
200210
wizard = self._create_return_wizard()
201211
wizard.product_return_moves[0].charge_restocking_fee = True
202-
res = wizard.create_returns()
212+
res = wizard.action_create_returns_all()
203213
picking = self.env["stock.picking"].browse(res["res_id"])
204214
self.assertEqual(2, len(self.so.order_line))
205215
self._process_picking(picking)

sale_stock_restocking_fee_invoicing/views/res_company_views.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<!-- Copyright 2020 ACSONE SA/NV
33
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
44
<odoo>
5-
65
<record model="ir.ui.view" id="res_company_form_view">
76
<field
87
name="name"

sale_stock_restocking_fee_invoicing/views/res_config_settings_views.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<!-- Copyright 2020 ACSONE SA/NV
33
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
44
<odoo>
5-
65
<record model="ir.ui.view" id="res_config_settings_view_form">
76
<field
87
name="name"
@@ -30,5 +29,4 @@
3029
</xpath>
3130
</field>
3231
</record>
33-
3432
</odoo>

sale_stock_restocking_fee_invoicing/views/res_partner_views.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<!-- Copyright 2020 ACSONE SA/NV
33
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
44
<odoo>
5-
65
<record model="ir.ui.view" id="res_partner_form_view">
76
<field
87
name="name"
@@ -15,6 +14,4 @@
1514
</xpath>
1615
</field>
1716
</record>
18-
19-
2017
</odoo>

sale_stock_restocking_fee_invoicing/views/stock_move_views.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<!-- Copyright 2020 ACSONE SA/NV
33
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
44
<odoo>
5-
65
<record model="ir.ui.view" id="stock_move_form_view">
76
<field
87
name="name"
@@ -19,5 +18,4 @@
1918
</field>
2019
</field>
2120
</record>
22-
2321
</odoo>

0 commit comments

Comments
 (0)