19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:32:12 +01:00
parent 79f83631d5
commit 73afc09215
6267 changed files with 1534193 additions and 1130106 deletions

View file

@ -1,74 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="res_config_settings_view_form_sale" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.sale.stock.sale</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="sale.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@id='ups']" position="after">
<div class="col-12 col-lg-6 o_setting_box" id="display_incoterms_setting">
<div class="o_setting_left_pane">
<field name="group_display_incoterm"/>
</div>
<div class="o_setting_right_pane">
<label for="group_display_incoterm"/>
<div class="text-muted">
Display incoterms on orders &amp; invoices
</div>
<div class="content-group" attrs="{'invisible': [('group_display_incoterm','=',False)]}">
<div class="mt8">
<button name="%(account.action_incoterms_tree)d" icon="fa-arrow-right" type="action" string="Incoterms" class="btn-link"/>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
<record id="res_config_settings_view_form_stock" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.sale.stock.stock</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="stock.res_config_settings_view_form"/>
<field name="arch" type="xml">
<div id="warning_info" position="after">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_right_pane">
<label for="default_picking_policy"/>
<div class="text-muted">
When to start shipping
</div>
<div class="content-group">
<div class="mt16">
<field name="default_picking_policy" class="o_light_label w-auto" widget="selection"/>
</div>
</div>
</div>
</div>
</div>
<xpath expr="//h2[@id='schedule_info']" position="attributes">
<attribute name="invisible">0</attribute>
</xpath>
<setting id="warning_info" position="after">
<setting help="When to start shipping">
<field name="default_picking_policy" class="o_light_label w-auto" widget="selection"/>
</setting>
</setting>
<div id="sale_security_lead" position="replace">
<div class="col-12 col-lg-6 o_setting_box" title="Margin of error for dates promised to customers. Products will be scheduled for procurement and delivery that many days earlier than the actual promised date, to cope with unexpected delays in the supply chain.">
<div class="o_setting_left_pane">
<field name="use_security_lead"/>
</div>
<div class="o_setting_right_pane">
<label for="use_security_lead"/>
<a href="https://www.odoo.com/documentation/16.0/applications/inventory_and_mrp/inventory/management/planning/scheduled_dates.html" title="Documentation" class="me-2 o_doc_link" target="_blank"></a>
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." role="img" aria-label="Values set here are company-specific." groups="base.group_multi_company"/>
<div class="text-muted">
Schedule deliveries earlier to avoid delays
</div>
<div class="content-group">
<div class="mt16" attrs="{'invisible': [('use_security_lead','=',False)]}">
<span>Move forward expected delivery dates by <field name="security_lead" class="oe_inline"/> days</span>
</div>
<setting company_dependent="1" help="Schedule deliveries earlier to avoid delays" documentation="/applications/inventory_and_mrp/inventory/management/planning/scheduled_dates.html" title="Margin of error for dates promised to customers. Products will be scheduled for procurement and delivery that many days earlier than the actual promised date, to cope with unexpected delays in the supply chain.">
<field name="use_security_lead"/>
<div class="content-group">
<div class="mt16" invisible="not use_security_lead">
<span>Move forward expected delivery dates by <field name="security_lead" class="oe_inline"/> days</span>
</div>
</div>
</div>
</setting>
</div>
</field>
</record>

View file

@ -6,10 +6,8 @@
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif"/>
<field name="arch" type="xml">
<group name="signature" position="after">
<group name="Warehouses">
<field name="property_warehouse_id" groups="stock.group_stock_multi_warehouses"/>
</group>
<group name="other_preferences" position="inside">
<field name="property_warehouse_id" groups="stock.group_stock_multi_warehouses"/>
</group>
</field>
</record>
@ -19,7 +17,7 @@
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_simple_form"/>
<field name="arch" type="xml">
<group name="phone_numbers" position="after">
<group name="access_groups" position="after">
<group name="Warehouses">
<field name="property_warehouse_id" groups="stock.group_stock_multi_warehouses"/>
</group>
@ -32,10 +30,8 @@
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<group name="messaging" position="after">
<group name="Warehouses" string="Inventory" groups="stock.group_stock_multi_warehouses">
<field name="property_warehouse_id" groups="stock.group_stock_multi_warehouses"/>
</group>
<group name="other_preferences" position="inside">
<field name="property_warehouse_id" groups="stock.group_stock_multi_warehouses"/>
</group>
</field>
</record>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="view_order_line_tree_inherit_sale_stock" model="ir.ui.view">
<field name="name">sale.order.line.list.sale.stock.location</field>
<field name="inherit_id" ref="sale.view_order_line_tree"/>
<field name="model">sale.order.line</field>
<field name="arch" type="xml">
<field name="price_subtotal" position="before">
<field name="route_ids" groups="stock.group_adv_location" options="{'no_create': True}"/>
</field>
</field>
</record>
</odoo>

