odoo-addon-rma 16.0.5.0.1.1__py3-none-any.whl → 16.0.5.1.0__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.
@@ -11,7 +11,7 @@ Return Merchandise Authorization Management
11
11
  !! This file is generated by oca-gen-addon-readme !!
12
12
  !! changes will be overwritten. !!
13
13
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14
- !! source digest: sha256:cac6b4039e044713ee69c313f5779dbc5bb1d78ebec22a50b0f5bf74b7da491a
14
+ !! source digest: sha256:ee42142efd7393e2b2a8fa941b46827ae484f0116729f557a09de20fb9868658
15
15
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
16
 
17
17
  .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
@@ -5,7 +5,7 @@
5
5
  {
6
6
  "name": "Return Merchandise Authorization Management",
7
7
  "summary": "Return Merchandise Authorization (RMA)",
8
- "version": "16.0.5.0.1",
8
+ "version": "16.0.5.1.0",
9
9
  "development_status": "Production/Stable",
10
10
  "category": "RMA",
11
11
  "website": "https://github.com/OCA/rma",
@@ -1041,6 +1041,13 @@ msgstr ""
1041
1041
  msgid "Incoming e-mail"
1042
1042
  msgstr ""
1043
1043
 
1044
+ #. module: rma
1045
+ #: model:ir.model.fields,help:rma.field_rma__requires_action
1046
+ msgid ""
1047
+ "Indicates whether the RMA requires processing such as a receipt,delivery, or"
1048
+ " refund."
1049
+ msgstr ""
1050
+
1044
1051
  #. module: rma
1045
1052
  #: model:ir.model.fields,field_description:rma.field_rma__partner_invoice_id
1046
1053
  msgid "Invoice Address"
@@ -1841,6 +1848,11 @@ msgstr ""
1841
1848
  msgid "Required field(s):%s"
1842
1849
  msgstr ""
1843
1850
 
1851
+ #. module: rma
1852
+ #: model:ir.model.fields,field_description:rma.field_rma__requires_action
1853
+ msgid "Requires Action"
1854
+ msgstr ""
1855
+
1844
1856
  #. module: rma
1845
1857
  #: model:ir.model.fields,field_description:rma.field_rma__user_id
1846
1858
  #: model_terms:ir.ui.view,arch_db:rma.rma_view_search
@@ -337,6 +337,24 @@ class Rma(models.Model):
337
337
  different_return_product = fields.Boolean(
338
338
  related="operation_id.different_return_product"
339
339
  )
340
+ requires_action = fields.Boolean(
341
+ compute="_compute_requires_action",
342
+ help="Indicates whether the RMA requires processing such as a receipt,"
343
+ "delivery, or refund.",
344
+ )
345
+
346
+ @api.depends("operation_id")
347
+ def _compute_requires_action(self):
348
+ """
349
+ compute whether the RMA requires any follow-up action based on the
350
+ operation configuration
351
+ """
352
+ for rma in self:
353
+ rma.requires_action = (
354
+ rma.operation_id.action_create_receipt
355
+ or rma.operation_id.action_create_delivery
356
+ or rma.operation_id.action_create_refund
357
+ )
340
358
 
341
359
  @api.depends("operation_id.action_create_receipt", "state", "reception_move_id")
342
360
  def _compute_show_create_receipt(self):
@@ -509,13 +527,17 @@ class Rma(models.Model):
509
527
  and r.state == "confirmed"
510
528
  )
511
529
 
512
- @api.depends("state", "remaining_qty")
530
+ @api.depends("state", "remaining_qty", "requires_action")
513
531
  def _compute_can_be_finished(self):
532
+ # The RMA can be finished if:
533
+ # - It's in a transitional state AND there is still quantity to process
534
+ # OR
535
+ # - It's not already finished AND no further action is required
514
536
  for rma in self:
515
537
  rma.can_be_finished = (
516
538
  rma.state in {"received", "waiting_replacement", "waiting_return"}
517
539
  and rma.remaining_qty > 0
518
- )
540
+ ) or (rma.state != "finished" and not rma.requires_action)
519
541
 
