odoo-addon-rma-delivery 16.0.1.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.
- odoo/addons/rma_delivery/README.rst +131 -0
- odoo/addons/rma_delivery/__init__.py +1 -0
- odoo/addons/rma_delivery/__manifest__.py +18 -0
- odoo/addons/rma_delivery/i18n/it.po +80 -0
- odoo/addons/rma_delivery/i18n/rma_delivery.pot +104 -0
- odoo/addons/rma_delivery/models/__init__.py +4 -0
- odoo/addons/rma_delivery/models/res_company.py +38 -0
- odoo/addons/rma_delivery/models/res_config_settings.py +25 -0
- odoo/addons/rma_delivery/models/rma.py +77 -0
- odoo/addons/rma_delivery/models/stock_move.py +18 -0
- odoo/addons/rma_delivery/readme/CONFIGURE.rst +23 -0
- odoo/addons/rma_delivery/readme/CONTRIBUTORS.rst +6 -0
- odoo/addons/rma_delivery/readme/DESCRIPTION.rst +2 -0
- odoo/addons/rma_delivery/readme/USAGE.rst +6 -0
- odoo/addons/rma_delivery/static/description/icon.png +0 -0
- odoo/addons/rma_delivery/static/description/index.html +475 -0
- odoo/addons/rma_delivery/tests/__init__.py +1 -0
- odoo/addons/rma_delivery/tests/test_rma_delivery.py +207 -0
- odoo/addons/rma_delivery/views/res_config_settings_views.xml +70 -0
- odoo/addons/rma_delivery/views/rma_views.xml +24 -0
- odoo_addon_rma_delivery-16.0.1.1.0.dist-info/METADATA +148 -0
- odoo_addon_rma_delivery-16.0.1.1.0.dist-info/RECORD +24 -0
- odoo_addon_rma_delivery-16.0.1.1.0.dist-info/WHEEL +5 -0
- odoo_addon_rma_delivery-16.0.1.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
5
|
+
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
|
6
|
+
<title>README.rst</title>
|
|
7
|
+
<style type="text/css">
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
:Author: David Goodger (goodger@python.org)
|
|
11
|
+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
|
12
|
+
:Copyright: This stylesheet has been placed in the public domain.
|
|
13
|
+
|
|
14
|
+
Default cascading style sheet for the HTML output of Docutils.
|
|
15
|
+
Despite the name, some widely supported CSS2 features are used.
|
|
16
|
+
|
|
17
|
+
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
|
18
|
+
customize this style sheet.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/* used to remove borders from tables and images */
|
|
22
|
+
.borderless, table.borderless td, table.borderless th {
|
|
23
|
+
border: 0 }
|
|
24
|
+
|
|
25
|
+
table.borderless td, table.borderless th {
|
|
26
|
+
/* Override padding for "table.docutils td" with "! important".
|
|
27
|
+
The right padding separates the table cells. */
|
|
28
|
+
padding: 0 0.5em 0 0 ! important }
|
|
29
|
+
|
|
30
|
+
.first {
|
|
31
|
+
/* Override more specific margin styles with "! important". */
|
|
32
|
+
margin-top: 0 ! important }
|
|
33
|
+
|
|
34
|
+
.last, .with-subtitle {
|
|
35
|
+
margin-bottom: 0 ! important }
|
|
36
|
+
|
|
37
|
+
.hidden {
|
|
38
|
+
display: none }
|
|
39
|
+
|
|
40
|
+
.subscript {
|
|
41
|
+
vertical-align: sub;
|
|
42
|
+
font-size: smaller }
|
|
43
|
+
|
|
44
|
+
.superscript {
|
|
45
|
+
vertical-align: super;
|
|
46
|
+
font-size: smaller }
|
|
47
|
+
|
|
48
|
+
a.toc-backref {
|
|
49
|
+
text-decoration: none ;
|
|
50
|
+
color: black }
|
|
51
|
+
|
|
52
|
+
blockquote.epigraph {
|
|
53
|
+
margin: 2em 5em ; }
|
|
54
|
+
|
|
55
|
+
dl.docutils dd {
|
|
56
|
+
margin-bottom: 0.5em }
|
|
57
|
+
|
|
58
|
+
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
|
63
|
+
dl.docutils dt {
|
|
64
|
+
font-weight: bold }
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
div.abstract {
|
|
68
|
+
margin: 2em 5em }
|
|
69
|
+
|
|
70
|
+
div.abstract p.topic-title {
|
|
71
|
+
font-weight: bold ;
|
|
72
|
+
text-align: center }
|
|
73
|
+
|
|
74
|
+
div.admonition, div.attention, div.caution, div.danger, div.error,
|
|
75
|
+
div.hint, div.important, div.note, div.tip, div.warning {
|
|
76
|
+
margin: 2em ;
|
|
77
|
+
border: medium outset ;
|
|
78
|
+
padding: 1em }
|
|
79
|
+
|
|
80
|
+
div.admonition p.admonition-title, div.hint p.admonition-title,
|
|
81
|
+
div.important p.admonition-title, div.note p.admonition-title,
|
|
82
|
+
div.tip p.admonition-title {
|
|
83
|
+
font-weight: bold ;
|
|
84
|
+
font-family: sans-serif }
|
|
85
|
+
|
|
86
|
+
div.attention p.admonition-title, div.caution p.admonition-title,
|
|
87
|
+
div.danger p.admonition-title, div.error p.admonition-title,
|
|
88
|
+
div.warning p.admonition-title, .code .error {
|
|
89
|
+
color: red ;
|
|
90
|
+
font-weight: bold ;
|
|
91
|
+
font-family: sans-serif }
|
|
92
|
+
|
|
93
|
+
/* Uncomment (and remove this text!) to get reduced vertical space in
|
|
94
|
+
compound paragraphs.
|
|
95
|
+
div.compound .compound-first, div.compound .compound-middle {
|
|
96
|
+
margin-bottom: 0.5em }
|
|
97
|
+
|
|
98
|
+
div.compound .compound-last, div.compound .compound-middle {
|
|
99
|
+
margin-top: 0.5em }
|
|
100
|
+
*/
|
|
101
|
+
|
|
102
|
+
div.dedication {
|
|
103
|
+
margin: 2em 5em ;
|
|
104
|
+
text-align: center ;
|
|
105
|
+
font-style: italic }
|
|
106
|
+
|
|
107
|
+
div.dedication p.topic-title {
|
|
108
|
+
font-weight: bold ;
|
|
109
|
+
font-style: normal }
|
|
110
|
+
|
|
111
|
+
div.figure {
|
|
112
|
+
margin-left: 2em ;
|
|
113
|
+
margin-right: 2em }
|
|
114
|
+
|
|
115
|
+
div.footer, div.header {
|
|
116
|
+
clear: both;
|
|
117
|
+
font-size: smaller }
|
|
118
|
+
|
|
119
|
+
div.line-block {
|
|
120
|
+
display: block ;
|
|
121
|
+
margin-top: 1em ;
|
|
122
|
+
margin-bottom: 1em }
|
|
123
|
+
|
|
124
|
+
div.line-block div.line-block {
|
|
125
|
+
margin-top: 0 ;
|
|
126
|
+
margin-bottom: 0 ;
|
|
127
|
+
margin-left: 1.5em }
|
|
128
|
+
|
|
129
|
+
div.sidebar {
|
|
130
|
+
margin: 0 0 0.5em 1em ;
|
|
131
|
+
border: medium outset ;
|
|
132
|
+
padding: 1em ;
|
|
133
|
+
background-color: #ffffee ;
|
|
134
|
+
width: 40% ;
|
|
135
|
+
float: right ;
|
|
136
|
+
clear: right }
|
|
137
|
+
|
|
138
|
+
div.sidebar p.rubric {
|
|
139
|
+
font-family: sans-serif ;
|
|
140
|
+
font-size: medium }
|
|
141
|
+
|
|
142
|
+
div.system-messages {
|
|
143
|
+
margin: 5em }
|
|
144
|
+
|
|
145
|
+
div.system-messages h1 {
|
|
146
|
+
color: red }
|
|
147
|
+
|
|
148
|
+
div.system-message {
|
|
149
|
+
border: medium outset ;
|
|
150
|
+
padding: 1em }
|
|
151
|
+
|
|
152
|
+
div.system-message p.system-message-title {
|
|
153
|
+
color: red ;
|
|
154
|
+
font-weight: bold }
|
|
155
|
+
|
|
156
|
+
div.topic {
|
|
157
|
+
margin: 2em }
|
|
158
|
+
|
|
159
|
+
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
|
160
|
+
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
|
161
|
+
margin-top: 0.4em }
|
|
162
|
+
|
|
163
|
+
h1.title {
|
|
164
|
+
text-align: center }
|
|
165
|
+
|
|
166
|
+
h2.subtitle {
|
|
167
|
+
text-align: center }
|
|
168
|
+
|
|
169
|
+
hr.docutils {
|
|
170
|
+
width: 75% }
|
|
171
|
+
|
|
172
|
+
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
|
173
|
+
clear: left ;
|
|
174
|
+
float: left ;
|
|
175
|
+
margin-right: 1em }
|
|
176
|
+
|
|
177
|
+
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
|
178
|
+
clear: right ;
|
|
179
|
+
float: right ;
|
|
180
|
+
margin-left: 1em }
|
|
181
|
+
|
|
182
|
+
img.align-center, .figure.align-center, object.align-center {
|
|
183
|
+
display: block;
|
|
184
|
+
margin-left: auto;
|
|
185
|
+
margin-right: auto;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
table.align-center {
|
|
189
|
+
margin-left: auto;
|
|
190
|
+
margin-right: auto;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.align-left {
|
|
194
|
+
text-align: left }
|
|
195
|
+
|
|
196
|
+
.align-center {
|
|
197
|
+
clear: both ;
|
|
198
|
+
text-align: center }
|
|
199
|
+
|
|
200
|
+
.align-right {
|
|
201
|
+
text-align: right }
|
|
202
|
+
|
|
203
|
+
/* reset inner alignment in figures */
|
|
204
|
+
div.align-right {
|
|
205
|
+
text-align: inherit }
|
|
206
|
+
|
|
207
|
+
/* div.align-center * { */
|
|
208
|
+
/* text-align: left } */
|
|
209
|
+
|
|
210
|
+
.align-top {
|
|
211
|
+
vertical-align: top }
|
|
212
|
+
|
|
213
|
+
.align-middle {
|
|
214
|
+
vertical-align: middle }
|
|
215
|
+
|
|
216
|
+
.align-bottom {
|
|
217
|
+
vertical-align: bottom }
|
|
218
|
+
|
|
219
|
+
ol.simple, ul.simple {
|
|
220
|
+
margin-bottom: 1em }
|
|
221
|
+
|
|
222
|
+
ol.arabic {
|
|
223
|
+
list-style: decimal }
|
|
224
|
+
|
|
225
|
+
ol.loweralpha {
|
|
226
|
+
list-style: lower-alpha }
|
|
227
|
+
|
|
228
|
+
ol.upperalpha {
|
|
229
|
+
list-style: upper-alpha }
|
|
230
|
+
|
|
231
|
+
ol.lowerroman {
|
|
232
|
+
list-style: lower-roman }
|
|
233
|
+
|
|
234
|
+
ol.upperroman {
|
|
235
|
+
list-style: upper-roman }
|
|
236
|
+
|
|
237
|
+
p.attribution {
|
|
238
|
+
text-align: right ;
|
|
239
|
+
margin-left: 50% }
|
|
240
|
+
|
|
241
|
+
p.caption {
|
|
242
|
+
font-style: italic }
|
|
243
|
+
|
|
244
|
+
p.credits {
|
|
245
|
+
font-style: italic ;
|
|
246
|
+
font-size: smaller }
|
|
247
|
+
|
|
248
|
+
p.label {
|
|
249
|
+
white-space: nowrap }
|
|
250
|
+
|
|
251
|
+
p.rubric {
|
|
252
|
+
font-weight: bold ;
|
|
253
|
+
font-size: larger ;
|
|
254
|
+
color: maroon ;
|
|
255
|
+
text-align: center }
|
|
256
|
+
|
|
257
|
+
p.sidebar-title {
|
|
258
|
+
font-family: sans-serif ;
|
|
259
|
+
font-weight: bold ;
|
|
260
|
+
font-size: larger }
|
|
261
|
+
|
|
262
|
+
p.sidebar-subtitle {
|
|
263
|
+
font-family: sans-serif ;
|
|
264
|
+
font-weight: bold }
|
|
265
|
+
|
|
266
|
+
p.topic-title {
|
|
267
|
+
font-weight: bold }
|
|
268
|
+
|
|
269
|
+
pre.address {
|
|
270
|
+
margin-bottom: 0 ;
|
|
271
|
+
margin-top: 0 ;
|
|
272
|
+
font: inherit }
|
|
273
|
+
|
|
274
|
+
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
|
275
|
+
margin-left: 2em ;
|
|
276
|
+
margin-right: 2em }
|
|
277
|
+
|
|
278
|
+
pre.code .ln { color: gray; } /* line numbers */
|
|
279
|
+
pre.code, code { background-color: #eeeeee }
|
|
280
|
+
pre.code .comment, code .comment { color: #5C6576 }
|
|
281
|
+
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
|
282
|
+
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
|
283
|
+
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
|
284
|
+
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
|
285
|
+
pre.code .inserted, code .inserted { background-color: #A3D289}
|
|
286
|
+
|
|
287
|
+
span.classifier {
|
|
288
|
+
font-family: sans-serif ;
|
|
289
|
+
font-style: oblique }
|
|
290
|
+
|
|
291
|
+
span.classifier-delimiter {
|
|
292
|
+
font-family: sans-serif ;
|
|
293
|
+
font-weight: bold }
|
|
294
|
+
|
|
295
|
+
span.interpreted {
|
|
296
|
+
font-family: sans-serif }
|
|
297
|
+
|
|
298
|
+
span.option {
|
|
299
|
+
white-space: nowrap }
|
|
300
|
+
|
|
301
|
+
span.pre {
|
|
302
|
+
white-space: pre }
|
|
303
|
+
|
|
304
|
+
span.problematic, pre.problematic {
|
|
305
|
+
color: red }
|
|
306
|
+
|
|
307
|
+
span.section-subtitle {
|
|
308
|
+
/* font-size relative to parent (h1..h6 element) */
|
|
309
|
+
font-size: 80% }
|
|
310
|
+
|
|
311
|
+
table.citation {
|
|
312
|
+
border-left: solid 1px gray;
|
|
313
|
+
margin-left: 1px }
|
|
314
|
+
|
|
315
|
+
table.docinfo {
|
|
316
|
+
margin: 2em 4em }
|
|
317
|
+
|
|
318
|
+
table.docutils {
|
|
319
|
+
margin-top: 0.5em ;
|
|
320
|
+
margin-bottom: 0.5em }
|
|
321
|
+
|
|
322
|
+
table.footnote {
|
|
323
|
+
border-left: solid 1px black;
|
|
324
|
+
margin-left: 1px }
|
|
325
|
+
|
|
326
|
+
table.docutils td, table.docutils th,
|
|
327
|
+
table.docinfo td, table.docinfo th {
|
|
328
|
+
padding-left: 0.5em ;
|
|
329
|
+
padding-right: 0.5em ;
|
|
330
|
+
vertical-align: top }
|
|
331
|
+
|
|
332
|
+
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
|
333
|
+
font-weight: bold ;
|
|
334
|
+
text-align: left ;
|
|
335
|
+
white-space: nowrap ;
|
|
336
|
+
padding-left: 0 }
|
|
337
|
+
|
|
338
|
+
/* "booktabs" style (no vertical lines) */
|
|
339
|
+
table.docutils.booktabs {
|
|
340
|
+
border: 0px;
|
|
341
|
+
border-top: 2px solid;
|
|
342
|
+
border-bottom: 2px solid;
|
|
343
|
+
border-collapse: collapse;
|
|
344
|
+
}
|
|
345
|
+
table.docutils.booktabs * {
|
|
346
|
+
border: 0px;
|
|
347
|
+
}
|
|
348
|
+
table.docutils.booktabs th {
|
|
349
|
+
border-bottom: thin solid;
|
|
350
|
+
text-align: left;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
|
354
|
+
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
|
355
|
+
font-size: 100% }
|
|
356
|
+
|
|
357
|
+
ul.auto-toc {
|
|
358
|
+
list-style-type: none }
|
|
359
|
+
|
|
360
|
+
</style>
|
|
361
|
+
</head>
|
|
362
|
+
<body>
|
|
363
|
+
<div class="document">
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
|
|
367
|
+
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
|
|
368
|
+
</a>
|
|
369
|
+
<div class="section" id="return-merchandise-authorization-management-link-with-deliveries">
|
|
370
|
+
<h1>Return Merchandise Authorization Management - Link with deliveries</h1>
|
|
371
|
+
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
372
|
+
!! This file is generated by oca-gen-addon-readme !!
|
|
373
|
+
!! changes will be overwritten. !!
|
|
374
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
375
|
+
!! source digest: sha256:b65c1ac22988a89751a755b8cb8846b1cbee481f38a58a909bdafc450e40b72e
|
|
376
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
377
|
+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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_delivery"><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_delivery"><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>
|
|
378
|
+
<p>This module extends the functionality of the RMA module to allow to choose a default
|
|
379
|
+
behavior for the shipping method used on the RMA receipt/returns to the customer.</p>
|
|
380
|
+
<p><strong>Table of contents</strong></p>
|
|
381
|
+
<div class="contents local topic" id="contents">
|
|
382
|
+
<ul class="simple">
|
|
383
|
+
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
|
|
384
|
+
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
|
|
385
|
+
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
|
|
386
|
+
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
|
|
387
|
+
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
|
|
388
|
+
<li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
|
|
389
|
+
<li><a class="reference internal" href="#maintainers" id="toc-entry-7">Maintainers</a></li>
|
|
390
|
+
</ul>
|
|
391
|
+
</li>
|
|
392
|
+
</ul>
|
|
393
|
+
</div>
|
|
394
|
+
<div class="section" id="configuration">
|
|
395
|
+
<h2><a class="toc-backref" href="#toc-entry-1">Configuration</a></h2>
|
|
396
|
+
<p>To configure RMAs shipping strategy for your company:</p>
|
|
397
|
+
<ol class="arabic simple">
|
|
398
|
+
<li>Go to <em>Inventory > Configuration > Settings</em></li>
|
|
399
|
+
<li>Choose an <em>RMA delivery method strategy</em>.</li>
|
|
400
|
+
<li>There are 4 possibilities:<ul>
|
|
401
|
+
<li>Fixed method: the method will always be the same. Select it on the field <em>Default RMA delivery method</em>
|
|
402
|
+
(or leave it empty for no delivery method at all).</li>
|
|
403
|
+
<li>Customer method: the method will be the one configured on the partner.</li>
|
|
404
|
+
<li>Mixed method: the method will be the one configured on the partner, otherwise
|
|
405
|
+
the fixed one will be chosen.</li>
|
|
406
|
+
<li>RMA method: the method will be configured in each RMA.</li>
|
|
407
|
+
</ul>
|
|
408
|
+
</li>
|
|
409
|
+
<li>Choose an <em>RMA reception method strategy</em>.</li>
|
|
410
|
+
<li>There are 4 possibilities:<ul>
|
|
411
|
+
<li>Fixed method: the method will always be the same. Select it on the field <em>Default RMA delivery method</em>
|
|
412
|
+
(or leave it empty for no delivery method at all).</li>
|
|
413
|
+
<li>Customer method: the method will be the one configured on the partner.</li>
|
|
414
|
+
<li>Mixed method: the method will be the one configured on the partner, otherwise
|
|
415
|
+
the fixed one will be chosen.</li>
|
|
416
|
+
</ul>
|
|
417
|
+
</li>
|
|
418
|
+
</ol>
|
|
419
|
+
</div>
|
|
420
|
+
<div class="section" id="usage">
|
|
421
|
+
<h2><a class="toc-backref" href="#toc-entry-2">Usage</a></h2>
|
|
422
|
+
<p>To use this module, you need to:</p>
|
|
423
|
+
<ol class="arabic simple">
|
|
424
|
+
<li>Go to a RMA which has received quantities.</li>
|
|
425
|
+
<li>Return it to the customer.</li>
|
|
426
|
+
<li>Depending on your company configuration, the return picking will get one or another
|
|
427
|
+
carrier.</li>
|
|
428
|
+
</ol>
|
|
429
|
+
</div>
|
|
430
|
+
<div class="section" id="bug-tracker">
|
|
431
|
+
<h2><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h2>
|
|
432
|
+
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/rma/issues">GitHub Issues</a>.
|
|
433
|
+
In case of trouble, please check there if your issue has already been reported.
|
|
434
|
+
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
435
|
+
<a class="reference external" href="https://github.com/OCA/rma/issues/new?body=module:%20rma_delivery%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
|
436
|
+
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
|
437
|
+
</div>
|
|
438
|
+
<div class="section" id="credits">
|
|
439
|
+
<h2><a class="toc-backref" href="#toc-entry-4">Credits</a></h2>
|
|
440
|
+
<div class="section" id="authors">
|
|
441
|
+
<h3><a class="toc-backref" href="#toc-entry-5">Authors</a></h3>
|
|
442
|
+
<ul class="simple">
|
|
443
|
+
<li>Tecnativa</li>
|
|
444
|
+
</ul>
|
|
445
|
+
</div>
|
|
446
|
+
<div class="section" id="contributors">
|
|
447
|
+
<h3><a class="toc-backref" href="#toc-entry-6">Contributors</a></h3>
|
|
448
|
+
<ul class="simple">
|
|
449
|
+
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
|
|
450
|
+
<li>David Vidal</li>
|
|
451
|
+
<li>Víctor Martínez</li>
|
|
452
|
+
</ul>
|
|
453
|
+
</li>
|
|
454
|
+
<li>Souheil Bejaoui - ACSONE SA/NV <<a class="reference external" href="mailto:souheil.bejaoui@acsone.eu">souheil.bejaoui@acsone.eu</a>></li>
|
|
455
|
+
</ul>
|
|
456
|
+
</div>
|
|
457
|
+
<div class="section" id="maintainers">
|
|
458
|
+
<h3><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h3>
|
|
459
|
+
<p>This module is maintained by the OCA.</p>
|
|
460
|
+
<a class="reference external image-reference" href="https://odoo-community.org">
|
|
461
|
+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
|
462
|
+
</a>
|
|
463
|
+
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
464
|
+
mission is to support the collaborative development of Odoo features and
|
|
465
|
+
promote its widespread use.</p>
|
|
466
|
+
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
|
|
467
|
+
<p><a class="reference external image-reference" href="https://github.com/chienandalu"><img alt="chienandalu" src="https://github.com/chienandalu.png?size=40px" /></a></p>
|
|
468
|
+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/rma/tree/16.0/rma_delivery">OCA/rma</a> project on GitHub.</p>
|
|
469
|
+
<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>
|
|
470
|
+
</div>
|
|
471
|
+
</div>
|
|
472
|
+
</div>
|
|
473
|
+
</div>
|
|
474
|
+
</body>
|
|
475
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from . import test_rma_delivery
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# Copyright 2022 Tecnativa - David Vidal
|
|
2
|
+
# Copyright 2026 Tecnativa - Víctor Martínez
|
|
3
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
4
|
+
from odoo.tests import Form
|
|
5
|
+
|
|
6
|
+
from odoo.addons.rma.tests.test_rma import TestRma
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class TestRmaDeliveryBase(TestRma):
|
|
10
|
+
@classmethod
|
|
11
|
+
def setUpClass(cls):
|
|
12
|
+
super().setUpClass()
|
|
13
|
+
cls.carrier_product = cls.product_product.create(
|
|
14
|
+
{"name": "Delivery product test 1", "type": "service"}
|
|
15
|
+
)
|
|
16
|
+
cls.replace_product = cls.product_product.create(
|
|
17
|
+
{"name": "Replace product test 1", "type": "product"}
|
|
18
|
+
)
|
|
19
|
+
cls.carrier = cls.env["delivery.carrier"].create(
|
|
20
|
+
{
|
|
21
|
+
"name": "Test Fixed delivery method",
|
|
22
|
+
"product_id": cls.carrier_product.id,
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
cls.carrier_customer = cls.env["delivery.carrier"].create(
|
|
26
|
+
{
|
|
27
|
+
"name": "Test Customer delivery method",
|
|
28
|
+
"product_id": cls.carrier_product.id,
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
cls.partner.property_delivery_carrier_id = cls.carrier_customer
|
|
32
|
+
cls.partner_shipping.property_delivery_carrier_id = False
|
|
33
|
+
cls.company.rma_fixed_delivery_method = cls.carrier
|
|
34
|
+
cls.company.rma_fixed_reception_strategy = cls.carrier
|
|
35
|
+
|
|
36
|
+
def _return_to_customer(self, rma, delivery_type="return"):
|
|
37
|
+
"""Helper to return the rma"""
|
|
38
|
+
delivery_form = Form(
|
|
39
|
+
self.env["rma.delivery.wizard"].with_context(
|
|
40
|
+
active_ids=rma.ids,
|
|
41
|
+
rma_delivery_type=delivery_type,
|
|
42
|
+
)
|
|
43
|
+
)
|
|
44
|
+
if delivery_type == "replace":
|
|
45
|
+
delivery_form.product_id = self.replace_product
|
|
46
|
+
delivery_form.product_uom_qty = 1
|
|
47
|
+
delivery_wizard = delivery_form.save()
|
|
48
|
+
delivery_wizard.action_deliver()
|
|
49
|
+
return rma.delivery_move_ids.picking_id
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class TestRmaDelivery(TestRmaDeliveryBase):
|
|
53
|
+
def test_01_fixed_method(self):
|
|
54
|
+
"""Fixed method. RMA gets the company default carrier"""
|
|
55
|
+
# Return picking
|
|
56
|
+
rma = self._create_confirm_receive(
|
|
57
|
+
self.partner_shipping, self.product, 1, self.rma_loc
|
|
58
|
+
)
|
|
59
|
+
self.company.rma_delivery_strategy = "fixed_method"
|
|
60
|
+
picking = self._return_to_customer(rma)
|
|
61
|
+
self.assertEqual(
|
|
62
|
+
picking.carrier_id,
|
|
63
|
+
self.carrier,
|
|
64
|
+
"The carrier isn't the one set in the company as default",
|
|
65
|
+
)
|
|
66
|
+
# Replace picking
|
|
67
|
+
rma = self._create_confirm_receive(
|
|
68
|
+
self.partner_shipping, self.product, 1, self.rma_loc
|
|
69
|
+
)
|
|
70
|
+
picking = self._return_to_customer(rma, "replace")
|
|
71
|
+
self.assertEqual(
|
|
72
|
+
picking.carrier_id,
|
|
73
|
+
self.carrier,
|
|
74
|
+
"The carrier isn't the one set in the company as default",
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
def test_02_customer_method(self):
|
|
78
|
+
"""Customer method. RMA gets the carrier from the contact"""
|
|
79
|
+
# Return picking
|
|
80
|
+
rma = self._create_confirm_receive(
|
|
81
|
+
self.partner_shipping, self.product, 1, self.rma_loc
|
|
82
|
+
)
|
|
83
|
+
self.company.rma_delivery_strategy = "customer_method"
|
|
84
|
+
picking = self._return_to_customer(rma)
|
|
85
|
+
self.assertEqual(
|
|
86
|
+
picking.carrier_id,
|
|
87
|
+
self.carrier_customer,
|
|
88
|
+
"The carrier isn't the same one as in the commercial partner",
|
|
89
|
+
)
|
|
90
|
+
carrier_2 = self.env["delivery.carrier"].create(
|
|
91
|
+
{"name": "Test delivery method", "product_id": self.carrier_product.id}
|
|
92
|
+
)
|
|
93
|
+
self.partner_shipping.property_delivery_carrier_id = carrier_2
|
|
94
|
+
rma = self._create_confirm_receive(
|
|
95
|
+
self.partner_shipping, self.product, 1, self.rma_loc
|
|
96
|
+
)
|
|
97
|
+
picking = self._return_to_customer(rma)
|
|
98
|
+
self.assertEqual(
|
|
99
|
+
picking.carrier_id,
|
|
100
|
+
carrier_2,
|
|
101
|
+
"The carrier isn't the same one as in the picking partner",
|
|
102
|
+
)
|
|
103
|
+
# Replace picking
|
|
104
|
+
rma = self._create_confirm_receive(
|
|
105
|
+
self.partner_shipping, self.product, 1, self.rma_loc
|
|
106
|
+
)
|
|
107
|
+
picking = self._return_to_customer(rma, "replace")
|
|
108
|
+
self.assertEqual(
|
|
109
|
+
picking.carrier_id,
|
|
110
|
+
carrier_2,
|
|
111
|
+
"The carrier isn't the same one as in the picking partner",
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
def test_03_mixed_method(self):
|
|
115
|
+
"""Mixed method. RMA gets the carrier from the contact otherwise the company
|
|
116
|
+
default one"""
|
|
117
|
+
# Return picking
|
|
118
|
+
rma = self._create_confirm_receive(
|
|
119
|
+
self.partner_shipping, self.product, 1, self.rma_loc
|
|
120
|
+
)
|
|
121
|
+
self.company.rma_delivery_strategy = "mixed_method"
|
|
122
|
+
picking = self._return_to_customer(rma)
|
|
123
|
+
self.assertEqual(
|
|
124
|
+
picking.carrier_id,
|
|
125
|
+
self.carrier_customer,
|
|
126
|
+
"The carrier isn't the same one as in the commercial partner",
|
|
127
|
+
)
|
|
128
|
+
self.partner.property_delivery_carrier_id = False
|
|
129
|
+
rma = self._create_confirm_receive(
|
|
130
|
+
self.partner_shipping, self.product, 1, self.rma_loc
|
|
131
|
+
)
|
|
132
|
+
picking = self._return_to_customer(rma)
|
|
133
|
+
self.assertEqual(
|
|
134
|
+
picking.carrier_id,
|
|
135
|
+
self.carrier,
|
|
136
|
+
"The carrier isn't the one set in the company as default",
|
|
137
|
+
)
|
|
138
|
+
# Replace picking
|
|
139
|
+
rma = self._create_confirm_receive(
|
|
140
|
+
self.partner_shipping, self.product, 1, self.rma_loc
|
|
141
|
+
)
|
|
142
|
+
picking = self._return_to_customer(rma, "replace")
|
|
143
|
+
self.assertEqual(
|
|
144
|
+
picking.carrier_id,
|
|
145
|
+
self.carrier,
|
|
146
|
+
"The carrier isn't the one set in the company as default",
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
def test_04_rma_method(self):
|
|
150
|
+
self.company.rma_delivery_strategy = "rma_method"
|
|
151
|
+
rma = self._create_confirm_receive(
|
|
152
|
+
self.partner_shipping, self.product, 1, self.rma_loc
|
|
153
|
+
)
|
|
154
|
+
rma.carrier_id = self.carrier
|
|
155
|
+
picking = self._return_to_customer(rma)
|
|
156
|
+
self.assertEqual(picking.carrier_id, self.carrier)
|
|
157
|
+
# Replace picking
|
|
158
|
+
rma = self._create_confirm_receive(
|
|
159
|
+
self.partner_shipping, self.product, 1, self.rma_loc
|
|
160
|
+
)
|
|
161
|
+
rma.carrier_id = self.carrier
|
|
162
|
+
picking = self._return_to_customer(rma, "replace")
|
|
163
|
+
self.assertEqual(picking.carrier_id, self.carrier)
|
|
164
|
+
|
|
165
|
+
def test_reception_01_fixed_method(self):
|
|
166
|
+
self.company.rma_reception_strategy = "fixed_method"
|
|
167
|
+
rma = self._create_rma(self.partner_shipping, self.product, 1, self.rma_loc)
|
|
168
|
+
rma.action_confirm()
|
|
169
|
+
self.assertEqual(rma.reception_move_id.picking_id.carrier_id, self.carrier)
|
|
170
|
+
|
|
171
|
+
def test_reception_02_customer_method(self):
|
|
172
|
+
self.company.rma_reception_strategy = "customer_method"
|
|
173
|
+
rma = self._create_rma(self.partner_shipping, self.product, 1, self.rma_loc)
|
|
174
|
+
rma.action_confirm()
|
|
175
|
+
self.assertEqual(
|
|
176
|
+
rma.reception_move_id.picking_id.carrier_id,
|
|
177
|
+
self.carrier_customer,
|
|
178
|
+
)
|
|
179
|
+
carrier_2 = self.env["delivery.carrier"].create(
|
|
180
|
+
{"name": "Test delivery method", "product_id": self.carrier_product.id}
|
|
181
|
+
)
|
|
182
|
+
self.partner_shipping.property_delivery_carrier_id = carrier_2
|
|
183
|
+
rma2 = self._create_rma(self.partner_shipping, self.product, 1, self.rma_loc)
|
|
184
|
+
rma2.action_confirm()
|
|
185
|
+
self.assertEqual(
|
|
186
|
+
rma2.reception_move_id.picking_id.carrier_id,
|
|
187
|
+
carrier_2,
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
def test_reception_03_mixed_method(self):
|
|
191
|
+
self.company.rma_reception_strategy = "mixed_method"
|
|
192
|
+
rma = self._create_rma(self.partner_shipping, self.product, 1, self.rma_loc)
|
|
193
|
+
rma.action_confirm()
|
|
194
|
+
self.assertEqual(
|
|
195
|
+
rma.reception_move_id.picking_id.carrier_id, self.carrier_customer
|
|
196
|
+
)
|
|
197
|
+
self.partner.property_delivery_carrier_id = False
|
|
198
|
+
rma2 = self._create_rma(self.partner_shipping, self.product, 1, self.rma_loc)
|
|
199
|
+
rma2.action_confirm()
|
|
200
|
+
self.assertEqual(rma2.reception_move_id.picking_id.carrier_id, self.carrier)
|
|
201
|
+
|
|
202
|
+
def test_reception_04_rma_method(self):
|
|
203
|
+
self.company.rma_reception_strategy = "rma_method"
|
|
204
|
+
rma = self._create_rma(self.partner_shipping, self.product, 1, self.rma_loc)
|
|
205
|
+
rma.reception_carrier_id = self.carrier
|
|
206
|
+
rma.action_confirm()
|
|
207
|
+
self.assertEqual(rma.reception_move_id.picking_id.carrier_id, self.carrier)
|