Skip to content

Commit dbb532e

Browse files
committed
[ADD] shopfloor_mobile_printing_base
1 parent 00ffe6b commit dbb532e

File tree

15 files changed

+1115
-0
lines changed

15 files changed

+1115
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../shopfloor_mobile_printing_base
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import setuptools
2+
3+
setuptools.setup(
4+
setup_requires=['setuptools-odoo'],
5+
odoo_addon=True,
6+
)
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
==============================
2+
Shopfloor Mobile Printing Base
3+
==============================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:87d0a3ca476eeb63945ef15e1ba78c79e0384b64eb7cfb1071f1724cbb7746c8
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%2Fwms-lightgray.png?logo=github
20+
:target: https://github.com/OCA/wms/tree/16.0/shopfloor_mobile_printing_base
21+
:alt: OCA/wms
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/wms-16-0/wms-16-0-shopfloor_mobile_printing_base
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/wms&target_branch=16.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module allows to use a new Vue component that allows to send print
32+
commands with an amount of copies.
33+
34+
**Table of contents**
35+
36+
.. contents::
37+
:local:
38+
39+
Usage
40+
=====
41+
42+
Use this in your component template:
43+
44+
``<label-printer v-on:print_labels="state.print_labels($event)" buttonLabel="<The label>"/>``
45+
46+
Implement the ``print_labels()`` (or whatever you call it) method on
47+
your component level:
48+
49+
::
50+
51+
const Reception = process_registry.extend("reception", {
52+
template: new_template,
53+
"methods._get_states": function () {
54+
let states = _get_states.bind(this)();
55+
const set_destination = states.set_destination;
56+
57+
const self = this;
58+
set_destination.print_labels = function (quantity) {
59+
self.wait_call(
60+
self.odoo.call("print_labels", {
61+
picking_id: self.state.data.picking.id,
62+
selected_line_id: self.state.data.selected_move_line[0].id,
63+
quantity: quantity,
64+
})
65+
);
66+
};
67+
return states;
68+
},
69+
});
70+
71+
See ``shopfloor_printing_base`` for backend implementation.
72+
73+
Bug Tracker
74+
===========
75+
76+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/wms/issues>`_.
77+
In case of trouble, please check there if your issue has already been reported.
78+
If you spotted it first, help us to smash it by providing a detailed and welcomed
79+
`feedback <https://github.com/OCA/wms/issues/new?body=module:%20shopfloor_mobile_printing_base%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
80+
81+
Do not contact contributors directly about support or help with technical issues.
82+
83+
Credits
84+
=======
85+
86+
Authors
87+
-------
88+
89+
* ACSONE SA/NV
90+
91+
Contributors
92+
------------
93+
94+
- Denis Roussel [email protected]
95+
96+
Maintainers
97+
-----------
98+
99+
This module is maintained by the OCA.
100+
101+
.. image:: https://odoo-community.org/logo.png
102+
:alt: Odoo Community Association
103+
:target: https://odoo-community.org
104+
105+
OCA, or the Odoo Community Association, is a nonprofit organization whose
106+
mission is to support the collaborative development of Odoo features and
107+
promote its widespread use.
108+
109+
.. |maintainer-rousseldenis| image:: https://github.com/rousseldenis.png?size=40px
110+
:target: https://github.com/rousseldenis
111+
:alt: rousseldenis
112+
113+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
114+
115+
|maintainer-rousseldenis|
116+
117+
This module is part of the `OCA/wms <https://github.com/OCA/wms/tree/16.0/shopfloor_mobile_printing_base>`_ project on GitHub.
118+
119+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

shopfloor_mobile_printing_base/__init__.py

Whitespace-only changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright 2025 ACSONE SA/NV
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "Shopfloor Mobile Printing Base",
6+
"summary": """This module adds the widget to print in shopfloor""",
7+
"version": "16.0.1.0.0",
8+
"license": "AGPL-3",
9+
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
10+
"maintainers": ["rousseldenis"],
11+
"website": "https://github.com/OCA/wms",
12+
"depends": [
13+
"shopfloor_mobile_base",
14+
],
15+
"data": ["templates/assets.xml"],
16+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Denis Roussel <[email protected]>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This module allows to use a new Vue component that allows to send print commands
2+
with an amount of copies.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Use this in your component template:
2+
3+
` <label-printer v-on:print_labels="state.print_labels($event)" buttonLabel="<The label>"/> `
4+
5+
Implement the `print_labels()` (or whatever you call it) method on your component level:
6+
7+
```
8+
const Reception = process_registry.extend("reception", {
9+
template: new_template,
10+
"methods._get_states": function () {
11+
let states = _get_states.bind(this)();
12+
const set_destination = states.set_destination;
13+
14+
const self = this;
15+
set_destination.print_labels = function (quantity) {
16+
self.wait_call(
17+
self.odoo.call("print_labels", {
18+
picking_id: self.state.data.picking.id,
19+
selected_line_id: self.state.data.selected_move_line[0].id,
20+
quantity: quantity,
21+
})
22+
);
23+
};
24+
return states;
25+
},
26+
});
27+
```
28+
29+
See `shopfloor_printing_base` for backend implementation.
9.23 KB
Loading

0 commit comments

Comments
 (0)