Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions setup/shopfloor_reception_shipment_advice/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,
)
6 changes: 6 additions & 0 deletions setup/shopfloor_reception_shipment_advice_mobile/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,
)
6 changes: 6 additions & 0 deletions setup/shopfloor_shipment_advice/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,
)
6 changes: 6 additions & 0 deletions setup/shopfloor_shipment_advice_mobile/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,
)
16 changes: 11 additions & 5 deletions shopfloor_reception/services/reception.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,14 @@ def _select_picking(self, picking):
)
return self._response_for_select_move(picking)

def _response_for_select_move(self, picking, message=None):
data = {"picking": self._data_for_stock_picking(picking, with_lines=True)}
def _response_for_select_move_get_data(self, picking):
data = {}
if picking:
data = {"picking": self._data_for_stock_picking(picking, with_lines=True)}
return data

def _response_for_select_move(self, picking, message=None, **kwargs):
data = self._response_for_select_move_get_data(picking, **kwargs)
return self._response(next_state="select_move", data=data, message=message)

def _response_for_confirm_done(self, picking, message=None):
Expand Down Expand Up @@ -1079,7 +1085,7 @@ def list_stock_pickings(self):
"""
return self._response_for_manual_selection()

def scan_line(self, picking_id, barcode):
def scan_line(self, picking_id, barcode, **kwargs):
"""Scan a product or a packaging

input:
Expand Down Expand Up @@ -2007,8 +2013,8 @@ def _schema_manual_selection(self):
def _schema_select_move(self):
return {
"picking": self.schemas._schema_dict_of(
self._schema_stock_picking_with_lines(), required=True
)
self._schema_stock_picking_with_lines(), required=False
),
}

@property
Expand Down
22 changes: 17 additions & 5 deletions shopfloor_reception_mobile/static/src/scenario/reception.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ const Reception = {
<template v-if="state_is('select_document')">
<manual-select
class="with-progress-bar"
:records="state.data.pickings"
:options="manual_select_options_for_select_document(true)"
:key="make_state_component_key(['reception', 'manual-select-document'])"
:records="select_move_from_record()"
:options="operation_options()"
:key="select_move_from_record_key()"
/>
<div class="button-list button-vertical-list full">
<v-row align="center">
Expand Down Expand Up @@ -71,7 +71,7 @@ const Reception = {
<div class="button-list button-vertical-list full">
<v-row align="center">
<v-col class="text-center" cols="12">
<btn-action @click="state.on_mark_as_done">Mark as Done</btn-action>
<btn-action v-if="state.data.picking" @click="state.on_mark_as_done">Mark as Done</btn-action>
</v-col>
</v-row>
</div>
Expand Down Expand Up @@ -243,8 +243,11 @@ const Reception = {
line_being_handled: function () {
return this.state.data.selected_move_line[0] || {};
},
moves_to_select: function () {
return _.result(this.state, "data.picking.moves", []);
},
ordered_moves: function () {
const moves = _.result(this.state, "data.picking.moves", []);
const moves = this.moves_to_select;
if (_.isEmpty(moves)) {
return;
}
Expand Down Expand Up @@ -289,12 +292,21 @@ const Reception = {
},
];
},
select_move_from_record: function () {
return this.state.data.picking;
},
operation_options: function () {
return {
title_action_field: {action_val_path: "name"},
fields: this.picking_display_fields(),
};
},
select_move_from_record_key: function () {
return this.make_state_component_key([
"reception-select-move-from-record",
this.state.data.picking.id,
]);
},
select_document_display_fields: function () {
var fields = this.picking_display_fields();
fields.push({path: "move_line_count", label: "Lines"});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,16 @@ export const reception_states = function () {
cancel_picking_line: "on_cancel",
select: "on_select",
},
get_odoo_call_data: () => {
const picking = this.state.data.picking;
return {
picking_id: picking ? picking.id : null,
};
},
on_scan: (barcode) => {
this.wait_call(
this.odoo.call("scan_line", {
picking_id: this.state.data.picking.id,
barcode: barcode.text,
})
);
const data = this.state.get_odoo_call_data();
data.barcode = barcode.text;
this.wait_call(this.odoo.call("scan_line", data));
},
on_mark_as_done: () => {
this.wait_call(
Expand Down
85 changes: 85 additions & 0 deletions shopfloor_reception_shipment_advice/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===================================
Shopfloor Reception Shipment Advice
===================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f20e9113ee2e070851ae1a12f447221226b3c42219d5526450a4b1bf142c17da
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-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/16.0/shopfloor_reception_shipment_advice
:alt: OCA/wms
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/wms-16-0/wms-16-0-shopfloor_reception_shipment_advice
: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=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module extends the `shopfloor_reception` module.
Adding the possibility to select a shipment advice for
processing its moves.
The shipment advice can be selected by scanning its name.
Or by scanning a dock barcode and then selecting one in
a list of shipment confirmed or in progress.

**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_reception_shipment_advice%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.

Credits
=======

Authors
~~~~~~~

* Camptocamp

Contributors
~~~~~~~~~~~~

* Thierry Ducrest <thierry.ducrest@camptocamp.com>

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/16.0/shopfloor_reception_shipment_advice>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions shopfloor_reception_shipment_advice/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import services
15 changes: 15 additions & 0 deletions shopfloor_reception_shipment_advice/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "Shopfloor Reception Shipment Advice",
"summary": "Allows to recieve goods based on shipment advice",
"version": "16.0.1.0.0",
"category": "Inventory",
"website": "https://github.com/OCA/wms",
"author": "Camptocamp, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": [
"shopfloor",
"shopfloor_shipment_advice",
"shopfloor_reception",
"shipment_advice",
],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Thierry Ducrest <thierry.ducrest@camptocamp.com>
6 changes: 6 additions & 0 deletions shopfloor_reception_shipment_advice/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This module extends the `shopfloor_reception` module.
Adding the possibility to select a shipment advice for
processing its moves.
The shipment advice can be selected by scanning its name.
Or by scanning a dock barcode and then selecting one in
a list of shipment confirmed or in progress.
1 change: 1 addition & 0 deletions shopfloor_reception_shipment_advice/services/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import reception
Loading
Loading