View file

@ -1,134 +1,126 @@
<?xml version="1.0"?>
<odoo>
<data>
<record id="view_order_form_inherit_sale_stock" model="ir.ui.view">
<field name="name">sale.order.form.sale.stock</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='action_view_invoice']" position="before">
<button type="object"
name="action_view_delivery"
class="oe_stat_button"
icon="fa-truck"
attrs="{'invisible': [('delivery_count', '=', 0)]}" groups="stock.group_stock_user">
<field name="delivery_count" widget="statinfo" string="Delivery"/>
</button>
</xpath>
<xpath expr="//group[@name='sale_shipping']" position="attributes">
<attribute name="groups"></attribute><!-- Remove the res.group on the group and set it on the field directly-->
<attribute name="string">Delivery</attribute>
</xpath>
<xpath expr="//label[@for='commitment_date']" position="before">
<field name="warehouse_id" invisible="1"/> <!-- needed for js logic -->
<field name="warehouse_id" options="{'no_create': True}" groups="stock.group_stock_multi_warehouses" force_save="1"/>
<field name="incoterm" options="{'no_open': True, 'no_create': True}" groups="sale_stock.group_display_incoterm"/>
<field name="incoterm_location" groups="sale_stock.group_display_incoterm"/>
<field name="picking_policy" required="True"/>
</xpath>
<xpath expr="//span[@name='expected_date_span']" position="attributes">
<attribute name="attrs">
{'invisible': [('effective_date', '!=', False), ('commitment_date', '!=', False)]}
</attribute>
</xpath>
<xpath expr="//div[@name='commitment_date_div']" position="replace">
<div class="o_row">
<field name="commitment_date"/>
<span class="text-muted" attrs="{'invisible': [('effective_date', '!=', False), ('commitment_date', '!=', False)]}">Expected: <field name="expected_date" class="oe_inline" widget="date"/></span>
</div>
<field name="effective_date" attrs="{'invisible': [('effective_date', '=', False)]}"/>
</xpath>
<field name="effective_date" position="after">
<field name="delivery_status" attrs="{'invisible': [('state', 'not in', ['sale', 'done'])]}"/>
</field>
<xpath expr="//page[@name='other_information']//field[@name='expected_date']" position="after">
<field name="show_json_popover" invisible="1"/>
<field string=" " name="json_popover" widget="stock_rescheduling_popover" attrs="{'invisible': [('show_json_popover', '=', False)]}"/>
</xpath>
<xpath expr="//field[@name='order_line']/form/group/group/field[@name='analytic_distribution']" position="before">
<field name="route_id" groups="stock.group_adv_location" options="{'no_create': True}"/>
</xpath>
<xpath expr="//field[@name='order_line']/tree/field[@name='analytic_distribution']" position="after">
<field name="route_id" groups="stock.group_adv_location" options="{'no_create': True}" optional="hide"/>
</xpath>
</field>
</record>
<record id="view_quotation_tree" model="ir.ui.view">
<field name="name">sale.order.tree.inherit.sale.stock</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_quotation_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='tag_ids']" position="after">
<field name="warehouse_id" options="{'no_create': True}" groups="stock.group_stock_multi_warehouses" optional="hide" />
</xpath>
<record id="view_order_form_inherit_sale_stock" model="ir.ui.view">
<field name="name">sale.order.form.sale.stock</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<button name="action_view_invoice" position="before">
<button
name="action_view_delivery"
type="object"
class="oe_stat_button"
icon="fa-truck"
invisible="delivery_count == 0"
groups="stock.group_stock_user"
>
<field name="delivery_count" widget="statinfo" string="Delivery"/>
</button>
</button>
<group name="sale_shipping" position="attributes">
<attribute name="groups"></attribute><!-- Remove the res.group on the group and set it on the field directly-->
<attribute name="string">Delivery</attribute>
</group>
<label for="commitment_date" position="before">
<field name="warehouse_id" options="{'no_create': True}" force_save="1" readonly="state == 'sale'"/>
<field name="incoterm" options="{'no_open': True, 'no_create': True}"/>
<field name="incoterm_location"/>
<field name="picking_policy" required="True" readonly="state not in ['draft', 'sent']"/>
</label>
<span name="expected_date_span" position="attributes">
<attribute name="invisible">effective_date and commitment_date</attribute>
</span>
<div name="commitment_date_div" position="replace">
<div class="o_row">
<field name="commitment_date"/>
<span class="text-muted" invisible="not expected_date or (effective_date and commitment_date)">Expected: <field name="expected_date" class="oe_inline"/></span>
</div>
<field name="effective_date" invisible="not effective_date"/>
<field name="delivery_status" invisible="state != 'sale'"/>
</div>
<xpath expr="//page[@name='other_information']//field[@name='expected_date']" position="after">
<field string=" " name="json_popover" widget="stock_rescheduling_popover" invisible="not show_json_popover"/>
</xpath>
<xpath expr="//field[@name='order_line']//form//field[@name='analytic_distribution']" position="before">
<field name="route_ids" widget="many2many_tags" groups="stock.group_adv_location" options="{'no_create': True}"/>
</xpath>
<xpath expr="//field[@name='order_line']//form//field[@name='product_uom_id']" position="after">
<widget name="qty_at_date_widget"/>
</xpath>
<xpath expr="//field[@name='order_line']//list//field[@name='analytic_distribution']" position="after">
<field
name="route_ids"
widget="many2many_tags"
groups="stock.group_adv_location"
options="{'no_create': True}"
optional="hide"/>
</xpath>
<xpath expr="//field[@name='order_line']//list//field[@name='qty_delivered']" position="after">
<widget name="qty_at_date_widget" width="20px"/>
</xpath>
</field>
</record>
<record id="sale_order_tree" model="ir.ui.view">
<field name="name">sale.order.list.inherit.sale.stock</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.sale_order_tree"/>
<field name="arch" type="xml">
<field name="tag_ids" position="after">
<field
name="warehouse_id"
options="{'no_create': True}"
readonly="state == 'sale'"
groups="stock.group_stock_multi_warehouses"
optional="hide"
/>
</field>
</record>
</field>
</record>
<record id="view_order_tree" model="ir.ui.view">
<field name="name">sale.order.tree.inherit.sale.stock</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='team_id']" position="after">
<field name="warehouse_id" options="{'no_create': True}" groups="stock.group_stock_multi_warehouses" optional="hide"/>
</xpath>
<field name="invoice_status" position="before">
<field name="effective_date" invisible="1"/>
<field name="delivery_status" optional="hide" widget="badge"
decoration-success="commitment_date and (commitment_date &gt; datetime.datetime.combine(datetime.date.today(), datetime.time(23,59,59)).to_utc().strftime('%Y-%m-%d %H:%M:%S') or delivery_status=='full' and effective_date &lt;= commitment_date)"
decoration-danger="commitment_date and (commitment_date &lt; effective_date or commitment_date &lt; datetime.datetime.combine(datetime.date.today(), datetime.time(0,0,0)).to_utc().strftime('%Y-%m-%d %H:%M:%S') and delivery_status!='full' and effective_date &lt;= commitment_date)"
decoration-warning="commitment_date and commitment_date &gt;= datetime.datetime.combine(datetime.date.today(), datetime.time(0,0,0)).to_utc().strftime('%Y-%m-%d %H:%M:%S') and commitment_date &lt;= datetime.datetime.combine(datetime.date.today(), datetime.time(23,59,59)).to_utc().strftime('%Y-%m-%d %H:%M:%S') and delivery_status!='full'"/>
</field>
<record id="view_order_tree" model="ir.ui.view">
<field name="name">sale.order.list.inherit.sale.stock</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_tree"/>
<field name="arch" type="xml">
<field name="commitment_date" position="attributes">
<attribute name="decoration-danger">
(
(
commitment_date &lt; effective_date
or commitment_date &lt; datetime.datetime.combine(
datetime.date.today(),
datetime.time(0,0,0)
).to_utc().strftime('%Y-%m-%d %H:%M:%S')
)
and delivery_status in ['pending', 'started']
and effective_date &lt;= commitment_date
or delivery_status == 'partial'
)
</attribute>
</field>
</record>
<record id="view_order_line_tree_inherit_sale_stock" model="ir.ui.view">
<field name="name">sale.order.line.tree.sale.stock.location</field>
<field name="inherit_id" ref="sale.view_order_line_tree"/>
<field name="model">sale.order.line</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='price_subtotal']" position="before">
<field name="route_id" groups="stock.group_adv_location" options="{'no_create': True}"/>
</xpath>
<field name="invoice_status" position="before">
<field
name="delivery_status"
decoration-success="delivery_status == 'full'"
decoration-warning="delivery_status == 'partial'"
decoration-info="delivery_status in ['pending', 'started']"
widget="badge"
optional="hide"/>
</field>
</record>
</field>
</record>
<record id="view_order_form_inherit_sale_stock_qty" model="ir.ui.view">
<field name="name">sale.order.line.tree.sale.stock.qty</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="model">sale.order</field>
<field name="arch" type="xml">
<xpath expr="//page/field[@name='order_line']/form/group/group/div[@name='ordered_qty']/field[@name='product_uom']" position="after">
<!-- below fields are used in the widget qty_at_date_widget -->
<field name="virtual_available_at_date" invisible="1"/>
<field name="qty_available_today" invisible="1"/>
<field name="free_qty_today" invisible="1"/>
<field name="scheduled_date" invisible="1"/>
<field name="forecast_expected_date" invisible="1"/>
<field name="warehouse_id" invisible="1"/>
<field name="move_ids" invisible="1"/>
<field name="qty_to_deliver" invisible="1"/>
<field name="is_mto" invisible="1"/>
<field name="display_qty_widget" invisible="1"/>
<widget name="qty_at_date_widget" width="0.1"/>
</xpath>
<xpath expr="//page/field[@name='order_line']/tree/field[@name='qty_delivered']" position="after">
<!-- below fields are used in the widget qty_at_date_widget -->
<field name="virtual_available_at_date" invisible="1"/>
<field name="qty_available_today" invisible="1"/>
<field name="free_qty_today" invisible="1"/>
<field name="scheduled_date" invisible="1"/>
<field name="forecast_expected_date" invisible="1"/>
<field name="warehouse_id" invisible="1"/>
<field name="move_ids" invisible="1"/>
<field name="qty_to_deliver" invisible="1"/>
<field name="is_mto" invisible="1"/>
<field name="display_qty_widget" invisible="1"/>
<widget name="qty_at_date_widget" width="20px"/>
</xpath>
</field>
</record>
<record id="sale_stock_sale_order_view_search_inherit" model="ir.ui.view">
<field name="name">sale_stock.sale.order.search.inherit</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.sale_order_view_search_inherit_sale"/>
<field name="arch" type="xml">
<filter name="order_date" position="after">
<filter string="Late Availability" name="late_availability" domain="[('late_availability', '=', True)]"/>
</filter>
</field>
</record>
</data>
</odoo>