520
542
  @api.depends("product_uom_qty", "state", "remaining_qty", "remaining_qty_to_done")
521
543
  def _compute_can_be_split(self):
@@ -960,6 +982,9 @@ class Rma(models.Model):
960
982
  def action_finish(self):
961
983
  """Invoked when a user wants to manually finalize the RMA"""
962
984
  self.ensure_one()
985
+ if not self.requires_action:
986
+ self.state = "finished"
987
+ return {}
963
988
  self._ensure_can_be_returned()
964
989
  # Force active_id to avoid issues when coming from smart buttons
965
990
  # in other models
@@ -372,7 +372,7 @@ ul.auto-toc {
372
372
  !! This file is generated by oca-gen-addon-readme !!
373
373
  !! changes will be overwritten. !!
374
374
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375
- !! source digest: sha256:cac6b4039e044713ee69c313f5779dbc5bb1d78ebec22a50b0f5bf74b7da491a
375
+ !! source digest: sha256:ee42142efd7393e2b2a8fa941b46827ae484f0116729f557a09de20fb9868658
376
376
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377
377
  <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/license-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>
378
378
  <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>.
@@ -315,3 +315,21 @@ class TestRmaOperation(TestRma):
315
315
  rma.action_confirm()
316
316
  self.assertEqual(rma.reception_move_id.state, "done")
317
317
  self.assertEqual(rma.reception_move_id.picking_id.state, "done")
318
+
319
+ def test_manual_finish_if_no_required_action_flag(self):
320
+ self.operation.action_create_receipt = False
321
+ self.operation.action_create_delivery = False
322
+ self.operation.action_create_refund = False
323
+ rma = self._create_rma(self.partner, self.product, 1, self.rma_loc)
324
+ rma.action_confirm()
325
+ self.assertFalse(rma.requires_action)
326
+ self.assertEqual(rma.state, "confirmed")
327
+ rma.action_finish()
328
+ self.assertEqual(rma.state, "finished")
329
+ self.operation.action_create_receipt = "manual_on_confirm"
330
+ rma2 = self._create_rma(self.partner, self.product, 1, self.rma_loc)
331
+ rma2.action_confirm()
332
+ self.assertTrue(rma2.requires_action)
333
+ self.assertEqual(rma2.state, "confirmed")
334
+ with self.assertRaises(ValidationError):
335
+ rma2.action_finish()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-rma
3
- Version: 16.0.5.0.1.1
3
+ Version: 16.0.5.1.0
4
4
  Summary: Return Merchandise Authorization (RMA)
5
5
  Home-page: https://github.com/OCA/rma
6
6
  Author: Tecnativa, Odoo Community Association (OCA)
@@ -27,7 +27,7 @@ Return Merchandise Authorization Management
27
27
  !! This file is generated by oca-gen-addon-readme !!
28
28
  !! changes will be overwritten. !!
29
29
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
30
- !! source digest: sha256:cac6b4039e044713ee69c313f5779dbc5bb1d78ebec22a50b0f5bf74b7da491a
30
+ !! source digest: sha256:ee42142efd7393e2b2a8fa941b46827ae484f0116729f557a09de20fb9868658
31
31
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
32
32
 
33
33
  .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
@@ -1,6 +1,6 @@
1
- odoo/addons/rma/README.rst,sha256=KoArkLSpfB9wFbjL3qyBhCLty_kM6db7-1A--FmvH5I,8402
1
+ odoo/addons/rma/README.rst,sha256=W9R2IfqDBP710szKQvslBAeUgdTXqg7GEbWDFv-v59w,8402
2
2
  odoo/addons/rma/__init__.py,sha256=KD8ElbTlUwRgGDQzvMIqp-WeEXGTuHqQT352BCbK2I0,168
3
- odoo/addons/rma/__manifest__.py,sha256=KqYDmVHkPRYyj_NXThxY72CQmfXZglNk0uEQHbyJ5Fo,1593
3
+ odoo/addons/rma/__manifest__.py,sha256=eaPOvk3mZePA3pgFKSrACS8zyZkq6zVVrK5kStl2_r8,1593
4
4
  odoo/addons/rma/hooks.py,sha256=Zd5KcqVj_ONKV-GyrZiXOAmdRGBRRczJGdhrgUrzY_s,3320
5
5
  odoo/addons/rma/controllers/__init__.py,sha256=ZAYSY9pxyJjumL2QVLuxqtBzjLwKPiQsVXMBAWvNGGY,85
6
6
  odoo/addons/rma/controllers/main.py,sha256=lmi25T49fDnCoUSqqr8eibwVXa6lMANwbkFuHhUxgZg,5426
@@ -15,7 +15,7 @@ odoo/addons/rma/i18n/it.po,sha256=zSBkjM8djFyVIhI5uq3vD_nCgWw8EHTzefNYSxczyKA,98
15
15
  odoo/addons/rma/i18n/nl.po,sha256=eVPCTYxViQmgJoQVrFjZDvQh__b79h_FnY-5cl_Q3BY,72142
16
16
  odoo/addons/rma/i18n/pt.po,sha256=1ETSyUkIgmNmcC0fPwEfx0gcS216xYJlJQuiD4PplPY,84045
17
17
  odoo/addons/rma/i18n/pt_BR.po,sha256=6RRKzwoMnypnkSMsy-hayld0dX3pCD_V0V-0wOV3S6Y,83298
18
- odoo/addons/rma/i18n/rma.pot,sha256=_EizVNi3X5YDpWQknzsfd_IkNhgKzrmhI0Ptt2cV21c,72144
18
+ odoo/addons/rma/i18n/rma.pot,sha256=8dFnmu-ol_FMb_KA5jd86UQ6i9534aFLDLBQm2vfhOQ,72454
19
19
  odoo/addons/rma/i18n/ro.po,sha256=E-jztXzIcsqgRrer0R5rpsJSUanYLYAK9zByRpR2T1Q,79984
20
20
  odoo/addons/rma/i18n/zh_CN.po,sha256=7WTnb8tKWM4R9Z-mklBdrymBovJCC_1gq55pzQSafdU,72253
21
21
  odoo/addons/rma/migrations/16.0.1.4.0/post-migration.py,sha256=jQn_F-J2amiqJZQZ33nQZeb_hOebJBXJMHdYbgiakd4,654
@@ -25,7 +25,7 @@ odoo/addons/rma/models/res_company.py,sha256=46aercxmY3p3t0JoIzlSSP_pjkvjaQb1pHR
25
25
  odoo/addons/rma/models/res_config_settings.py,sha256=-X3NWCfEG1LJ2iE2dYl3Ut-suDskrHMkp0D597EFhIw,1493
26
26
  odoo/addons/rma/models/res_partner.py,sha256=hwa0H6OIniUcTp5xjsRGmtkDHb1rMbZXRo7IsRqL-4U,1217
27
27
  odoo/addons/rma/models/res_users.py,sha256=43A5IHYXEXe9M4G0cONf1l7EZ1AWl5mhWJ24EdtAfhI,351
28
- odoo/addons/rma/models/rma.py,sha256=ULRer9G_bY-ZTeR3YNvpc3ijZMO2VwraCFOVrGQB19U,58295
28
+ odoo/addons/rma/models/rma.py,sha256=NNS1HQCy7bUVjsFawuTWSRUfPV4NvQBKx_oPMyRcPHA,59320
29
29
  odoo/addons/rma/models/rma_finalization.py,sha256=kgJ6EFWBXJKGCwKy7bbWRUynExsCMQyjqcflDpvwtaE,681
30
30
  odoo/addons/rma/models/rma_operation.py,sha256=9fmCVOgeUzbxcVViqjgKIMfoH-JO7YZqjO_iZ_CKD7U,5858
31
31
  odoo/addons/rma/models/rma_tag.py,sha256=RVFLyo8XmgjK_ftrRHWiEtzUQGs4b-OMhg0hwr-5Rzw,833
@@ -42,11 +42,11 @@ odoo/addons/rma/report/report.xml,sha256=rMg9_lccL-dJClHvMCmRI1Feh499gnExeskIylc
42
42
  odoo/addons/rma/security/ir.model.access.csv,sha256=zACDkLgOfICGiJGb4A9RNKbtlpBcFIC4rDZxESyBzbQ,1724
43
43
  odoo/addons/rma/security/rma_security.xml,sha256=_tz_MXqW8bWfzGhgQ3pDI7xdx6tX321DrkIaRAd2W6E,5374
44
44
  odoo/addons/rma/static/description/icon.png,sha256=0VH8J6xmJMYW0dBaW-Ts-Gm5oRvbf9mOglT4vqUKxdU,7450
45
- odoo/addons/rma/static/description/index.html,sha256=4RspGqE3B_l5e6muupzchxia_436NOOKVwiC3J1LjzM,19399
45
+ odoo/addons/rma/static/description/index.html,sha256=vZwwPW9Mw58Nal8DCl54zWgiQRj_2GmLK63GnAYHA3E,19399
46
46
  odoo/addons/rma/tests/__init__.py,sha256=X6dddCmdfZT9glqjpjtcAoIigt-OBX6hth6bDVYrvy4,155
47
47
  odoo/addons/rma/tests/test_rma.py,sha256=mbjlSG5s9eeooFfWEMF-XE0VvzWaBxE39LX5cS7wUUg,41420
48
48
  odoo/addons/rma/tests/test_rma_dashboard.py,sha256=HZS8QswRx34it3RQalIiNwvsXRlNpYwIa9RvxVLZHEM,3238
49
- odoo/addons/rma/tests/test_rma_operation.py,sha256=wVCkP6ZQbnxCGDSdJ0GuieoI4g2fs9H31uXyDpF1i0w,14229
49
+ odoo/addons/rma/tests/test_rma_operation.py,sha256=RZTrwAkM5e1y26oTBkU2iRIL_VwXL9tAcKc3OCsPl64,15078
50
50
  odoo/addons/rma/views/dashboard.xml,sha256=sf8IbRXeHeWRzeWQeJH8SdacXiPJJhJ2e1rnDLAJJrE,9541
51
51
  odoo/addons/rma/views/menus.xml,sha256=KWrTOvwY6IB-liNjRvBxTkdCSkes-CMTFI0iakxoavE,603
52
52
  odoo/addons/rma/views/report_rma.xml,sha256=scWiOVovRPdNZWJgHmj7930wRaQ80ZIOz3GWygXN3yk,6579
@@ -69,7 +69,7 @@ odoo/addons/rma/wizard/rma_split.py,sha256=PZuVAGCXzRkycxJQIgfbPY__EPRXGPAkiKaGX
69
69
  odoo/addons/rma/wizard/rma_split_views.xml,sha256=jtrUmgS9rsUfbgx6y77cUXPnmd1ObY7lmQ_8XZDxxuo,1581
70
70
  odoo/addons/rma/wizard/stock_picking_return.py,sha256=poQsNCMZOBYGuODACKaF9QH0mj6LHd3jMkKkVrYdxXU,7221
71
71
  odoo/addons/rma/wizard/stock_picking_return_views.xml,sha256=mvVA1z7Z4NoUnq5gnRx-eFYyEe9zrAoTQ1gnCbyLVeE,2060
72
- odoo_addon_rma-16.0.5.0.1.1.dist-info/METADATA,sha256=WLnegxpEQo0kiQZi3gzD34fzg4AK83GO7YLZ4p4zmhc,8966
73
- odoo_addon_rma-16.0.5.0.1.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
74
- odoo_addon_rma-16.0.5.0.1.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
75
- odoo_addon_rma-16.0.5.0.1.1.dist-info/RECORD,,
72
+ odoo_addon_rma-16.0.5.1.0.dist-info/METADATA,sha256=l9DhHfD6S8XVQVn3Y4O_DFfOR8SKKZ2hk20sUA8AX6c,8964
73
+ odoo_addon_rma-16.0.5.1.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
74
+ odoo_addon_rma-16.0.5.1.0.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
75
+ odoo_addon_rma-16.0.5.1.0.dist-info/RECORD,,