odoo18/demo_addons_modules/aui_custom_module/views/sale.xml

54 lines
3.0 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_order_form_aui_inherit" model="ir.ui.view">
<field name="name">sale.order.form.aui.inherit</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='partner_id']" position="after">
<field name="warehouse_id"/>
<field name="warehouse_location_id" invisible="1" force_save="1"/>
</xpath>
<xpath expr="//page[@name='order_lines']/field[@name='order_line']/list/field[@name='product_id']" position="attributes">
<attribute name="optional">show</attribute>
<attribute name="context">{
'search_view_ref': 'stock.view_stock_product_search', 'search_default_real_stock_available': 1, 'location': parent.warehouse_location_id,
'partner_id': parent.partner_id,
'quantity': product_uom_qty,
'pricelist': parent.pricelist_id,
'uom':product_uom,
'company_id': parent.company_id,
'default_lst_price': price_unit,
}</attribute>
</xpath>
<xpath expr="//page[@name='order_lines']/field[@name='order_line']/list/field[@name='product_template_id']" position="attributes">
<attribute name="optional">hide</attribute>
</xpath>
<xpath expr="//notebook" position="inside">
<page name="additional_expense" string="Additional Expenses">
<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>
</field>
</record>
</odoo>