Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] delivery_state: Migration to 18.0 #980

Open
wants to merge 33 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
75df1c4
[ADD] delivery_carrier_state
rlizana May 22, 2020
fdaeb2f
[IMP] delivery_state: automated action
chienandalu Aug 12, 2020
43a10f7
[IMP] delivery_state: black, isort, prettier
misern2 Sep 16, 2020
2c9d0dc
[MIG] delivery_state: Migration to 13.0
misern2 Sep 16, 2020
4f16fe9
[IMP] delivery_state: automatic email sending
chienandalu Jan 15, 2021
4806012
[13.0][IMP] delivery_state: black, isort, prettier
hildickethan Apr 15, 2021
fbe58dd
[14.0][MIG] delivery_state: Migration to 14.0
hildickethan Apr 15, 2021
12f15fb
[MIG] delivery_state: Migration to 15.0
victoralmau Aug 9, 2022
5d4d20a
[IMP] delivery_state: Automatic email when the picking is customer de…
victoralmau Aug 10, 2022
7af11d6
[MIG] delivery_state: Migration to 16.0
chienandalu Nov 9, 2022
c214592
[UPD] Update delivery_state.pot
Nov 11, 2022
811ad0a
[UPD] README.rst
OCA-git-bot Nov 11, 2022
9219438
[IMP] delivery_state: new state to ignore further update calls
chienandalu Dec 12, 2022
2291c8d
[UPD] Update delivery_state.pot
Dec 14, 2022
62675fc
delivery_state 16.0.1.1.0
OCA-git-bot Dec 14, 2022
3f70db0
Update translation files
weblate Dec 14, 2022
35a949f
[UPD] Update delivery_state.pot
May 24, 2023
459204f
Update translation files
weblate May 24, 2023
61416d4
Translated using Weblate (Spanish)
Ivorra78 Aug 3, 2023
b2f0349
[UPD] README.rst
OCA-git-bot Sep 3, 2023
412e457
Update translation files
weblate Oct 9, 2023
c945368
Added translation using Weblate (French)
kbentaleb Jan 8, 2024
c17ec8d
Translated using Weblate (French)
kbentaleb Jan 8, 2024
f040169
Added translation using Weblate (Italian)
mymage May 7, 2024
57f6706
[IMP] delivery_state: pre-commit auto fixes
sbiosca-s73 Jul 24, 2024
057203b
[17.0][MIG] delivery_state: Migration to 17.0
sbiosca-s73 Jul 24, 2024
194d839
[UPD] Update delivery_state.pot
Jul 25, 2024
ea14208
[BOT] post-merge updates
OCA-git-bot Jul 25, 2024
65181c9
Update translation files
weblate Jul 25, 2024
2f1fd78
Translated using Weblate (Italian)
mymage Jul 29, 2024
0e7802c
Translated using Weblate (Italian)
mymage Aug 22, 2024
d86e0cc
[IMP] delivery_state: pre-commit auto fixes
arantxa-s73 Feb 13, 2025
8c31523
[MIG] delivery_state: Migration to 18.0
arantxa-s73 Feb 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
150 changes: 150 additions & 0 deletions delivery_state/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
==============
Delivery State
==============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:996ce209cc2b49ef369604f39c2d5df92cd9c0f0f0cb639a789ad5ea76ffb091
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fdelivery--carrier-lightgray.png?logo=github
:target: https://github.com/OCA/delivery-carrier/tree/18.0/delivery_state
:alt: OCA/delivery-carrier
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/delivery-carrier-18-0/delivery-carrier-18-0-delivery_state
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module adds additional functions that will be needed for the
carrier developments. It provides fields to be able to contemplate the
tracking states and also adds a global field so it can have generic
states in addition to the ones carrier gives us.

**Table of contents**

.. contents::
:local:

Configuration
=============

A scheduled action for automating the tracking update for these pickings
can be configured going to *Settings > Technical > Scheduled Actions*
and then choosing *Update deliveries states*. It will update the pending
delivery states for the pickings with service providers with tracking
methods configured, and in pending state (not delivered or cancelled).

In order to send automatic notifications to the customer when the
picking is customer_delivered:

1. Go to *Inventory > Configuration > Settings*.
2. Enable the option *Email Confirmation (customer delivered)*.
3. Choose the template "Delivery: Picking delivered by Email".

Usage
=====

Depending on the delivery service provider, the state tracking could be
more or less complete, since it could have or not the necessary API
calls implemented.

With regular methods (fixed, based on rules):