View file

@ -1,60 +1,155 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="sale_order_portal_content_inherit_sale_stock"
<template
id="sale_stock.sale_order_portal_content_inherit_sale_stock"
name="Orders Shipping Followup"
inherit_id="sale.sale_order_portal_content">
<xpath expr="//div[@id='so_date']" position="after">
<div t-if="sale_order.incoterm" class="row">
<div class="mb-3 col-6 ms-auto">
<strong>Incoterm: </strong> <span t-field="sale_order.incoterm"/>
</div>
</div>
</xpath>
<xpath expr="//div[@id='informations']" position="inside">
inherit_id="sale.sale_order_portal_content"
>
<tbody id="sale_info_table" position="inside">
<tr t-if="sale_order.incoterm">
<th class="pb-0">Incoterm:</th>
<td class="w-100 pb-0 text-wrap">
<p t-if="sale_order.incoterm_location">
<span t-field="sale_order.incoterm.code"/> <br/>
<span t-field="sale_order.incoterm_location"/>
</p>
<p t-else="" t-field="sale_order.incoterm.code" class="m-0"/>
</td>
</tr>
</tbody>
<div id="sale_invoices" position="after">
<t t-set="delivery_orders" t-value="sale_order.picking_ids.filtered(lambda picking: picking.picking_type_id.code == 'outgoing')"/>
<t t-if="delivery_orders">
<div>
<strong>Delivery Orders</strong>
</div>
<div>
<t t-foreach="delivery_orders" t-as="picking">
<t t-set="latest_delivery_orders" t-value="delivery_orders.sorted('create_date', reverse=True)[:3]"/>
<div t-if="delivery_orders" class="col-12 col-lg-6 mb-4">
<h5 class="mb-1">Last Delivery Orders</h5>
<hr class="mt-1 mb-2"/>
<div class="d-flex flex-column gap-2">
<t t-foreach="latest_delivery_orders" t-as="picking">
<t t-set="delivery_report_url"
t-value="'/my/picking/pdf/%s?%s' % (picking.id, keep_query())"/>
<div name="delivery_order"
class="d-flex flex-wrap align-items-center justify-content-between">
<div name="delivery_details">
class="d-flex flex-column">
<div name="delivery_details" class="d-flex align-items-center justify-content-between">
<a t-att-href="delivery_report_url">
<span t-esc="picking.name"/>
</a>
<div class="small d-lg-inline-block ms-3">
Date:
<span class="text-muted"
<div t-if="picking.state == 'done'">
<span class="small badge rounded-pill text-bg-success orders_label_text_align">
<i class="fa fa-fw fa-truck"/> Shipped
</span>
<a class="badge rounded-pill text-bg-secondary orders_label_text_align" target="_blank"
t-att-href="'/my/picking/return/pdf/%s?%s' % (picking.id, keep_query())">
RETURN
</a>
</div>
<span t-elif="picking.state == 'cancel'"
class="small badge rounded-pill text-bg-danger orders_label_text_align">
<i class="fa fa-fw fa-times"/>Cancelled
</span>
<span t-elif="picking.state in ['draft', 'waiting', 'confirmed', 'assigned']"
class="small badge rounded-pill text-bg-info orders_label_text_align">
<i class="fa fa-fw fa-clock-o"/>Preparation
</span>
</div>
<div class="small d-lg-inline-block" t-if="picking.date_done or picking.scheduled_date">
Date:
<span class="text-muted"
t-field="picking.date_done"
t-options="{'date_only': True}"/>
<span t-if="picking.state in ['draft', 'waiting', 'confirmed', 'assigned']"
<span t-if="picking.state in ['draft', 'waiting', 'confirmed', 'assigned']"
class="text-muted"
t-field="picking.scheduled_date"
t-options="{'date_only': True}"/>
</div>
</div>
<span t-if="picking.state == 'done'"
class="small badge text-bg-success orders_label_text_align">
<i class="fa fa-fw fa-truck"/> <b>Shipped</b>
</span>
<span t-elif="picking.state == 'cancel'"
class="small badge text-bg-danger orders_label_text_align">
<i class="fa fa-fw fa-times"/> <b>Cancelled</b>
</span>
<span t-elif="picking.state in ['draft', 'waiting', 'confirmed', 'assigned']"
class="small badge text-bg-info orders_label_text_align">
<i class="fa fa-fw fa-clock-o"/> <b>Preparation</b>
</span>
</div>
</t>
</div>
</t>
</xpath>
</div>
<t t-set="returns" t-value="delivery_orders.return_ids.sorted('create_date', reverse=True)"/>
<div t-if="returns" class="col-12 col-lg-6 mb-4">
<h4 class="mb-1">Returns</h4>
<hr class="mt-1 mb-2"/>
<t t-foreach="returns" t-as="picking">
<t t-set="delivery_report_url"
t-value="'/my/picking/pdf/%s?%s' % (picking.id, keep_query())"/>
<div name="return">
<div name="return_details" class="d-flex justify-content-between align-items-center">
<a t-att-href="delivery_report_url">
<span t-esc="picking.name"/>
</a>
<span t-if="picking.state == 'done'"
class="small badge rounded-pill text-bg-success orders_label_text_align">
<i class="fa fa-fw fa-truck"/> Received
</span>
<span t-elif="picking.state == 'cancel'"
class="small badge rounded-pill text-bg-danger orders_label_text_align">
<i class="fa fa-fw fa-times"/> Cancelled
</span>
<span t-elif="picking.state in ['draft', 'waiting', 'confirmed', 'assigned']"
class="small badge rounded-pill text-bg-info orders_label_text_align">
<i class="fa fa-fw fa-clock-o"/> Awaiting arrival
</span>
</div>
<div class="small d-lg-inline-block">
Date:
<span class="text-muted"
t-field="picking.date_done"
t-options="{'date_only': True}"/>
<span t-if="picking.state in ['draft', 'waiting', 'confirmed', 'assigned']"
class="text-muted"
t-field="picking.scheduled_date"
t-options="{'date_only': True}"/>
</div>
</div>
</t>
</div>
</div>
</template>
<template
id="sale_stock.portal_my_orders"
name="Portal Orders Shipping Status Column"
inherit_id="sale.portal_my_orders"
>
<th name="order_total" position="before">
<th class="text-end" name="order_delivery">Shipping Status</th>
</th>
<td name="order_amount_total" position="before">
<td class="text-end" name="order_delivery_status">
<span
t-if="order.delivery_status == 'pending'"
class="badge rounded-pill text-bg-warning"
>
Not Delivered
</span>
<span
t-elif="order.delivery_status == 'started'"
class="badge rounded-pill text-bg-primary"
>
Started
</span>
<span
t-elif="order.delivery_status == 'partial'"
class="badge rounded-pill text-bg-info"
>
Partially Delivered
</span>
<span
t-elif="order.delivery_status == 'full'"
class="badge rounded-pill text-bg-success"
>
Delivered
</span>
<span
t-else=""
class="badge rounded-pill text-bg-danger"
>
Not Available
</span>
</td>
</td>
</template>
</odoo>

View file

@ -8,7 +8,7 @@
<xpath expr="//div[hasclass('oe_button_box')]/button" position="before">
<button class="oe_stat_button" name="action_view_so"
type="object" icon="fa-pencil-square-o" help="Sale Orders"
attrs="{'invisible': ['|', ('sale_order_count', '=', 0), ('display_complete', '=', False)]}">
invisible="sale_order_count == 0 or not display_complete">
<div class="o_field_widget o_stat_info">
<span class="o_stat_value">
<field name="sale_order_count" widget="statinfo" nolabel="1" class="mr4"/>
@ -17,19 +17,6 @@
</div>
</button>
</xpath>
<xpath expr="//group[@name='main_group']" position="after">
<group>
<field name="sale_order_ids" widget="many2many" readonly="True"
attrs="{'invisible': ['|', ('sale_order_ids', '=', []), ('display_complete', '=', True)]}">
<tree>
<field name="name"/>
<field name="partner_id"/>
<field name="date_order"/>
<field name="state" invisible="1"/>
</tree>
</field>
</group>
</xpath>
</field>
</record>
</odoo>

View file

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="sale_stock_help_message_template" inherit_id="stock.help_message_template">
<xpath expr="//p[@name='top_help_message']/t[@name='delivery_message']" position="replace">
<t t-if="picking_type_code == 'outgoing'">
No delivery yet! Automate them with sales orders.
</t>
</xpath>
<xpath expr="//p[@name='bottom_help_message']/t[@name='delivery_message']" position="replace">
<t t-if="picking_type_code == 'outgoing'">
Reduce back orders with reservations, locations management, smart
replenishment propositions, shipping connectors, barcode scanner, etc.
</t>
</xpath>
<xpath expr="//p[@name='bottom_help_message']" position="after">
<a t-if="picking_type_code == 'outgoing'" class="btn btn-secondary" name="sale.action_orders" type="action">Sales Orders</a>
</xpath>
</template>
<record model="ir.ui.view" id="view_picking_form">
<field name="name">sale.stock.view.picking.form</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_form"></field>
<field name="arch" type="xml">
<xpath expr="//field[@name='move_type']" position="before">
<field name="sale_id"/>
</xpath>
</field>
</record>
</odoo>

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="stock_reference_sale_view_form" model="ir.ui.view">
<field name="name">stock.reference.sale</field>
<field name="model">stock.reference</field>
<field name="inherit_id" ref="stock.stock_reference_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='picking_ids']" position="after">
<field name="sale_ids" widget="many2many_tags" readonly="True"/>
</xpath>
</field>
</record>
</odoo>