mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
stock_measuring_device: Release device before closing the wizard
This commit is contained in:
committed by
Hai Lang
parent
a0ffc17f18
commit
b808d2bc35
@@ -3,7 +3,7 @@
|
||||
{
|
||||
"name": "Stock Measuring Device",
|
||||
"summary": "Implement a common interface for measuring and weighing devices",
|
||||
"version": "13.0.1.0.0",
|
||||
"version": "13.0.1.1.0",
|
||||
"category": "Warehouse",
|
||||
"author": "Camptocamp, Odoo Community Association (OCA)",
|
||||
"license": "AGPL-3",
|
||||
|
||||
@@ -81,6 +81,11 @@ msgstr ""
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_measuring_device
|
||||
#: model:ir.model.fields,field_description:stock_measuring_device.field_measuring_wizard_line__is_measured
|
||||
msgid "Is Measured"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_measuring_device
|
||||
#: model:ir.model.fields,field_description:stock_measuring_device.field_measuring_wizard_line__is_unit_line
|
||||
msgid "Is Unit Line"
|
||||
@@ -201,6 +206,11 @@ msgstr ""
|
||||
msgid "Required"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_measuring_device
|
||||
#: model_terms:ir.ui.view,arch_db:stock_measuring_device.view_measuring_wizard
|
||||
msgid "Retrieve Product"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_measuring_device
|
||||
#: model_terms:ir.ui.view,arch_db:stock_measuring_device.view_measuring_wizard
|
||||
msgid "Save"
|
||||
|
||||
@@ -151,7 +151,11 @@ class MeasuringWizard(models.TransientModel):
|
||||
self.onchange_product_id()
|
||||
|
||||
def action_close(self):
|
||||
self.ensure_one()
|
||||
for line in self.line_ids:
|
||||
if not line.scan_requested:
|
||||
continue
|
||||
line.packaging_id._measuring_device_release()
|
||||
line.scan_requested = False
|
||||
return {
|
||||
"type": "ir.actions.act_window",
|
||||
"res_model": self.device_id._name,
|
||||
|
||||
Reference in New Issue
Block a user