1. Go to Inventory / Operations and open an outgoing pending picking.
2. In the *Additional Info* tab, assign it a delivery carrier which
is fixed or based on rules.
3. Validate the picking and you'll see in the same tab the delivery
state info with the shipping date and the shipping state.
4. If enabled, an automatic notification will be sent to the picking
customer.

When service provider methods are implemented, we can follow the same
steps as described before, but we'll get additionally:

1. In the *Additional Info* tab, we'll see button *Update tracking
state* to manually query the provider API for tracking updates for
this expedition.

2. Depending on the stated returned by the provider, we could get
these states (field *Carrier State*):

- Shipping recorded in carrier
- In transit
- Canceled shipment (finished)
- Incident
- Warehouse delivered
- Customer delivered (finished)

3. In the field *Tracking state* we'll get the tracking state name
given by the provider (which is mapped to the ones in this module)

4. In the field *Tracking history* we'll get the former states log.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/delivery-carrier/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`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**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Trey (www.trey.es)
* FactorLibre
* Tecnativa

Contributors
------------

- `Trey <https://www.trey.es>`__:

- Roberto Lizana <roberto@trey.es>

- `FactorLibre <https://www.factorlibre.com>`__:

- Zahra Velasco <zahra.velasco@factorlibre.com>

- `Tecnativa <https://www.tecnativa.com>`__:

- Pedro M. Baeza
- David Vidal
- Víctor Martínez

- Marçal Isern <marsal.isern@qubiq.es>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/18.0/delivery_state>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions delivery_state/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import models
24 changes: 24 additions & 0 deletions delivery_state/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2020 Trey, Kilobytes de Soluciones
# Copyright 2020 FactorLibre
# Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Delivery State",
"summary": "Provides fields to be able to contemplate the tracking states"
"and also adds a global fields",
"author": "Trey (www.trey.es), "
"FactorLibre, "
"Tecnativa, "
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/delivery-carrier",
"license": "AGPL-3",
"category": "Delivery",
"version": "18.0.1.0.0",
"depends": ["delivery", "stock_delivery"],
"data": [
"data/ir_cron_data.xml",
"data/mail_template.xml",
"views/res_config_settings_view.xml",
"views/stock_picking_views.xml",
],
}
11 changes: 11 additions & 0 deletions delivery_state/data/ir_cron_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="ir_cron_delivery_state" model="ir.cron">
<field name="name">Update deliveries states</field>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="model_id" ref="model_stock_picking" />
<field name="code">model._update_delivery_state()</field>
<field name="state">code</field>
</record>
</odoo>
29 changes: 29 additions & 0 deletions delivery_state/data/mail_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="delivery_state_delivered_notification" model="mail.template">
<field name="name">Delivery: Picking delivered by Email</field>
<field name="model_id" ref="stock.model_stock_picking" />
<field
name="subject"
>Your order {{ object.carrier_tracking_ref or object.name }} from {{ object.company_id.name }}</field>
<field
name="partner_to"
>{{ object.partner_id.email and object.partner_id.id or object.partner_id.parent_id.id }}</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Hello <t t-out="object.partner_id.name" />,<br /><br />
Your package has been delivered!<br /><br />
Order information<br />
Order <t t-out="object.carrier_tracking_ref" /><br />
<t t-if="user.signature">
<br />
<t t-out="user.signature" />
</t>
</p>
</div>
</field>
<field name="lang">{{ object.partner_id.lang }}</field>
<field name="auto_delete" eval="True" />
</record>
</odoo>
169 changes: 169 additions & 0 deletions delivery_state/i18n/delivery_state.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * delivery_state
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: delivery_state
#: model:mail.template,body_html:delivery_state.delivery_state_delivered_notification
msgid ""
"<div style=\"margin: 0px; padding: 0px;\">\n"
" <p style=\"margin: 0px; padding: 0px; font-size: 13px;\">\n"
" Hello <t t-out=\"object.partner_id.name\"></t>,<br><br>\n"
" Your package has been delivered!<br><br>\n"
" Order information<br>\n"
" Order <t t-out=\"object.carrier_tracking_ref\"></t><br>\n"
" <t t-if=\"user.signature\">\n"
" <br>\n"
" <t t-out=\"user.signature\"></t>\n"
" </t>\n"
" </p>\n"
" </div>\n"
" "
msgstr ""

#. module: delivery_state
#: model_terms:ir.ui.view,arch_db:delivery_state.res_config_settings_view_form
msgid ""
"<span class=\"fa fa-lg fa-building-o\" title=\"Values set here are company-"
"specific.\" groups=\"base.group_multi_company\"/>"
msgstr ""

