Skip to content

Commit 73b64f5

Browse files
committed
Merge PR #985 into 18.0
Signed-off-by hparfr
2 parents b4a300e + 3736568 commit 73b64f5

18 files changed

+1380
-0
lines changed
+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
================================
2+
Default label for carrier labels
3+
================================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:e63d345236f826a7ea806aac0780e01f91e9d07acc0ade837f666b76a7de4d00
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_label_default
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_label_default
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 defines a basic label to print when no specific carrier is
32+
selected.
33+
34+
**Table of contents**
35+
36+
.. contents::
37+
:local:
38+
39+
Known issues / Roadmap
40+
======================
41+
42+
- Make the label report configurable at the company level
43+
44+
Bug Tracker
45+
===========
46+
47+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/delivery-carrier/issues>`_.
48+
In case of trouble, please check there if your issue has already been reported.
49+
If you spotted it first, help us to smash it by providing a detailed and welcomed
50+
`feedback <https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_carrier_label_default%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
51+
52+
Do not contact contributors directly about support or help with technical issues.
53+
54+
Credits
55+
=======
56+
57+
Authors
58+
-------
59+
60+
* Camptocamp
61+
62+
Contributors
63+
------------
64+
65+
- Yannick Vaucher <yannick.vaucher@camptocamp.com>
66+
- Sébastien Alix <sebastien.alix@camptocamp.com>
67+
- Sergio Teruel <sergio.teruel@tecnativa.com>
68+
- Iryna Vyshnevska <i.vyshnevska@mobilunity.com>
69+
- Italo Lopes <italo.lopes@camptocamp.com>
70+
71+
Other credits
72+
-------------
73+
74+
Images
75+
~~~~~~
76+
77+
- Odoo Community Association:
78+
`Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`__.
79+
80+
Maintainers
81+
-----------
82+
83+
This module is maintained by the OCA.
84+
85+
.. image:: https://odoo-community.org/logo.png
86+
:alt: Odoo Community Association
87+
:target: https://odoo-community.org
88+
89+
OCA, or the Odoo Community Association, is a nonprofit organization whose
90+
mission is to support the collaborative development of Odoo features and
91+
promote its widespread use.
92+
93+
This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/18.0/delivery_carrier_label_default>`_ project on GitHub.
94+
95+
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,21 @@
1+
# Copyright 2013-2019 Camptocamp SA
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
3+
{
4+
"name": "Default label for carrier labels",
5+
"summary": "This module defines a basic label to print "
6+
"when no specific carrier is selected.",
7+
"version": "18.0.1.0.0",
8+
"category": "Delivery",
9+
"website": "https://github.com/OCA/delivery-carrier",
10+
"author": "Camptocamp, Odoo Community Association (OCA)",
11+
"license": "AGPL-3",
12+
"installable": True,
13+
"depends": [
14+
"stock_delivery",
15+
"delivery_carrier_shipping_label",
16+
],
17+
"data": [
18+
"views/report_default_label.xml",
19+
"views/reports.xml",
20+
],
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * delivery_carrier_label_default
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 12.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: delivery_carrier_label_default
17+
#: model:ir.actions.report,name:delivery_carrier_label_default.default_label
18+
msgid "Shipping Label"
19+
msgstr ""
20+
21+
#. module: delivery_carrier_label_default
22+
#: model:ir.model,name:delivery_carrier_label_default.model_stock_picking
23+
msgid "Transfer"
24+
msgstr ""
25+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import stock_picking
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2013-2019 Camptocamp SA
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
3+
import base64
4+
5+
from odoo import models
6+
7+
8+
class StockPicking(models.Model):
9+
_inherit = "stock.picking"
10+
11+
def generate_default_label(self):
12+
"""Generate a label from a qweb report."""
13+
self.ensure_one()
14+
report = self.env.ref(
15+
"delivery_carrier_label_default.action_report_default_label"
16+
)
17+
file_, file_type = report._render(report.report_name, res_ids=self.ids)
18+
return {
19+
"name": f"{report.name}.{file_type}",
20+
"file": base64.b64encode(file_),
21+
"file_type": file_type,
22+
}
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,5 @@
1+
- Yannick Vaucher \<<yannick.vaucher@camptocamp.com>\>
2+
- Sébastien Alix \<<sebastien.alix@camptocamp.com>\>
3+
- Sergio Teruel \<<sergio.teruel@tecnativa.com>\>
4+
- Iryna Vyshnevska \<<i.vyshnevska@mobilunity.com>\>
5+
- Italo Lopes \<<italo.lopes@camptocamp.com>\>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## Images
2+
3+
- Odoo Community Association:
4+
[Icon](https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This module defines a basic label to print when no specific carrier is
2+
selected.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Make the label report configurable at the company level

0 commit comments

Comments
 (0)