Skip to content

Commit

Permalink
[MIG] stock_barcodes_picking_batch: Migration to v16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sergio-teruel committed Jan 9, 2025
1 parent 9aad6aa commit e22fa7f
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 38 deletions.
6 changes: 6 additions & 0 deletions setup/stock_barcodes_picking_batch/setup.py
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,
)
12 changes: 6 additions & 6 deletions stock_barcodes_picking_batch/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Stock Barcodes Picking Batch
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f603dac65975b9a6fbb4e0b34d620e2f27ae121035f14da02e46ef1964c0b763
!! source digest: sha256:fc12527a3a89609fedd765c1c96e95ca6a633a3d428d74157376c47ac37167cf
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand All @@ -17,13 +17,13 @@ Stock Barcodes Picking Batch
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--barcode-lightgray.png?logo=github
:target: https://github.com/OCA/stock-logistics-barcode/tree/15.0/stock_barcodes_picking_batch
:target: https://github.com/OCA/stock-logistics-barcode/tree/16.0/stock_barcodes_picking_batch
:alt: OCA/stock-logistics-barcode
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/stock-logistics-barcode-15-0/stock-logistics-barcode-15-0-stock_barcodes_picking_batch
:target: https://translation.odoo-community.org/projects/stock-logistics-barcode-16-0/stock-logistics-barcode-16-0-stock_barcodes_picking_batch
: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/stock-logistics-barcode&target_branch=15.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-barcode&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand All @@ -47,7 +47,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-barcode/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/stock-logistics-barcode/issues/new?body=module:%20stock_barcodes_picking_batch%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/stock-logistics-barcode/issues/new?body=module:%20stock_barcodes_picking_batch%0Aversion:%2016.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.

