odoo-addon-delivery-state 17.0.1.0.0.5__py3-none-any.whl → 18.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/delivery_state/README.rst +26 -22
- odoo/addons/delivery_state/__manifest__.py +1 -1
- odoo/addons/delivery_state/data/ir_cron_data.xml +0 -2
- odoo/addons/delivery_state/data/mail_template.xml +3 -3
- odoo/addons/delivery_state/i18n/delivery_state.pot +18 -8
- odoo/addons/delivery_state/models/stock_picking.py +11 -1
- odoo/addons/delivery_state/static/description/index.html +20 -14
- odoo/addons/delivery_state/tests/test_delivery_state.py +42 -1
- odoo/addons/delivery_state/views/stock_picking_views.xml +2 -0
- {odoo_addon_delivery_state-17.0.1.0.0.5.dist-info → odoo_addon_delivery_state-18.0.1.1.0.dist-info}/METADATA +30 -25
- {odoo_addon_delivery_state-17.0.1.0.0.5.dist-info → odoo_addon_delivery_state-18.0.1.1.0.dist-info}/RECORD +13 -13
- {odoo_addon_delivery_state-17.0.1.0.0.5.dist-info → odoo_addon_delivery_state-18.0.1.1.0.dist-info}/WHEEL +1 -1
- {odoo_addon_delivery_state-17.0.1.0.0.5.dist-info → odoo_addon_delivery_state-18.0.1.1.0.dist-info}/top_level.txt +0 -0
|
@@ -1,3 +1,7 @@
|
|
|
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
|
+
|
|
1
5
|
==============
|
|
2
6
|
Delivery State
|
|
3
7
|
==============
|
|
@@ -7,23 +11,23 @@ Delivery State
|
|
|
7
11
|
!! This file is generated by oca-gen-addon-readme !!
|
|
8
12
|
!! changes will be overwritten. !!
|
|
9
13
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
10
|
-
!! source digest: sha256:
|
|
14
|
+
!! source digest: sha256:d64fd22ab49cba03ff16e84772582cbb328d55953ca57e6201e2191c00a6f066
|
|
11
15
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
12
16
|
|
|
13
17
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
14
18
|
:target: https://odoo-community.org/page/development-status
|
|
15
19
|
:alt: Beta
|
|
16
|
-
.. |badge2| image:: https://img.shields.io/badge/
|
|
20
|
+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
|
17
21
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
18
22
|
:alt: License: AGPL-3
|
|
19
23
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fdelivery--carrier-lightgray.png?logo=github
|
|
20
|
-
:target: https://github.com/OCA/delivery-carrier/tree/
|
|
24
|
+
:target: https://github.com/OCA/delivery-carrier/tree/18.0/delivery_state
|
|
21
25
|
:alt: OCA/delivery-carrier
|
|
22
26
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
23
|
-
:target: https://translation.odoo-community.org/projects/delivery-carrier-
|
|
27
|
+
:target: https://translation.odoo-community.org/projects/delivery-carrier-18-0/delivery-carrier-18-0-delivery_state
|
|
24
28
|
:alt: Translate me on Weblate
|
|
25
29
|
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
26
|
-
:target: https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&target_branch=
|
|
30
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&target_branch=18.0
|
|
27
31
|
:alt: Try me on Runboat
|
|
28
32
|
|
|
29
33
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
@@ -81,12 +85,12 @@ steps as described before, but we'll get additionally:
|
|
|
81
85
|
2. Depending on the stated returned by the provider, we could get
|
|
82
86
|
these states (field *Carrier State*):
|
|
83
87
|
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
88
|
+
- Shipping recorded in carrier
|
|
89
|
+
- In transit
|
|
90
|
+
- Canceled shipment (finished)
|
|
91
|
+
- Incident
|
|
92
|
+
- Warehouse delivered
|
|
93
|
+
- Customer delivered (finished)
|
|
90
94
|
|
|
91
95
|
3. In the field *Tracking state* we'll get the tracking state name
|
|
92
96
|
given by the provider (which is mapped to the ones in this module)
|
|
@@ -99,7 +103,7 @@ Bug Tracker
|
|
|
99
103
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/delivery-carrier/issues>`_.
|
|
100
104
|
In case of trouble, please check there if your issue has already been reported.
|
|
101
105
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
102
|
-
`feedback <https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_state%0Aversion:%
|
|
106
|
+
`feedback <https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_state%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
103
107
|
|
|
104
108
|
Do not contact contributors directly about support or help with technical issues.
|
|
105
109
|
|
|
@@ -116,21 +120,21 @@ Authors
|
|
|
116
120
|
Contributors
|
|
117
121
|
------------
|
|
118
122
|
|
|
119
|
-
-
|
|
123
|
+
- `Trey <https://www.trey.es>`__:
|
|
120
124
|
|
|
121
|
-
|
|
125
|
+
- Roberto Lizana <roberto@trey.es>
|
|
122
126
|
|
|
123
|
-
-
|
|
127
|
+
- `FactorLibre <https://www.factorlibre.com>`__:
|
|
124
128
|
|
|
125
|
-
|
|
129
|
+
- Zahra Velasco <zahra.velasco@factorlibre.com>
|
|
126
130
|
|
|
127
|
-
-
|
|
131
|
+
- `Tecnativa <https://www.tecnativa.com>`__:
|
|
128
132
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
133
|
+
- Pedro M. Baeza
|
|
134
|
+
- David Vidal
|
|
135
|
+
- Víctor Martínez
|
|
132
136
|
|
|
133
|
-
-
|
|
137
|
+
- Marçal Isern <marsal.isern@qubiq.es>
|
|
134
138
|
|
|
135
139
|
Maintainers
|
|
136
140
|
-----------
|
|
@@ -145,6 +149,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
|
145
149
|
mission is to support the collaborative development of Odoo features and
|
|
146
150
|
promote its widespread use.
|
|
147
151
|
|
|
148
|
-
This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/
|
|
152
|
+
This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/18.0/delivery_state>`_ project on GitHub.
|
|
149
153
|
|
|
150
154
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
<field name="name">Update deliveries states</field>
|
|
5
5
|
<field name="interval_number">1</field>
|
|
6
6
|
<field name="interval_type">days</field>
|
|
7
|
-
<field name="numbercall">-1</field>
|
|
8
|
-
<field name="doall" eval="False" />
|
|
9
7
|
<field name="model_id" ref="model_stock_picking" />
|
|
10
8
|
<field name="code">model._update_delivery_state()</field>
|
|
11
9
|
<field name="state">code</field>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
#
|
|
5
5
|
msgid ""
|
|
6
6
|
msgstr ""
|
|
7
|
-
"Project-Id-Version: Odoo Server
|
|
7
|
+
"Project-Id-Version: Odoo Server 18.0\n"
|
|
8
8
|
"Report-Msgid-Bugs-To: \n"
|
|
9
9
|
"Last-Translator: \n"
|
|
10
10
|
"Language-Team: \n"
|
|
@@ -18,14 +18,14 @@ msgstr ""
|
|
|
18
18
|
msgid ""
|
|
19
19
|
"<div style=\"margin: 0px; padding: 0px;\">\n"
|
|
20
20
|
" <p style=\"margin: 0px; padding: 0px; font-size: 13px;\">\n"
|
|
21
|
-
" Hello <t t-out=\"object.partner_id.name\"
|
|
22
|
-
" Your package has been delivered!<br
|
|
23
|
-
" Order information<br
|
|
24
|
-
" Order <t t-out=\"object.carrier_tracking_ref\"
|
|
21
|
+
" Hello <t t-out=\"object.partner_id.name\"/>,<br/><br/>\n"
|
|
22
|
+
" Your package has been delivered!<br/><br/>\n"
|
|
23
|
+
" Order information<br/>\n"
|
|
24
|
+
" Order <t t-out=\"object.carrier_tracking_ref\"/><br/>\n"
|
|
25
25
|
" <t t-if=\"user.signature\">\n"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
26
|
+
" <br/>\n"
|
|
27
|
+
" <t t-out=\"user.signature\"/>\n"
|
|
28
|
+
" </t>\n"
|
|
29
29
|
" </p>\n"
|
|
30
30
|
" </div>\n"
|
|
31
31
|
" "
|
|
@@ -110,6 +110,16 @@ msgstr ""
|
|
|
110
110
|
msgid "No more updates from carrier"
|
|
111
111
|
msgstr ""
|
|
112
112
|
|
|
113
|
+
#. module: delivery_state
|
|
114
|
+
#: model:ir.model.fields,field_description:delivery_state.field_stock_picking__pod_file
|
|
115
|
+
msgid "Proof of Delivery File"
|
|
116
|
+
msgstr ""
|
|
117
|
+
|
|
118
|
+
#. module: delivery_state
|
|
119
|
+
#: model:ir.model.fields,field_description:delivery_state.field_stock_picking__pod_filename
|
|
120
|
+
msgid "Proof of Delivery Filename"
|
|
121
|
+
msgstr ""
|
|
122
|
+
|
|
113
123
|
#. module: delivery_state
|
|
114
124
|
#: model_terms:ir.ui.view,arch_db:delivery_state.res_config_settings_view_form
|
|
115
125
|
msgid ""
|
|
@@ -39,6 +39,16 @@ class StockPicking(models.Model):
|
|
|
39
39
|
tracking=True,
|
|
40
40
|
readonly=True,
|
|
41
41
|
)
|
|
42
|
+
pod_file = fields.Binary(
|
|
43
|
+
string="Proof of Delivery File",
|
|
44
|
+
readonly=True,
|
|
45
|
+
copy=False,
|
|
46
|
+
)
|
|
47
|
+
pod_filename = fields.Char(
|
|
48
|
+
string="Proof of Delivery Filename",
|
|
49
|
+
readonly=True,
|
|
50
|
+
copy=False,
|
|
51
|
+
)
|
|
42
52
|
|
|
43
53
|
def tracking_state_update(self):
|
|
44
54
|
"""Call to the service provider API which should have the method
|
|
@@ -46,7 +56,7 @@ class StockPicking(models.Model):
|
|
|
46
56
|
<my_provider>_tracking_state_update
|
|
47
57
|
It can be triggered manually or by the cron."""
|
|
48
58
|
for picking in self.filtered("carrier_id"):
|
|
49
|
-
method = "
|
|
59
|
+
method = f"{picking.delivery_type}_tracking_state_update"
|
|
50
60
|
if hasattr(picking.carrier_id, method):
|
|
51
61
|
getattr(picking.carrier_id, method)(picking)
|
|
52
62
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
5
5
|
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
|
6
|
-
<title>
|
|
6
|
+
<title>README.rst</title>
|
|
7
7
|
<style type="text/css">
|
|
8
8
|
|
|
9
9
|
/*
|
|
@@ -360,16 +360,21 @@ ul.auto-toc {
|
|
|
360
360
|
</style>
|
|
361
361
|
</head>
|
|
362
362
|
<body>
|
|
363
|
-
<div class="document"
|
|
364
|
-
<h1 class="title">Delivery State</h1>
|
|
363
|
+
<div class="document">
|
|
365
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="delivery-state">
|
|
370
|
+
<h1>Delivery State</h1>
|
|
366
371
|
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
367
372
|
!! This file is generated by oca-gen-addon-readme !!
|
|
368
373
|
!! changes will be overwritten. !!
|
|
369
374
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
370
|
-
!! source digest: sha256:
|
|
375
|
+
!! source digest: sha256:d64fd22ab49cba03ff16e84772582cbb328d55953ca57e6201e2191c00a6f066
|
|
371
376
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
372
|
-
<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/
|
|
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/delivery-carrier/tree/18.0/delivery_state"><img alt="OCA/delivery-carrier" src="https://img.shields.io/badge/github-OCA%2Fdelivery--carrier-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/delivery-carrier-18-0/delivery-carrier-18-0-delivery_state"><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/delivery-carrier&target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
373
378
|
<p>This module adds additional functions that will be needed for the
|
|
374
379
|
carrier developments. It provides fields to be able to contemplate the
|
|
375
380
|
tracking states and also adds a global field so it can have generic
|
|
@@ -389,7 +394,7 @@ states in addition to the ones carrier gives us.</p>
|
|
|
389
394
|
</ul>
|
|
390
395
|
</div>
|
|
391
396
|
<div class="section" id="configuration">
|
|
392
|
-
<
|
|
397
|
+
<h2><a class="toc-backref" href="#toc-entry-1">Configuration</a></h2>
|
|
393
398
|
<p>A scheduled action for automating the tracking update for these pickings
|
|
394
399
|
can be configured going to <em>Settings > Technical > Scheduled Actions</em>
|
|
395
400
|
and then choosing <em>Update deliveries states</em>. It will update the pending
|
|
@@ -406,7 +411,7 @@ picking is customer_delivered:</p>
|
|
|
406
411
|
</blockquote>
|
|
407
412
|
</div>
|
|
408
413
|
<div class="section" id="usage">
|
|
409
|
-
<
|
|
414
|
+
<h2><a class="toc-backref" href="#toc-entry-2">Usage</a></h2>
|
|
410
415
|
<p>Depending on the delivery service provider, the state tracking could be
|
|
411
416
|
more or less complete, since it could have or not the necessary API
|
|
412
417
|
calls implemented.</p>
|
|
@@ -452,17 +457,17 @@ given by the provider (which is mapped to the ones in this module)</p>
|
|
|
452
457
|
</blockquote>
|
|
453
458
|
</div>
|
|
454
459
|
<div class="section" id="bug-tracker">
|
|
455
|
-
<
|
|
460
|
+
<h2><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h2>
|
|
456
461
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/delivery-carrier/issues">GitHub Issues</a>.
|
|
457
462
|
In case of trouble, please check there if your issue has already been reported.
|
|
458
463
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
459
|
-
<a class="reference external" href="https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_state%0Aversion:%
|
|
464
|
+
<a class="reference external" href="https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_state%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
|
460
465
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
|
461
466
|
</div>
|
|
462
467
|
<div class="section" id="credits">
|
|
463
|
-
<
|
|
468
|
+
<h2><a class="toc-backref" href="#toc-entry-4">Credits</a></h2>
|
|
464
469
|
<div class="section" id="authors">
|
|
465
|
-
<
|
|
470
|
+
<h3><a class="toc-backref" href="#toc-entry-5">Authors</a></h3>
|
|
466
471
|
<ul class="simple">
|
|
467
472
|
<li>Trey (www.trey.es)</li>
|
|
468
473
|
<li>FactorLibre</li>
|
|
@@ -470,7 +475,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
470
475
|
</ul>
|
|
471
476
|
</div>
|
|
472
477
|
<div class="section" id="contributors">
|
|
473
|
-
<
|
|
478
|
+
<h3><a class="toc-backref" href="#toc-entry-6">Contributors</a></h3>
|
|
474
479
|
<ul class="simple">
|
|
475
480
|
<li><a class="reference external" href="https://www.trey.es">Trey</a>:<ul>
|
|
476
481
|
<li>Roberto Lizana <<a class="reference external" href="mailto:roberto@trey.es">roberto@trey.es</a>></li>
|
|
@@ -490,7 +495,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
490
495
|
</ul>
|
|
491
496
|
</div>
|
|
492
497
|
<div class="section" id="maintainers">
|
|
493
|
-
<
|
|
498
|
+
<h3><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h3>
|
|
494
499
|
<p>This module is maintained by the OCA.</p>
|
|
495
500
|
<a class="reference external image-reference" href="https://odoo-community.org">
|
|
496
501
|
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
|
@@ -498,10 +503,11 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
498
503
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
499
504
|
mission is to support the collaborative development of Odoo features and
|
|
500
505
|
promote its widespread use.</p>
|
|
501
|
-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/delivery-carrier/tree/
|
|
506
|
+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/delivery-carrier/tree/18.0/delivery_state">OCA/delivery-carrier</a> project on GitHub.</p>
|
|
502
507
|
<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>
|
|
503
508
|
</div>
|
|
504
509
|
</div>
|
|
505
510
|
</div>
|
|
511
|
+
</div>
|
|
506
512
|
</body>
|
|
507
513
|
</html>
|
|
@@ -31,7 +31,7 @@ class TestDeliveryState(TransactionCase):
|
|
|
31
31
|
}
|
|
32
32
|
)
|
|
33
33
|
cls.product = cls.env["product.product"].create(
|
|
34
|
-
{"name": "Test product", "type": "
|
|
34
|
+
{"name": "Test product", "type": "consu"}
|
|
35
35
|
)
|
|
36
36
|
cls.partner = cls.env["res.partner"].create({"name": "Mr. Odoo"})
|
|
37
37
|
cls.partner_shipping = cls.env["res.partner"].create(
|
|
@@ -63,6 +63,36 @@ class TestDeliveryState(TransactionCase):
|
|
|
63
63
|
],
|
|
64
64
|
}
|
|
65
65
|
)
|
|
66
|
+
cls.picking = cls.env["stock.picking"].create(
|
|
67
|
+
{
|
|
68
|
+
"picking_type_id": cls.env["stock.picking.type"].search([], limit=1).id,
|
|
69
|
+
"partner_id": cls.partner.id,
|
|
70
|
+
"location_id": cls.env["stock.location"]
|
|
71
|
+
.search([("usage", "=", "internal")], limit=1)
|
|
72
|
+
.id,
|
|
73
|
+
"location_dest_id": cls.env["stock.location"]
|
|
74
|
+
.search([("usage", "=", "customer")], limit=1)
|
|
75
|
+
.id,
|
|
76
|
+
"move_ids": [
|
|
77
|
+
(
|
|
78
|
+
0,
|
|
79
|
+
0,
|
|
80
|
+
{
|
|
81
|
+
"name": cls.product.name,
|
|
82
|
+
"product_id": cls.product.id,
|
|
83
|
+
"product_uom_qty": 1,
|
|
84
|
+
"product_uom": cls.product.uom_id.id,
|
|
85
|
+
"location_id": cls.env["stock.location"]
|
|
86
|
+
.search([("usage", "=", "internal")], limit=1)
|
|
87
|
+
.id,
|
|
88
|
+
"location_dest_id": cls.env["stock.location"]
|
|
89
|
+
.search([("usage", "=", "customer")], limit=1)
|
|
90
|
+
.id,
|
|
91
|
+
},
|
|
92
|
+
)
|
|
93
|
+
],
|
|
94
|
+
}
|
|
95
|
+
)
|
|
66
96
|
|
|
67
97
|
def test_delivery_state(self):
|
|
68
98
|
delivery_wizard = Form(
|
|
@@ -116,3 +146,14 @@ class TestDeliveryState(TransactionCase):
|
|
|
116
146
|
)
|
|
117
147
|
last_mail = fields.first(mails)
|
|
118
148
|
self.assertTrue("XX-0000" in last_mail.body)
|
|
149
|
+
|
|
150
|
+
def test_update_delivery_state(self):
|
|
151
|
+
self.picking.carrier_id = self.carrier.id
|
|
152
|
+
self.picking.state = "done"
|
|
153
|
+
self.picking.delivery_state = "shipping_recorded_in_carrier"
|
|
154
|
+
with patch.object(type(self.picking), "tracking_state_update") as mock_update:
|
|
155
|
+
self.env["stock.picking"]._update_delivery_state()
|
|
156
|
+
mock_update.assert_called()
|
|
157
|
+
self.assertEqual(
|
|
158
|
+
self.picking.delivery_state, "shipping_recorded_in_carrier"
|
|
159
|
+
)
|
|
@@ -22,6 +22,8 @@ License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
|
22
22
|
<field name="date_delivered" />
|
|
23
23
|
<field name="delivery_state" />
|
|
24
24
|
<field name="tracking_state" class="oe_inline" />
|
|
25
|
+
<field name="pod_file" filename="pod_filename" />
|
|
26
|
+
<field name="pod_filename" invisible="1" />
|
|
25
27
|
<button
|
|
26
28
|
name="tracking_state_update"
|
|
27
29
|
string="Update tracking state"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: odoo-addon-delivery_state
|
|
3
|
-
Version:
|
|
3
|
+
Version: 18.0.1.1.0
|
|
4
4
|
Requires-Python: >=3.10
|
|
5
|
-
Requires-Dist: odoo
|
|
5
|
+
Requires-Dist: odoo==18.0.*
|
|
6
6
|
Summary: Provides fields to be able to contemplate the tracking statesand also adds a global fields
|
|
7
7
|
Home-page: https://github.com/OCA/delivery-carrier
|
|
8
8
|
License: AGPL-3
|
|
@@ -10,8 +10,13 @@ Author: Trey (www.trey.es), FactorLibre, Tecnativa, Odoo Community Association (
|
|
|
10
10
|
Author-email: support@odoo-community.org
|
|
11
11
|
Classifier: Programming Language :: Python
|
|
12
12
|
Classifier: Framework :: Odoo
|
|
13
|
-
Classifier: Framework :: Odoo ::
|
|
13
|
+
Classifier: Framework :: Odoo :: 18.0
|
|
14
14
|
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
15
|
+
Description-Content-Type: text/x-rst
|
|
16
|
+
|
|
17
|
+
.. image:: https://odoo-community.org/readme-banner-image
|
|
18
|
+
:target: https://odoo-community.org/get-involved?utm_source=readme
|
|
19
|
+
:alt: Odoo Community Association
|
|
15
20
|
|
|
16
21
|
==============
|
|
17
22
|
Delivery State
|
|
@@ -22,23 +27,23 @@ Delivery State
|
|
|
22
27
|
!! This file is generated by oca-gen-addon-readme !!
|
|
23
28
|
!! changes will be overwritten. !!
|
|
24
29
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
25
|
-
!! source digest: sha256:
|
|
30
|
+
!! source digest: sha256:d64fd22ab49cba03ff16e84772582cbb328d55953ca57e6201e2191c00a6f066
|
|
26
31
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
27
32
|
|
|
28
33
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
29
34
|
:target: https://odoo-community.org/page/development-status
|
|
30
35
|
:alt: Beta
|
|
31
|
-
.. |badge2| image:: https://img.shields.io/badge/
|
|
36
|
+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
|
32
37
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
33
38
|
:alt: License: AGPL-3
|
|
34
39
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fdelivery--carrier-lightgray.png?logo=github
|
|
35
|
-
:target: https://github.com/OCA/delivery-carrier/tree/
|
|
40
|
+
:target: https://github.com/OCA/delivery-carrier/tree/18.0/delivery_state
|
|
36
41
|
:alt: OCA/delivery-carrier
|
|
37
42
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
38
|
-
:target: https://translation.odoo-community.org/projects/delivery-carrier-
|
|
43
|
+
:target: https://translation.odoo-community.org/projects/delivery-carrier-18-0/delivery-carrier-18-0-delivery_state
|
|
39
44
|
:alt: Translate me on Weblate
|
|
40
45
|
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
41
|
-
:target: https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&target_branch=
|
|
46
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&target_branch=18.0
|
|
42
47
|
:alt: Try me on Runboat
|
|
43
48
|
|
|
44
49
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
@@ -96,12 +101,12 @@ steps as described before, but we'll get additionally:
|
|
|
96
101
|
2. Depending on the stated returned by the provider, we could get
|
|
97
102
|
these states (field *Carrier State*):
|
|
98
103
|
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
104
|
+
- Shipping recorded in carrier
|
|
105
|
+
- In transit
|
|
106
|
+
- Canceled shipment (finished)
|
|
107
|
+
- Incident
|
|
108
|
+
- Warehouse delivered
|
|
109
|
+
- Customer delivered (finished)
|
|
105
110
|
|
|
106
111
|
3. In the field *Tracking state* we'll get the tracking state name
|
|
107
112
|
given by the provider (which is mapped to the ones in this module)
|
|
@@ -114,7 +119,7 @@ Bug Tracker
|
|
|
114
119
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/delivery-carrier/issues>`_.
|
|
115
120
|
In case of trouble, please check there if your issue has already been reported.
|
|
116
121
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
117
|
-
`feedback <https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_state%0Aversion:%
|
|
122
|
+
`feedback <https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_state%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
118
123
|
|
|
119
124
|
Do not contact contributors directly about support or help with technical issues.
|
|
120
125
|
|
|
@@ -131,21 +136,21 @@ Authors
|
|
|
131
136
|
Contributors
|
|
132
137
|
------------
|
|
133
138
|
|
|
134
|
-
-
|
|
139
|
+
- `Trey <https://www.trey.es>`__:
|
|
135
140
|
|
|
136
|
-
|
|
141
|
+
- Roberto Lizana <roberto@trey.es>
|
|
137
142
|
|
|
138
|
-
-
|
|
143
|
+
- `FactorLibre <https://www.factorlibre.com>`__:
|
|
139
144
|
|
|
140
|
-
|
|
145
|
+
- Zahra Velasco <zahra.velasco@factorlibre.com>
|
|
141
146
|
|
|
142
|
-
-
|
|
147
|
+
- `Tecnativa <https://www.tecnativa.com>`__:
|
|
143
148
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
149
|
+
- Pedro M. Baeza
|
|
150
|
+
- David Vidal
|
|
151
|
+
- Víctor Martínez
|
|
147
152
|
|
|
148
|
-
-
|
|
153
|
+
- Marçal Isern <marsal.isern@qubiq.es>
|
|
149
154
|
|
|
150
155
|
Maintainers
|
|
151
156
|
-----------
|
|
@@ -160,6 +165,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
|
160
165
|
mission is to support the collaborative development of Odoo features and
|
|
161
166
|
promote its widespread use.
|
|
162
167
|
|
|
163
|
-
This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/
|
|
168
|
+
This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/18.0/delivery_state>`_ project on GitHub.
|
|
164
169
|
|
|
165
170
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
odoo/addons/delivery_state/README.rst,sha256=
|
|
1
|
+
odoo/addons/delivery_state/README.rst,sha256=E8W3qC91NlJt3lkIhbMqCJgnQ0g8oMQdD4gFdP4ZeY8,5628
|
|
2
2
|
odoo/addons/delivery_state/__init__.py,sha256=vjC7oVOHhST0bMtkabfH6FeMaqB-PHV4o8HQvIB_5NM,86
|
|
3
|
-
odoo/addons/delivery_state/__manifest__.py,sha256=
|
|
4
|
-
odoo/addons/delivery_state/data/ir_cron_data.xml,sha256=
|
|
5
|
-
odoo/addons/delivery_state/data/mail_template.xml,sha256=
|
|
6
|
-
odoo/addons/delivery_state/i18n/delivery_state.pot,sha256=
|
|
3
|
+
odoo/addons/delivery_state/__manifest__.py,sha256=b4N6sIqjH8L90L1lL2rqycjrDAoydMTe70OeZgY7Zj8,809
|
|
4
|
+
odoo/addons/delivery_state/data/ir_cron_data.xml,sha256=a8pIAiddcrLqvQzF4Lx-3fTJ4jbYqmHoxbvUnUtBYFc,463
|
|
5
|
+
odoo/addons/delivery_state/data/mail_template.xml,sha256=U6MhWcPRLWIeIYkpfuvhEDI5-GZ-pswfXPUETmg9U8U,1344
|
|
6
|
+
odoo/addons/delivery_state/i18n/delivery_state.pot,sha256=jUbspGtArzhxOarfisOG5R2vYifXKCRxUHN4I9tm4EY,6035
|
|
7
7
|
odoo/addons/delivery_state/i18n/es.po,sha256=t548exglxSJ7yAxKBOIzOp6qGn-wrGee5DalNxZfLhU,8844
|
|
8
8
|
odoo/addons/delivery_state/i18n/fr.po,sha256=AVgT5k2gldpaEMcygME88rpedTP7MJRe7328k2xoNw4,6657
|
|
9
9
|
odoo/addons/delivery_state/i18n/it.po,sha256=y3j7xlOH3A8tYY6JcIYwJ_Oey5n1hfB7IpXpmt6yc7o,7382
|
|
@@ -11,18 +11,18 @@ odoo/addons/delivery_state/models/__init__.py,sha256=cpomDITzUjM_K1CWge5kZH7Geo-
|
|
|
11
11
|
odoo/addons/delivery_state/models/delivery_carrier.py,sha256=l65TjoKhwiAAtDAhqGdfcMLiE7QMRGz0szbqYS2xd6c,838
|
|
12
12
|
odoo/addons/delivery_state/models/res_company.py,sha256=TmiRVODzdSApqG8oALxder-cR8gDEkIjQQp2Hu7IbpA,560
|
|
13
13
|
odoo/addons/delivery_state/models/res_config_settings.py,sha256=o8_pVps9gOceamgKwJO1IHyzXhbSoL5KKntFU3fAUNY,548
|
|
14
|
-
odoo/addons/delivery_state/models/stock_picking.py,sha256=
|
|
14
|
+
odoo/addons/delivery_state/models/stock_picking.py,sha256=ZkyojlDMreUu1thULzygmc-r80uEzpwMDkQGX7QCAS8,3482
|
|
15
15
|
odoo/addons/delivery_state/readme/CONFIGURE.md,sha256=qTUnJHkLOG67b53gXQIVaMiw7DerJ54x4TQNRQfqwpM,645
|
|
16
16
|
odoo/addons/delivery_state/readme/CONTRIBUTORS.md,sha256=z9acHu_jLy9kE6Sl3BVDxJuyP7af206ckJ0sgcklsmA,315
|
|
17
17
|
odoo/addons/delivery_state/readme/DESCRIPTION.md,sha256=XvCND-7CFgybGm3C2S6adPRFSJjbU9UXqxa54jeE_JU,254
|
|
18
18
|
odoo/addons/delivery_state/readme/USAGE.md,sha256=bBK1O4dDBWeaYVLiI1o-Vuw-SVic7VHvPmzj0-5wEb8,1424
|
|
19
19
|
odoo/addons/delivery_state/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
|
20
|
-
odoo/addons/delivery_state/static/description/index.html,sha256=
|
|
20
|
+
odoo/addons/delivery_state/static/description/index.html,sha256=aSkWuM9nOZQgBiHY8fGMzHs5rzypYhqEK1qnBHmS38A,16125
|
|
21
21
|
odoo/addons/delivery_state/tests/__init__.py,sha256=giksTYtSXScTPW6jKMPrb3DDCqTX_0HL1G76G5IJhQY,175
|
|
22
|
-
odoo/addons/delivery_state/tests/test_delivery_state.py,sha256=
|
|
22
|
+
odoo/addons/delivery_state/tests/test_delivery_state.py,sha256=omYhd0h3Y-FYPU_4rbGeSGiESiG4dX7zUkupOKp1kMI,6534
|
|
23
23
|
odoo/addons/delivery_state/views/res_config_settings_view.xml,sha256=LspyMgUk7H3Ocv9YPEZHMGjUJv7joIMOnPEdTjFmDWs,2129
|
|
24
|
-
odoo/addons/delivery_state/views/stock_picking_views.xml,sha256=
|
|
25
|
-
odoo_addon_delivery_state-
|
|
26
|
-
odoo_addon_delivery_state-
|
|
27
|
-
odoo_addon_delivery_state-
|
|
28
|
-
odoo_addon_delivery_state-
|
|
24
|
+
odoo/addons/delivery_state/views/stock_picking_views.xml,sha256=BsGfPOIdijhtz9wRf7Hhzkz4vi4kPqEtHJXw8TIfErY,1638
|
|
25
|
+
odoo_addon_delivery_state-18.0.1.1.0.dist-info/METADATA,sha256=7CLqO9-8k_g5IPIlk__Tg3kWzqcw4hwvsIN3zMBoCS0,6272
|
|
26
|
+
odoo_addon_delivery_state-18.0.1.1.0.dist-info/WHEEL,sha256=ZhOvUsYhy81Dx67gN3TV0RchQWBIIzutDZaJODDg2Vo,81
|
|
27
|
+
odoo_addon_delivery_state-18.0.1.1.0.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
|
|
28
|
+
odoo_addon_delivery_state-18.0.1.1.0.dist-info/RECORD,,
|
|
File without changes
|