forked from Mapan/odoo17e
38 lines
2.0 KiB
XML
38 lines
2.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<odoo>
|
|
|
|
<record id="rental_order_form_view_inherit_stock" model="ir.ui.view">
|
|
<field name="name">rental.order.form.inherit.stock</field>
|
|
<field name="model">sale.order</field>
|
|
<field name="inherit_id" ref="sale_renting.rental_order_primary_form_view"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//notebook/page[@name='order_lines']/field/tree/field[@name='is_product_rentable']" position='after'>
|
|
<field name="tracking" column_invisible="True"/>
|
|
<field name="available_reserved_lots" column_invisible="True"/>
|
|
<field name="reserved_lot_ids" optional="hide" widget="many2many_tags" groups="sale_stock_renting.group_rental_stock_picking"/>
|
|
</xpath>
|
|
<xpath expr="//notebook/page[@name='order_lines']/field/tree/field[@name='qty_delivered']" position="attributes">
|
|
<attribute name="column_invisible">parent.state != 'sale'</attribute>
|
|
<attribute name="readonly">qty_delivered_method != 'manual' or is_rental and tracking != 'none'</attribute>
|
|
</xpath>
|
|
<xpath expr="//notebook/page[@name='order_lines']/field/tree/field[@name='qty_returned']" position="attributes">
|
|
<attribute name="column_invisible">parent.state != 'sale' or not parent.is_rental_order</attribute>
|
|
<attribute name="invisible">not is_rental or not is_product_rentable</attribute>
|
|
<attribute name="readonly">not is_rental or tracking != 'none'</attribute>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="sale_renting.rental_product_template_action" model="ir.actions.act_window">
|
|
<field name="context">{
|
|
'default_sale_ok': False,
|
|
'default_rent_ok': True,
|
|
'default_detailed_type': 'product',
|
|
'default_purchase_ok': False,
|
|
'search_default_filter_to_rent': True,
|
|
}
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|