Skip to content

Commit 0bee3ea

Browse files
committed
Add shopfloor_stock_picking_partner_note
1 parent e18e5d8 commit 0bee3ea

File tree

10 files changed

+193
-0
lines changed

10 files changed

+193
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../shopfloor_stock_picking_partner_note
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: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
======================
2+
Shopfloor Packing 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:5c613b779f18beeb6e4777e4a446034ffe3a8e86142a77e0c68b1338d60c3a11
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Alpha
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/14.0/shopfloor_packing_info
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-14-0/wms-14-0-shopfloor_packing_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/wms&target_branch=14.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
Adds the option to choose predefined messages for the
32+
parameter "Checkout Packing Info", that is set on Customers
33+
and reused in other places, mainly pickings. These new messages
34+
are archived instead of deleted, to keep track of old messages
35+
associated to existing (or archived) Customers.
36+
37+
The new predefined messages can be created directly in the partner
38+
or in the menu Inventory > Settings > Shopfloor.
39+
40+
.. IMPORTANT::
41+
This is an alpha version, the data model and design can change at any time without warning.
42+
Only for development or testing purpose, do not use in production.
43+
`More details on development status <https://odoo-community.org/page/development-status>`_
44+
45+
**Table of contents**
46+
47+
.. contents::
48+
:local:
49+
50+
Bug Tracker
51+
===========
52+
53+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/wms/issues>`_.
54+
In case of trouble, please check there if your issue has already been reported.
55+
If you spotted it first, help us to smash it by providing a detailed and welcomed
56+
`feedback <https://github.com/OCA/wms/issues/new?body=module:%20shopfloor_packing_info%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
57+
58+
Do not contact contributors directly about support or help with technical issues.
59+
60+
Credits
61+
=======
62+
63+
Authors
64+
~~~~~~~
65+
66+
* Camptocamp
67+
68+
Contributors
69+
~~~~~~~~~~~~
70+
71+
* Carlos Serra-Toro <[email protected]>
72+
* Simone Orsi <[email protected]>
73+
74+
Maintainers
75+
~~~~~~~~~~~
76+
77+
This module is maintained by the OCA.
78+
79+
.. image:: https://odoo-community.org/logo.png
80+
:alt: Odoo Community Association
81+
:target: https://odoo-community.org
82+
83+
OCA, or the Odoo Community Association, is a nonprofit organization whose
84+
mission is to support the collaborative development of Odoo features and
85+
promote its widespread use.
86+
87+
This module is part of the `OCA/wms <https://github.com/OCA/wms/tree/14.0/shopfloor_packing_info>`_ project on GitHub.
88+
89+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

shopfloor_stock_picking_partner_note/__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 2021 Camptocamp SA (https://www.camptocamp.com)
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
3+
{
4+
"name": "Shopfloor Stock Picking Partner Note",
5+
"summary": "Adapts Shopfloor to Module stock_picking_partner_note",
6+
"version": "14.0.1.0.0",
7+
"development_status": "Alpha",
8+
"category": "Inventory",
9+
"website": "https://github.com/OCA/wms",
10+
"author": "Camptocamp, Odoo Community Association (OCA)",
11+
"license": "AGPL-3",
12+
"application": False,
13+
"depends": ["shopfloor", "stock_picking_partner_note"],
14+
"data": ["templates/assets.xml"],
15+
"auto_install": True,
16+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* Juan Miguel Sánchez Arce <[email protected]>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
This module is created to integrate the features from stock_picking_partner_note into shopfloor.
2+
3+
For example, that module makes the stock picking notes computed and stored as an Html field,
4+
which is not compatible with the shopfloor mobile frontend as it expects the notes to be stored as a simple text field.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Copyright 2024 Camptocamp SA (http://www.camptocamp.com)
3+
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
4+
*/
5+
6+
import {process_registry} from "/shopfloor_mobile_base/static/wms/src/services/process_registry.js";
7+
8+
// stock_picking_partner_note makes the 'note' field in pickings an HTML field,
9+
// which means that we need to display the note as HTML in the shopfloor frontend as well.
10+
const checkout_scenario = process_registry.get("checkout");
11+
const template = checkout_scenario.component.template;
12+
const new_template = template.replace(
13+
'v-text="state.data.picking.note"',
14+
'v-html="state.data.picking.note"'
15+
);
16+
17+
const CheckoutStockPickingPartnerNote = process_registry.extend("checkout", {
18+
template: new_template,
19+
});
20+
21+
process_registry.replace("checkout", CheckoutStockPickingPartnerNote);
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* Copyright 2024 Camptocamp SA (http://www.camptocamp.com)
3+
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
4+
*/
5+
6+
import {process_registry} from "/shopfloor_mobile_base/static/wms/src/services/process_registry.js";
7+
8+
// stock_picking_partner_note makes the 'note' field in pickings an HTML field,
9+
// which means that we need to display the note as HTML in the shopfloor frontend as well.
10+
const cluster_picking_scenario = process_registry.get("cluster_picking");
11+
const template = cluster_picking_scenario.component.template;
12+
const new_template = template.replace(
13+
'v-text="state.data.picking.note"',
14+
'v-html="state.data.picking.note"'
15+
);
16+
17+
const ClusterPickingStockPickingPartnerNote = process_registry.extend(
18+
"cluster_picking",
19+
{
20+
template: new_template,
21+
}
22+
);
23+
24+
process_registry.replace("cluster_picking", ClusterPickingStockPickingPartnerNote);
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<!-- Copyright 2024 Camptocamp SA
3+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
4+
<odoo>
5+
6+
<template
7+
id="shopfloor_app_assets"
8+
inherit_id="shopfloor_mobile.shopfloor_app_assets"
9+
>
10+
<script id="script_scenario_zone_picking" position="after">
11+
12+
<t
13+
t-set="mod_version"
14+
t-value="get_version('shopfloor_stock_picking_partner_note')"
15+
/>
16+
<script
17+
id="script_scenario_checkout_stock_picking_partner_note"
18+
t-attf-src="/shopfloor_stock_picking_partner_note/static/src/scenario/checkout.js?v=#{mod_version}"
19+
type="module"
20+
/>
21+
<script
22+
id="script_scenario_cluster_picking_stock_picking_partner_note"
23+
t-attf-src="/shopfloor_stock_picking_partner_note/static/src/scenario/cluster_picking.js?v=#{mod_version}"
24+
type="module"
25+
/>
26+
27+
28+
</script>
29+
</template>
30+
31+
</odoo>

0 commit comments

Comments
 (0)