Files
odoo_source/addons/mrp_subcontracting/views/subcontracting_portal_views.xml
T
FrancoisGe 8d41ccf119 [REF] *: relative width of a field is no longer supported in list views
Since the conversion of the list view to owl, the relative field size
has not been reimplemented. We have decided not to support it anymore.
So we will remove all its uses.

The relative width consists in adding a width attribute with a
value. This value corresponds to the weight of the field, the higher
it is, the more space the field will take. This size is only used when
the list is empty.

Example of this:
<tree>
    <field ... width="2">
    <field ... width="1">
</tree>

The first field will take 2x more space than the first one when the list
is empty.

closes odoo/odoo#110382

Related: odoo/documentation#3375
Related: odoo/enterprise#36020
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-23 11:19:59 +01:00

59 lines
3.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="subcontracting_portal_production_form_view" model="ir.ui.view">
<field name="name">subcontracting.portal.production.view.form</field>
<field name="model">stock.picking</field>
<field name="priority">999</field>
<field name="arch" type="xml">
<form js_class="subcontracting_portal_picking_form_view" string="Manufacturing Orders">
<sheet>
<div class="oe_title">
<h1>
<field name="name" placeholder="Manufacturing Reference" nolabel="1"/>
</h1>
</div>
<group>
<field name="state" invisible='1'/>
<field name="scheduled_date" attrs="{'required': [('id', '!=', False)]}" decoration-warning="state not in ('done', 'cancel') and scheduled_date &lt; now" decoration-danger="state not in ('done', 'cancel') and scheduled_date &lt; current_date" decoration-bf="state not in ('done', 'cancel') and (scheduled_date &lt; current_date or scheduled_date &lt; now)"/>
<field name="date_deadline" attrs="{'invisible': ['|', ('state', 'in', ('done', 'cancel')), ('date_deadline', '=', False)]}" decoration-danger="date_deadline and date_deadline &lt; current_date" decoration-bf="date_deadline and date_deadline &lt; current_date"/>
<field name="origin" placeholder="e.g. PO0032"/>
</group>
<notebook>
<page string="Operations" name="operations">
<field name="move_ids_without_package" mode="tree">
<tree no_open="1">
<field name="id" readonly="1" invisible="1"/>
<field name="product_id" readonly="1"/>
<field name="show_details_visible" invisible="1"/>
<field name="description_picking" string="Description" optional="hide"/>
<field name="date" optional="hide"/>
<field name="date_deadline" optional="hide"/>
<field name="product_packaging_id" groups="product.group_stock_packaging"/>
<field name="product_uom_qty" string="Demand" readonly="1"/>
<field name="product_qty" invisible="1" readonly="1"/>
<field name="quantity_done" string="Done"/>
<field name="product_uom" groups="uom.group_uom"/>
<button name="action_show_details" type="object" icon="fa-list" title="Details"
attrs="{'invisible': [('show_details_visible', '=', False)]}" context="{'is_subcontracting_portal': 1}"/>
<field name="show_subcontracting_details_visible" invisible="1"/>
<button name="action_show_subcontract_details" string="Register components for subcontracted product" type="object" icon="fa-sitemap"
attrs="{'invisible': [('show_subcontracting_details_visible', '=', False)]}"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="subcontracting_portal_view_production_action" model="ir.actions.act_window">
<field name="name">Subcontracting Portal</field>
<field name="res_model">stock.picking</field>
<field name="view_mode">form</field>
<field name="view_id" ref="subcontracting_portal_production_form_view"/>
</record>
</odoo>