odoo18/demo_addons_modules/aui_custom_module/views/stock.xml

56 lines
3.1 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_picking_form_aui_inherit" model="ir.ui.view">
<field name="name">stock.picking.form.aui.inherit</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='button_box']" position="inside">
<button name="action_view_work_orders"
type="object"
class="oe_stat_button"
icon="fa-cogs" invisible="work_order_count &lt;= 0">
<field name="work_order_count" widget="statinfo"
string="Work Orders"/>
</button>
</xpath>
<xpath expr="//field[@name='origin']" position="after">
<field name="vehicle_no" readonly="state in ['cancel','done']"/>
<field name="distance" readonly="state in ['cancel','done']"/>
<button name="action_create_work_order"
string="Create Work Order"
type="object"
class="btn-primary"
invisible="picking_type_code != 'incoming' or state not in ['done'] or not contains_raw_material"/>
</xpath>
<xpath expr="//notebook" position="inside">
<page name="additional_expense" string="Additional Expenses" invisible="state != 'done'">
<button name="action_open_landing_cost" string="Create Landing Cost" type="object"
class="btn-primary"/>
<field name="landed_cost_ids" context="{'form_view_ref': 'aui_custom_module.view_stock_landed_cost_form_2'}" readonly="0" options="{'create': false, 'delete': false}">
<list create="false" delete="false">
<field name="name"/>
<field name="date"/>
<field name="picking_ids" widget="many2many_tags"/>
<field name="cost_lines" widget="many2many_tags"/>
<field name="amount_total"/>
<field name="state"/>
<button name="button_validate" string="Validate" invisible="state != 'draft'" class="oe_highlight"
type="object"/>
<button name="button_cancel" string="Cancel" invisible="state != 'draft'" type="object"/>
</list>
</field>
</page>
</xpath>
<xpath expr="//notebook/page[@name='extra']" position="inside">
<group string="Work Orders">
<field name="work_order_qty_total" string="Ordered Qty"/>
<field name="available_to_work_order" string="Remaining Qty"/>
<field name="contains_raw_material" invisible="1"/>
</group>
</xpath>
</field>
</record>
</odoo>