Expand Down Expand Up @@ -81,6 +81,6 @@ 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/stock-logistics-barcode <https://github.com/OCA/stock-logistics-barcode/tree/15.0/stock_barcodes_picking_batch>`_ project on GitHub.
This module is part of the `OCA/stock-logistics-barcode <https://github.com/OCA/stock-logistics-barcode/tree/16.0/stock_barcodes_picking_batch>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
12 changes: 7 additions & 5 deletions stock_barcodes_picking_batch/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright 2021 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Stock Barcodes Picking Batch",
"summary": "It provides read barcodes on stock operations from batch pickings.",
"version": "15.0.1.0.1",
"version": "16.0.1.0.0",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-barcode",
"license": "AGPL-3",
Expand All @@ -15,9 +15,11 @@
"views/stock_picking_batch_views.xml",
"wizard/stock_barcodes_read_picking_batch_views.xml",
],
"web.assets_backend": [
"stock_barcodes_picking_batch/static/src/**/*.js",
],
"assets": {
"web.assets_backend": [
"stock_barcodes_picking_batch/static/src/**/*.js",
],
},
"installable": True,
"auto_install": True,
}
19 changes: 11 additions & 8 deletions stock_barcodes_picking_batch/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -274,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -300,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -366,9 +367,9 @@ <h1 class="title">Stock Barcodes Picking Batch</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f603dac65975b9a6fbb4e0b34d620e2f27ae121035f14da02e46ef1964c0b763
!! source digest: sha256:fc12527a3a89609fedd765c1c96e95ca6a633a3d428d74157376c47ac37167cf
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/stock-logistics-barcode/tree/15.0/stock_barcodes_picking_batch"><img alt="OCA/stock-logistics-barcode" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--barcode-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/stock-logistics-barcode-15-0/stock-logistics-barcode-15-0-stock_barcodes_picking_batch"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-barcode&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/stock-logistics-barcode/tree/16.0/stock_barcodes_picking_batch"><img alt="OCA/stock-logistics-barcode" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--barcode-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/stock-logistics-barcode-16-0/stock-logistics-barcode-16-0-stock_barcodes_picking_batch"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-barcode&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module extends barcode reader interface to allow to read quant barcodes.
After barcode has been readed the product, lot and location are been filled.</p>
<p><strong>Table of contents</strong></p>
Expand All @@ -393,7 +394,7 @@ <h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-barcode/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/stock-logistics-barcode/issues/new?body=module:%20stock_barcodes_picking_batch%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/stock-logistics-barcode/issues/new?body=module:%20stock_barcodes_picking_batch%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -417,11 +418,13 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-barcode/tree/15.0/stock_barcodes_picking_batch">OCA/stock-logistics-barcode</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-barcode/tree/16.0/stock_barcodes_picking_batch">OCA/stock-logistics-barcode</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/** @odoo-module */
/* Copyright 2024 Tecnativa - Sergio Teruel
* License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). */

import {barcodeModels} from "@stock_barcodes/utils/barcodes_models_utils.esm";

barcodeModels.push("stock.picking.batch", "wiz.candidate.picking.batch");
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def setUpClass(cls):
"location_dest_id": cls.customer_location.id,
"partner_id": cls.partner_agrolite.id,
"picking_type_id": cls.picking_type_out.id,
"move_lines": [
"move_ids": [
Command.create(
{
"name": cls.product_wo_tracking.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class WizStockBarcodesReadPickingBatch(models.TransientModel):
)
confirmed_moves = fields.Boolean(string="Confirmed moves")
picking_mode = fields.Selection(
selection_add=[("picking_batch", "Picking batch mode")]
selection_add=[("picking_batch", "Picking batch mode")],
ondelete={"picking_batch": "picking"},
)

def name_get(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<templates>
<t t-name="kanban-box">
<div
t-att-class="'oe_kanban_color_alert' + (record.is_pending.raw_value == false ? ' bg-success' : '')"
t-att-class="'oe_kanban_color_alert' + (record.is_pending.raw_value == false ? ' bg-success text-white' : '')"
>
<!-- TODO: Remove if not useful-->
<div invisible="1">
Expand Down Expand Up @@ -71,34 +71,40 @@
/>
</strong>
</div>
<div class="col text-right">
<span
for="product_ref_count"
>#Ref: </span>
<strong>
<field name="product_ref_count" />
</strong>
<span> | </span>
<span
for="product_ref_done"
>#Read: </span>
<strong>
<field name="product_ref_done" />
</strong>
<div class="col">
<div class="float-end">
<span
for="product_ref_count"
>#Ref: </span>
<strong>
<field
name="product_ref_count"
/>
</strong>
<span> | </span>
<span
for="product_ref_done"
>#Read: </span>
<strong>
<field
name="product_ref_done"
/>
</strong>
</div>
</div>
</div>
<div>
<button
name="action_open_picking_batch"
type="object"
class="btn btn-secondary pull-left"
class="btn btn-secondary float-start border"
context="{'wiz_barcode_id': parent.id, 'picking_batch_id': picking_batch_id}"
>Open</button>
<!-- FIXME: Fix confirm question -->
<button
name="action_validate_picking_batch"
type="object"
t-att-class="'pull-right btn' + (record.is_pending.raw_value == false ? ' btn-primary' : ' btn-secondary')"
t-att-class="'btn float-end' + (record.is_pending.raw_value == false ? ' btn-primary' : ' btn-secondary border')"
attrs="{'invisible': [('state', '!=', 'in_progress')]}"
confirm="Are you sure to validate the picking batch?"
context="{'wiz_barcode_id': parent.id, 'picking_batch_id': picking_batch_id}"
Expand Down Expand Up @@ -126,6 +132,7 @@
name="pending_move_ids"
options="{'no_open': True, 'always_reload': True}"
nolabel="1"
colspan="2"
force_save="1"
mode="tree,kanban"
>
Expand Down Expand Up @@ -214,6 +221,7 @@
options="{'no_open': True, 'always_reload': True}"
nolabel="1"
force_save="1"
colspan="2"
mode="tree,kanban"
>
<tree>
Expand Down

0 comments on commit e22fa7f

Please sign in to comment.