You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

34 lines
1.6 KiB

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<!-- inheriting the sale order form view -->
<record id="view_order_form" model="ir.ui.view">
<field name="name">sale.order.view.form.inherit.delivery.slot</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="model">sale.order</field>
<field name="arch" type="xml">
<!-- Adding a new field for Delivery Slot Per Product -->
<field name="sale_order_template_id" position="after">
<field name="slot_per_product"
string="Delivery Slot Per Product"/>
</field>
<div name="button_box" position="inside">
<!-- Adding a button to view Delivery Slots -->
<button class="oe_stat_button" type="object"
name="action_view_delivery_slot"
icon="fa-clock-o"
attrs="{'invisible':[('slot_count','=',0)]}">
<field string="Delivery Slots" name="slot_count"
widget="statinfo"/>
</button>
</div>
<xpath expr="//field[@name='order_line']/tree/field[@name='price_unit']"
position="before">
<!-- Adding fields for Delivery Date and Delivery Slot -->
<field name="delivery_date"
attrs="{'column_invisible':[('parent.slot_per_product', '=', False)]}"/>
<field name="slot_id"
attrs="{'column_invisible':[('parent.slot_per_product', '=', False)]}"/>
</xpath>
</field>
</record>
</odoo>