odoo-addon-rma 16.0.3.6.0.1__py3-none-any.whl → 16.0.4.0.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.
- odoo/addons/rma/README.rst +1 -1
- odoo/addons/rma/__manifest__.py +2 -1
- odoo/addons/rma/i18n/it.po +3 -3
- odoo/addons/rma/i18n/rma.pot +83 -0
- odoo/addons/rma/models/rma_operation.py +108 -1
- odoo/addons/rma/static/description/index.html +1 -1
- odoo/addons/rma/tests/__init__.py +1 -0
- odoo/addons/rma/tests/test_rma_dashboard.py +73 -0
- odoo/addons/rma/views/dashboard.xml +188 -0
- odoo/addons/rma/views/rma_views.xml +12 -0
- {odoo_addon_rma-16.0.3.6.0.1.dist-info → odoo_addon_rma-16.0.4.0.0.dist-info}/METADATA +2 -2
- {odoo_addon_rma-16.0.3.6.0.1.dist-info → odoo_addon_rma-16.0.4.0.0.dist-info}/RECORD +14 -12
- {odoo_addon_rma-16.0.3.6.0.1.dist-info → odoo_addon_rma-16.0.4.0.0.dist-info}/WHEEL +0 -0
- {odoo_addon_rma-16.0.3.6.0.1.dist-info → odoo_addon_rma-16.0.4.0.0.dist-info}/top_level.txt +0 -0
odoo/addons/rma/README.rst
CHANGED
@@ -7,7 +7,7 @@ Return Merchandise Authorization Management
|
|
7
7
|
!! This file is generated by oca-gen-addon-readme !!
|
8
8
|
!! changes will be overwritten. !!
|
9
9
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
10
|
-
!! source digest: sha256:
|
10
|
+
!! source digest: sha256:1b3498a03ec99e02a79a319f90549a3b3671ee7e8c11b6bb010ba85d092ca447
|
11
11
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
12
12
|
|
13
13
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
|
odoo/addons/rma/__manifest__.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
{
|
6
6
|
"name": "Return Merchandise Authorization Management",
|
7
7
|
"summary": "Return Merchandise Authorization (RMA)",
|
8
|
-
"version": "16.0.
|
8
|
+
"version": "16.0.4.0.0",
|
9
9
|
"development_status": "Production/Stable",
|
10
10
|
"category": "RMA",
|
11
11
|
"website": "https://github.com/OCA/rma",
|
@@ -34,6 +34,7 @@
|
|
34
34
|
"views/rma_tag_views.xml",
|
35
35
|
"views/stock_picking_views.xml",
|
36
36
|
"views/stock_warehouse_views.xml",
|
37
|
+
"views/dashboard.xml",
|
37
38
|
"views/res_config_settings_views.xml",
|
38
39
|
],
|
39
40
|
"post_init_hook": "post_init_hook",
|
odoo/addons/rma/i18n/it.po
CHANGED
@@ -6,7 +6,7 @@ msgid ""
|
|
6
6
|
msgstr ""
|
7
7
|
"Project-Id-Version: Odoo Server 14.0\n"
|
8
8
|
"Report-Msgid-Bugs-To: \n"
|
9
|
-
"PO-Revision-Date: 2025-
|
9
|
+
"PO-Revision-Date: 2025-04-22 10:24+0000\n"
|
10
10
|
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
|
11
11
|
"Language-Team: none\n"
|
12
12
|
"Language: it\n"
|
@@ -14,7 +14,7 @@ msgstr ""
|
|
14
14
|
"Content-Type: text/plain; charset=UTF-8\n"
|
15
15
|
"Content-Transfer-Encoding: \n"
|
16
16
|
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
17
|
-
"X-Generator: Weblate 5.
|
17
|
+
"X-Generator: Weblate 5.10.4\n"
|
18
18
|
|
19
19
|
#. module: rma
|
20
20
|
#. odoo-python
|
@@ -1636,7 +1636,7 @@ msgstr "RMA in stato bozza"
|
|
1636
1636
|
#. module: rma
|
1637
1637
|
#: model:ir.model.fields,field_description:rma.field_stock_warehouse__rma_out_replace_route_id
|
1638
1638
|
msgid "RMA out Replace Route"
|
1639
|
-
msgstr ""
|
1639
|
+
msgstr "Percorso riparazione uscita RMA"
|
1640
1640
|
|
1641
1641
|
#. module: rma
|
1642
1642
|
#: model:ir.model.fields,field_description:rma.field_stock_warehouse__rma_out_route_id
|
odoo/addons/rma/i18n/rma.pot
CHANGED
@@ -119,6 +119,11 @@ msgstr ""
|
|
119
119
|
msgid "<i class=\"fa fa-download\" role=\"img\" aria-label=\"Download\" title=\"Download\"/>"
|
120
120
|
msgstr ""
|
121
121
|
|
122
|
+
#. module: rma
|
123
|
+
#: model_terms:ir.ui.view,arch_db:rma.rma_operation_kanban
|
124
|
+
msgid "<i class=\"fa fa-ellipsis-v\" role=\"img\" aria-label=\"Manage\" title=\"Manage\"/>"
|
125
|
+
msgstr ""
|
126
|
+
|
122
127
|
#. module: rma
|
123
128
|
#: model_terms:ir.ui.view,arch_db:rma.portal_rma_page
|
124
129
|
msgid ""
|
@@ -226,6 +231,26 @@ msgid ""
|
|
226
231
|
"specific.\" groups=\"base.group_multi_company\"/>"
|
227
232
|
msgstr ""
|
228
233
|
|
234
|
+
#. module: rma
|
235
|
+
#: model_terms:ir.ui.view,arch_db:rma.rma_operation_kanban
|
236
|
+
msgid "<span>Awaiting action</span>"
|
237
|
+
msgstr ""
|
238
|
+
|
239
|
+
#. module: rma
|
240
|
+
#: model_terms:ir.ui.view,arch_db:rma.rma_operation_kanban
|
241
|
+
msgid "<span>Draft</span>"
|
242
|
+
msgstr ""
|
243
|
+
|
244
|
+
#. module: rma
|
245
|
+
#: model_terms:ir.ui.view,arch_db:rma.rma_operation_kanban
|
246
|
+
msgid "<span>New</span>"
|
247
|
+
msgstr ""
|
248
|
+
|
249
|
+
#. module: rma
|
250
|
+
#: model_terms:ir.ui.view,arch_db:rma.rma_operation_kanban
|
251
|
+
msgid "<span>Processed</span>"
|
252
|
+
msgstr ""
|
253
|
+
|
229
254
|
#. module: rma
|
230
255
|
#: model_terms:ir.ui.view,arch_db:rma.portal_rma_page
|
231
256
|
msgid "<strong class=\"d-block mb-1\">Delivery</strong>"
|
@@ -434,7 +459,10 @@ msgid "Avatar"
|
|
434
459
|
msgstr ""
|
435
460
|
|
436
461
|
#. module: rma
|
462
|
+
#. odoo-python
|
463
|
+
#: code:addons/rma/models/rma_operation.py:0
|
437
464
|
#: model_terms:ir.ui.view,arch_db:rma.rma_view_search
|
465
|
+
#, python-format
|
438
466
|
msgid "Awaiting Action"
|
439
467
|
msgstr ""
|
440
468
|
|
@@ -502,6 +530,11 @@ msgstr ""
|
|
502
530
|
msgid "Closed"
|
503
531
|
msgstr ""
|
504
532
|
|
533
|
+
#. module: rma
|
534
|
+
#: model:ir.model.fields,field_description:rma.field_rma_operation__color
|
535
|
+
msgid "Color"
|
536
|
+
msgstr ""
|
537
|
+
|
505
538
|
#. module: rma
|
506
539
|
#: model:ir.model.fields,field_description:rma.field_rma_tag__color
|
507
540
|
msgid "Color Index"
|
@@ -536,6 +569,7 @@ msgstr ""
|
|
536
569
|
|
537
570
|
#. module: rma
|
538
571
|
#: model:ir.ui.menu,name:rma.rma_configuration_menu
|
572
|
+
#: model_terms:ir.ui.view,arch_db:rma.rma_operation_kanban
|
539
573
|
msgid "Configuration"
|
540
574
|
msgstr ""
|
541
575
|
|
@@ -564,6 +598,21 @@ msgid ""
|
|
564
598
|
"same category. The conversion will be made based on the ratios."
|
565
599
|
msgstr ""
|
566
600
|
|
601
|
+
#. module: rma
|
602
|
+
#: model:ir.model.fields,field_description:rma.field_rma_operation__count_rma_awaiting_action
|
603
|
+
msgid "Count Rma Awaiting Action"
|
604
|
+
msgstr ""
|
605
|
+
|
606
|
+
#. module: rma
|
607
|
+
#: model:ir.model.fields,field_description:rma.field_rma_operation__count_rma_draft
|
608
|
+
msgid "Count Rma Draft"
|
609
|
+
msgstr ""
|
610
|
+
|
611
|
+
#. module: rma
|
612
|
+
#: model:ir.model.fields,field_description:rma.field_rma_operation__count_rma_processed
|
613
|
+
msgid "Count Rma Processed"
|
614
|
+
msgstr ""
|
615
|
+
|
567
616
|
#. module: rma
|
568
617
|
#: model:ir.model.fields,field_description:rma.field_stock_return_picking__create_rma
|
569
618
|
msgid "Create RMAs"
|
@@ -574,6 +623,11 @@ msgstr ""
|
|
574
623
|
msgid "Create a new RMA finalization"
|
575
624
|
msgstr ""
|
576
625
|
|
626
|
+
#. module: rma
|
627
|
+
#: model_terms:ir.actions.act_window,help:rma.rma_dashboard_action
|
628
|
+
msgid "Create a new RMA operation"
|
629
|
+
msgstr ""
|
630
|
+
|
577
631
|
#. module: rma
|
578
632
|
#: model_terms:ir.actions.act_window,help:rma.action_rma_tag
|
579
633
|
msgid "Create a new RMA tag"
|
@@ -701,8 +755,11 @@ msgid "Display Name"
|
|
701
755
|
msgstr ""
|
702
756
|
|
703
757
|
#. module: rma
|
758
|
+
#. odoo-python
|
759
|
+
#: code:addons/rma/models/rma_operation.py:0
|
704
760
|
#: model:ir.model.fields.selection,name:rma.selection__rma__state__draft
|
705
761
|
#: model_terms:ir.ui.view,arch_db:rma.rma_view_search
|
762
|
+
#, python-format
|
706
763
|
msgid "Draft"
|
707
764
|
msgstr ""
|
708
765
|
|
@@ -1068,6 +1125,11 @@ msgstr ""
|
|
1068
1125
|
msgid "New"
|
1069
1126
|
msgstr ""
|
1070
1127
|
|
1128
|
+
#. module: rma
|
1129
|
+
#: model:ir.actions.act_window,name:rma.action_rma_form
|
1130
|
+
msgid "New RMA"
|
1131
|
+
msgstr ""
|
1132
|
+
|
1071
1133
|
#. module: rma
|
1072
1134
|
#: model:ir.model.fields,field_description:rma.field_rma__activity_date_deadline
|
1073
1135
|
msgid "Next Activity Deadline"
|
@@ -1164,6 +1226,11 @@ msgstr ""
|
|
1164
1226
|
msgid "Other Information"
|
1165
1227
|
msgstr ""
|
1166
1228
|
|
1229
|
+
#. module: rma
|
1230
|
+
#: model:ir.ui.menu,name:rma.rma_dashboard_menu
|
1231
|
+
msgid "Overview"
|
1232
|
+
msgstr ""
|
1233
|
+
|
1167
1234
|
#. module: rma
|
1168
1235
|
#: model:ir.model.fields,field_description:rma.field_rma_team__alias_user_id
|
1169
1236
|
msgid "Owner"
|
@@ -1217,7 +1284,10 @@ msgid "Priority"
|
|
1217
1284
|
msgstr ""
|
1218
1285
|
|
1219
1286
|
#. module: rma
|
1287
|
+
#. odoo-python
|
1288
|
+
#: code:addons/rma/models/rma_operation.py:0
|
1220
1289
|
#: model_terms:ir.ui.view,arch_db:rma.rma_view_search
|
1290
|
+
#, python-format
|
1221
1291
|
msgid "Processed"
|
1222
1292
|
msgstr ""
|
1223
1293
|
|
@@ -1286,6 +1356,7 @@ msgstr ""
|
|
1286
1356
|
#: model:ir.module.category,name:rma.rma_module_category
|
1287
1357
|
#: model:ir.ui.menu,name:rma.rma_menu
|
1288
1358
|
#: model_terms:ir.ui.view,arch_db:rma.res_config_settings_view_form
|
1359
|
+
#: model_terms:ir.ui.view,arch_db:rma.rma_operation_kanban
|
1289
1360
|
#: model_terms:ir.ui.view,arch_db:rma.view_partner_form
|
1290
1361
|
#: model_terms:ir.ui.view,arch_db:rma.view_picking_form
|
1291
1362
|
msgid "RMA"
|
@@ -1397,6 +1468,11 @@ msgstr ""
|
|
1397
1468
|
msgid "RMA Out Type"
|
1398
1469
|
msgstr ""
|
1399
1470
|
|
1471
|
+
#. module: rma
|
1472
|
+
#: model:ir.actions.act_window,name:rma.rma_dashboard_action
|
1473
|
+
msgid "RMA Overview"
|
1474
|
+
msgstr ""
|
1475
|
+
|
1400
1476
|
#. module: rma
|
1401
1477
|
#: model_terms:ir.ui.view,arch_db:rma.res_config_settings_view_form
|
1402
1478
|
msgid "RMA Receipt Confirmation Email"
|
@@ -1935,6 +2011,13 @@ msgstr ""
|
|
1935
2011
|
msgid "That operation name already exists !"
|
1936
2012
|
msgstr ""
|
1937
2013
|
|
2014
|
+
#. module: rma
|
2015
|
+
#: model_terms:ir.actions.act_window,help:rma.rma_dashboard_action
|
2016
|
+
msgid ""
|
2017
|
+
"The RMA operation system allows you to configure each return operation\n"
|
2018
|
+
" with specific settings that will adjust its behavior."
|
2019
|
+
msgstr ""
|
2020
|
+
|
1938
2021
|
#. module: rma
|
1939
2022
|
#: model:ir.model.fields,help:rma.field_rma_tag__active
|
1940
2023
|
msgid "The active field allows you to hide the category without removing it."
|
@@ -1,7 +1,14 @@
|
|
1
1
|
# Copyright 2020 Tecnativa - Ernesto Tejeda
|
2
2
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
3
3
|
|
4
|
-
from
|
4
|
+
from ast import literal_eval
|
5
|
+
from collections import defaultdict
|
6
|
+
|
7
|
+
from odoo import _, api, fields, models
|
8
|
+
from odoo.osv.expression import AND
|
9
|
+
|
10
|
+
PROCESSED_STATES = ["received", "refunded", "replaced", "finished"]
|
11
|
+
AWAITING_ACTION_STATES = ["waiting_return", "waiting_replacement", "confirmed"]
|
5
12
|
|
6
13
|
|
7
14
|
class RmaOperation(models.Model):
|
@@ -10,7 +17,107 @@ class RmaOperation(models.Model):
|
|
10
17
|
|
11
18
|
active = fields.Boolean(default=True)
|
12
19
|
name = fields.Char(required=True, translate=True)
|
20
|
+
color = fields.Integer()
|
21
|
+
count_rma_draft = fields.Integer(compute="_compute_count_rma")
|
22
|
+
count_rma_awaiting_action = fields.Integer(compute="_compute_count_rma")
|
23
|
+
count_rma_processed = fields.Integer(compute="_compute_count_rma")
|
13
24
|
|
14
25
|
_sql_constraints = [
|
15
26
|
("name_uniq", "unique (name)", "That operation name already exists !"),
|
16
27
|
]
|
28
|
+
|
29
|
+
@api.model
|
30
|
+
def _get_rma_draft_domain(self):
|
31
|
+
return [("state", "=", "draft")]
|
32
|
+
|
33
|
+
@api.model
|
34
|
+
def _get_rma_awaiting_action_domain(self):
|
35
|
+
return [("state", "in", AWAITING_ACTION_STATES)]
|
36
|
+
|
37
|
+
@api.model
|
38
|
+
def _get_rma_processed_domain(self):
|
39
|
+
return [("state", "in", PROCESSED_STATES)]
|
40
|
+
|
41
|
+
def _compute_count_rma(self):
|
42
|
+
self.update(
|
43
|
+
{
|
44
|
+
"count_rma_draft": 0,
|
45
|
+
"count_rma_processed": 0,
|
46
|
+
"count_rma_awaiting_action": 0,
|
47
|
+
}
|
48
|
+
)
|
49
|
+
state_by_op = defaultdict(int)
|
50
|
+
for group in self.env["rma"].read_group(
|
51
|
+
AND([[("operation_id", "!=", False)]]),
|
52
|
+
groupby=["operation_id", "state"],
|
53
|
+
fields=["id"],
|
54
|
+
lazy=False,
|
55
|
+
):
|
56
|
+
operation_id = group.get("operation_id")[0]
|
57
|
+
state = group.get("state")
|
58
|
+
count = group.get("__count")
|
59
|
+
if state == "draft":
|
60
|
+
state_by_op[(operation_id, "count_rma_draft")] += count
|
61
|
+
if state in PROCESSED_STATES:
|
62
|
+
state_by_op[(operation_id, "count_rma_processed")] += count
|
63
|
+
if state in AWAITING_ACTION_STATES:
|
64
|
+
state_by_op[(operation_id, "count_rma_awaiting_action")] += count
|
65
|
+
for (operation_id, field), count in state_by_op.items():
|
66
|
+
self.browse(operation_id).update({field: count})
|
67
|
+
|
68
|
+
def _get_action(self, name, domain):
|
69
|
+
action = self.env["ir.actions.actions"]._for_xml_id("rma.rma_action")
|
70
|
+
action["display_name"] = name
|
71
|
+
context = {
|
72
|
+
"search_default_operation_id": [self.id],
|
73
|
+
"default_operation_id": self.id,
|
74
|
+
}
|
75
|
+
action_context = literal_eval(action["context"])
|
76
|
+
context = {**action_context, **context}
|
77
|
+
action["context"] = context
|
78
|
+
action["domain"] = domain
|
79
|
+
return action
|
80
|
+
|
81
|
+
def get_action_rma_tree_draft(self):
|
82
|
+
self.ensure_one()
|
83
|
+
name = self.display_name + ": " + _("Draft")
|
84
|
+
return self._get_action(
|
85
|
+
name,
|
86
|
+
domain=AND(
|
87
|
+
[
|
88
|
+
[("operation_id", "=", self.id)],
|
89
|
+
self._get_rma_draft_domain(),
|
90
|
+
]
|
91
|
+
),
|
92
|
+
)
|
93
|
+
|
94
|
+
def get_action_rma_tree_awaiting_action(self):
|
95
|
+
self.ensure_one()
|
96
|
+
name = self.display_name + ": " + _("Awaiting Action")
|
97
|
+
return self._get_action(
|
98
|
+
name,
|
99
|
+
domain=AND(
|
100
|
+
[
|
101
|
+
[("operation_id", "=", self.id)],
|
102
|
+
self._get_rma_awaiting_action_domain(),
|
103
|
+
]
|
104
|
+
),
|
105
|
+
)
|
106
|
+
|
107
|
+
def get_action_rma_tree_processed(self):
|
108
|
+
self.ensure_one()
|
109
|
+
name = self.display_name + ": " + _("Processed")
|
110
|
+
return self._get_action(
|
111
|
+
name,
|
112
|
+
domain=AND(
|
113
|
+
[
|
114
|
+
[("operation_id", "=", self.id)],
|
115
|
+
self._get_rma_processed_domain(),
|
116
|
+
]
|
117
|
+
),
|
118
|
+
)
|
119
|
+
|
120
|
+
def get_action_all_rma(self):
|
121
|
+
self.ensure_one()
|
122
|
+
name = self.display_name
|
123
|
+
return self._get_action(name, domain=[("operation_id", "=", self.id)])
|
@@ -367,7 +367,7 @@ ul.auto-toc {
|
|
367
367
|
!! This file is generated by oca-gen-addon-readme !!
|
368
368
|
!! changes will be overwritten. !!
|
369
369
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
370
|
-
!! source digest: sha256:
|
370
|
+
!! source digest: sha256:1b3498a03ec99e02a79a319f90549a3b3671ee7e8c11b6bb010ba85d092ca447
|
371
371
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
372
372
|
<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&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
373
373
|
<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>.
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# Copyright 2024 ACSONE SA/NV
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
3
|
+
|
4
|
+
from .test_rma import TestRma
|
5
|
+
|
6
|
+
PROCESSED_STATES = ["received", "refunded", "replaced", "finished"]
|
7
|
+
AWAITING_ACTION_STATES = ["waiting_return", "waiting_replacement", "confirmed"]
|
8
|
+
|
9
|
+
|
10
|
+
class TestRmaDashboard(TestRma):
|
11
|
+
def test_0(self):
|
12
|
+
operation_replace = self.env.ref("rma.rma_operation_replace")
|
13
|
+
operation_return = self.env.ref("rma.rma_operation_return")
|
14
|
+
operation_refund = self.env.ref("rma.rma_operation_refund")
|
15
|
+
replace_draft_1 = self._create_rma(
|
16
|
+
self.partner, self.product, 1, self.rma_loc, operation=operation_replace
|
17
|
+
)
|
18
|
+
self._create_rma(
|
19
|
+
self.partner, self.product, 1, self.rma_loc, operation=operation_replace
|
20
|
+
) # replace_draft_2
|
21
|
+
replace_draft_1.copy({"state": "confirmed"}) # replace_confirmed
|
22
|
+
replace_draft_1.copy({"state": "received"}) # replace_received
|
23
|
+
replace_draft_1.copy({"state": "waiting_return"}) # replace_waiting_return
|
24
|
+
replace_draft_1.copy( # replace_waiting_replacement
|
25
|
+
{"state": "waiting_replacement"}
|
26
|
+
)
|
27
|
+
return_draft = self._create_rma(
|
28
|
+
self.partner, self.product, 1, self.rma_loc, operation=operation_return
|
29
|
+
)
|
30
|
+
return_draft.copy({"state": "confirmed"}) # return_confirmed
|
31
|
+
return_draft.copy({"state": "waiting_return"}) # return_waiting_return
|
32
|
+
return_draft.copy({"state": "returned"}) # return_returned
|
33
|
+
return_draft.copy({"state": "finished"}) # return_finished
|
34
|
+
refund_draft = self._create_rma(
|
35
|
+
self.partner, self.product, 1, self.rma_loc, operation=operation_refund
|
36
|
+
)
|
37
|
+
refund_draft.copy({"state": "finished"}) # refund_refunded
|
38
|
+
|
39
|
+
self.assertEqual(operation_replace.count_rma_draft, 2)
|
40
|
+
self.assertEqual(operation_replace.count_rma_awaiting_action, 3)
|
41
|
+
self.assertEqual(operation_replace.count_rma_processed, 1)
|
42
|
+
|
43
|
+
self.assertEqual(operation_return.count_rma_draft, 1)
|
44
|
+
self.assertEqual(operation_return.count_rma_awaiting_action, 2)
|
45
|
+
self.assertEqual(operation_return.count_rma_processed, 1)
|
46
|
+
|
47
|
+
self.assertEqual(operation_refund.count_rma_draft, 1)
|
48
|
+
self.assertEqual(operation_refund.count_rma_awaiting_action, 0)
|
49
|
+
self.assertEqual(operation_refund.count_rma_processed, 1)
|
50
|
+
|
51
|
+
action = operation_replace.get_action_rma_tree_draft()
|
52
|
+
self.assertListEqual(
|
53
|
+
["&", ("operation_id", "=", operation_replace.id), ("state", "=", "draft")],
|
54
|
+
action.get("domain"),
|
55
|
+
)
|
56
|
+
action = operation_replace.get_action_rma_tree_awaiting_action()
|
57
|
+
self.assertListEqual(
|
58
|
+
[
|
59
|
+
"&",
|
60
|
+
("operation_id", "=", operation_replace.id),
|
61
|
+
("state", "in", AWAITING_ACTION_STATES),
|
62
|
+
],
|
63
|
+
action.get("domain"),
|
64
|
+
)
|
65
|
+
action = operation_replace.get_action_rma_tree_processed()
|
66
|
+
self.assertListEqual(
|
67
|
+
[
|
68
|
+
"&",
|
69
|
+
("operation_id", "=", operation_replace.id),
|
70
|
+
("state", "in", PROCESSED_STATES),
|
71
|
+
],
|
72
|
+
action.get("domain"),
|
73
|
+
)
|
@@ -0,0 +1,188 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
2
|
+
<!-- Copyright 2024 ACSONE SA/NV
|
3
|
+
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
4
|
+
<odoo>
|
5
|
+
|
6
|
+
<record id="rma_operation_kanban" model="ir.ui.view">
|
7
|
+
<field name="model">rma.operation</field>
|
8
|
+
<field name="arch" type="xml">
|
9
|
+
<kanban
|
10
|
+
class="oe_background_grey o_kanban_dashboard o_emphasize_colors"
|
11
|
+
create="0"
|
12
|
+
group_create="false"
|
13
|
+
>
|
14
|
+
<field name="color" />
|
15
|
+
<field name="count_rma_draft" />
|
16
|
+
<field name="count_rma_awaiting_action" />
|
17
|
+
<field name="count_rma_processed" />
|
18
|
+
<templates>
|
19
|
+
<t t-name="kanban-box">
|
20
|
+
<div
|
21
|
+
t-attf-class="#{!selection_mode ? kanban_color(record.color.raw_value) : ''}"
|
22
|
+
name="rma_operation"
|
23
|
+
>
|
24
|
+
<div t-attf-class="o_kanban_card_header">
|
25
|
+
<div class="o_kanban_card_header_title">
|
26
|
+
<div class="o_primary" t-if="!selection_mode">
|
27
|
+
<a type="object" name="get_action_all_rma">
|
28
|
+
<field name="name" />
|
29
|
+
</a>
|
30
|
+
</div>
|
31
|
+
<div class="o_primary" t-if="selection_mode">
|
32
|
+
<field name="name" />
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
<div
|
36
|
+
class="o_kanban_manage_button_section"
|
37
|
+
t-if="!selection_mode"
|
38
|
+
>
|
39
|
+
<a class="o_kanban_manage_toggle_button" href="#"><i
|
40
|
+
class="fa fa-ellipsis-v"
|
41
|
+
role="img"
|
42
|
+
aria-label="Manage"
|
43
|
+
title="Manage"
|
44
|
+
/></a>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
<div
|
48
|
+
class="container o_kanban_card_content"
|
49
|
+
t-if="!selection_mode"
|
50
|
+
>
|
51
|
+
<div class="row">
|
52
|
+
<div class="col-9 o_kanban_primary_left">
|
53
|
+
<button
|
54
|
+
class="btn btn-link"
|
55
|
+
name="get_action_rma_tree_draft"
|
56
|
+
type="object"
|
57
|
+
>
|
58
|
+
<span>Draft</span>
|
59
|
+
</button>
|
60
|
+
</div>
|
61
|
+
<div class="col-3 o_kanban_primary_right">
|
62
|
+
<button
|
63
|
+
class="btn btn-link"
|
64
|
+
name="get_action_rma_tree_draft"
|
65
|
+
type="object"
|
66
|
+
>
|
67
|
+
<span
|
68
|
+
t-esc="record.count_rma_draft.value"
|
69
|
+
/>
|
70
|
+
</button>
|
71
|
+
</div>
|
72
|
+
<div class="col-9 o_kanban_primary_left">
|
73
|
+
<button
|
74
|
+
class="btn btn-link"
|
75
|
+
name="get_action_rma_tree_awaiting_action"
|
76
|
+
type="object"
|
77
|
+
>
|
78
|
+
<span>Awaiting action</span>
|
79
|
+
</button>
|
80
|
+
</div>
|
81
|
+
<div class="col-3 o_kanban_primary_right">
|
82
|
+
<button
|
83
|
+
class="btn btn-link"
|
84
|
+
name="get_action_rma_tree_awaiting_action"
|
85
|
+
type="object"
|
86
|
+
>
|
87
|
+
<span
|
88
|
+
t-esc="record.count_rma_awaiting_action.value"
|
89
|
+
/>
|
90
|
+
</button>
|
91
|
+
</div>
|
92
|
+
<div class="col-9 o_kanban_primary_left">
|
93
|
+
<button
|
94
|
+
class="btn btn-link"
|
95
|
+
name="get_action_rma_tree_processed"
|
96
|
+
type="object"
|
97
|
+
>
|
98
|
+
<span>Processed</span>
|
99
|
+
</button>
|
100
|
+
</div>
|
101
|
+
<div class="col-3 o_kanban_primary_right">
|
102
|
+
<button
|
103
|
+
class="btn btn-link"
|
104
|
+
name="get_action_rma_tree_processed"
|
105
|
+
type="object"
|
106
|
+
>
|
107
|
+
<span
|
108
|
+
t-esc="record.count_rma_processed.value"
|
109
|
+
/>
|
110
|
+
</button>
|
111
|
+
</div>
|
112
|
+
</div>
|
113
|
+
</div>
|
114
|
+
<div
|
115
|
+
class="container o_kanban_card_manage_pane dropdown-menu"
|
116
|
+
role="menu"
|
117
|
+
>
|
118
|
+
<div class="row">
|
119
|
+
<div
|
120
|
+
class="col-6 o_kanban_card_manage_section o_kanban_manage_new"
|
121
|
+
>
|
122
|
+
<div
|
123
|
+
role="menuitem"
|
124
|
+
class="o_kanban_card_manage_title"
|
125
|
+
>
|
126
|
+
<span>New</span>
|
127
|
+
</div>
|
128
|
+
<div role="menuitem">
|
129
|
+
<a
|
130
|
+
name="%(action_rma_form)d"
|
131
|
+
type="action"
|
132
|
+
>RMA</a>
|
133
|
+
</div>
|
134
|
+
</div>
|
135
|
+
</div>
|
136
|
+
|
137
|
+
<div
|
138
|
+
t-if="widget.editable"
|
139
|
+
class="o_kanban_card_manage_settings row"
|
140
|
+
>
|
141
|
+
<div
|
142
|
+
class="col-8"
|
143
|
+
role="menuitem"
|
144
|
+
aria-haspopup="true"
|
145
|
+
>
|
146
|
+
<ul
|
147
|
+
class="oe_kanban_colorpicker"
|
148
|
+
data-field="color"
|
149
|
+
role="menu"
|
150
|
+
/>
|
151
|
+
</div>
|
152
|
+
<div role="menuitem" class="col-4">
|
153
|
+
<a
|
154
|
+
class="dropdown-item"
|
155
|
+
role="menuitem"
|
156
|
+
type="edit"
|
157
|
+
>Configuration</a>
|
158
|
+
</div>
|
159
|
+
</div>
|
160
|
+
</div>
|
161
|
+
</div>
|
162
|
+
</t>
|
163
|
+
</templates>
|
164
|
+
</kanban>
|
165
|
+
</field>
|
166
|
+
</record>
|
167
|
+
|
168
|
+
<record id="rma_dashboard_action" model="ir.actions.act_window">
|
169
|
+
<field name="name">RMA Overview</field>
|
170
|
+
<field name="res_model">rma.operation</field>
|
171
|
+
<field name="type">ir.actions.act_window</field>
|
172
|
+
<field name="view_mode">kanban,form</field>
|
173
|
+
<field name="help" type="html">
|
174
|
+
<p class="o_view_nocontent_smiling_face"> Create a new RMA operation </p>
|
175
|
+
<p>The RMA operation system allows you to configure each return operation
|
176
|
+
with specific settings that will adjust its behavior.</p>
|
177
|
+
</field>
|
178
|
+
</record>
|
179
|
+
|
180
|
+
<menuitem
|
181
|
+
action="rma_dashboard_action"
|
182
|
+
id="rma_dashboard_menu"
|
183
|
+
parent="rma_menu"
|
184
|
+
sequence="0"
|
185
|
+
name="Overview"
|
186
|
+
/>
|
187
|
+
|
188
|
+
</odoo>
|
@@ -439,4 +439,16 @@
|
|
439
439
|
<record id="rma_orders_menu" model="ir.ui.menu">
|
440
440
|
<field name="action" ref="rma_action" />
|
441
441
|
</record>
|
442
|
+
|
443
|
+
<record id="action_rma_form" model="ir.actions.act_window">
|
444
|
+
<field name="name">New RMA</field>
|
445
|
+
<field name="res_model">rma</field>
|
446
|
+
<field name="type">ir.actions.act_window</field>
|
447
|
+
<field name="view_mode">form</field>
|
448
|
+
<field name="context">{
|
449
|
+
'search_operation_id': [active_id],
|
450
|
+
'default_operation_id': active_id,
|
451
|
+
}
|
452
|
+
</field>
|
453
|
+
</record>
|
442
454
|
</odoo>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: odoo-addon-rma
|
3
|
-
Version: 16.0.
|
3
|
+
Version: 16.0.4.0.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)
|
@@ -23,7 +23,7 @@ Return Merchandise Authorization Management
|
|
23
23
|
!! This file is generated by oca-gen-addon-readme !!
|
24
24
|
!! changes will be overwritten. !!
|
25
25
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
26
|
-
!! source digest: sha256:
|
26
|
+
!! source digest: sha256:1b3498a03ec99e02a79a319f90549a3b3671ee7e8c11b6bb010ba85d092ca447
|
27
27
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
28
28
|
|
29
29
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
|
@@ -1,6 +1,6 @@
|
|
1
|
-
odoo/addons/rma/README.rst,sha256=
|
1
|
+
odoo/addons/rma/README.rst,sha256=Oq_9E1IBTRI25wltihIiBYG6hbNGtflD6iuRF_UnTOM,8237
|
2
2
|
odoo/addons/rma/__init__.py,sha256=KD8ElbTlUwRgGDQzvMIqp-WeEXGTuHqQT352BCbK2I0,168
|
3
|
-
odoo/addons/rma/__manifest__.py,sha256=
|
3
|
+
odoo/addons/rma/__manifest__.py,sha256=Doh3wYw618ZwfHDNjqT9dpy4_p9WvSyDuv4X0YQU2CI,1558
|
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
|
@@ -11,11 +11,11 @@ odoo/addons/rma/i18n/de.po,sha256=WaFR6piwiMuHfY6ndCRA5wRDARqlbgzICJDomxyvlbI,86
|
|
11
11
|
odoo/addons/rma/i18n/de_AT.po,sha256=UszBMZWbDToCJlUea1DQOOKqc-xVlTBDA36AwY4eGlg,64789
|
12
12
|
odoo/addons/rma/i18n/es.po,sha256=-vgWX1cZm-JSuBC5OzUXw99eWjdj_8rqhQOa6XNbfNk,90823
|
13
13
|
odoo/addons/rma/i18n/fr.po,sha256=0rWfWYLUlUre7FOhLbP9pxvAsEeFwyTZ0GbbbeN8kGE,80811
|
14
|
-
odoo/addons/rma/i18n/it.po,sha256=
|
14
|
+
odoo/addons/rma/i18n/it.po,sha256=E7YfF6EnwsupkvfPjpbV4AbyoWOu6RfKJdV2nn3RriA,90032
|
15
15
|
odoo/addons/rma/i18n/nl.po,sha256=ipDbxD84fsWSINUQpTvA3U4rIyBHPUTmwIlgJtFNrYM,64786
|
16
16
|
odoo/addons/rma/i18n/pt.po,sha256=UZAn4BrrdGSX-ta0eyI1jECz02fzzWOdlVI5g8wRRBU,76689
|
17
17
|
odoo/addons/rma/i18n/pt_BR.po,sha256=xkz2akgSUGWmxwGrcL4vRiusZFbW1eM3HqkygsnrQXU,75942
|
18
|
-
odoo/addons/rma/i18n/rma.pot,sha256=
|
18
|
+
odoo/addons/rma/i18n/rma.pot,sha256=8C5EeC9YtY7r4EdX2l8THmpK2vvPCQXa9LK2qMl1zV8,66998
|
19
19
|
odoo/addons/rma/i18n/ro.po,sha256=A9Se6IL8alc8tTTZsJzWMEsR5HPTnvJm7Fz9RYK48Mk,72628
|
20
20
|
odoo/addons/rma/i18n/zh_CN.po,sha256=svt2fDdtM2GZ07eUxPro-wQJdHzDS2FiRlasNSky6Xk,64897
|
21
21
|
odoo/addons/rma/migrations/16.0.1.4.0/post-migration.py,sha256=jQn_F-J2amiqJZQZ33nQZeb_hOebJBXJMHdYbgiakd4,654
|
@@ -27,7 +27,7 @@ odoo/addons/rma/models/res_partner.py,sha256=hwa0H6OIniUcTp5xjsRGmtkDHb1rMbZXRo7
|
|
27
27
|
odoo/addons/rma/models/res_users.py,sha256=43A5IHYXEXe9M4G0cONf1l7EZ1AWl5mhWJ24EdtAfhI,351
|
28
28
|
odoo/addons/rma/models/rma.py,sha256=03PHEGLlCgt67oUlJDbvJ5GDPHtoskN9-ZInA1nKciE,52155
|
29
29
|
odoo/addons/rma/models/rma_finalization.py,sha256=kgJ6EFWBXJKGCwKy7bbWRUynExsCMQyjqcflDpvwtaE,681
|
30
|
-
odoo/addons/rma/models/rma_operation.py,sha256=
|
30
|
+
odoo/addons/rma/models/rma_operation.py,sha256=1-_6Z921_RQSdK-H2_gYd84iPYF9JNiaybvEQbMXNuM,4153
|
31
31
|
odoo/addons/rma/models/rma_tag.py,sha256=RVFLyo8XmgjK_ftrRHWiEtzUQGs4b-OMhg0hwr-5Rzw,833
|
32
32
|
odoo/addons/rma/models/rma_team.py,sha256=5gyghbFOE4RR6dR5TQ1lRC4kK88i6G51V3dlY9gN6EY,1935
|
33
33
|
odoo/addons/rma/models/stock_move.py,sha256=rpA7RtEwc0TA86lsKnJvAnMU2Ai6atkd9yhguemqt5I,4934
|
@@ -42,9 +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=
|
46
|
-
odoo/addons/rma/tests/__init__.py,sha256=
|
45
|
+
odoo/addons/rma/static/description/index.html,sha256=vhLeY3FF_mfD6_-Hps3LUDSjT8NlksRDrh2p7mXWrJs,19205
|
46
|
+
odoo/addons/rma/tests/__init__.py,sha256=81GJ8itc-sGXkj3shWeDJjSv1gKrtpOYhU5JPp6yGko,122
|
47
47
|
odoo/addons/rma/tests/test_rma.py,sha256=Ft0Mcb7ZQd9FCwxHJqRJjLiUcdRryFwBMlZdtNMdBls,40932
|
48
|
+
odoo/addons/rma/tests/test_rma_dashboard.py,sha256=HZS8QswRx34it3RQalIiNwvsXRlNpYwIa9RvxVLZHEM,3238
|
49
|
+
odoo/addons/rma/views/dashboard.xml,sha256=sf8IbRXeHeWRzeWQeJH8SdacXiPJJhJ2e1rnDLAJJrE,9541
|
48
50
|
odoo/addons/rma/views/menus.xml,sha256=KWrTOvwY6IB-liNjRvBxTkdCSkes-CMTFI0iakxoavE,603
|
49
51
|
odoo/addons/rma/views/report_rma.xml,sha256=scWiOVovRPdNZWJgHmj7930wRaQ80ZIOz3GWygXN3yk,6579
|
50
52
|
odoo/addons/rma/views/res_config_settings_views.xml,sha256=BgV6WqRHDe2e3773wCHGyclQ0hh47_ZZsHo062V992w,9436
|
@@ -53,7 +55,7 @@ odoo/addons/rma/views/rma_finalization_views.xml,sha256=n7uDfDuY_3-U-XMw98AnZTeG
|
|
53
55
|
odoo/addons/rma/views/rma_portal_templates.xml,sha256=cPL5U4LTv486LgjS0Pr2ryeKKtCPv9e7GOl7w36j8YQ,27419
|
54
56
|
odoo/addons/rma/views/rma_tag_views.xml,sha256=Nhq9pUOHx6TS9dREkavjVzKjPUSjv89vJ3AdNpCNDsQ,2217
|
55
57
|
odoo/addons/rma/views/rma_team_views.xml,sha256=ekbQB-lLi8pFV-AAp1ETK1FkPzxoqTCu_XRo6Hf2Bbs,6988
|
56
|
-
odoo/addons/rma/views/rma_views.xml,sha256
|
58
|
+
odoo/addons/rma/views/rma_views.xml,sha256=-awFnh8QSuXqo6wJjf8nGh9iaOfLrX-OjN7cJhF6vYM,20501
|
57
59
|
odoo/addons/rma/views/stock_picking_views.xml,sha256=0N80h-BuliU2iLIzpkdbLf-YpQ1R97pP9Lq_pKq_M-Q,945
|
58
60
|
odoo/addons/rma/views/stock_warehouse_views.xml,sha256=f3f0DtzNvOc0txPANs0Zw0Ds5ZbPDX20iAunIAIEgpA,921
|
59
61
|
odoo/addons/rma/wizard/__init__.py,sha256=v5BQZoM0R5d2jOPuFiq500H2QAEee9eJB-4hKm5Wk7U,190
|
@@ -65,7 +67,7 @@ odoo/addons/rma/wizard/rma_split.py,sha256=PZuVAGCXzRkycxJQIgfbPY__EPRXGPAkiKaGX
|
|
65
67
|
odoo/addons/rma/wizard/rma_split_views.xml,sha256=jtrUmgS9rsUfbgx6y77cUXPnmd1ObY7lmQ_8XZDxxuo,1581
|
66
68
|
odoo/addons/rma/wizard/stock_picking_return.py,sha256=vGV5hSettscItmDRA8xmpuPE0v0r8q8uOSTiSy6El8E,7119
|
67
69
|
odoo/addons/rma/wizard/stock_picking_return_views.xml,sha256=NNnHzPR419GuIikwmJym4YZ-EVoPS6lG2G0XNX_4vLc,1677
|
68
|
-
odoo_addon_rma-16.0.
|
69
|
-
odoo_addon_rma-16.0.
|
70
|
-
odoo_addon_rma-16.0.
|
71
|
-
odoo_addon_rma-16.0.
|
70
|
+
odoo_addon_rma-16.0.4.0.0.dist-info/METADATA,sha256=VP-buUom-4-fAxs6X25NdOBk3fYooHwHYRYItA3KFkU,8799
|
71
|
+
odoo_addon_rma-16.0.4.0.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
72
|
+
odoo_addon_rma-16.0.4.0.0.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
73
|
+
odoo_addon_rma-16.0.4.0.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|