[FIX] stock: detailed operations and operations display tweaks
These o2m should be full width in enterprise. The only way to make them full screen is to make them direct children of their tab. Duplicate detailed operations and switch some field in operations to make it work. closes odoo/odoo#36518 Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
This commit is contained in:
@@ -293,22 +293,27 @@
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Detailed Operations" attrs="{'invisible': [('show_operations', '=', False)]}">
|
||||
<!-- Reservation hidden -->
|
||||
<page string="Detailed Operations" attrs="{'invisible': ['|', ('show_operations', '=', False), ('show_reserved', '=', True)]}">
|
||||
<field name="move_line_nosuggest_ids"
|
||||
attrs="{'invisible': [('show_reserved', '=', True)],
|
||||
'readonly': ['|', '|', ('show_operations', '=', False), ('state', '=', 'cancel'), '&', ('state', '=', 'done'), ('is_locked', '=', True)]
|
||||
}"
|
||||
attrs="{'readonly': ['|', '|', ('show_operations', '=', False), ('state', '=', 'cancel'), '&', ('state', '=', 'done'), ('is_locked', '=', True)]}"
|
||||
context="{'tree_view_ref': 'stock.view_stock_move_line_detailed_operation_tree', 'default_picking_id': id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id, 'default_company_id': company_id}"/>
|
||||
<field name="package_level_ids_details"
|
||||
context="{'default_location_id': location_id, 'default_location_dest_id': location_dest_id, 'default_company_id': company_id}"
|
||||
attrs="{'readonly': [('state', '=', 'done')], 'invisible': ['|', ('picking_type_entire_packs', '=', False), ('show_operations', '=', False)]}" />
|
||||
<button class="oe_highlight" name="put_in_pack" type="object" string="Put in Pack" attrs="{'invisible': [('state', 'in', ('draft', 'done', 'cancel'))]}" groups="stock.group_tracking_lot"/>
|
||||
</page>
|
||||
|
||||
<!-- Reservation displayed -->
|
||||
<page string="Detailed Operations" attrs="{'invisible': ['|', ('show_operations', '=', False), ('show_reserved', '=', False)]}">
|
||||
<field name="move_line_ids_without_package"
|
||||
attrs="{'invisible': [('show_reserved', '=', False)],
|
||||
'readonly': ['|', '|', ('show_operations', '=', False), ('state', '=', 'cancel'), '&', ('state', '=', 'done'), ('is_locked', '=', True)]
|
||||
}"
|
||||
attrs="{'readonly': ['|', '|', ('show_operations', '=', False), ('state', '=', 'cancel'), '&', ('state', '=', 'done'), ('is_locked', '=', True)]}"
|
||||
context="{'tree_view_ref': 'stock.view_stock_move_line_detailed_operation_tree', 'default_picking_id': id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id, 'default_company_id': company_id}"/>
|
||||
<field name="package_level_ids_details" context="{'default_location_id': location_id, 'default_location_dest_id': location_dest_id, 'default_company_id': company_id}" attrs="{'readonly': [('state', '=', 'done')], 'invisible': ['|', ('picking_type_entire_packs', '=', False), ('show_operations', '=', False)]}" />
|
||||
<button class="oe_highlight" name="put_in_pack" type="object" string="Put in Pack" attrs="{'invisible': [('state', 'in', ('draft', 'done', 'cancel'))]}" groups="stock.group_tracking_lot"/>
|
||||
</page>
|
||||
|
||||
<page string="Operations">
|
||||
<field name="id" invisible="1"/>
|
||||
<field name="move_ids_without_package" attrs="{'readonly': ['|', '&', ('show_operations', '=', True), '|', ('is_locked', '=', True), ('state', '=', 'done'), '&', ('state', '=', 'done'), ('is_locked', '=', True)]}" context="{'default_company_id': company_id, 'picking_type_code': picking_type_code, 'default_picking_id': id, 'form_view_ref':'stock.view_move_form', 'address_in_id': partner_id, 'default_picking_type_id': picking_type_id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id}">
|
||||
<tree decoration-danger="not parent.immediate_transfer and state != 'done' and quantity_done > reserved_availability and show_reserved_availability" decoration-muted="scrapped == True or state == 'cancel' or (state == 'done' and is_locked == True)" string="Stock Moves" editable="bottom">
|
||||
<field name="company_id" invisible="1"/>
|
||||
@@ -369,6 +374,7 @@
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
<field name="id" invisible="1"/>
|
||||
<field name="package_level_ids" context="{'default_location_id': location_id, 'default_location_dest_id': location_dest_id, 'default_company_id': company_id}" attrs="{'readonly': [('state', '=', 'done')], 'invisible': ['|', ('picking_type_entire_packs', '=', False), ('show_operations', '=', True)]}" />
|
||||
<button class="oe_highlight" name="put_in_pack" type="object" string="Put in Pack" attrs="{'invisible': [('state', 'in', ('draft', 'done', 'cancel'))]}" groups="stock.group_tracking_lot"/>
|
||||
</page>
|
||||
|
||||
Reference in New Issue
Block a user