[FIX] stock_secondary_unit: Allow use secondary units in form view for mobile views

TT30538
This commit is contained in:
sergio-teruel
2021-06-22 15:29:34 +02:00
committed by Rocío Vega
parent 221170515a
commit 09df703097
5 changed files with 22 additions and 1 deletions

View File

@@ -3,7 +3,7 @@
{
"name": "Stock Secondary Unit",
"summary": "Get product quantities in a secondary unit",
"version": "13.0.2.0.0",
"version": "13.0.2.1.0",
"development_status": "Production/Stable",
"category": "stock",
"website": "https://github.com/OCA/stock-logistics-warehouse",

View File

@@ -39,6 +39,7 @@ msgstr "ID"
#. module: stock_secondary_unit
#: model:ir.model.fields,field_description:stock_secondary_unit.field_stock_move__product_uom_qty
#: model:ir.model.fields,field_description:stock_secondary_unit.field_stock_reservation__product_uom_qty
msgid "Initial Demand"
msgstr ""
@@ -93,6 +94,7 @@ msgstr "Unidad Secundaria"
#. module: stock_secondary_unit
#: model:ir.model.fields,help:stock_secondary_unit.field_stock_move__product_uom_qty
#: model:ir.model.fields,help:stock_secondary_unit.field_stock_reservation__product_uom_qty
msgid ""
"This is the quantity of products from an inventory point of view. For moves "
"in the state 'done', this is the quantity of products that were actually "

View File

@@ -35,6 +35,7 @@ msgstr ""
#. module: stock_secondary_unit
#: model:ir.model.fields,field_description:stock_secondary_unit.field_stock_move__product_uom_qty
#: model:ir.model.fields,field_description:stock_secondary_unit.field_stock_reservation__product_uom_qty
msgid "Initial Demand"
msgstr ""
@@ -88,6 +89,7 @@ msgstr ""
#. module: stock_secondary_unit
#: model:ir.model.fields,help:stock_secondary_unit.field_stock_move__product_uom_qty
#: model:ir.model.fields,help:stock_secondary_unit.field_stock_reservation__product_uom_qty
msgid ""
"This is the quantity of products from an inventory point of view. For moves "
"in the state 'done', this is the quantity of products that were actually "

View File

@@ -38,6 +38,7 @@ msgstr "ID"
#. module: stock_secondary_unit
#: model:ir.model.fields,field_description:stock_secondary_unit.field_stock_move__product_uom_qty
#: model:ir.model.fields,field_description:stock_secondary_unit.field_stock_reservation__product_uom_qty
msgid "Initial Demand"
msgstr ""
@@ -91,6 +92,7 @@ msgstr "库存产品辅助单位"
#. module: stock_secondary_unit
#: model:ir.model.fields,help:stock_secondary_unit.field_stock_move__product_uom_qty
#: model:ir.model.fields,help:stock_secondary_unit.field_stock_reservation__product_uom_qty
msgid ""
"This is the quantity of products from an inventory point of view. For moves "
"in the state 'done', this is the quantity of products that were actually "

View File

@@ -23,6 +23,21 @@
attrs="{'column_invisible': [('parent.immediate_transfer', '=', True)], 'readonly': ['|', ('is_initial_demand_editable', '=', False), '&', '&', ('show_operations', '=', True), ('is_locked', '=', True), ('is_initial_demand_editable', '=', False)]}"
/>
</xpath>
<xpath
expr="//field[@name='move_ids_without_package']/form//field[@name='product_uom_qty']"
position="before"
>
<field
name="secondary_uom_qty"
attrs="{'invisible': [('parent.immediate_transfer', '=', True)], 'readonly': [('is_initial_demand_editable', '=', False)]}"
/>
<field
name="secondary_uom_id"
domain="[('product_tmpl_id.product_variant_ids', 'in', [product_id])]"
options="{'no_create': True}"
attrs="{'invisible': [('parent.immediate_transfer', '=', True)], 'readonly': [('is_initial_demand_editable', '=', False)]}"
/>
</xpath>
</field>
</record>
</odoo>