odoo-addon-rma 16.0.1.2.0.2__py3-none-any.whl → 17.0.1.0.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/rma/README.rst +87 -78
- odoo/addons/rma/__manifest__.py +1 -1
- odoo/addons/rma/controllers/main.py +2 -1
- odoo/addons/rma/data/mail_data.xml +3 -6
- odoo/addons/rma/hooks.py +1 -5
- odoo/addons/rma/i18n/rma.pot +49 -81
- odoo/addons/rma/models/rma.py +51 -112
- odoo/addons/rma/models/stock_move.py +1 -1
- odoo/addons/rma/readme/CONFIGURE.md +22 -0
- odoo/addons/rma/readme/CONTRIBUTORS.md +9 -0
- odoo/addons/rma/readme/{DESCRIPTION.rst → DESCRIPTION.md} +4 -4
- odoo/addons/rma/readme/ROADMAP.md +3 -0
- odoo/addons/rma/readme/USAGE.md +59 -0
- odoo/addons/rma/static/description/index.html +55 -46
- odoo/addons/rma/tests/test_rma.py +21 -37
- odoo/addons/rma/views/res_config_settings_views.xml +55 -124
- odoo/addons/rma/views/res_partner_views.xml +1 -1
- odoo/addons/rma/views/rma_finalization_views.xml +1 -1
- odoo/addons/rma/views/rma_team_views.xml +2 -6
- odoo/addons/rma/views/rma_views.xml +71 -39
- odoo/addons/rma/views/stock_picking_views.xml +1 -1
- odoo/addons/rma/wizard/rma_delivery_views.xml +8 -19
- odoo/addons/rma/wizard/stock_picking_return_views.xml +1 -1
- odoo_addon_rma-17.0.1.0.0.2.dist-info/METADATA +220 -0
- {odoo_addon_rma-16.0.1.2.0.2.dist-info → odoo_addon_rma-17.0.1.0.0.2.dist-info}/RECORD +27 -27
- {odoo_addon_rma-16.0.1.2.0.2.dist-info → odoo_addon_rma-17.0.1.0.0.2.dist-info}/WHEEL +1 -1
- odoo_addon_rma-17.0.1.0.0.2.dist-info/top_level.txt +1 -0
- odoo/addons/rma/readme/CONFIGURE.rst +0 -21
- odoo/addons/rma/readme/CONTRIBUTORS.rst +0 -9
- odoo/addons/rma/readme/ROADMAP.rst +0 -3
- odoo/addons/rma/readme/USAGE.rst +0 -57
- odoo_addon_rma-16.0.1.2.0.2.dist-info/METADATA +0 -214
- odoo_addon_rma-16.0.1.2.0.2.dist-info/top_level.txt +0 -1
@@ -366,16 +366,17 @@ ul.auto-toc {
|
|
366
366
|
!! This file is generated by oca-gen-addon-readme !!
|
367
367
|
!! changes will be overwritten. !!
|
368
368
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
369
|
-
!! source digest: sha256:
|
369
|
+
!! source digest: sha256:9ca167b75e0dcd82a66217ef64dd006910f4feda1f408dbdf09ef43e6555eb22
|
370
370
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
371
|
-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/rma/tree/
|
372
|
-
<p>This module allows you to manage <a class="reference external" href="https://en.wikipedia.org/wiki/Return_merchandise_authorization">Return Merchandise Authorization
|
371
|
+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/rma/tree/17.0/rma"><img alt="OCA/rma" src="https://img.shields.io/badge/github-OCA%2Frma-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/rma-17-0/rma-17-0-rma"><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/rma&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>This module allows you to manage <a class="reference external" href="https://en.wikipedia.org/wiki/Return_merchandise_authorization">Return Merchandise Authorization
|
373
|
+
(RMA)</a>.
|
373
374
|
RMA documents can be created from scratch, from a delivery order or from
|
374
375
|
an incoming email. Product receptions and returning delivery operations
|
375
376
|
of the RMA module are fully integrated with the Receipts and Deliveries
|
376
377
|
Operations of Odoo inventory core module. It also allows you to generate
|
377
|
-
refunds in the same way as Odoo generates it.
|
378
|
-
|
378
|
+
refunds in the same way as Odoo generates it. Besides, you have full
|
379
|
+
integration of the RMA documents in the customer portal.</p>
|
379
380
|
<p><strong>Table of contents</strong></p>
|
380
381
|
<div class="contents local topic" id="contents">
|
381
382
|
<ul class="simple">
|
@@ -398,8 +399,8 @@ Besides, you have full integration of the RMA documents in the customer portal.<
|
|
398
399
|
<li>Go to <em>Settings > General Settings</em>.</li>
|
399
400
|
<li>Check ‘External Email Servers’ checkbox under <em>Discuss</em> section.</li>
|
400
401
|
<li>Set an ‘alias domain’ and an incoming server.</li>
|
401
|
-
<li>Go to <em>RMA > Configuration > RMA Team</em> and select a team or create a
|
402
|
-
one.</li>
|
402
|
+
<li>Go to <em>RMA > Configuration > RMA Team</em> and select a team or create a
|
403
|
+
new one.</li>
|
403
404
|
<li>Go to ‘Email’ tab and set an ‘Email Alias’.</li>
|
404
405
|
</ol>
|
405
406
|
<p>If you want to manually finish RMAs, you need to:</p>
|
@@ -407,11 +408,12 @@ one.</li>
|
|
407
408
|
<li>Go to <em>Settings > Inventory</em>.</li>
|
408
409
|
<li>Set <em>Finish RMAs manually</em> checkbox on.</li>
|
409
410
|
</ol>
|
410
|
-
<p>By default, returns to customer are grouped by shipping address,
|
411
|
-
If you want to avoid this grouping you can:</p>
|
411
|
+
<p>By default, returns to customer are grouped by shipping address,
|
412
|
+
warehouse and company. If you want to avoid this grouping you can:</p>
|
412
413
|
<ol class="arabic simple">
|
413
414
|
<li>Go to <em>Settings > Inventory</em>.</li>
|
414
|
-
<li>Set <em>Group RMA returns by customer address and warehouse</em> checkbox
|
415
|
+
<li>Set <em>Group RMA returns by customer address and warehouse</em> checkbox
|
416
|
+
off.</li>
|
415
417
|
</ol>
|
416
418
|
<p>The users will still be able to group those pickings from the wizard.</p>
|
417
419
|
</div>
|
@@ -420,51 +422,54 @@ If you want to avoid this grouping you can:</p>
|
|
420
422
|
<p>To use this module, you need to:</p>
|
421
423
|
<ol class="arabic simple">
|
422
424
|
<li>Go to <em>RMA > Orders</em> and create a new RMA.</li>
|
423
|
-
<li>Select a partner, an invoice address, select a product
|
424
|
-
|
425
|
-
|
426
|
-
<li>You will see an smart button labeled ‘Receipt’. Click on that button
|
427
|
-
the reception operation form.</li>
|
428
|
-
<li>If everything is right, validate the operation and go back to the RMA
|
429
|
-
see it in a ‘received’ state.</li>
|
430
|
-
<li>Now you are able to generate a refund, generate a delivery order to
|
431
|
-
to the customer the same product or another product as a
|
432
|
-
the RMA by extracting a part of the remaining
|
433
|
-
preview the RMA in the website. All of these
|
434
|
-
clicking on the buttons in the status bar.<ul>
|
435
|
-
<li>If you click on ‘Refund’ button, a refund will be created, and
|
436
|
-
accessible via the smart button labeled Refund. The RMA
|
437
|
-
automatically to ‘Refunded’ state when the refund is
|
425
|
+
<li>Select a partner, an invoice address, select a product (or select a
|
426
|
+
picking and a move instead), write a quantity, fill the rest of the
|
427
|
+
form and click on ‘confirm’ button in the status bar.</li>
|
428
|
+
<li>You will see an smart button labeled ‘Receipt’. Click on that button
|
429
|
+
to see the reception operation form.</li>
|
430
|
+
<li>If everything is right, validate the operation and go back to the RMA
|
431
|
+
to see it in a ‘received’ state.</li>
|
432
|
+
<li>Now you are able to generate a refund, generate a delivery order to
|
433
|
+
return to the customer the same product or another product as a
|
434
|
+
replacement, split the RMA by extracting a part of the remaining
|
435
|
+
quantity to another RMA, preview the RMA in the website. All of these
|
436
|
+
operations can be done by clicking on the buttons in the status bar.<ul>
|
437
|
+
<li>If you click on ‘To Refund’ button, a refund will be created, and
|
438
|
+
it will be accessible via the smart button labeled Refund. The RMA
|
439
|
+
will be set automatically to ‘Refunded’ state when the refund is
|
440
|
+
validated.</li>
|
438
441
|
<li>If you click on ‘Replace’ or ‘Return to customer’ button instead,
|
439
|
-
a popup wizard will guide you to create a Delivery order to the
|
440
|
-
and this order will be accessible via the smart button
|
441
|
-
The RMA will be set automatically to ‘Replaced’
|
442
|
-
the RMA quantity is equal or lower than
|
443
|
-
orders linked to it.</li>
|
442
|
+
a popup wizard will guide you to create a Delivery order to the
|
443
|
+
client and this order will be accessible via the smart button
|
444
|
+
labeled Delivery. The RMA will be set automatically to ‘Replaced’
|
445
|
+
or ‘Returned’ state when the RMA quantity is equal or lower than
|
446
|
+
the quantity in done delivery orders linked to it.</li>
|
444
447
|
</ul>
|
445
448
|
</li>
|
446
|
-
<li>You can also finish the RMA without further ado. To do so click on
|
447
|
-
button. A wizard will ask you for the reason from a
|
448
|
-
Be sure to configure them in advance
|
449
|
-
|
449
|
+
<li>You can also finish the RMA without further ado. To do so click on
|
450
|
+
the <em>Finish</em> button. A wizard will ask you for the reason from a
|
451
|
+
selection of preconfigured ones. Be sure to configure them in advance
|
452
|
+
on <em>RMA > Configuration > Finalization Reasons</em>. Once the RMA is
|
453
|
+
finished, it will be set to that state and the reason will be
|
450
454
|
registered.</li>
|
451
455
|
</ol>
|
452
456
|
<p>An RMA can also be created from a return of a delivery order:</p>
|
453
457
|
<ol class="arabic simple">
|
454
|
-
<li>Select a delivery order and click on ‘Return’ button to create a
|
458
|
+
<li>Select a delivery order and click on ‘Return’ button to create a
|
459
|
+
return.</li>
|
455
460
|
<li>Check “Create RMAs” checkbox in the returning wizard, select the RMA
|
456
461
|
stock location and click on ‘Return’ button.</li>
|
457
|
-
<li>An RMA will be created for each product returned in the previous
|
458
|
-
Every RMA will be in confirmed state and they will
|
459
|
-
|
462
|
+
<li>An RMA will be created for each product returned in the previous
|
463
|
+
step. Every RMA will be in confirmed state and they will be linked to
|
464
|
+
the returning operation generated previously.</li>
|
460
465
|
</ol>
|
461
466
|
<p>There are Optional RMA Teams that can be used for:</p>
|
462
467
|
<blockquote>
|
463
468
|
<ul class="simple">
|
464
469
|
<li>Organize RMAs in sections.</li>
|
465
470
|
<li>Subscribe users to notifications.</li>
|
466
|
-
<li>Create RMAs from incoming mail to special aliases (See
|
467
|
-
section).</li>
|
471
|
+
<li>Create RMAs from incoming mail to special aliases (See
|
472
|
+
configuration section).</li>
|
468
473
|
</ul>
|
469
474
|
</blockquote>
|
470
475
|
<p>To create an RMA Team (RMA Responsible user level required):</p>
|
@@ -477,8 +482,8 @@ section).</li>
|
|
477
482
|
<li>Notes, Debates, Activities. As in standard Odoo.</li>
|
478
483
|
</ul>
|
479
484
|
</li>
|
480
|
-
<li>In the list view, use the cross handle to sort RMA Teams. The top
|
481
|
-
will be the default one if no team is set.</li>
|
485
|
+
<li>In the list view, use the cross handle to sort RMA Teams. The top
|
486
|
+
team will be the default one if no team is set.</li>
|
482
487
|
</ol>
|
483
488
|
</blockquote>
|
484
489
|
</div>
|
@@ -486,8 +491,8 @@ will be the default one if no team is set.</li>
|
|
486
491
|
<h1><a class="toc-backref" href="#toc-entry-3">Known issues / Roadmap</a></h1>
|
487
492
|
<ul class="simple">
|
488
493
|
<li>As soon as the picking is selected, the user should select the move,
|
489
|
-
but perhaps stock.move _rec_name could be improved to better show
|
490
|
-
the product of that move is.</li>
|
494
|
+
but perhaps stock.move _rec_name could be improved to better show
|
495
|
+
what the product of that move is.</li>
|
491
496
|
</ul>
|
492
497
|
</div>
|
493
498
|
<div class="section" id="bug-tracker">
|
@@ -495,7 +500,7 @@ the product of that move is.</li>
|
|
495
500
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/rma/issues">GitHub Issues</a>.
|
496
501
|
In case of trouble, please check there if your issue has already been reported.
|
497
502
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
498
|
-
<a class="reference external" href="https://github.com/OCA/rma/issues/new?body=module:%20rma%0Aversion:%
|
503
|
+
<a class="reference external" href="https://github.com/OCA/rma/issues/new?body=module:%20rma%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
499
504
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
500
505
|
</div>
|
501
506
|
<div class="section" id="credits">
|
@@ -518,6 +523,10 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
518
523
|
</li>
|
519
524
|
<li>Chafique Delli <<a class="reference external" href="mailto:chafique.delli@akretion.com">chafique.delli@akretion.com</a>></li>
|
520
525
|
<li>Giovanni Serra - Ooops <<a class="reference external" href="mailto:giovanni@ooops404.com">giovanni@ooops404.com</a>></li>
|
526
|
+
<li><a class="reference external" href="https://www.apsl.tech">APSL-Nagarro</a>:<ul>
|
527
|
+
<li>Antoni Marroig <<a class="reference external" href="mailto:amarroig@apsl.net">amarroig@apsl.net</a>></li>
|
528
|
+
</ul>
|
529
|
+
</li>
|
521
530
|
</ul>
|
522
531
|
</div>
|
523
532
|
<div class="section" id="maintainers">
|
@@ -529,7 +538,7 @@ mission is to support the collaborative development of Odoo features and
|
|
529
538
|
promote its widespread use.</p>
|
530
539
|
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
|
531
540
|
<p><a class="reference external image-reference" href="https://github.com/pedrobaeza"><img alt="pedrobaeza" src="https://github.com/pedrobaeza.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/chienandalu"><img alt="chienandalu" src="https://github.com/chienandalu.png?size=40px" /></a></p>
|
532
|
-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/rma/tree/
|
541
|
+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/rma/tree/17.0/rma">OCA/rma</a> project on GitHub.</p>
|
533
542
|
<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>
|
534
543
|
</div>
|
535
544
|
</div>
|
@@ -85,6 +85,8 @@ class TestRma(TransactionCase):
|
|
85
85
|
vals["product_uom_qty"] = qty
|
86
86
|
if location:
|
87
87
|
vals["location_id"] = location.id
|
88
|
+
|
89
|
+
vals["user_id"] = self.env.user.id
|
88
90
|
return self.env["rma"].create(vals)
|
89
91
|
|
90
92
|
def _create_confirm_receive(
|
@@ -92,7 +94,7 @@ class TestRma(TransactionCase):
|
|
92
94
|
):
|
93
95
|
rma = self._create_rma(partner, product, qty, location)
|
94
96
|
rma.action_confirm()
|
95
|
-
rma.reception_move_id.
|
97
|
+
rma.reception_move_id.quantity = rma.product_uom_qty
|
96
98
|
rma.reception_move_id.picking_id._action_done()
|
97
99
|
return rma
|
98
100
|
|
@@ -107,7 +109,7 @@ class TestRma(TransactionCase):
|
|
107
109
|
limit=1,
|
108
110
|
)
|
109
111
|
picking_form = Form(
|
110
|
-
|
112
|
+
record=self.env["stock.picking"].with_context(
|
111
113
|
default_picking_type_id=picking_type.id
|
112
114
|
),
|
113
115
|
view="stock.view_picking_form",
|
@@ -124,7 +126,7 @@ class TestRma(TransactionCase):
|
|
124
126
|
picking = picking_form.save()
|
125
127
|
picking.action_confirm()
|
126
128
|
for move in picking.move_ids:
|
127
|
-
move.
|
129
|
+
move.quantity = move.product_uom_qty
|
128
130
|
picking.button_validate()
|
129
131
|
return picking
|
130
132
|
|
@@ -157,7 +159,7 @@ class TestRmaCase(TestRma):
|
|
157
159
|
limit=1,
|
158
160
|
)
|
159
161
|
picking_form = Form(
|
160
|
-
|
162
|
+
record=self.env["stock.picking"].with_context(
|
161
163
|
default_picking_type_id=outgoing_picking_type.id
|
162
164
|
),
|
163
165
|
view="stock.view_picking_form",
|
@@ -203,13 +205,13 @@ class TestRmaCase(TestRma):
|
|
203
205
|
self.assertEqual(rma.reception_move_id.product_uom_qty, 10)
|
204
206
|
self.assertEqual(rma.reception_move_id.product_uom, rma.product_uom)
|
205
207
|
self.assertEqual(rma.state, "confirmed")
|
206
|
-
rma.reception_move_id.
|
208
|
+
rma.reception_move_id.quantity = 9
|
207
209
|
with self.assertRaises(ValidationError):
|
208
210
|
rma.reception_move_id.picking_id._action_done()
|
209
|
-
rma.reception_move_id.
|
211
|
+
rma.reception_move_id.quantity = 10
|
210
212
|
rma.reception_move_id.picking_id._action_done()
|
211
213
|
self.assertEqual(rma.reception_move_id.picking_id.state, "done")
|
212
|
-
self.assertEqual(rma.reception_move_id.
|
214
|
+
self.assertEqual(rma.reception_move_id.quantity, 10)
|
213
215
|
self.assertEqual(rma.state, "received")
|
214
216
|
|
215
217
|
def test_cancel(self):
|
@@ -386,8 +388,6 @@ class TestRmaCase(TestRma):
|
|
386
388
|
self.assertTrue(rma.can_be_replaced)
|
387
389
|
self.assertEqual(rma.delivered_qty, 2)
|
388
390
|
self.assertEqual(rma.remaining_qty, 8)
|
389
|
-
self.assertEqual(rma.delivered_qty_done, 0)
|
390
|
-
self.assertEqual(rma.remaining_qty_to_done, 10)
|
391
391
|
first_move = rma.delivery_move_ids
|
392
392
|
picking = first_move.picking_id
|
393
393
|
# Replace again with another product with the remaining quantity
|
@@ -413,18 +413,13 @@ class TestRmaCase(TestRma):
|
|
413
413
|
self.assertTrue(picking.state, "waiting")
|
414
414
|
self.assertEqual(rma.delivered_qty, 10)
|
415
415
|
self.assertEqual(rma.remaining_qty, 0)
|
416
|
-
self.assertEqual(rma.delivered_qty_done, 0)
|
417
|
-
self.assertEqual(rma.remaining_qty_to_done, 10)
|
418
416
|
# remaining_qty is 0 but rma is not set to 'replaced' until
|
419
|
-
|
420
|
-
|
421
|
-
second_move.quantity_done = 8
|
417
|
+
first_move.quantity = 2
|
418
|
+
second_move.quantity = 8
|
422
419
|
picking.button_validate()
|
423
420
|
self.assertEqual(picking.state, "done")
|
424
421
|
self.assertEqual(rma.delivered_qty, 10)
|
425
422
|
self.assertEqual(rma.remaining_qty, 0)
|
426
|
-
self.assertEqual(rma.delivered_qty_done, 10)
|
427
|
-
self.assertEqual(rma.remaining_qty_to_done, 0)
|
428
423
|
# The RMA is now in 'replaced' state
|
429
424
|
self.assertEqual(rma.state, "replaced")
|
430
425
|
self.assertFalse(rma.can_be_refunded)
|
@@ -457,18 +452,14 @@ class TestRmaCase(TestRma):
|
|
457
452
|
self.assertTrue(rma.can_be_returned)
|
458
453
|
self.assertEqual(rma.delivered_qty, 2)
|
459
454
|
self.assertEqual(rma.remaining_qty, 8)
|
460
|
-
self.assertEqual(rma.delivered_qty_done, 0)
|
461
|
-
self.assertEqual(rma.remaining_qty_to_done, 10)
|
462
455
|
first_move = rma.delivery_move_ids
|
463
456
|
picking = first_move.picking_id
|
464
457
|
# Validate the picking
|
465
|
-
first_move.
|
458
|
+
first_move.quantity = 2
|
466
459
|
picking.button_validate()
|
467
460
|
self.assertEqual(picking.state, "done")
|
468
461
|
self.assertEqual(rma.delivered_qty, 2)
|
469
462
|
self.assertEqual(rma.remaining_qty, 8)
|
470
|
-
self.assertEqual(rma.delivered_qty_done, 2)
|
471
|
-
self.assertEqual(rma.remaining_qty_to_done, 8)
|
472
463
|
# Return the remaining quantity to the customer
|
473
464
|
delivery_form = Form(
|
474
465
|
self.env["rma.delivery.wizard"].with_context(
|
@@ -479,21 +470,16 @@ class TestRmaCase(TestRma):
|
|
479
470
|
delivery_wizard = delivery_form.save()
|
480
471
|
delivery_wizard.action_deliver()
|
481
472
|
second_move = rma.delivery_move_ids - first_move
|
482
|
-
second_move.
|
473
|
+
second_move.quantity = 8
|
483
474
|
self.assertEqual(rma.delivered_qty, 10)
|
484
475
|
self.assertEqual(rma.remaining_qty, 0)
|
485
|
-
self.assertEqual(rma.delivered_qty_done, 2)
|
486
|
-
self.assertEqual(rma.remaining_qty_to_done, 8)
|
487
476
|
self.assertEqual(rma.state, "waiting_return")
|
488
477
|
# remaining_qty is 0 but rma is not set to 'returned' until
|
489
|
-
# remaining_qty_to_done is less than or equal to 0
|
490
478
|
picking_2 = second_move.picking_id
|
491
479
|
picking_2.button_validate()
|
492
480
|
self.assertEqual(picking_2.state, "done")
|
493
481
|
self.assertEqual(rma.delivered_qty, 10)
|
494
482
|
self.assertEqual(rma.remaining_qty, 0)
|
495
|
-
self.assertEqual(rma.delivered_qty_done, 10)
|
496
|
-
self.assertEqual(rma.remaining_qty_to_done, 0)
|
497
483
|
# The RMA is now in 'returned' state
|
498
484
|
self.assertEqual(rma.state, "returned")
|
499
485
|
self.assertFalse(rma.can_be_refunded)
|
@@ -579,7 +565,7 @@ class TestRmaCase(TestRma):
|
|
579
565
|
self.assertEqual(rma.product_id, rma.delivery_move_ids.product_id)
|
580
566
|
self.assertEqual(rma.product_uom_qty, rma.delivery_move_ids.product_uom_qty)
|
581
567
|
self.assertEqual(rma.product_uom, rma.delivery_move_ids.product_uom)
|
582
|
-
rma.delivery_move_ids.
|
568
|
+
rma.delivery_move_ids.quantity = rma.product_uom_qty
|
583
569
|
pick_1.button_validate()
|
584
570
|
pick_2.button_validate()
|
585
571
|
self.assertEqual(all_rmas.mapped("state"), ["returned"] * 4)
|
@@ -643,8 +629,8 @@ class TestRmaCase(TestRma):
|
|
643
629
|
self.assertTrue(reception_moves[1].rma_receiver_ids)
|
644
630
|
self.assertEqual(reception_moves.mapped("rma_receiver_ids"), rmas)
|
645
631
|
# Validate the reception picking to set rmas to 'received' state
|
646
|
-
reception_moves[0].
|
647
|
-
reception_moves[1].
|
632
|
+
reception_moves[0].quantity = reception_moves[0].product_uom_qty
|
633
|
+
reception_moves[1].quantity = reception_moves[1].product_uom_qty
|
648
634
|
reception.button_validate()
|
649
635
|
self.assertEqual(rmas.mapped("state"), ["received"] * 2)
|
650
636
|
|
@@ -658,7 +644,7 @@ class TestRmaCase(TestRma):
|
|
658
644
|
)
|
659
645
|
rma = rma_form.save()
|
660
646
|
rma.action_confirm()
|
661
|
-
rma.reception_move_id.
|
647
|
+
rma.reception_move_id.quantity = 10
|
662
648
|
rma.reception_move_id.picking_id._action_done()
|
663
649
|
# Return quantity 4 of the same product to the customer
|
664
650
|
delivery_form = Form(
|
@@ -670,7 +656,7 @@ class TestRmaCase(TestRma):
|
|
670
656
|
delivery_form.product_uom_qty = 4
|
671
657
|
delivery_wizard = delivery_form.save()
|
672
658
|
delivery_wizard.action_deliver()
|
673
|
-
rma.delivery_move_ids.
|
659
|
+
rma.delivery_move_ids.quantity = 4
|
674
660
|
rma.delivery_move_ids.picking_id.button_validate()
|
675
661
|
self.assertEqual(rma.state, "waiting_return")
|
676
662
|
# Extract the remaining quantity to another RMA
|
@@ -690,8 +676,6 @@ class TestRmaCase(TestRma):
|
|
690
676
|
self.assertEqual(new_rma.origin_split_rma_id, rma)
|
691
677
|
self.assertEqual(new_rma.delivered_qty, 0)
|
692
678
|
self.assertEqual(new_rma.remaining_qty, 6)
|
693
|
-
self.assertEqual(new_rma.delivered_qty_done, 0)
|
694
|
-
self.assertEqual(new_rma.remaining_qty_to_done, 6)
|
695
679
|
self.assertEqual(new_rma.state, "received")
|
696
680
|
self.assertTrue(new_rma.can_be_refunded)
|
697
681
|
self.assertTrue(new_rma.can_be_returned)
|
@@ -699,8 +683,8 @@ class TestRmaCase(TestRma):
|
|
699
683
|
self.assertEqual(new_rma.move_id, rma.move_id)
|
700
684
|
self.assertEqual(new_rma.reception_move_id, rma.reception_move_id)
|
701
685
|
self.assertEqual(new_rma.product_uom_qty + rma.product_uom_qty, 10)
|
702
|
-
self.assertEqual(new_rma.move_id.
|
703
|
-
self.assertEqual(new_rma.reception_move_id.
|
686
|
+
self.assertEqual(new_rma.move_id.quantity, 10)
|
687
|
+
self.assertEqual(new_rma.reception_move_id.quantity, 10)
|
704
688
|
|
705
689
|
def test_rma_to_receive_on_delete_invoice(self):
|
706
690
|
rma = self._create_confirm_receive(self.partner, self.product, 10, self.rma_loc)
|
@@ -763,7 +747,7 @@ class TestRmaCase(TestRma):
|
|
763
747
|
)
|
764
748
|
# Now we'll confirm the incoming goods picking and the automatic
|
765
749
|
# reception notification should be sent
|
766
|
-
rma.reception_move_id.
|
750
|
+
rma.reception_move_id.quantity = rma.product_uom_qty
|
767
751
|
rma.reception_move_id.picking_id.button_validate()
|
768
752
|
mail_receipt = (
|
769
753
|
self.env["mail.message"].search([("partner_ids", "in", self.partner.ids)])
|
@@ -5,154 +5,85 @@
|
|
5
5
|
<field name="inherit_id" ref="stock.res_config_settings_view_form" />
|
6
6
|
<field name="arch" type="xml">
|
7
7
|
<xpath
|
8
|
-
expr="//
|
8
|
+
expr="//block[@name='operations_setting_container']"
|
9
9
|
position="inside"
|
10
10
|
>
|
11
|
-
<
|
12
|
-
|
11
|
+
<setting
|
12
|
+
title="Finish RMAs manually"
|
13
|
+
help=" When the RMA is receive, allow to finsish it manually choosing a finalization reason."
|
14
|
+
>
|
13
15
|
<field name="group_rma_manual_finalization" />
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
/>
|
20
|
-
<div class="text-muted">
|
21
|
-
When the RMA is receive, allow to finsish it manually choosing
|
22
|
-
a finalization reason.
|
23
|
-
</div>
|
24
|
-
</div>
|
25
|
-
</div>
|
26
|
-
<div class="col-12 col-lg-6 o_setting_box">
|
27
|
-
<div class="o_setting_left_pane">
|
16
|
+
</setting>
|
17
|
+
<setting
|
18
|
+
title="Values set here are company-specific."
|
19
|
+
help="Group RMA returns by customer and warehouse."
|
20
|
+
>
|
28
21
|
<field name="rma_return_grouping" />
|
29
|
-
|
30
|
-
|
31
|
-
<label for="rma_return_grouping" />
|
32
|
-
<span
|
33
|
-
class="fa fa-lg fa-building-o"
|
34
|
-
title="Values set here are company-specific."
|
35
|
-
groups="base.group_multi_company"
|
36
|
-
/>
|
37
|
-
<div class="text-muted">
|
38
|
-
Group RMA returns by customer and warehouse.
|
39
|
-
</div>
|
40
|
-
</div>
|
41
|
-
</div>
|
42
|
-
<div
|
43
|
-
class="col-12 col-lg-6 o_setting_box"
|
22
|
+
</setting>
|
23
|
+
<setting
|
44
24
|
title="Send automatic RMA info to customer"
|
25
|
+
help="When the RMA is confirmed, send an automatic information email."
|
45
26
|
>
|
46
|
-
<div class="o_setting_left_pane">
|
47
27
|
<field name="send_rma_confirmation" />
|
48
|
-
|
49
|
-
<div class="o_setting_right_pane">
|
50
|
-
<label
|
51
|
-
for="send_rma_confirmation"
|
52
|
-
string="RMA Confirmation Email"
|
53
|
-
/>
|
54
|
-
<span
|
55
|
-
class="fa fa-lg fa-building-o"
|
56
|
-
title="Values set here are company-specific."
|
57
|
-
groups="base.group_multi_company"
|
58
|
-
/>
|
59
|
-
<div class="text-muted">
|
60
|
-
When the RMA is confirmed, send an automatic information email.
|
61
|
-
</div>
|
62
|
-
<div
|
63
|
-
class="row mt16"
|
64
|
-
attrs="{'invisible': [('send_rma_confirmation', '=', False)]}"
|
65
|
-
>
|
28
|
+
<div class="row mt16" invisible="not send_rma_confirmation">
|
66
29
|
<label
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
30
|
+
for="rma_mail_confirmation_template_id"
|
31
|
+
string="Email Template"
|
32
|
+
class="col-lg-4 o_light_label"
|
33
|
+
/>
|
71
34
|
<field
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
35
|
+
name="rma_mail_confirmation_template_id"
|
36
|
+
class="oe_inline"
|
37
|
+
required="send_rma_confirmation"
|
38
|
+
context="{'default_model': 'rma'}"
|
39
|
+
/>
|
77
40
|
</div>
|
78
|
-
|
79
|
-
|
80
|
-
<div
|
81
|
-
class="col-12 col-lg-6 o_setting_box"
|
41
|
+
</setting>
|
42
|
+
<setting
|
82
43
|
title="Send automatic RMA products reception notification to customer"
|
44
|
+
help="When the RMA products are received, send an automatic information email."
|
83
45
|
>
|
84
|
-
<div class="o_setting_left_pane">
|
85
46
|
<field name="send_rma_receipt_confirmation" />
|
86
|
-
|
87
|
-
|
47
|
+
<div
|
48
|
+
class="row mt16"
|
49
|
+
invisible="not send_rma_receipt_confirmation"
|
50
|
+
>
|
88
51
|
<label
|
89
|
-
for="
|
90
|
-
string="
|
52
|
+
for="rma_mail_receipt_confirmation_template_id"
|
53
|
+
string="Email Template"
|
54
|
+
class="col-lg-4 o_light_label"
|
91
55
|
/>
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
56
|
+
|
57
|
+
<field
|
58
|
+
name="rma_mail_receipt_confirmation_template_id"
|
59
|
+
class="oe_inline"
|
60
|
+
required="send_rma_receipt_confirmation"
|
61
|
+
context="{'default_model': 'rma'}"
|
96
62
|
/>
|
97
|
-
<div class="text-muted">
|
98
|
-
When the RMA products are received, send an automatic information email.
|
99
|
-
</div>
|
100
|
-
<div
|
101
|
-
class="row mt16"
|
102
|
-
attrs="{'invisible': [('send_rma_receipt_confirmation', '=', False)]}"
|
103
|
-
>
|
104
|
-
<label
|
105
|
-
for="rma_mail_receipt_confirmation_template_id"
|
106
|
-
string="Email Template"
|
107
|
-
class="col-lg-4 o_light_label"
|
108
|
-
/>
|
109
|
-
<field
|
110
|
-
name="rma_mail_receipt_confirmation_template_id"
|
111
|
-
class="oe_inline"
|
112
|
-
attrs="{'required': [('send_rma_receipt_confirmation', '=', True)]}"
|
113
|
-
context="{'default_model': 'rma'}"
|
114
|
-
/>
|
115
63
|
</div>
|
116
|
-
|
117
|
-
|
118
|
-
<div
|
119
|
-
class="col-12 col-lg-6 o_setting_box"
|
64
|
+
</setting>
|
65
|
+
<setting
|
120
66
|
title="Send automatic notification when the customer places an RMA"
|
67
|
+
help="When customers themselves place an RMA from the portal, send an automatic notification acknowleging it."
|
121
68
|
>
|
122
|
-
<div class="o_setting_left_pane">
|
123
69
|
<field name="send_rma_draft_confirmation" />
|
124
|
-
</div>
|
125
|
-
<div class="o_setting_right_pane">
|
126
|
-
<label
|
127
|
-
for="send_rma_draft_confirmation"
|
128
|
-
string="RMA draft notification Email"
|
129
|
-
/>
|
130
|
-
<span
|
131
|
-
class="fa fa-lg fa-building-o"
|
132
|
-
title="Values set here are company-specific."
|
133
|
-
groups="base.group_multi_company"
|
134
|
-
/>
|
135
|
-
<div class="text-muted">
|
136
|
-
When customers themselves place an RMA from the portal, send an automatic notification acknowleging it.
|
137
|
-
</div>
|
138
70
|
<div
|
139
|
-
|
140
|
-
|
141
|
-
|
71
|
+
class="row mt16"
|
72
|
+
invisible="not send_rma_draft_confirmation"
|
73
|
+
>
|
142
74
|
<label
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
75
|
+
for="rma_mail_draft_confirmation_template_id"
|
76
|
+
string="Email Template"
|
77
|
+
class="col-lg-4 o_light_label"
|
78
|
+
/>
|
147
79
|
<field
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
80
|
+
name="rma_mail_draft_confirmation_template_id"
|
81
|
+
class="oe_inline"
|
82
|
+
required="send_rma_draft_confirmation"
|
83
|
+
context="{'default_model': 'rma'}"
|
84
|
+
/>
|
153
85
|
</div>
|
154
|
-
|
155
|
-
</div>
|
86
|
+
</setting>
|
156
87
|
</xpath>
|
157
88
|
</field>
|
158
89
|
</record>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<field name="name" />
|
11
11
|
<field name="user_id" />
|
12
12
|
<field name="company_id" groups="base.group_multi_company" />
|
13
|
-
<field name="company_id"
|
13
|
+
<field name="company_id" column_invisible="1" />
|
14
14
|
</tree>
|
15
15
|
</field>
|
16
16
|
</record>
|
@@ -81,11 +81,7 @@
|
|
81
81
|
</kanban>
|
82
82
|
</field>
|
83
83
|
</page>
|
84
|
-
<page
|
85
|
-
name="emails"
|
86
|
-
string="Email"
|
87
|
-
attrs="{'invisible': [('alias_domain', '=', False)]}"
|
88
|
-
>
|
84
|
+
<page name="emails" string="Email" invisible="not alias_domain">
|
89
85
|
<group name="group_alias">
|
90
86
|
<label for="alias_name" string="Email Alias" />
|
91
87
|
<div name="alias_def">
|