odoo-addon-rma 17.0.2.0.2__py3-none-any.whl → 17.0.2.2.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 +3 -1
- odoo/addons/rma/__manifest__.py +1 -1
- odoo/addons/rma/i18n/de.po +28 -25
- odoo/addons/rma/i18n/de_AT.po +13 -25
- odoo/addons/rma/i18n/es.po +28 -25
- odoo/addons/rma/i18n/fr.po +28 -25
- odoo/addons/rma/i18n/it.po +28 -25
- odoo/addons/rma/i18n/nl.po +13 -25
- odoo/addons/rma/i18n/pt.po +28 -25
- odoo/addons/rma/i18n/pt_BR.po +28 -25
- odoo/addons/rma/i18n/rma.pot +75 -32
- odoo/addons/rma/i18n/ro.po +28 -25
- odoo/addons/rma/i18n/zh_CN.po +13 -25
- odoo/addons/rma/models/rma.py +1 -0
- odoo/addons/rma/models/stock_move.py +1 -3
- odoo/addons/rma/readme/CONTRIBUTORS.md +2 -0
- odoo/addons/rma/static/description/index.html +3 -1
- odoo/addons/rma/tests/test_rma.py +22 -7
- odoo/addons/rma/views/report_rma.xml +36 -25
- odoo/addons/rma/views/res_config_settings_views.xml +171 -76
- odoo/addons/rma/views/rma_views.xml +18 -0
- odoo/addons/rma/wizard/stock_picking_return.py +19 -0
- odoo/addons/rma/wizard/stock_picking_return_views.xml +9 -1
- {odoo_addon_rma-17.0.2.0.2.dist-info → odoo_addon_rma-17.0.2.2.0.dist-info}/METADATA +4 -2
- {odoo_addon_rma-17.0.2.0.2.dist-info → odoo_addon_rma-17.0.2.2.0.dist-info}/RECORD +27 -27
- {odoo_addon_rma-17.0.2.0.2.dist-info → odoo_addon_rma-17.0.2.2.0.dist-info}/WHEEL +0 -0
- {odoo_addon_rma-17.0.2.0.2.dist-info → odoo_addon_rma-17.0.2.2.0.dist-info}/top_level.txt +0 -0
odoo/addons/rma/models/rma.py
CHANGED
@@ -26,9 +26,7 @@ class StockMove(models.Model):
|
|
26
26
|
)
|
27
27
|
# RMA that creates the out move
|
28
28
|
rma_id = fields.Many2one(
|
29
|
-
comodel_name="rma",
|
30
|
-
string="RMA return",
|
31
|
-
copy=False,
|
29
|
+
comodel_name="rma", string="RMA return", copy=False, index=True
|
32
30
|
)
|
33
31
|
|
34
32
|
def unlink(self):
|
@@ -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:332aee253ea006150dd84367588b401c225d097053614131e9c2f1ff01fef4cc
|
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/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>
|
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
|
@@ -532,6 +532,8 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
532
532
|
</ul>
|
533
533
|
</li>
|
534
534
|
<li>Michael Tietz (MT Software) <a class="reference external" href="mailto:mtietz@mt-software.de">mtietz@mt-software.de</a></li>
|
535
|
+
<li>Jacques-Etienne Baudoux - BCIM <a class="reference external" href="mailto:je@bcim.be">je@bcim.be</a></li>
|
536
|
+
<li>Souheil Bejaoui - ACSONE SA/NV <a class="reference external" href="mailto:souheil.bejaoui@acsone.eu">souheil.bejaoui@acsone.eu</a></li>
|
535
537
|
</ul>
|
536
538
|
</div>
|
537
539
|
<div class="section" id="maintainers">
|
@@ -71,8 +71,11 @@ class TestRma(BaseCommon):
|
|
71
71
|
cls.warehouse = cls.env.ref("stock.warehouse0")
|
72
72
|
# Ensure grouping
|
73
73
|
cls.env.company.rma_return_grouping = True
|
74
|
+
cls.operation = cls.env.ref("rma.rma_operation_replace")
|
74
75
|
|
75
|
-
def _create_rma(
|
76
|
+
def _create_rma(
|
77
|
+
self, partner=None, product=None, qty=None, location=None, operation=None
|
78
|
+
):
|
76
79
|
vals = {}
|
77
80
|
if partner:
|
78
81
|
vals["partner_id"] = partner.id
|
@@ -82,14 +85,17 @@ class TestRma(BaseCommon):
|
|
82
85
|
vals["product_uom_qty"] = qty
|
83
86
|
if location:
|
84
87
|
vals["location_id"] = location.id
|
85
|
-
|
88
|
+
if operation:
|
89
|
+
vals["operation_id"] = operation.id
|
90
|
+
elif operation is None:
|
91
|
+
vals["operation_id"] = self.operation.id
|
86
92
|
vals["user_id"] = self.env.user.id
|
87
93
|
return self.env["rma"].create(vals)
|
88
94
|
|
89
95
|
def _create_confirm_receive(
|
90
|
-
self, partner=None, product=None, qty=None, location=None
|
96
|
+
self, partner=None, product=None, qty=None, location=None, operation=None
|
91
97
|
):
|
92
|
-
rma = self._create_rma(partner, product, qty, location)
|
98
|
+
rma = self._create_rma(partner, product, qty, location, operation)
|
93
99
|
rma.action_confirm()
|
94
100
|
rma.reception_move_id.quantity = rma.product_uom_qty
|
95
101
|
rma.reception_move_id.picking_id.button_validate()
|
@@ -221,19 +227,26 @@ class TestRmaCase(TestRma):
|
|
221
227
|
self.assertEqual(rma.product_uom, self.product.uom_id)
|
222
228
|
|
223
229
|
def test_ensure_required_fields_on_confirm(self):
|
224
|
-
rma = self._create_rma()
|
230
|
+
rma = self._create_rma(operation=False)
|
225
231
|
with self.assertRaises(ValidationError) as e:
|
226
232
|
rma.action_confirm()
|
227
233
|
self.assertEqual(
|
228
234
|
e.exception.args[0],
|
229
|
-
"Required field(s):\nCustomer\nShipping Address\nInvoice Address\nProduct"
|
235
|
+
"Required field(s):\nCustomer\nShipping Address\nInvoice Address\nProduct"
|
236
|
+
"\nRequested operation",
|
230
237
|
)
|
231
238
|
rma.partner_id = self.partner.id
|
232
239
|
with self.assertRaises(ValidationError) as e:
|
233
240
|
rma.action_confirm()
|
234
|
-
self.assertEqual(
|
241
|
+
self.assertEqual(
|
242
|
+
e.exception.args[0], "Required field(s):\nProduct\nRequested operation"
|
243
|
+
)
|
235
244
|
rma.product_id = self.product.id
|
236
245
|
rma.location_id = self.rma_loc.id
|
246
|
+
with self.assertRaises(ValidationError) as e:
|
247
|
+
rma.action_confirm()
|
248
|
+
self.assertEqual(e.exception.args[0], "Required field(s):\nRequested operation")
|
249
|
+
rma.operation_id = self.operation
|
237
250
|
rma.action_confirm()
|
238
251
|
self.assertEqual(rma.state, "confirmed")
|
239
252
|
|
@@ -670,6 +683,7 @@ class TestRmaCase(TestRma):
|
|
670
683
|
)
|
671
684
|
)
|
672
685
|
stock_return_picking_form.create_rma = True
|
686
|
+
stock_return_picking_form.rma_operation_id = self.operation
|
673
687
|
return_wizard = stock_return_picking_form.save()
|
674
688
|
picking_action = return_wizard.create_returns()
|
675
689
|
# Each origin move is linked to a different RMA
|
@@ -698,6 +712,7 @@ class TestRmaCase(TestRma):
|
|
698
712
|
rma_form.move_id = origin_delivery.move_ids.filtered(
|
699
713
|
lambda r: r.product_id == self.product
|
700
714
|
)
|
715
|
+
rma_form.operation_id = self.operation
|
701
716
|
rma = rma_form.save()
|
702
717
|
rma.action_confirm()
|
703
718
|
rma.reception_move_id.quantity = 10
|
@@ -95,31 +95,42 @@
|
|
95
95
|
</p>
|
96
96
|
</div>
|
97
97
|
</div>
|
98
|
-
<
|
99
|
-
<
|
100
|
-
<
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
<
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
<
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
98
|
+
<table class="table table-sm o_main_table table-borderless mt-4">
|
99
|
+
<tbody>
|
100
|
+
<tr t-if="doc.picking_id" name="tr_picking">
|
101
|
+
<td>Origin delivery</td>
|
102
|
+
<td><span t-field="doc.picking_id" /></td>
|
103
|
+
</tr>
|
104
|
+
<tr>
|
105
|
+
<td>Product</td>
|
106
|
+
<td><span t-field="doc.product_id" /></td>
|
107
|
+
</tr>
|
108
|
+
<tr>
|
109
|
+
<td>Quantity</td>
|
110
|
+
<td>
|
111
|
+
<span t-field="doc.product_uom_qty" />
|
112
|
+
<span
|
113
|
+
t-field="doc.product_uom"
|
114
|
+
groups="uom.group_uom"
|
115
|
+
/>
|
116
|
+
</td>
|
117
|
+
</tr>
|
118
|
+
<tr t-if="doc.delivered_qty">
|
119
|
+
<td>Delivered Quantity</td>
|
120
|
+
<td>
|
121
|
+
<span t-field="doc.delivered_qty" />
|
122
|
+
<span
|
123
|
+
t-field="doc.product_uom"
|
124
|
+
groups="uom.group_uom"
|
125
|
+
/>
|
126
|
+
</td>
|
127
|
+
</tr>
|
128
|
+
<tr>
|
129
|
+
<td>Requested operation</td>
|
130
|
+
<td><span t-field="doc.operation_id" /></td>
|
131
|
+
</tr>
|
132
|
+
</tbody>
|
133
|
+
</table>
|
123
134
|
<div t-if="doc.description">
|
124
135
|
<strong>RMA Note:</strong>
|
125
136
|
<p t-out="doc.description" />
|
@@ -2,89 +2,184 @@
|
|
2
2
|
<odoo>
|
3
3
|
<record id="res_config_settings_view_form" model="ir.ui.view">
|
4
4
|
<field name="model">res.config.settings</field>
|
5
|
-
<field name="inherit_id" ref="
|
5
|
+
<field name="inherit_id" ref="base.res_config_settings_view_form" />
|
6
6
|
<field name="arch" type="xml">
|
7
|
-
<xpath
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
class="
|
37
|
-
|
38
|
-
|
39
|
-
|
7
|
+
<xpath expr="//form" position="inside">
|
8
|
+
<app string="RMA" groups="rma.rma_group_manager" name="rma">
|
9
|
+
<h2>Return Merchandise Authorization Management</h2>
|
10
|
+
<div
|
11
|
+
class="row mt16 o_settings_container"
|
12
|
+
name="operations_setting_container"
|
13
|
+
>
|
14
|
+
<div
|
15
|
+
class="col-12 col-lg-6 o_setting_box"
|
16
|
+
title="Finish RMAs manually"
|
17
|
+
>
|
18
|
+
<div class="o_setting_left_pane">
|
19
|
+
<field name="group_rma_manual_finalization" />
|
20
|
+
</div>
|
21
|
+
<div class="o_setting_right_pane">
|
22
|
+
<label
|
23
|
+
for="group_rma_manual_finalization"
|
24
|
+
string="RMA Manual Finalization"
|
25
|
+
/>
|
26
|
+
<div class="text-muted">
|
27
|
+
When the RMA is receive, allow to finsish it manually choosing
|
28
|
+
a finalization reason.
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
<div class="col-12 col-lg-6 o_setting_box">
|
33
|
+
<div class="o_setting_left_pane">
|
34
|
+
<field name="rma_return_grouping" />
|
35
|
+
</div>
|
36
|
+
<div class="o_setting_right_pane">
|
37
|
+
<label for="rma_return_grouping" />
|
38
|
+
<span
|
39
|
+
class="fa fa-lg fa-building-o"
|
40
|
+
title="Values set here are company-specific."
|
41
|
+
groups="base.group_multi_company"
|
42
|
+
/>
|
43
|
+
<div
|
44
|
+
class="text-muted"
|
45
|
+
>Group RMA returns by customer and warehouse.</div>
|
46
|
+
</div>
|
40
47
|
</div>
|
41
|
-
</setting>
|
42
|
-
<setting
|
43
|
-
title="Send automatic RMA products reception notification to customer"
|
44
|
-
help="When the RMA products are received, send an automatic information email."
|
45
|
-
>
|
46
|
-
<field name="send_rma_receipt_confirmation" />
|
47
48
|
<div
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
class="
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
49
|
+
class="col-12 col-lg-6 o_setting_box"
|
50
|
+
title="Send automatic RMA info to customer"
|
51
|
+
>
|
52
|
+
<div class="o_setting_left_pane">
|
53
|
+
<field name="send_rma_confirmation" />
|
54
|
+
</div>
|
55
|
+
<div class="o_setting_right_pane">
|
56
|
+
<label
|
57
|
+
for="send_rma_confirmation"
|
58
|
+
string="RMA Confirmation Email"
|
59
|
+
/>
|
60
|
+
<span
|
61
|
+
class="fa fa-lg fa-building-o"
|
62
|
+
title="Values set here are company-specific."
|
63
|
+
groups="base.group_multi_company"
|
64
|
+
/>
|
65
|
+
<div
|
66
|
+
class="text-muted"
|
67
|
+
>When the RMA is confirmed, send an automatic information email.</div>
|
68
|
+
<div
|
69
|
+
class="row mt16"
|
70
|
+
invisible="not send_rma_confirmation"
|
71
|
+
>
|
72
|
+
<label
|
73
|
+
for="rma_mail_confirmation_template_id"
|
74
|
+
string="Email Template"
|
75
|
+
class="col-lg-4 o_light_label"
|
76
|
+
/>
|
77
|
+
<field
|
78
|
+
name="rma_mail_confirmation_template_id"
|
79
|
+
class="oe_inline"
|
80
|
+
required="send_rma_confirmation"
|
81
|
+
context="{'default_model': 'rma'}"
|
82
|
+
/>
|
83
|
+
</div>
|
84
|
+
</div>
|
63
85
|
</div>
|
64
|
-
</setting>
|
65
|
-
<setting
|
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."
|
68
|
-
>
|
69
|
-
<field name="send_rma_draft_confirmation" />
|
70
86
|
<div
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
<
|
75
|
-
|
76
|
-
|
77
|
-
class="
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
87
|
+
class="col-12 col-lg-6 o_setting_box"
|
88
|
+
title="Send automatic RMA products reception notification to customer"
|
89
|
+
>
|
90
|
+
<div class="o_setting_left_pane">
|
91
|
+
<field name="send_rma_receipt_confirmation" />
|
92
|
+
</div>
|
93
|
+
<div class="o_setting_right_pane">
|
94
|
+
<label
|
95
|
+
for="send_rma_receipt_confirmation"
|
96
|
+
string="RMA Receipt Confirmation Email"
|
97
|
+
/>
|
98
|
+
<span
|
99
|
+
class="fa fa-lg fa-building-o"
|
100
|
+
title="Values set here are company-specific."
|
101
|
+
groups="base.group_multi_company"
|
102
|
+
/>
|
103
|
+
<div
|
104
|
+
class="text-muted"
|
105
|
+
>When the RMA products are received, send an automatic information email.</div>
|
106
|
+
<div
|
107
|
+
class="row mt16"
|
108
|
+
invisible="not send_rma_receipt_confirmation"
|
109
|
+
>
|
110
|
+
<label
|
111
|
+
for="rma_mail_receipt_confirmation_template_id"
|
112
|
+
string="Email Template"
|
113
|
+
class="col-lg-4 o_light_label"
|
114
|
+
/>
|
115
|
+
<field
|
116
|
+
name="rma_mail_receipt_confirmation_template_id"
|
117
|
+
class="oe_inline"
|
118
|
+
required="send_rma_receipt_confirmation"
|
119
|
+
context="{'default_model': 'rma'}"
|
120
|
+
/>
|
121
|
+
</div>
|
122
|
+
</div>
|
123
|
+
</div>
|
124
|
+
<div
|
125
|
+
class="col-12 col-lg-6 o_setting_box"
|
126
|
+
title="Send automatic notification when the customer places an RMA"
|
127
|
+
>
|
128
|
+
<div class="o_setting_left_pane">
|
129
|
+
<field name="send_rma_draft_confirmation" />
|
130
|
+
</div>
|
131
|
+
<div class="o_setting_right_pane">
|
132
|
+
<label
|
133
|
+
for="send_rma_draft_confirmation"
|
134
|
+
string="RMA draft notification Email"
|
135
|
+
/>
|
136
|
+
<span
|
137
|
+
class="fa fa-lg fa-building-o"
|
138
|
+
title="Values set here are company-specific."
|
139
|
+
groups="base.group_multi_company"
|
140
|
+
/>
|
141
|
+
<div
|
142
|
+
class="text-muted"
|
143
|
+
>When customers themselves place an RMA from the portal, send an automatic notification acknowleging it.</div>
|
144
|
+
<div
|
145
|
+
class="row mt16"
|
146
|
+
invisible="not send_rma_draft_confirmation"
|
147
|
+
>
|
148
|
+
<label
|
149
|
+
for="rma_mail_draft_confirmation_template_id"
|
150
|
+
string="Email Template"
|
151
|
+
class="col-lg-4 o_light_label"
|
152
|
+
/>
|
153
|
+
<field
|
154
|
+
name="rma_mail_draft_confirmation_template_id"
|
155
|
+
class="oe_inline"
|
156
|
+
required="send_rma_draft_confirmation"
|
157
|
+
context="{'default_model': 'rma'}"
|
158
|
+
/>
|
159
|
+
</div>
|
160
|
+
</div>
|
85
161
|
</div>
|
86
|
-
|
162
|
+
</div>
|
163
|
+
</app>
|
87
164
|
</xpath>
|
88
165
|
</field>
|
89
166
|
</record>
|
167
|
+
|
168
|
+
<record id="action_rma_config_settings" model="ir.actions.act_window">
|
169
|
+
<field name="name">Settings</field>
|
170
|
+
<field name="type">ir.actions.act_window</field>
|
171
|
+
<field name="res_model">res.config.settings</field>
|
172
|
+
<field name="view_mode">form</field>
|
173
|
+
<field name="target">inline</field>
|
174
|
+
<field name="context">{'module' : 'rma', 'bin_size': False}</field>
|
175
|
+
</record>
|
176
|
+
|
177
|
+
<menuitem
|
178
|
+
id="menu_rma_general_settings"
|
179
|
+
name="Settings"
|
180
|
+
parent="rma_configuration_menu"
|
181
|
+
sequence="0"
|
182
|
+
action="action_rma_config_settings"
|
183
|
+
groups="base.group_system"
|
184
|
+
/>
|
90
185
|
</odoo>
|
@@ -9,8 +9,26 @@
|
|
9
9
|
<field name="arch" type="xml">
|
10
10
|
<search>
|
11
11
|
<field name="name" />
|
12
|
+
<field name="origin" />
|
12
13
|
<field name="user_id" />
|
14
|
+
<field name="product_id" />
|
13
15
|
<field name="tag_ids" />
|
16
|
+
<filter
|
17
|
+
string="Awaiting Action"
|
18
|
+
name="waiting_action"
|
19
|
+
domain="[('state', 'in', ['waiting_return', 'waiting_replacement', 'confirmed'])]"
|
20
|
+
/>
|
21
|
+
<filter
|
22
|
+
string="Processed"
|
23
|
+
name="processed"
|
24
|
+
domain="[('state', 'in', ['received', 'refunded', 'replaced', 'finished'])]"
|
25
|
+
/>
|
26
|
+
<filter
|
27
|
+
string="Closed"
|
28
|
+
name="closed"
|
29
|
+
domain="[('state', 'in', ['locked', 'cancelled'])]"
|
30
|
+
/>
|
31
|
+
<separator />
|
14
32
|
<filter
|
15
33
|
name="draft_filter"
|
16
34
|
string="Draft"
|
@@ -11,6 +11,20 @@ from odoo.tools import float_compare
|
|
11
11
|
class ReturnPickingLine(models.TransientModel):
|
12
12
|
_inherit = "stock.return.picking.line"
|
13
13
|
|
14
|
+
rma_operation_id = fields.Many2one(
|
15
|
+
comodel_name="rma.operation",
|
16
|
+
string="Operation",
|
17
|
+
compute="_compute_rma_operation_id",
|
18
|
+
store=True,
|
19
|
+
readonly=False,
|
20
|
+
)
|
21
|
+
|
22
|
+
@api.depends("wizard_id.rma_operation_id")
|
23
|
+
def _compute_rma_operation_id(self):
|
24
|
+
for rec in self:
|
25
|
+
if rec.wizard_id.rma_operation_id:
|
26
|
+
rec.rma_operation_id = rec.wizard_id.rma_operation_id
|
27
|
+
|
14
28
|
def _prepare_rma_vals(self):
|
15
29
|
self.ensure_one()
|
16
30
|
return {
|
@@ -19,6 +33,7 @@ class ReturnPickingLine(models.TransientModel):
|
|
19
33
|
"product_uom_qty": self.quantity,
|
20
34
|
"product_uom": self.product_id.uom_id.id,
|
21
35
|
"location_id": self.wizard_id.location_id.id or self.move_id.location_id.id,
|
36
|
+
"operation_id": self.rma_operation_id.id,
|
22
37
|
}
|
23
38
|
|
24
39
|
|
@@ -30,6 +45,10 @@ class ReturnPicking(models.TransientModel):
|
|
30
45
|
rma_location_ids = fields.Many2many(
|
31
46
|
comodel_name="stock.location", compute="_compute_rma_location_id"
|
32
47
|
)
|
48
|
+
rma_operation_id = fields.Many2one(
|
49
|
+
comodel_name="rma.operation",
|
50
|
+
string="Requested operation",
|
51
|
+
)
|
33
52
|
# Expand domain for RMAs
|
34
53
|
location_id = fields.Many2one(
|
35
54
|
domain="create_rma and [('id', 'child_of', rma_location_ids)]"
|
@@ -8,12 +8,20 @@
|
|
8
8
|
<field name="model">stock.return.picking</field>
|
9
9
|
<field name="inherit_id" ref="stock.view_stock_return_picking_form" />
|
10
10
|
<field name="arch" type="xml">
|
11
|
-
<field
|
11
|
+
<xpath expr="//field[@name='product_return_moves']//tree" position="inside">
|
12
|
+
<field
|
13
|
+
name="rma_operation_id"
|
14
|
+
required="parent.create_rma and quantity>0"
|
15
|
+
column_invisible="not parent.create_rma"
|
16
|
+
/>
|
17
|
+
</xpath>
|
18
|
+
<field name="product_return_moves" position="before">
|
12
19
|
<group name="group_rma">
|
13
20
|
<field
|
14
21
|
name="create_rma"
|
15
22
|
invisible="picking_type_code != 'outgoing'"
|
16
23
|
/>
|
24
|
+
<field name="rma_operation_id" invisible="not create_rma" />
|
17
25
|
<field name="rma_location_ids" invisible="1" />
|
18
26
|
<field name="picking_id" invisible="1" />
|
19
27
|
<field name="picking_type_code" invisible="1" />
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: odoo-addon-rma
|
3
|
-
Version: 17.0.2.0
|
3
|
+
Version: 17.0.2.2.0
|
4
4
|
Requires-Python: >=3.10
|
5
5
|
Requires-Dist: odoo>=17.0a,<17.1dev
|
6
6
|
Summary: Return Merchandise Authorization (RMA)
|
@@ -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:332aee253ea006150dd84367588b401c225d097053614131e9c2f1ff01fef4cc
|
27
27
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
28
28
|
|
29
29
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
|
@@ -195,6 +195,8 @@ Contributors
|
|
195
195
|
- Antoni Marroig <amarroig@apsl.net>
|
196
196
|
|
197
197
|
- Michael Tietz (MT Software) mtietz@mt-software.de
|
198
|
+
- Jacques-Etienne Baudoux - BCIM je@bcim.be
|
199
|
+
- Souheil Bejaoui - ACSONE SA/NV souheil.bejaoui@acsone.eu
|
198
200
|
|
199
201
|
Maintainers
|
200
202
|
-----------
|