Files
odoo_source/addons/delivery/views/sale_order_views.xml
T
Brieuc-brd 8a2875bb38 [IMP] delivery, sale_loyalty, project: adapt for milk
This commit adapts the spacing between the buttons in the
sale_order_views to fit with Milk.

project: layout fixes:
- Fixed kog displaying on top of the project status button
- Fixed the flickering in project updates when selecting rows in list
view

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:21 +02:00

57 lines
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_order_form_with_carrier" model="ir.ui.view">
<field name="name">delivery.sale.order.form.view.with_carrier</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<field name="partner_id" position='after'>
<field name="delivery_set" invisible="1"/>
<field name="is_all_service" invisible="1"/>
<field name="recompute_delivery_price" invisible="1"/>
</field>
<group name="note_group" position="before">
<div class="oe_right mb-2 ms-1">
<button
string="Add shipping"
name="action_open_delivery_wizard"
type="object"
attrs="{'invisible': ['|', '|',('is_all_service', '=', True), ('order_line', '=', []), ('delivery_set', '=', True)]}"
/>
<button
string="Update shipping cost"
name="action_open_delivery_wizard"
context="{'carrier_recompute':True}"
type="object"
class="text-warning btn-secondary"
attrs="{'invisible': ['|', '|',('is_all_service', '=', True), ('recompute_delivery_price', '=', False), ('delivery_set', '=', False)]}"
/>
<button
string="Update shipping cost"
name="action_open_delivery_wizard"
context="{'carrier_recompute':True}"
type="object"
attrs="{'invisible': ['|', '|',('is_all_service', '=', True), ('recompute_delivery_price', '=', True), ('delivery_set', '=', False)]}"
/>
</div>
</group>
<xpath expr="//field[@name='order_line']/form/group/group/field[@name='price_unit']" position="before">
<field name="recompute_delivery_price" invisible="1"/>
<field name="is_delivery" invisible="1"/>
</xpath>
<xpath expr="//field[@name='order_line']/tree/field[@name='price_unit']" position="before">
<field name="recompute_delivery_price" invisible="1"/>
<field name="is_delivery" invisible="1"/>
</xpath>
<xpath expr="//field[@name='order_line']/tree" position="attributes">
<attribute name="decoration-warning">recompute_delivery_price and is_delivery</attribute>
</xpath>
<label for="commitment_date" position="before">
<field name="shipping_weight" readonly="True"/>
</label>
</field>
</record>
</odoo>