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.
@@ -0,0 +1,131 @@
1
+ .. image:: https://odoo-community.org/readme-banner-image
2
+ :target: https://odoo-community.org/get-involved?utm_source=readme
3
+ :alt: Odoo Community Association
4
+
5
+ ==================================================================
6
+ Return Merchandise Authorization Management - Link with deliveries
7
+ ==================================================================
8
+
9
+ ..
10
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11
+ !! This file is generated by oca-gen-addon-readme !!
12
+ !! changes will be overwritten. !!
13
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14
+ !! source digest: sha256:b65c1ac22988a89751a755b8cb8846b1cbee481f38a58a909bdafc450e40b72e
15
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
+
17
+ .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
18
+ :target: https://odoo-community.org/page/development-status
19
+ :alt: Beta
20
+ .. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
21
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
22
+ :alt: License: AGPL-3
23
+ .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Frma-lightgray.png?logo=github
24
+ :target: https://github.com/OCA/rma/tree/16.0/rma_delivery
25
+ :alt: OCA/rma
26
+ .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27
+ :target: https://translation.odoo-community.org/projects/rma-16-0/rma-16-0-rma_delivery
28
+ :alt: Translate me on Weblate
29
+ .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/rma&target_branch=16.0
31
+ :alt: Try me on Runboat
32
+
33
+ |badge1| |badge2| |badge3| |badge4| |badge5|
34
+
35
+ This module extends the functionality of the RMA module to allow to choose a default
36
+ behavior for the shipping method used on the RMA receipt/returns to the customer.
37
+
38
+ **Table of contents**
39
+
40
+ .. contents::
41
+ :local:
42
+
43
+ Configuration
44
+ =============
45
+
46
+ To configure RMAs shipping strategy for your company:
47
+
48
+ #. Go to *Inventory > Configuration > Settings*
49
+ #. Choose an *RMA delivery method strategy*.
50
+ #. There are 4 possibilities:
51
+
52
+ - Fixed method: the method will always be the same. Select it on the field *Default RMA delivery method*
53
+ (or leave it empty for no delivery method at all).
54
+ - Customer method: the method will be the one configured on the partner.
55
+ - Mixed method: the method will be the one configured on the partner, otherwise
56
+ the fixed one will be chosen.
57
+ - RMA method: the method will be configured in each RMA.
58
+
59
+
60
+ #. Choose an *RMA reception method strategy*.
61
+ #. There are 4 possibilities:
62
+
63
+ - Fixed method: the method will always be the same. Select it on the field *Default RMA delivery method*
64
+ (or leave it empty for no delivery method at all).
65
+ - Customer method: the method will be the one configured on the partner.
66
+ - Mixed method: the method will be the one configured on the partner, otherwise
67
+ the fixed one will be chosen.
68
+
69
+
70
+ Usage
71
+ =====
72
+
73
+ To use this module, you need to:
74
+
75
+ #. Go to a RMA which has received quantities.
76
+ #. Return it to the customer.
77
+ #. Depending on your company configuration, the return picking will get one or another
78
+ carrier.
79
+
80
+ Bug Tracker
81
+ ===========
82
+
83
+ Bugs are tracked on `GitHub Issues <https://github.com/OCA/rma/issues>`_.
84
+ In case of trouble, please check there if your issue has already been reported.
85
+ If you spotted it first, help us to smash it by providing a detailed and welcomed
86
+ `feedback <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**>`_.
87
+
88
+ Do not contact contributors directly about support or help with technical issues.
89
+
90
+ Credits
91
+ =======
92
+
93
+ Authors
94
+ ~~~~~~~
95
+
96
+ * Tecnativa
97
+
98
+ Contributors
99
+ ~~~~~~~~~~~~
100
+
101
+ * `Tecnativa <https://www.tecnativa.com>`_:
102
+
103
+ * David Vidal
104
+ * Víctor Martínez
105
+
106
+ * Souheil Bejaoui - ACSONE SA/NV <souheil.bejaoui@acsone.eu>
107
+
108
+ Maintainers
109
+ ~~~~~~~~~~~
110
+
111
+ This module is maintained by the OCA.
112
+
113
+ .. image:: https://odoo-community.org/logo.png
114
+ :alt: Odoo Community Association
115
+ :target: https://odoo-community.org
116
+
117
+ OCA, or the Odoo Community Association, is a nonprofit organization whose
118
+ mission is to support the collaborative development of Odoo features and
119
+ promote its widespread use.
120
+
121
+ .. |maintainer-chienandalu| image:: https://github.com/chienandalu.png?size=40px
122
+ :target: https://github.com/chienandalu
123
+ :alt: chienandalu
124
+
125
+ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
126
+
127
+ |maintainer-chienandalu|
128
+
129
+ This module is part of the `OCA/rma <https://github.com/OCA/rma/tree/16.0/rma_delivery>`_ project on GitHub.
130
+
131
+ You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
@@ -0,0 +1 @@
1
+ from . import models
@@ -0,0 +1,18 @@
1
+ # Copyright 2022 Tecnativa - David Vidal
2
+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3
+ {
4
+ "name": "Return Merchandise Authorization Management - Link with deliveries",
5
+ "summary": "Allow to choose a default delivery carrier for returns",
6
+ "version": "16.0.1.1.0",
7
+ "development_status": "Beta",
8
+ "category": "RMA",
9
+ "website": "https://github.com/OCA/rma",
10
+ "author": "Tecnativa, Odoo Community Association (OCA)",
11
+ "maintainers": ["chienandalu"],
12
+ "license": "AGPL-3",
13
+ "depends": ["rma", "delivery"],
14
+ "data": [
15
+ "views/res_config_settings_views.xml",
16
+ "views/rma_views.xml",
17
+ ],
18
+ }
@@ -0,0 +1,80 @@
1
+ # Translation of Odoo Server.
2
+ # This file contains the translation of the following modules:
3
+ # * rma_delivery
4
+ #
5
+ msgid ""
6
+ msgstr ""
7
+ "Project-Id-Version: Odoo Server 16.0\n"
8
+ "Report-Msgid-Bugs-To: \n"
9
+ "PO-Revision-Date: 2025-06-04 09:26+0000\n"
10
+ "Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
11
+ "Language-Team: none\n"
12
+ "Language: it\n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=UTF-8\n"
15
+ "Content-Transfer-Encoding: \n"
16
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
17
+ "X-Generator: Weblate 5.10.4\n"
18
+
19
+ #. module: rma_delivery
20
+ #: model:ir.model.fields,field_description:rma_delivery.field_rma__carrier_id
21
+ msgid "Carrier"
22
+ msgstr ""
23
+
24
+ #. module: rma_delivery
25
+ #: model:ir.model,name:rma_delivery.model_res_company
26
+ msgid "Companies"
27
+ msgstr "Aziende"
28
+
29
+ #. module: rma_delivery
30
+ #: model:ir.model,name:rma_delivery.model_res_config_settings
31
+ msgid "Config Settings"
32
+ msgstr "Impostazioni configurazione"
33
+
34
+ #. module: rma_delivery
35
+ #: model:ir.model.fields.selection,name:rma_delivery.selection__res_company__rma_delivery_strategy__customer_method
36
+ msgid "Customer method"
37
+ msgstr "Metodo cliente"
38
+
39
+ #. module: rma_delivery
40
+ #: model:ir.model.fields.selection,name:rma_delivery.selection__res_company__rma_delivery_strategy__mixed_method
41
+ msgid "Customer method (fallback to fixed)"
42
+ msgstr "Metodo cliente (fallback da sistemare)"
43
+
44
+ #. module: rma_delivery
45
+ #: model:ir.model.fields,field_description:rma_delivery.field_res_company__rma_fixed_delivery_method
46
+ #: model:ir.model.fields,field_description:rma_delivery.field_res_config_settings__rma_fixed_delivery_method
47
+ msgid "Default RMA delivery method"
48
+ msgstr "Metodo predefinito consegna RMA"
49
+
50
+ #. module: rma_delivery
51
+ #: model:ir.model.fields.selection,name:rma_delivery.selection__res_company__rma_delivery_strategy__fixed_method
52
+ msgid "Fixed method"
53
+ msgstr "Metodo fisso"
54
+
55
+ #. module: rma_delivery
56
+ #: model:ir.model,name:rma_delivery.model_rma
57
+ msgid "RMA"
58
+ msgstr "RMA"
59
+
60
+ #. module: rma_delivery
61
+ #: model:ir.model.fields,field_description:rma_delivery.field_res_company__rma_delivery_strategy
62
+ #: model:ir.model.fields,field_description:rma_delivery.field_res_config_settings__rma_delivery_strategy
63
+ #: model:ir.model.fields,field_description:rma_delivery.field_rma__rma_delivery_strategy
64
+ msgid "RMA delivery method strategy"
65
+ msgstr "Strategia metodo consegna RMA"
66
+
67
+ #. module: rma_delivery
68
+ #: model_terms:ir.ui.view,arch_db:rma_delivery.res_config_settings_view_form
69
+ msgid "RMA delivery strategy"
70
+ msgstr "Strategia consegna RMA"
71
+
72
+ #. module: rma_delivery
73
+ #: model:ir.model.fields.selection,name:rma_delivery.selection__res_company__rma_delivery_strategy__rma_method
74
+ msgid "RMA method"
75
+ msgstr ""
76
+
77
+ #. module: rma_delivery
78
+ #: model:ir.model,name:rma_delivery.model_stock_move
79
+ msgid "Stock Move"
80
+ msgstr ""
@@ -0,0 +1,104 @@
1
+ # Translation of Odoo Server.
2
+ # This file contains the translation of the following modules:
3
+ # * rma_delivery
4
+ #
5
+ msgid ""
6
+ msgstr ""
7
+ "Project-Id-Version: Odoo Server 16.0\n"
8
+ "Report-Msgid-Bugs-To: \n"
9
+ "Last-Translator: \n"
10
+ "Language-Team: \n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: \n"
14
+ "Plural-Forms: \n"
15
+
16
+ #. module: rma_delivery
17
+ #: model:ir.model.fields,field_description:rma_delivery.field_rma__carrier_id
18
+ msgid "Carrier"
19
+ msgstr ""
20
+
21
+ #. module: rma_delivery
22
+ #: model:ir.model,name:rma_delivery.model_res_company
23
+ msgid "Companies"
24
+ msgstr ""
25
+
26
+ #. module: rma_delivery
27
+ #: model:ir.model,name:rma_delivery.model_res_config_settings
28
+ msgid "Config Settings"
29
+ msgstr ""
30
+
31
+ #. module: rma_delivery
32
+ #: model:ir.model.fields.selection,name:rma_delivery.selection__res_company__rma_delivery_strategy__customer_method
33
+ #: model:ir.model.fields.selection,name:rma_delivery.selection__res_company__rma_reception_strategy__customer_method
34
+ msgid "Customer method"
35
+ msgstr ""
36
+
37
+ #. module: rma_delivery
38
+ #: model:ir.model.fields.selection,name:rma_delivery.selection__res_company__rma_delivery_strategy__mixed_method
39
+ #: model:ir.model.fields.selection,name:rma_delivery.selection__res_company__rma_reception_strategy__mixed_method
40
+ msgid "Customer method (fallback to fixed)"
41
+ msgstr ""
42
+
43
+ #. module: rma_delivery
44
+ #: model:ir.model.fields,field_description:rma_delivery.field_res_company__rma_fixed_delivery_method
45
+ #: model:ir.model.fields,field_description:rma_delivery.field_res_config_settings__rma_fixed_delivery_method
46
+ msgid "Default RMA delivery method"
47
+ msgstr ""
48
+
49
+ #. module: rma_delivery
50
+ #: model:ir.model.fields,field_description:rma_delivery.field_res_company__rma_fixed_reception_strategy
51
+ #: model:ir.model.fields,field_description:rma_delivery.field_res_config_settings__rma_fixed_reception_strategy
52
+ msgid "Default RMA reception method"
53
+ msgstr ""
54
+
55
+ #. module: rma_delivery
56
+ #: model:ir.model.fields.selection,name:rma_delivery.selection__res_company__rma_delivery_strategy__fixed_method
57
+ #: model:ir.model.fields.selection,name:rma_delivery.selection__res_company__rma_reception_strategy__fixed_method
58
+ msgid "Fixed method"
59
+ msgstr ""
60
+
61
+ #. module: rma_delivery
62
+ #: model:ir.model,name:rma_delivery.model_rma
63
+ msgid "RMA"
64
+ msgstr ""
65
+
66
+ #. module: rma_delivery
67
+ #: model:ir.model.fields,field_description:rma_delivery.field_res_company__rma_delivery_strategy
68
+ #: model:ir.model.fields,field_description:rma_delivery.field_res_config_settings__rma_delivery_strategy
69
+ #: model:ir.model.fields,field_description:rma_delivery.field_rma__rma_delivery_strategy
70
+ msgid "RMA delivery method strategy"
71
+ msgstr ""
72
+
73
+ #. module: rma_delivery
74
+ #: model_terms:ir.ui.view,arch_db:rma_delivery.res_config_settings_view_form
75
+ msgid "RMA delivery strategy"
76
+ msgstr ""
77
+
78
+ #. module: rma_delivery
79
+ #: model:ir.model.fields.selection,name:rma_delivery.selection__res_company__rma_delivery_strategy__rma_method
80
+ #: model:ir.model.fields.selection,name:rma_delivery.selection__res_company__rma_reception_strategy__rma_method
81
+ msgid "RMA method"
82
+ msgstr ""
83
+
84
+ #. module: rma_delivery
85
+ #: model:ir.model.fields,field_description:rma_delivery.field_res_company__rma_reception_strategy
86
+ #: model:ir.model.fields,field_description:rma_delivery.field_res_config_settings__rma_reception_strategy
87
+ #: model:ir.model.fields,field_description:rma_delivery.field_rma__rma_reception_strategy
88
+ msgid "RMA reception method strategy"
89
+ msgstr ""
90
+
91
+ #. module: rma_delivery
92
+ #: model_terms:ir.ui.view,arch_db:rma_delivery.res_config_settings_view_form
93
+ msgid "RMA reception strategy"
94
+ msgstr ""
95
+
96
+ #. module: rma_delivery
97
+ #: model:ir.model.fields,field_description:rma_delivery.field_rma__reception_carrier_id
98
+ msgid "Reception Carrier"
99
+ msgstr ""
100
+
101
+ #. module: rma_delivery
102
+ #: model:ir.model,name:rma_delivery.model_stock_move
103
+ msgid "Stock Move"
104
+ msgstr ""
@@ -0,0 +1,4 @@
1
+ from . import res_company
2
+ from . import res_config_settings
3
+ from . import rma
4
+ from . import stock_move
@@ -0,0 +1,38 @@
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
+
5
+ from odoo import fields, models
6
+
7
+
8
+ class Company(models.Model):
9
+ _inherit = "res.company"
10
+
11
+ rma_delivery_strategy = fields.Selection(
12
+ selection=[
13
+ ("fixed_method", "Fixed method"),
14
+ ("customer_method", "Customer method"),
15
+ ("mixed_method", "Customer method (fallback to fixed)"),
16
+ ("rma_method", "RMA method"),
17
+ ],
18
+ string="RMA delivery method strategy",
19
+ default="mixed_method",
20
+ )
21
+ rma_fixed_delivery_method = fields.Many2one(
22
+ comodel_name="delivery.carrier",
23
+ string="Default RMA delivery method",
24
+ )
25
+ rma_reception_strategy = fields.Selection(
26
+ selection=[
27
+ ("fixed_method", "Fixed method"),
28
+ ("customer_method", "Customer method"),
29
+ ("mixed_method", "Customer method (fallback to fixed)"),
30
+ ("rma_method", "RMA method"),
31
+ ],
32
+ string="RMA reception method strategy",
33
+ default="mixed_method",
34
+ )
35
+ rma_fixed_reception_strategy = fields.Many2one(
36
+ comodel_name="delivery.carrier",
37
+ string="Default RMA reception method",
38
+ )
@@ -0,0 +1,25 @@
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 import fields, models
5
+
6
+
7
+ class ResConfigSettings(models.TransientModel):
8
+ _inherit = "res.config.settings"
9
+
10
+ rma_delivery_strategy = fields.Selection(
11
+ related="company_id.rma_delivery_strategy",
12
+ readonly=False,
13
+ )
14
+ rma_fixed_delivery_method = fields.Many2one(
15
+ related="company_id.rma_fixed_delivery_method",
16
+ readonly=False,
17
+ )
18
+ rma_reception_strategy = fields.Selection(
19
+ related="company_id.rma_reception_strategy",
20
+ readonly=False,
21
+ )
22
+ rma_fixed_reception_strategy = fields.Many2one(
23
+ related="company_id.rma_fixed_reception_strategy",
24
+ readonly=False,
25
+ )
@@ -0,0 +1,77 @@
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 import fields, models
5
+
6
+
7
+ class Rma(models.Model):
8
+ _inherit = "rma"
9
+
10
+ carrier_id = fields.Many2one(
11
+ comodel_name="delivery.carrier",
12
+ string="Carrier",
13
+ )
14
+ rma_delivery_strategy = fields.Selection(related="company_id.rma_delivery_strategy")
15
+ reception_carrier_id = fields.Many2one(
16
+ comodel_name="delivery.carrier",
17
+ string="Reception Carrier",
18
+ )
19
+ rma_reception_strategy = fields.Selection(
20
+ related="company_id.rma_reception_strategy"
21
+ )
22
+
23
+ def _get_default_carrier_id(self, company, partner):
24
+ """Gather the company option for default carrier on RMA returns. We could
25
+ either:
26
+ - Get a fixed method
27
+ - Get the partner's defined method (or his commercial entity one)
28
+ - Get the partner's and fallback to a fixed one if defined
29
+ """
30
+ strategy = company.rma_delivery_strategy
31
+ delivery_method = company.rma_fixed_delivery_method
32
+ partner_method = (
33
+ partner.property_delivery_carrier_id
34
+ or partner.commercial_partner_id.property_delivery_carrier_id
35
+ )
36
+ if strategy == "customer_method" or (
37
+ strategy == "mixed_method" and partner_method
38
+ ):
39
+ delivery_method = partner_method
40
+ return delivery_method
41
+
42
+ def _get_carrier(self):
43
+ self.ensure_one()
44
+ if self.rma_delivery_strategy == "rma_method":
45
+ return self.carrier_id
46
+ else:
47
+ return self._get_default_carrier_id(
48
+ self.company_id, self.partner_shipping_id
49
+ )
50
+
51
+ def _get_default_reception_carrier_id(self, company, partner):
52
+ """Gather the company option for default carrier on RMA reception.
53
+ We could either:
54
+ - Get a fixed method
55
+ - Get the partner's defined method (or his commercial entity one)
56
+ - Get the partner's and fallback to a fixed one if defined
57
+ """
58
+ strategy = company.rma_reception_strategy
59
+ delivery_method = company.rma_fixed_reception_strategy
60
+ partner_method = (
61
+ partner.property_delivery_carrier_id
62
+ or partner.commercial_partner_id.property_delivery_carrier_id
63
+ )
64
+ if strategy == "customer_method" or (
65
+ strategy == "mixed_method" and partner_method
66
+ ):
67
+ delivery_method = partner_method
68
+ return delivery_method
69
+
70
+ def _get_reception_carrier(self):
71
+ self.ensure_one()
72
+ if self.rma_reception_strategy == "rma_method":
73
+ return self.reception_carrier_id
74
+ else:
75
+ return self._get_default_reception_carrier_id(
76
+ self.company_id, self.partner_shipping_id
77
+ )
@@ -0,0 +1,18 @@
1
+ # Copyright 2026 Tecnativa - Víctor Martínez
2
+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3
+ from odoo import models
4
+
5
+
6
+ class StockMove(models.Model):
7
+ _inherit = "stock.move"
8
+
9
+ def _get_new_picking_values(self):
10
+ vals = super()._get_new_picking_values()
11
+ carrier = self.env["delivery.carrier"]
12
+ if self.rma_id:
13
+ carrier = self.rma_id[0]._get_carrier()
14
+ elif self.rma_receiver_ids:
15
+ carrier = self.rma_receiver_ids[0]._get_reception_carrier()
16
+ if carrier and any(rule.propagate_carrier for rule in self.rule_id):
17
+ vals["carrier_id"] = carrier.id
18
+ return vals
@@ -0,0 +1,23 @@
1
+ To configure RMAs shipping strategy for your company:
2
+
3
+ #. Go to *Inventory > Configuration > Settings*
4
+ #. Choose an *RMA delivery method strategy*.
5
+ #. There are 4 possibilities:
6
+
7
+ - Fixed method: the method will always be the same. Select it on the field *Default RMA delivery method*
8
+ (or leave it empty for no delivery method at all).
9
+ - Customer method: the method will be the one configured on the partner.
10
+ - Mixed method: the method will be the one configured on the partner, otherwise
11
+ the fixed one will be chosen.
12
+ - RMA method: the method will be configured in each RMA.
13
+
14
+
15
+ #. Choose an *RMA reception method strategy*.
16
+ #. There are 4 possibilities:
17
+
18
+ - Fixed method: the method will always be the same. Select it on the field *Default RMA delivery method*
19
+ (or leave it empty for no delivery method at all).
20
+ - Customer method: the method will be the one configured on the partner.
21
+ - Mixed method: the method will be the one configured on the partner, otherwise
22
+ the fixed one will be chosen.
23
+
@@ -0,0 +1,6 @@
1
+ * `Tecnativa <https://www.tecnativa.com>`_:
2
+
3
+ * David Vidal
4
+ * Víctor Martínez
5
+
6
+ * Souheil Bejaoui - ACSONE SA/NV <souheil.bejaoui@acsone.eu>
@@ -0,0 +1,2 @@
1
+ This module extends the functionality of the RMA module to allow to choose a default
2
+ behavior for the shipping method used on the RMA receipt/returns to the customer.
@@ -0,0 +1,6 @@
1
+ To use this module, you need to:
2
+
3
+ #. Go to a RMA which has received quantities.
4
+ #. Return it to the customer.
5
+ #. Depending on your company configuration, the return picking will get one or another
6
+ carrier.