Skip to content

Commit 13f54a9

Browse files
committed
Merge PR #599 into 16.0
Signed-off-by rousseldenis
2 parents bdb18c7 + eee5dd2 commit 13f54a9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+3067
-0
lines changed

delivery_carrier_label_gls/README.rst

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
==========================
2+
Delivery Carrier Label GLS
3+
==========================
4+
5+
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6+
!! This file is generated by oca-gen-addon-readme !!
7+
!! changes will be overwritten. !!
8+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9+
10+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
11+
:target: https://odoo-community.org/page/development-status
12+
:alt: Beta
13+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
14+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
15+
:alt: License: AGPL-3
16+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fdelivery--carrier-lightgray.png?logo=github
17+
:target: https://github.com/OCA/delivery-carrier/tree/16.0/delivery_carrier_label_gls
18+
:alt: OCA/delivery-carrier
19+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
20+
:target: https://translation.odoo-community.org/projects/delivery-carrier-16-0/delivery-carrier-16-0-delivery_carrier_label_gls
21+
:alt: Translate me on Weblate
22+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
23+
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/delivery-carrier&target_branch=16.0
24+
:alt: Try me on Runboat
25+
26+
|badge1| |badge2| |badge3| |badge4| |badge5|
27+
28+
Integration with GLS shipping webservices.
29+
Documentation:
30+
http://gls-shipit.gls-group.eu/webservices/2_8_11/doxygen/WS-REST-API/index.html
31+
32+
**Table of contents**
33+
34+
.. contents::
35+
:local:
36+
37+
Configuration
38+
=============
39+
40+
To start using GLS, you need to configure two types of settings in
41+
*Inventory - Configuration- Delivery* or *Inventory - Configuration - Settings*
42+
which leads to the right section in inventory global settings.
43+
First you have the *Carrier Account* where you find account number
44+
and password then you also have *Shipping Methods* with other GLS
45+
parameters to configure such as contact ID, urls and return address.
46+
These 2 types of settings use **"GLS"** as delivery type.
47+
The contact ID corresponds to the sender which needs to be a contact in the
48+
GLS database. This determines the default return address, as well as the billing.
49+
You can also configure the tracking url that is used for each carrier.
50+
51+
For client integration tests you need to fill your credentials in the tests/common.py.
52+
53+
Usage
54+
=====
55+
56+
Create the packages on GLS which returns a tracking ID.
57+
If there is any kind of mistake (address, weight),
58+
it is possible to cancel it as long as it has not been scanned yet.
59+
If the package is not cancelled, it is invoiced even if it never ships.
60+
61+
When sending a picking, all products should be put in one or multiple packages.
62+
These packages need to have a GLS packaging either Parcel, Express, or Freight.
63+
These are already pre-configured in the module data.
64+
65+
The end of day report should be printed when the delivery takes place.
66+
At the last resort, this function should be called at the end of the day.
67+
If it had already run, it would have no impact.
68+
In case the delivery is delayed, the report should simply be kept for the
69+
next day, and provided with the next report if there is one.
70+
71+
Bug Tracker
72+
===========
73+
74+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/delivery-carrier/issues>`_.
75+
In case of trouble, please check there if your issue has already been reported.
76+
If you spotted it first, help us smashing it by providing a detailed and welcomed
77+
`feedback <https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_carrier_label_gls%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
78+
79+
Do not contact contributors directly about support or help with technical issues.
80+
81+
Credits
82+
=======
83+
84+
Authors
85+
~~~~~~~
86+
87+
* Acsone
88+
* Akretion
89+
90+
Contributors
91+
~~~~~~~~~~~~
92+
93+
* David Beal @ Akretion
94+
* Nans Lefebvre <nans.lefebvre@acsone.eu>
95+
* Laurent Mignon <laurent.mignon@acsone.eu>
96+
* Hughes Damry <hughes.damry@acsone.eu>
97+
98+
Maintainers
99+
~~~~~~~~~~~
100+
101+
This module is maintained by the OCA.
102+
103+
.. image:: https://odoo-community.org/logo.png
104+
:alt: Odoo Community Association
105+
:target: https://odoo-community.org
106+
107+
OCA, or the Odoo Community Association, is a nonprofit organization whose
108+
mission is to support the collaborative development of Odoo features and
109+
promote its widespread use.
110+
111+
This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/16.0/delivery_carrier_label_gls>`_ project on GitHub.
112+
113+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .hooks import post_init_hook
2+
from . import models
3+
from . import wizards
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# © 2015 David BEAL @ Akretion
2+
# Copyright 2021 ACSONE SA/NV
3+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
4+
5+
{
6+
"name": "Delivery Carrier Label GLS",
7+
"version": "16.0.1.0.0",
8+
"author": "Acsone,Akretion,Odoo Community Association (OCA)",
9+
"maintener": "Akretion",
10+
"category": "Warehouse",
11+
"summary": "GLS carrier label printing",
12+
"depends": [
13+
"base_delivery_carrier_label",
14+
"delivery",
15+
"delivery_carrier_account",
16+
],
17+
"website": "https://github.com/OCA/delivery-carrier",
18+
"data": [
19+
"security/groups.xml",
20+
"security/ir.model.access.csv",
21+
"data/ir_cron.xml",
22+
"data/product_product.xml",
23+
"data/carrier_account.xml",
24+
"data/delivery_carrier.xml",
25+
"data/stock_package_type.xml",
26+
"views/res_config_settings.xml",
27+
"views/delivery_carrier.xml",
28+
"views/delivery_report_gls.xml",
29+
"views/sale_order.xml",
30+
"views/stock.xml",
31+
"views/carrier_account.xml",
32+
"wizards/delivery_report_gls_wizard.xml",
33+
"report/report_delivery_report_gls.xml",
34+
"report/delivery_report_gls_view.xml",
35+
],
36+
"license": "AGPL-3",
37+
"installable": True,
38+
"auto_install": False,
39+
"application": False,
40+
"post_init_hook": "post_init_hook",
41+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo noupdate="1">
3+
<record id="carrier_account_gls" model="carrier.account">
4+
<field name="name">GLS</field>
5+
<field name="delivery_type">gls</field>
6+
<field name="account">CHANGE ME</field>
7+
<field name="password">CHANGE ME</field>
8+
</record>
9+
<record forcecreate="True" id="carrier_account_id_gls" model="ir.property">
10+
<field name="name">carrier_account_id</field>
11+
<field
12+
name="fields_id"
13+
search="[('model','=','delivery.carrier'),('name','=','carrier_account_id')]"
14+
/>
15+
<field name="value" eval="'carrier.account,'+str(ref('carrier_account_gls'))" />
16+
</record>
17+
</odoo>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo noupdate="1">
3+
<record id="delivery_carrier_gls" model="delivery.carrier">
4+
<field name="name">GLS</field>
5+
<field name="delivery_type">gls</field>
6+
<field name="code">GLS</field>
7+
<field name="product_id" ref="delivery_carrier_label_gls.product_product_gls" />
8+
<field
9+
name="carrier_account_id"
10+
ref="delivery_carrier_label_gls.carrier_account_gls"
11+
/>
12+
<field name="gls_contact_id">CHANGE ME</field>
13+
<field
14+
name="gls_url"
15+
>https://shipit-wbm-test01.gls-group.eu:8443/backend/rs/</field>
16+
<field
17+
name="gls_url_test"
18+
>https://shipit-wbm-test01.gls-group.eu:8443/backend/rs/</field>
19+
<field
20+
name="gls_url_tracking"
21+
>https://gls-group.eu/EU/en/parcel-tracking/match=%s</field>
22+
<field name="gls_label_format">pdf</field>
23+
</record>
24+
</odoo>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo noupdate="1">
3+
<record forcecreate="True" id="cron_end_of_day_report" model="ir.cron">
4+
<field name="name">GLS: End of Day Report</field>
5+
<field name="active" eval="True" />
6+
<field name="user_id" ref="base.user_root" />
7+
<field name="interval_number">1</field>
8+
<field name="interval_type">days</field>
9+
<field name="numbercall">-1</field>
10+
<field name="doall" eval="False" />
11+
<field
12+
name="model_id"
13+
ref="delivery_carrier_label_gls.model_delivery_report_gls_wizard"
14+
/>
15+
<field name="code">model._cron_end_of_day_report()</field>
16+
<field name="nextcall" eval="(DateTime.now()).strftime('%Y-%m-%d 23:00:01')" />
17+
</record>
18+
</odoo>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<!-- Copyright 2021 ACSONE SA/NV
3+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
4+
<odoo noupdate="1">
5+
<record id="product_product_gls" model="product.product">
6+
<field name="default_code">SHIP_GLS</field>
7+
<field name="type">service</field>
8+
<field name="sale_ok" eval="False" />
9+
<field name="name">Shipping cost - GLS</field>
10+
<field
11+
name="image_1920"
12+
type="base64"
13+
file="delivery_carrier_label_gls/static/img/gls.jpg"
14+
/>
15+
</record>
16+
</odoo>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<!-- Copyright 2021 ACSONE SA/NV
3+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
4+
<odoo noupdate="1">
5+
<record id="packaging_gls_parcel" model="stock.package.type">
6+
<field name="name">GLS: Parcel</field>
7+
<field name="package_carrier_type">gls</field>
8+
<field name="shipper_package_code">PARCEL</field>
9+
<field name="max_weight">40</field>
10+
</record>
11+
<record id="packaging_gls_express" model="stock.package.type">
12+
<field name="name">GLS: Express</field>
13+
<field name="package_carrier_type">gls</field>
14+
<field name="shipper_package_code">EXPRESS</field>
15+
<field name="max_weight">40</field>
16+
</record>
17+
<record id="packaging_gls_freight" model="stock.package.type">
18+
<field name="name">GLS: Freight</field>
19+
<field name="package_carrier_type">gls</field>
20+
<field name="shipper_package_code">FREIGHT</field>
21+
<field name="max_weight">40</field>
22+
</record>
23+
</odoo>

delivery_carrier_label_gls/hooks.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright 2021 ACSONE SA/NV
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
from odoo import SUPERUSER_ID, api
5+
6+
7+
def post_init_hook(cr, registry):
8+
env = api.Environment(cr, SUPERUSER_ID, {})
9+
rcs = env["res.config.settings"].create({"company_id": env.company.id})
10+
rcs.group_stock_tracking_lot = True
11+
rcs.execute()

0 commit comments

Comments
 (0)