#. module: delivery_state
#: model:ir.model.fields.selection,name:delivery_state.selection__stock_picking__delivery_state__canceled_shipment
msgid "Canceled shipment"
msgstr ""

#. module: delivery_state
#: model:ir.model.fields,field_description:delivery_state.field_stock_picking__delivery_state
msgid "Carrier State"
msgstr ""

#. module: delivery_state
#: model:ir.model,name:delivery_state.model_res_company
msgid "Companies"
msgstr ""

#. module: delivery_state
#: model:ir.model,name:delivery_state.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: delivery_state
#: model:ir.model.fields.selection,name:delivery_state.selection__stock_picking__delivery_state__customer_delivered
msgid "Customer delivered"
msgstr ""

#. module: delivery_state
#: model:ir.model.fields,field_description:delivery_state.field_stock_picking__date_delivered
msgid "Delivery Date"
msgstr ""

#. module: delivery_state
#: model:mail.template,name:delivery_state.delivery_state_delivered_notification
msgid "Delivery: Picking delivered by Email"
msgstr ""

#. module: delivery_state
#: model_terms:ir.ui.view,arch_db:delivery_state.res_config_settings_view_form
msgid "Email Confirmation (customer delivered)"
msgstr ""

#. module: delivery_state
#: model:ir.model.fields,field_description:delivery_state.field_res_company__delivery_state_delivered_email_validation
#: model:ir.model.fields,field_description:delivery_state.field_res_config_settings__delivery_state_delivered_email_validation
msgid "Email Confirmation delivered picking"
msgstr ""

#. module: delivery_state
#: model_terms:ir.ui.view,arch_db:delivery_state.res_config_settings_view_form
msgid "Email Template"
msgstr ""

#. module: delivery_state
#: model:ir.model.fields,field_description:delivery_state.field_res_company__delivery_state_delivered_mail_template_id
#: model:ir.model.fields,field_description:delivery_state.field_res_config_settings__delivery_state_delivered_mail_template_id
msgid "Email Template delivered picking"
msgstr ""

#. module: delivery_state
#: model:ir.model.fields.selection,name:delivery_state.selection__stock_picking__delivery_state__in_transit
msgid "In transit"
msgstr ""

#. module: delivery_state
#: model:ir.model.fields.selection,name:delivery_state.selection__stock_picking__delivery_state__incident
msgid "Incident"
msgstr ""

#. module: delivery_state
#: model:ir.model.fields.selection,name:delivery_state.selection__stock_picking__delivery_state__no_update
msgid "No more updates from carrier"
msgstr ""

#. module: delivery_state
#: model_terms:ir.ui.view,arch_db:delivery_state.res_config_settings_view_form
msgid ""
"Send an automatic confirmation email when Delivery Orders are delivered"
msgstr ""

#. module: delivery_state
#: model:ir.model.fields,field_description:delivery_state.field_stock_picking__date_shipped
msgid "Shipment Date"
msgstr ""

#. module: delivery_state
#: model:ir.model,name:delivery_state.model_delivery_carrier
msgid "Shipping Methods"
msgstr ""

#. module: delivery_state
#: model:ir.model.fields.selection,name:delivery_state.selection__stock_picking__delivery_state__shipping_recorded_in_carrier
msgid "Shipping recorded in carrier"
msgstr ""

#. module: delivery_state
#: model:ir.model.fields,field_description:delivery_state.field_stock_picking__tracking_state
msgid "Tracking State"
msgstr ""

#. module: delivery_state
#: model:ir.model.fields,field_description:delivery_state.field_stock_picking__tracking_state_history
msgid "Tracking State History"
msgstr ""

#. module: delivery_state
#: model:ir.model,name:delivery_state.model_stock_picking
msgid "Transfer"
msgstr ""

#. module: delivery_state
#: model:ir.actions.server,name:delivery_state.ir_cron_delivery_state_ir_actions_server
msgid "Update deliveries states"
msgstr ""

#. module: delivery_state
#: model_terms:ir.ui.view,arch_db:delivery_state.view_picking_withcarrier_out_form
msgid "Update tracking state"
msgstr ""

#. module: delivery_state
#: model:ir.model.fields.selection,name:delivery_state.selection__stock_picking__delivery_state__warehouse_delivered
msgid "Warehouse delivered"
msgstr ""

#. module: delivery_state
#: model:mail.template,subject:delivery_state.delivery_state_delivered_notification
msgid ""
"Your order {{ object.carrier_tracking_ref or object.name }} from {{ "
"object.company_id.name }}"
msgstr ""
Loading
Loading