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.
Files changed (33) hide show
  1. odoo/addons/rma/README.rst +87 -78
  2. odoo/addons/rma/__manifest__.py +1 -1
  3. odoo/addons/rma/controllers/main.py +2 -1
  4. odoo/addons/rma/data/mail_data.xml +3 -6
  5. odoo/addons/rma/hooks.py +1 -5
  6. odoo/addons/rma/i18n/rma.pot +49 -81
  7. odoo/addons/rma/models/rma.py +51 -112
  8. odoo/addons/rma/models/stock_move.py +1 -1
  9. odoo/addons/rma/readme/CONFIGURE.md +22 -0
  10. odoo/addons/rma/readme/CONTRIBUTORS.md +9 -0
  11. odoo/addons/rma/readme/{DESCRIPTION.rst → DESCRIPTION.md} +4 -4
  12. odoo/addons/rma/readme/ROADMAP.md +3 -0
  13. odoo/addons/rma/readme/USAGE.md +59 -0
  14. odoo/addons/rma/static/description/index.html +55 -46
  15. odoo/addons/rma/tests/test_rma.py +21 -37
  16. odoo/addons/rma/views/res_config_settings_views.xml +55 -124
  17. odoo/addons/rma/views/res_partner_views.xml +1 -1
  18. odoo/addons/rma/views/rma_finalization_views.xml +1 -1
  19. odoo/addons/rma/views/rma_team_views.xml +2 -6
  20. odoo/addons/rma/views/rma_views.xml +71 -39
  21. odoo/addons/rma/views/stock_picking_views.xml +1 -1
  22. odoo/addons/rma/wizard/rma_delivery_views.xml +8 -19
  23. odoo/addons/rma/wizard/stock_picking_return_views.xml +1 -1
  24. odoo_addon_rma-17.0.1.0.0.2.dist-info/METADATA +220 -0
  25. {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
  26. {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
  27. odoo_addon_rma-17.0.1.0.0.2.dist-info/top_level.txt +1 -0
  28. odoo/addons/rma/readme/CONFIGURE.rst +0 -21
  29. odoo/addons/rma/readme/CONTRIBUTORS.rst +0 -9
  30. odoo/addons/rma/readme/ROADMAP.rst +0 -3
  31. odoo/addons/rma/readme/USAGE.rst +0 -57
  32. odoo_addon_rma-16.0.1.2.0.2.dist-info/METADATA +0 -214
  33. 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:4883b701d44a55d02e769bdbf411c649efc42341792b63e965630e712a6406d9
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/16.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-16-0/rma-16-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&amp;target_branch=16.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 (RMA)</a>.
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&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>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
- Besides, you have full integration of the RMA documents in the customer portal.</p>
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 &gt; 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 &gt; Configuration &gt; RMA Team</em> and select a team or create a new
402
- one.</li>
402
+ <li>Go to <em>RMA &gt; Configuration &gt; 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 &gt; 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, warehouse and company.
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 &gt; Inventory</em>.</li>
414
- <li>Set <em>Group RMA returns by customer address and warehouse</em> checkbox off.</li>
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 &gt; Orders</em> and create a new RMA.</li>
423
- <li>Select a partner, an invoice address, select a product
424
- (or select a picking and a move instead), write a quantity, fill the rest
425
- of the form and click on ‘confirm’ button in the status bar.</li>
426
- <li>You will see an smart button labeled ‘Receipt’. Click on that button to see
427
- the reception operation form.</li>
428
- <li>If everything is right, validate the operation and go back to the RMA to
429
- see it in a ‘received’ state.</li>
430
- <li>Now you are able to generate a refund, generate a delivery order to return
431
- to the customer the same product or another product as a replacement, split
432
- the RMA by extracting a part of the remaining quantity to another RMA,
433
- preview the RMA in the website. All of these operations can be done by
434
- clicking on the buttons in the status bar.<ul>
435
- <li>If you click on ‘Refund’ button, a refund will be created, and it will be
436
- accessible via the smart button labeled Refund. The RMA will be set
437
- automatically to ‘Refunded’ state when the refund is validated.</li>
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 client
440
- and this order will be accessible via the smart button labeled Delivery.
441
- The RMA will be set automatically to ‘Replaced’ or ‘Returned’ state when
442
- the RMA quantity is equal or lower than the quantity in done delivery
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 the <em>Finish</em>
447
- button. A wizard will ask you for the reason from a selection of preconfigured ones.
448
- Be sure to configure them in advance on <em>RMA &gt; Configuration &gt; Finalization Reasons</em>.
449
- Once the RMA is finished, it will be set to that state and the reason will be
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 &gt; Configuration &gt; 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 return.</li>
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 step.
458
- Every RMA will be in confirmed state and they will
459
- be linked to the returning operation generated previously.</li>
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 configuration
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 team
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 what
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:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
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 &lt;<a class="reference external" href="mailto:chafique.delli&#64;akretion.com">chafique.delli&#64;akretion.com</a>&gt;</li>
520
525
  <li>Giovanni Serra - Ooops &lt;<a class="reference external" href="mailto:giovanni&#64;ooops404.com">giovanni&#64;ooops404.com</a>&gt;</li>
526
+ <li><a class="reference external" href="https://www.apsl.tech">APSL-Nagarro</a>:<ul>
527
+ <li>Antoni Marroig &lt;<a class="reference external" href="mailto:amarroig&#64;apsl.net">amarroig&#64;apsl.net</a>&gt;</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/16.0/rma">OCA/rma</a> project on GitHub.</p>
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.quantity_done = rma.product_uom_qty
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
- recordp=self.env["stock.picking"].with_context(
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.quantity_done = move.product_uom_qty
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
- recordp=self.env["stock.picking"].with_context(
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.quantity_done = 9
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.quantity_done = 10
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.quantity_done, 10)
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
- # remaining_qty_to_done is less than or equal to 0
420
- first_move.quantity_done = 2
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.quantity_done = 2
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.quantity_done = 8
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.quantity_done = rma.product_uom_qty
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].quantity_done = reception_moves[0].product_uom_qty
647
- reception_moves[1].quantity_done = reception_moves[1].product_uom_qty
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.quantity_done = 10
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.quantity_done = 4
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.quantity_done, 10)
703
- self.assertEqual(new_rma.reception_move_id.quantity_done, 10)
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.quantity_done = rma.product_uom_qty
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="//div[@data-key='stock']/div[hasclass('o_settings_container')]"
8
+ expr="//block[@name='operations_setting_container']"
9
9
  position="inside"
10
10
  >
11
- <div class="col-12 col-lg-6 o_setting_box" title="Finish RMAs manually">
12
- <div class="o_setting_left_pane">
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
- </div>
15
- <div class="o_setting_right_pane">
16
- <label
17
- for="group_rma_manual_finalization"
18
- string="RMA Manual Finalization"
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
- </div>
30
- <div class="o_setting_right_pane">
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
- </div>
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
- for="rma_mail_confirmation_template_id"
68
- string="Email Template"
69
- class="col-lg-4 o_light_label"
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
- name="rma_mail_confirmation_template_id"
73
- class="oe_inline"
74
- attrs="{'required': [('send_rma_confirmation', '=', True)]}"
75
- context="{'default_model': 'rma'}"
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
- </div>
79
- </div>
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
- </div>
87
- <div class="o_setting_right_pane">
47
+ <div
48
+ class="row mt16"
49
+ invisible="not send_rma_receipt_confirmation"
50
+ >
88
51
  <label
89
- for="send_rma_receipt_confirmation"
90
- string="RMA Receipt Confirmation Email"
52
+ for="rma_mail_receipt_confirmation_template_id"
53
+ string="Email Template"
54
+ class="col-lg-4 o_light_label"
91
55
  />
92
- <span
93
- class="fa fa-lg fa-building-o"
94
- title="Values set here are company-specific."
95
- groups="base.group_multi_company"
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
- </div>
117
- </div>
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
- class="row mt16"
140
- attrs="{'invisible': [('send_rma_draft_confirmation', '=', False)]}"
141
- >
71
+ class="row mt16"
72
+ invisible="not send_rma_draft_confirmation"
73
+ >
142
74
  <label
143
- for="rma_mail_draft_confirmation_template_id"
144
- string="Email Template"
145
- class="col-lg-4 o_light_label"
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
- name="rma_mail_draft_confirmation_template_id"
149
- class="oe_inline"
150
- attrs="{'required': [('send_rma_draft_confirmation', '=', True)]}"
151
- context="{'default_model': 'rma'}"
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
- </div>
155
- </div>
86
+ </setting>
156
87
  </xpath>
157
88
  </field>
158
89
  </record>
@@ -14,7 +14,7 @@
14
14
  type="object"
15
15
  class="oe_stat_button"
16
16
  icon="fa-reply"
17
- attrs="{'invisible': [('rma_count', '=', 0)]}"
17
+ invisible="rma_count == 0"
18
18
  groups="rma.rma_group_user_own"
19
19
  >
20
20
  <field name="rma_count" widget="statinfo" string="RMA" />
@@ -28,7 +28,7 @@
28
28
  name="web_ribbon"
29
29
  title="Archived"
30
30
  bg_color="bg-danger"
31
- attrs="{'invisible': [('active', '=', True)]}"
31
+ invisible="active"
32
32
  />
33
33
  <group>
34
34
  <field name="name" />
@@ -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" invisible="1" />
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">