Skip to content

Commit c5a5381

Browse files
author
ilo
committed
[18.0][ADD] delivery_carrier_package_info
1 parent 3b9dba7 commit c5a5381

File tree

11 files changed

+610
-0
lines changed

11 files changed

+610
-0
lines changed
+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
=============================
2+
Delivery Carrier Package Info
3+
=============================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:366776b89f80b8f5bed4b4b5b961f2858a0aed73f7c383bdaa560bec2edc854c
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fdelivery--carrier-lightgray.png?logo=github
20+
:target: https://github.com/OCA/delivery-carrier/tree/18.0/delivery_carrier_package_info
21+
:alt: OCA/delivery-carrier
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/delivery-carrier-18-0/delivery-carrier-18-0-delivery_carrier_package_info
24+
:alt: Translate me on Weblate
25+
.. |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=18.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module add the fields ``parcel_tracking`` and
32+
``parcel_tracking_uri`` on ``stock.quant.package`` model.
33+
34+
**Table of contents**
35+
36+
.. contents::
37+
:local:
38+
39+
Bug Tracker
40+
===========
41+
42+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/delivery-carrier/issues>`_.
43+
In case of trouble, please check there if your issue has already been reported.
44+
If you spotted it first, help us to smash it by providing a detailed and welcomed
45+
`feedback <https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_carrier_package_info%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
46+
47+
Do not contact contributors directly about support or help with technical issues.
48+
49+
Credits
50+
=======
51+
52+
Authors
53+
-------
54+
55+
* Camptocamp
56+
57+
Contributors
58+
------------
59+
60+
- Sébastien BEAU <sebastien.beau@akretion.com>
61+
- Guewen Baconnier <guewen.baconnier@camptocamp.com>
62+
- Foram Shah <foram.shah@initos.com>
63+
- Italo Lopes <italo.lopes@camptocamp.com>
64+
65+
Maintainers
66+
-----------
67+
68+
This module is maintained by the OCA.
69+
70+
.. image:: https://odoo-community.org/logo.png
71+
:alt: Odoo Community Association
72+
:target: https://odoo-community.org
73+
74+
OCA, or the Odoo Community Association, is a nonprofit organization whose
75+
mission is to support the collaborative development of Odoo features and
76+
promote its widespread use.
77+
78+
This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/18.0/delivery_carrier_package_info>`_ project on GitHub.
79+
80+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright 2020 Akretion (https://www.akretion.com).
2+
# @author Sébastien BEAU <sebastien.beau@akretion.com>
3+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
4+
5+
6+
{
7+
"name": "Delivery Carrier Package Info",
8+
"summary": "Add track ref on packages",
9+
"version": "18.0.1.0.0",
10+
"category": "Delivery",
11+
"website": "https://github.com/OCA/delivery-carrier",
12+
"author": "Camptocamp,Odoo Community Association (OCA)",
13+
"license": "AGPL-3",
14+
"depends": [
15+
"delivery",
16+
],
17+
"data": ["views/stock_quant_package.xml"],
18+
"application": False,
19+
"installable": True,
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import stock_quant_package
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright 2020 Akretion (https://www.akretion.com).
2+
# Copyright 2020 Camptocamp SA
3+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
4+
5+
from odoo import api, fields, models
6+
7+
8+
class StockQuantPackage(models.Model):
9+
_inherit = "stock.quant.package"
10+
11+
parcel_tracking = fields.Char()
12+
parcel_tracking_uri = fields.Char(
13+
help="Link to the carrier's tracking page for this package."
14+
)
15+
16+
@api.depends("parcel_tracking", "name")
17+
def _compute_display_name(self):
18+
res = super()._compute_display_name()
19+
for pack in self:
20+
if pack.parcel_tracking:
21+
pack.display_name = f"{pack.display_name} - {pack.parcel_tracking}"
22+
return res
23+
24+
def open_website_url(self):
25+
"""Implement you own action in your module"""
26+
return None
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- Sébastien BEAU \<<sebastien.beau@akretion.com>\>
2+
- Guewen Baconnier \<<guewen.baconnier@camptocamp.com>\>
3+
- Foram Shah \<<foram.shah@initos.com>\>
4+
- Italo Lopes \<<italo.lopes@camptocamp.com>\>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This module add the fields ``parcel_tracking`` and ``parcel_tracking_uri`` on ``stock.quant.package`` model.
Loading

0 commit comments

Comments
 (0)