forked from OCA/wms
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add shopfloor_stock_picking_partner_note
- Loading branch information
Showing
10 changed files
with
193 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
setup/shopfloor_stock_picking_partner_note/odoo/addons/shopfloor_stock_picking_partner_note
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../shopfloor_stock_picking_partner_note |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
====================== | ||
Shopfloor Packing Info | ||
====================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:5c613b779f18beeb6e4777e4a446034ffe3a8e86142a77e0c68b1338d60c3a11 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Alpha | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fwms-lightgray.png?logo=github | ||
:target: https://github.com/OCA/wms/tree/14.0/shopfloor_packing_info | ||
:alt: OCA/wms | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/wms-14-0/wms-14-0-shopfloor_packing_info | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
:target: https://runboat.odoo-community.org/builds?repo=OCA/wms&target_branch=14.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
Adds the option to choose predefined messages for the | ||
parameter "Checkout Packing Info", that is set on Customers | ||
and reused in other places, mainly pickings. These new messages | ||
are archived instead of deleted, to keep track of old messages | ||
associated to existing (or archived) Customers. | ||
|
||
The new predefined messages can be created directly in the partner | ||
or in the menu Inventory > Settings > Shopfloor. | ||
|
||
.. IMPORTANT:: | ||
This is an alpha version, the data model and design can change at any time without warning. | ||
Only for development or testing purpose, do not use in production. | ||
`More details on development status <https://odoo-community.org/page/development-status>`_ | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/wms/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
`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**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* Camptocamp | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Carlos Serra-Toro <[email protected]> | ||
* Simone Orsi <[email protected]> | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
This module is part of the `OCA/wms <https://github.com/OCA/wms/tree/14.0/shopfloor_packing_info>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright 2021 Camptocamp SA (https://www.camptocamp.com) | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html) | ||
{ | ||
"name": "Shopfloor Stock Picking Partner Note", | ||
"summary": "Adapts Shopfloor to Module stock_picking_partner_note", | ||
"version": "14.0.1.0.0", | ||
"development_status": "Alpha", | ||
"category": "Inventory", | ||
"website": "https://github.com/OCA/wms", | ||
"author": "Camptocamp, Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"application": False, | ||
"depends": ["shopfloor", "stock_picking_partner_note"], | ||
"data": ["templates/assets.xml"], | ||
"auto_install": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* Juan Miguel Sánchez Arce <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
This module is created to integrate the features from stock_picking_partner_note into shopfloor. | ||
|
||
For example, that module makes the stock picking notes computed and stored as an Html field, | ||
which is not compatible with the shopfloor mobile frontend as it expects the notes to be stored as a simple text field. |
21 changes: 21 additions & 0 deletions
21
shopfloor_stock_picking_partner_note/static/src/scenario/checkout.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Copyright 2024 Camptocamp SA (http://www.camptocamp.com) | ||
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
*/ | ||
|
||
import {process_registry} from "/shopfloor_mobile_base/static/wms/src/services/process_registry.js"; | ||
|
||
// stock_picking_partner_note makes the 'note' field in pickings an HTML field, | ||
// which means that we need to display the note as HTML in the shopfloor frontend as well. | ||
const checkout_scenario = process_registry.get("checkout"); | ||
const template = checkout_scenario.component.template; | ||
const new_template = template.replace( | ||
'v-text="state.data.picking.note"', | ||
'v-html="state.data.picking.note"' | ||
); | ||
|
||
const CheckoutStockPickingPartnerNote = process_registry.extend("checkout", { | ||
template: new_template, | ||
}); | ||
|
||
process_registry.replace("checkout", CheckoutStockPickingPartnerNote); |
24 changes: 24 additions & 0 deletions
24
shopfloor_stock_picking_partner_note/static/src/scenario/cluster_picking.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* Copyright 2024 Camptocamp SA (http://www.camptocamp.com) | ||
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
*/ | ||
|
||
import {process_registry} from "/shopfloor_mobile_base/static/wms/src/services/process_registry.js"; | ||
|
||
// stock_picking_partner_note makes the 'note' field in pickings an HTML field, | ||
// which means that we need to display the note as HTML in the shopfloor frontend as well. | ||
const cluster_picking_scenario = process_registry.get("cluster_picking"); | ||
const template = cluster_picking_scenario.component.template; | ||
const new_template = template.replace( | ||
'v-text="state.data.picking.note"', | ||
'v-html="state.data.picking.note"' | ||
); | ||
|
||
const ClusterPickingStockPickingPartnerNote = process_registry.extend( | ||
"cluster_picking", | ||
{ | ||
template: new_template, | ||
} | ||
); | ||
|
||
process_registry.replace("cluster_picking", ClusterPickingStockPickingPartnerNote); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- Copyright 2024 Camptocamp SA | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> | ||
<odoo> | ||
|
||
<template | ||
id="shopfloor_app_assets" | ||
inherit_id="shopfloor_mobile.shopfloor_app_assets" | ||
> | ||
<script id="script_scenario_zone_picking" position="after"> | ||
|
||
<t | ||
t-set="mod_version" | ||
t-value="get_version('shopfloor_stock_picking_partner_note')" | ||
/> | ||
<script | ||
id="script_scenario_checkout_stock_picking_partner_note" | ||
t-attf-src="/shopfloor_stock_picking_partner_note/static/src/scenario/checkout.js?v=#{mod_version}" | ||
type="module" | ||
/> | ||
<script | ||
id="script_scenario_cluster_picking_stock_picking_partner_note" | ||
t-attf-src="/shopfloor_stock_picking_partner_note/static/src/scenario/cluster_picking.js?v=#{mod_version}" | ||
type="module" | ||
/> | ||
|
||
|
||
</script> | ||
</template> | ||
|
||
</odoo> |