mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-28 05:32:06 +02:00
Initial commit: Sale packages
This commit is contained in:
commit
14e3d26998
6469 changed files with 2479670 additions and 0 deletions
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="product_template_form_view_inherit_website_sale_stock" model="ir.ui.view">
|
||||
<field name="name">product.template.form.inherit.website.sale.stock</field>
|
||||
<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="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>
|
||||
</div>
|
||||
<field name="out_of_stock_message" attrs="{'invisible': [('type', 'in', ['service', 'consu'])]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="res_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.view.form.inherit.website.sale.stock</field>
|
||||
<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)
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_picking_form_inherit_website_sale_stock" model="ir.ui.view">
|
||||
<field name="name">stock.picking.form.inherit.website.sale.stock</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='extra']/group/group/field[@name='company_id']" position="before">
|
||||
<field name="website_id" groups="website.group_multi_website" invisible="1"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<record id="product_pages_tree_view" model="ir.ui.view">
|
||||
<field name="name">Product Pages Tree (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>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<?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">
|
||||
<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>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('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>
|
||||
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue