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

@ -5,23 +5,28 @@
<field name="model">product.template</field>
<field name="inherit_id" ref="website_sale.product_template_form_view" />
<field name="arch" type="xml">
<xpath expr="//field[@name='public_categ_ids']" position="after">
<label for="allow_out_of_stock_order" attrs="{'invisible': [('type', 'in', ['service', 'consu'])]}" string="Out-of-Stock"/>
<div attrs="{'invisible': [('type', 'in', ['service', 'consu'])]}">
<field name="allow_out_of_stock_order" class="oe_inline" /> Continue Selling
</div>
<label for="show_availability" attrs="{'invisible': [('type', 'in', ['service', 'consu'])]}" string="Show Available Qty"/>
<div attrs="{'invisible': [('type', 'in', ['service', 'consu'])]}">
<field name="website_ribbon_id" position="before">
<field name="allow_out_of_stock_order" invisible="not is_storable"/>
</field>
<field name="website_ribbon_id" position="after">
<label for="show_availability" invisible="not is_storable" string="Show Available Qty"/>
<div invisible="not is_storable">
<field name="show_availability" class="oe_inline" />
<span attrs="{'invisible': [('show_availability', '=', False)]}">
<label for="available_threshold" string="only if below" class="o_light_label"/>
<field name="available_threshold" class="oe_inline col-1" widget="integer"/>
Units
<span invisible="not show_availability">
<label
for="available_threshold"
string="Below"
class="o_light_label me-1"
/>
<field name="available_threshold" class="oe_inline col-1" digits="[42, 0]"/>
</span>
</div>
<field name="out_of_stock_message" attrs="{'invisible': [('type', 'in', ['service', 'consu'])]}"/>
</xpath>
<field
name="out_of_stock_message"
invisible="not is_storable"
placeholder="e.g. 'Will be back soon'"
/>
</field>
</field>
</record>
</odoo>

View file

@ -6,53 +6,46 @@
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="website_sale.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath expr="//div[@id='comparator_option_setting']" position="after">
<div class="col-12 col-lg-6 o_setting_box" id="product_availability_setting">
<div class="o_setting_left_pane">
</div>
<div class="o_setting_right_pane" name="stock_inventory_availability">
<div class="o_form_label">
Inventory Defaults
</div>
<div class="text-muted">
How to display products having low quantities (on hand - reserved)
<setting id="automatic_invoice_generation_setting" position="after">
<setting
string="Inventory Defaults"
id="product_availability_setting"
info="This setting is common to all websites."
>
<div class="content-group">
<div class="row mt16"
id="website_warehouse_setting"
groups="stock.group_stock_multi_warehouses">
<field name="website_company_id" invisible="1"/>
<label for="website_warehouse_id" string="Warehouse" class="col-lg-3 o_light_label" />
<field name="website_warehouse_id" placeholder="All warehouses"/>
</div>
<div class="content-group">
<div class="row mt16"
id="website_warehouse_setting"
groups="stock.group_stock_multi_warehouses">
<field name="website_company_id" invisible="1"/>
<label for="website_warehouse_id" string="Warehouse" class="col-lg-3 o_light_label" />
<field name="website_warehouse_id"/>
</div>
<div class="content-group">
<div class="row mt16"
id="allow_out_of_stock_order_setting"
title="Default availability mode set on newly created storable products. This can be changed at the product level.">
<div class="col-12">
<label for="allow_out_of_stock_order" string="Out-of-Stock" class="p-0 col-4 o_light_label"/>
<field name="allow_out_of_stock_order" class=" w-auto"/>
<label for="allow_out_of_stock_order" class="o_light_label" string="Continue Selling"/>
</div>
</div>
</div>
<div class="content-group">
<div class="row"
id="show_availability_setting"
title="Default visibility for custom messages.">
<div class="col-12">
<label for="show_availability" string="Show Available Qty" class="p-0 col-4 o_light_label mb-3 mt-2"/>
<field name="show_availability" class="w-auto"/>
<label for="available_threshold" string="only if below" class="o_light_label" attrs="{'invisible': [('show_availability', '=', False)]}"/>
<field name="available_threshold" class="oe_inline col-1" widget="integer" attrs="{'invisible': [('show_availability', '=', False)]}"/>
<span attrs="{'invisible': [('show_availability', '=', False)]}">Units</span>
</div>
id="allow_out_of_stock_order_setting"
title="Default availability mode set on newly created storable products. This can be changed at the product level.">
<div class="col-12">
<label for="default_allow_out_of_stock_order" string="Out-of-Stock" class="p-0 col-4 o_light_label"/>
<field name="default_allow_out_of_stock_order" class=" w-auto"/>
<label for="default_allow_out_of_stock_order" class="o_light_label" string="Continue Selling"/>
</div>
</div>
</div>
<div class="content-group">
<label for="default_show_availability" string="Show Available Quantity" class="p-0 col-4 o_light_label mt-2"/>
<field name="default_show_availability" class="w-auto"/>
<label for="default_available_threshold" string="only if below" class="o_light_label" invisible="not default_show_availability"/>
<field
name="default_available_threshold"
style="width: 30px;"
digits="[42, 0]"
invisible="not default_show_availability"
/>
<span invisible="not default_show_availability">units</span>
</div>
</div>
</div>
</xpath>
</setting>
</setting>
</field>
</record>

View file

@ -2,13 +2,10 @@
<odoo>
<record id="product_pages_tree_view" model="ir.ui.view">
<field name="name">Product Pages Tree (stock inherit)</field>
<field name="name">Product Pages List (stock inherit)</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="website_sale.product_pages_tree_view"/>
<field name="arch" type="xml">
<field name="responsible_id" position="attributes">
<attribute name="optional">hide</attribute>
</field>
<field name="virtual_available" position="attributes">
<attribute name="optional">hide</attribute>
</field>

View file

@ -1,22 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Shopping Cart Lines -->
<template id="website_sale_stock_cart_lines" inherit_id="website_sale.cart_lines" name="Shopping Cart Lines">
<template id="website_sale_stock_cart_lines" inherit_id="website_sale.cart_lines_quantity" name="Shopping Cart Lines">
<xpath expr="//input[@type='text'][hasclass('quantity')]" position="attributes">
<attribute name='t-att-data-max'>(line.product_uom_qty + line._get_max_available_qty()) if line.product_id.type == 'product' and not line.product_id.allow_out_of_stock_order else None</attribute>
<attribute name="t-att-data-max">line._get_max_line_qty()</attribute>
</xpath>
<xpath expr="//div[hasclass('css_quantity')]" position="after">
<div class='availability_messages'/>
<xpath expr="//div[contains(@t-attf-class, 'css_quantity')]" position="after">
<div class="availability_messages"/>
</xpath>
</template>
<template id="website_sale_stock_product" inherit_id="website_sale.product" priority="4">
<xpath expr="//div[@id='o_wsale_cta_wrapper']" position="after">
<div class="availability_messages o_not_editable"/>
</xpath>
<xpath expr="//div[@id='product_details']" position="inside">
<input id="wsale_user_email" type="hidden" t-att-value="user_email" t-nocache="user_email changes between users"/>
</xpath>
</template>
<template id="website_sale_stock_product" inherit_id="website_sale.cta_wrapper" priority="4">
<xpath expr="//div[@id='o_wsale_cta_wrapper']" position="before">
<div class="availability_messages o_not_editable"/>
<input id="wsale_user_email" type="hidden" t-att-value="user_email"/>
</xpath>
</template>
</odoo>