mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-26 08:32:02 +02:00
19.0 vanilla
This commit is contained in:
parent
79f83631d5
commit
73afc09215
6267 changed files with 1534193 additions and 1130106 deletions
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="product_attribute_value_list" model="ir.ui.view">
|
||||
<field name="name">product.attribute.value.list</field>
|
||||
<field name="model">product.attribute.value</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Attribute Values">
|
||||
<field name="name"/>
|
||||
<field name="default_extra_price"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -1,15 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="attribute_tree_view" model="ir.ui.view">
|
||||
<field name="name">product.attribute.tree</field>
|
||||
<field name="name">product.attribute.list</field>
|
||||
<field name="model">product.attribute</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Variant Values" default_order="sequence, id">
|
||||
<list string="Variant Values">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="display_type"/>
|
||||
<field name="create_variant"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -20,32 +20,72 @@
|
|||
<form string="Product Attribute">
|
||||
<field name="number_related_products" invisible="1"/>
|
||||
<sheet>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="text-bg-danger"
|
||||
invisible="active"
|
||||
/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button class="oe_stat_button" name="action_open_related_products"
|
||||
type="object" icon="fa-bars"
|
||||
attrs="{'invisible': [('number_related_products', '=', [])]}">
|
||||
<button name="action_open_product_template_attribute_lines"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-bars"
|
||||
invisible="not number_related_products">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_value"><field name="number_related_products"/></span>
|
||||
<span class="o_stat_text">Related Products</span>
|
||||
<span class="o_stat_text">Products</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<group name="main_fields" class="o_label_nowrap">
|
||||
<label for="name" string="Attribute Name"/>
|
||||
<field name="name" nolabel="1"/>
|
||||
<field name="display_type" widget="radio"/>
|
||||
<field name="create_variant" widget="radio" attrs="{'readonly': [('number_related_products', '!=', 0)]}"/>
|
||||
<group name="main_fields">
|
||||
<group name="sale_main_fields">
|
||||
<label for="name" string="Attribute Name"/>
|
||||
<field name="name" nolabel="1"/>
|
||||
<field name="display_type" widget="radio" options="{'horizontal': True}"/>
|
||||
<field name="create_variant"
|
||||
widget="radio"
|
||||
options="{'horizontal': True}"
|
||||
readonly="number_related_products != 0 or display_type == 'multi'"
|
||||
force_save="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Attribute Values" name="attribute_values">
|
||||
<field name="value_ids" widget="one2many" nolabel="1">
|
||||
<tree string="Values" editable="bottom">
|
||||
<field name="value_ids" widget="pavs_one2many" nolabel="1">
|
||||
<list string="Values" editable="bottom">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="display_type" invisible="1"/>
|
||||
<field name="is_custom" groups="product.group_product_variant"/>
|
||||
<field name="html_color" attrs="{'column_invisible': [('parent.display_type', '!=', 'color')]}" widget="color"/>
|
||||
</tree>
|
||||
<field name="display_type" column_invisible="True"/>
|
||||
<field name="is_custom" width="120px"
|
||||
column_invisible="parent.display_type == 'multi'"/>
|
||||
<field name="html_color"
|
||||
widget="color"
|
||||
column_invisible="parent.display_type != 'color'"
|
||||
invisible="image"/>
|
||||
<field name="image"
|
||||
widget="image"
|
||||
options="{'size': [70, 70]}"
|
||||
class="oe_avatar text-start float-none"
|
||||
column_invisible="parent.display_type not in ['color', 'image']"/>
|
||||
<field name="default_extra_price" width="160px"/>
|
||||
<button
|
||||
name="action_add_to_products"
|
||||
string="Add to products"
|
||||
type="object"
|
||||
icon="fa-plus"
|
||||
column_invisible="parent.number_related_products < 1"
|
||||
invisible="pav_attribute_line_ids"
|
||||
/>
|
||||
<button
|
||||
name="action_update_prices"
|
||||
string="Update extra prices"
|
||||
type="object"
|
||||
icon="fa-refresh"
|
||||
column_invisible="parent.number_related_products < 1"
|
||||
invisible="not pav_attribute_line_ids or not default_extra_price_changed"
|
||||
/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
|
|
@ -56,9 +96,9 @@
|
|||
|
||||
<record id="attribute_action" model="ir.actions.act_window">
|
||||
<field name="name">Attributes</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.attribute</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="path">attributes</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
|
||||
<record id="product_template_attribute_line_form" model="ir.ui.view">
|
||||
|
|
@ -72,10 +112,10 @@
|
|||
<label for="attribute_id" string="Attribute Name"/>
|
||||
<field name="attribute_id" nolabel="1"/>
|
||||
<field name="value_ids" widget="one2many">
|
||||
<tree string="Values">
|
||||
<list string="Values">
|
||||
<field name="name"/>
|
||||
<field name="html_color"/>
|
||||
</tree>
|
||||
</list>
|
||||
<form string="Values">
|
||||
<field name="name"/>
|
||||
</form>
|
||||
|
|
@ -86,41 +126,42 @@
|
|||
</record>
|
||||
|
||||
<record id="product_template_attribute_value_view_tree" model="ir.ui.view">
|
||||
<field name="name">product.template.attribute.value.view.tree</field>
|
||||
<field name="name">product.template.attribute.value.view.list</field>
|
||||
<field name="model">product.template.attribute.value</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Attributes" create="0" delete="0">
|
||||
<list string="Attributes" create="0" delete="0" multi_edit="1">
|
||||
<field name="product_tmpl_id" string="Product" column_invisible="context.get('product_invisible', False)"/>
|
||||
<field name="attribute_id" optional="hide"/>
|
||||
<field name="name"/>
|
||||
<field name="display_type" optional="hide"/>
|
||||
<field name="html_color" attrs="{'invisible': [('display_type', '!=', 'color')]}" widget="color"/>
|
||||
<field name="html_color" invisible="display_type != 'color' or image" widget="color"/>
|
||||
<field name="image" invisible="display_type != 'color'" widget="image" options="{'size': [70, 70]}"/>
|
||||
<field name="ptav_active" optional="hide"/>
|
||||
<field name="price_extra" widget="monetary" options="{'field_digits': True}"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
</tree>
|
||||
<field name="currency_id" column_invisible="True"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_template_attribute_value_view_form" model="ir.ui.view">
|
||||
<field name="name">product.template.attribute.value.view.form.</field>
|
||||
<field name="model">product.template.attribute.value</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Product Attribute" create="0" delete="0">
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="ptav_active" readonly="1" attrs="{'invisible': [('ptav_active', '=', True)]}"/>
|
||||
<field name="ptav_active" readonly="1" invisible="ptav_active"/>
|
||||
<field name="name"/>
|
||||
<field name="display_type" invisible="1"/>
|
||||
<field name="html_color" attrs="{'invisible': [('display_type', '!=', 'color')]}"/>
|
||||
<field name="html_color" invisible="display_type != 'color' or image"/>
|
||||
<field name="image" invisible="display_type != 'color' or not image" widget="image" options="{'size': [70, 70]}"/>
|
||||
<field name="price_extra" widget="monetary" options="{'field_digits': True}"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="exclude_for" widget="one2many" mode="tree">
|
||||
<tree editable="bottom">
|
||||
<field name="exclude_for" widget="one2many" mode="list">
|
||||
<list editable="bottom">
|
||||
<field name="product_tmpl_id" />
|
||||
<field name="value_ids" widget="many2many_tags" options="{'no_create': True}" />
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</group>
|
||||
</sheet>
|
||||
|
|
@ -139,4 +180,15 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_attribute_search" model="ir.ui.view">
|
||||
<field name="name">product.attribute.view.search</field>
|
||||
<field name="model">product.attribute</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<filter string="Inactive" name="inactive" domain="[('active', '=', False)]"/>
|
||||
<field name="name"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
name="%(product_template_action_all)d"
|
||||
icon="fa-th-list"
|
||||
type="action"
|
||||
context="{'search_default_categ_id': active_id, 'default_categ_id': active_id, 'group_expand': True}">
|
||||
context="{'search_default_categ_id': id, 'default_categ_id': id, 'group_expand': True}">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="product_count"/></span>
|
||||
<span class="o_stat_text"> Products</span>
|
||||
|
|
@ -27,6 +27,7 @@
|
|||
<field name="parent_id" class="oe_inline"/>
|
||||
</group>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -36,9 +37,9 @@
|
|||
<field name="model">product.category</field>
|
||||
<field name="priority">1</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Product Categories">
|
||||
<list string="Product Categories">
|
||||
<field name="display_name" string="Product Category"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -54,9 +55,9 @@
|
|||
</record>
|
||||
|
||||
<record id="product_category_action_form" model="ir.actions.act_window">
|
||||
<field name="name">Product Categories</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="name">Categories</field>
|
||||
<field name="res_model">product.category</field>
|
||||
<field name="path">product-categories</field>
|
||||
<field name="search_view_id" ref="product_category_search_view"/>
|
||||
<field name="view_id" ref="product_category_list_view"/>
|
||||
</record>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,69 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="product.product_combo_view_form" model="ir.ui.view">
|
||||
<field name="name">product.combo.form</field>
|
||||
<field name="model">product.combo</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Combo Choice">
|
||||
<div class="oe_title">
|
||||
<label for="name" string="Combo Choice"/>
|
||||
<h1>
|
||||
<field
|
||||
name="name"
|
||||
placeholder="e.g. Burger Choice"
|
||||
widget="text"
|
||||
options="{'line_breaks': False}"
|
||||
class="text-break"
|
||||
/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<field
|
||||
name="company_id"
|
||||
placeholder="Visible to all"
|
||||
groups="base.group_multi_company"
|
||||
options="{'no_create': True}"
|
||||
class="oe_inline"
|
||||
/>
|
||||
</group>
|
||||
<field name="combo_item_ids">
|
||||
<list editable="bottom">
|
||||
<field name="currency_id" column_invisible="True"/>
|
||||
<field name="product_id"/>
|
||||
<field
|
||||
name="lst_price"
|
||||
widget="monetary"
|
||||
options="{'field_digits': True}"
|
||||
/>
|
||||
<field
|
||||
name="extra_price"
|
||||
widget="monetary"
|
||||
options="{'field_digits': True}"
|
||||
/>
|
||||
</list>
|
||||
</field>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product.product_combo_view_tree" model="ir.ui.view">
|
||||
<field name="name">product.combo.list</field>
|
||||
<field name="model">product.combo</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Combo Choices">
|
||||
<field name="currency_id" column_invisible="True"/>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="base_price" widget="monetary" options="{'field_digits': True}"/>
|
||||
<field name="combo_item_count"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product.product_combo_action" model="ir.actions.act_window">
|
||||
<field name="name">Combo Choices</field>
|
||||
<field name="res_model">product.combo</field>
|
||||
<field name="path">combo-choices</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="product_document_form" model="ir.ui.view">
|
||||
<field name="name">product.document.form</field>
|
||||
<field name="model">product.document</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<field name="res_model" invisible="True"/>
|
||||
<h1>
|
||||
<field name="name" readonly="not datas and type != 'url'"/>
|
||||
</h1>
|
||||
<group>
|
||||
<group>
|
||||
<field name="type" readonly="datas or id" class="oe_inline"/>
|
||||
<label for="datas"/>
|
||||
<div class="o_row">
|
||||
<field name="datas"
|
||||
filename="name"
|
||||
invisible="type == 'url'"
|
||||
required="type == 'binary'"
|
||||
class="oe_inline"/>
|
||||
</div>
|
||||
<field name="url" widget="url" invisible="type == 'binary'" required="type == 'url'"/>
|
||||
<field name="res_name" string="Product Variant" invisible="res_model != 'product.product'"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Attached To" groups="base.group_no_one">
|
||||
<field name="res_name"/>
|
||||
<field name="company_id"
|
||||
groups="base.group_multi_company"
|
||||
options="{'no_create': True}"
|
||||
class="oe_inline"
|
||||
placeholder="Visible to all"/>
|
||||
</group>
|
||||
<group string="History" groups="base.group_no_one" invisible="not create_date">
|
||||
<label for="create_uid" string="Creation"/>
|
||||
<div name="creation_div">
|
||||
<field name="create_uid" readonly="1" class="oe_inline"/> on
|
||||
<field name="create_date" readonly="1" class="oe_inline"/>
|
||||
</div>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_document_kanban" model="ir.ui.view">
|
||||
<field name="name">product.document.kanban</field>
|
||||
<field name="model">product.document</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban js_class="product_documents_kanban" can_open="0">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="ir_attachment_id"/>
|
||||
<field name="mimetype"/>
|
||||
<field name="type"/>
|
||||
<field name="name"/>
|
||||
<field name="active"/>
|
||||
<field name="res_model"/>
|
||||
<templates>
|
||||
<t t-name="menu">
|
||||
<a t-if="widget.editable" type="open" class="dropdown-item">Edit</a>
|
||||
<a t-if="widget.deletable" type="delete" class="dropdown-item">Delete</a>
|
||||
<a t-attf-href="/web/content/#{record.ir_attachment_id.raw_value}?download=true" download="" class="dropdown-item">Download</a>
|
||||
</t>
|
||||
<t t-name="card" class="o_kanban_attachment flex-row">
|
||||
<widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
|
||||
<widget name="web_ribbon" title="Variant" bg_color="text-bg-secondary" invisible="not active or res_model != 'product.product'" groups="product.group_product_variant"/>
|
||||
<aside class="o_kanban_image m-2">
|
||||
<t t-set="webimage" t-value="new RegExp('image.*(gif|jpeg|jpg|png|webp)').test(record.mimetype.value)"/>
|
||||
<t t-set="binaryPreviewable"
|
||||
t-value="new RegExp('(image|video|application/pdf|text)').test(record.mimetype.value) && record.type.raw_value === 'binary'"/>
|
||||
<div t-attf-class="o_kanban_image_wrapper #{(webimage or binaryPreviewable) ? 'o_kanban_previewer' : ''}">
|
||||
<div t-if="record.type.raw_value == 'url'" class="fa fa-link fa-3x text-muted" aria-label="Image is a link"/>
|
||||
<img t-elif="webimage" t-attf-src="/web/image/#{record.ir_attachment_id.raw_value}/100x100" width="100" height="100" alt="Document" class="o_attachment_image"/>
|
||||
<div t-else="" class="o_image o_image_thumbnail" t-att-data-mimetype="record.mimetype.value"/>
|
||||
</div>
|
||||
</aside>
|
||||
<main class="ms-2 p-2">
|
||||
<field name="name" class=" fw-bolder fs-5 text-truncate"/>
|
||||
<field t-if="record.type.raw_value == 'url'" name="url" widget="url"/>
|
||||
<div class="d-flex flex-column mt-2">
|
||||
<field name="res_name" class="text-decoration-underline fst-italic" invisible="res_model != 'product.product'"/>
|
||||
</div>
|
||||
</main>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_document_list" model="ir.ui.view">
|
||||
<field name="name">product.document.list</field>
|
||||
<field name="model">product.document</field>
|
||||
<field name="arch" type="xml">
|
||||
<list editable="top" multi_edit="true">
|
||||
<field name="res_model" column_invisible="True"/>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="company_id" groups="base.group_multi_company" optional="show"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_document_search" model="ir.ui.view">
|
||||
<field name="name">product.document.search</field>
|
||||
<field name="model">product.document</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name"/>
|
||||
<filter name="archived" string="Archived" domain="[('active', '=', False)]"/>
|
||||
<filter
|
||||
string="Documents of this variant"
|
||||
name="context_variant"
|
||||
domain="[('res_model', '=', 'product.product'), ('res_id', '=', context.get('default_res_id'))]"/>
|
||||
<filter name="all" string="All" domain="['|', ('active', '=', True), ('active', '=', False)]"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="product_packaging_tree_view" model="ir.ui.view">
|
||||
<field name="name">product.packaging.tree.view</field>
|
||||
<field name="model">product.packaging</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Product Packagings" name="packaging">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="product_id"/>
|
||||
<field name="name" string="Packaging"/>
|
||||
<field name="qty"/>
|
||||
<field name="product_uom_id" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom"/>
|
||||
<field name="barcode" optional="hide"/>
|
||||
<field name="company_id" groups="base.group_multi_company" optional="hide"/>
|
||||
<field name="company_id" groups="!base.group_multi_company" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_packaging_tree_view2" model="ir.ui.view">
|
||||
<field name="name">product.packaging.tree.view2</field>
|
||||
<field name="model">product.packaging</field>
|
||||
<field name="mode">primary</field>
|
||||
<field name="inherit_id" ref="product.product_packaging_tree_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='product_id']" position="replace"/>
|
||||
<xpath expr="//tree[@name='packaging']" position="attributes">
|
||||
<attribute name="editable">bottom</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_packaging_form_view" model="ir.ui.view">
|
||||
<field name="name">product.packaging.form.view</field>
|
||||
<field name="model">product.packaging</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Product Packaging">
|
||||
<sheet>
|
||||
<label for="name" string="Packaging"/>
|
||||
<h1>
|
||||
<field name="name"/>
|
||||
</h1>
|
||||
<group>
|
||||
<field name="id" invisible='1'/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<group name="group_product">
|
||||
<field name="product_id" required='True' attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
</group>
|
||||
<group name="qty">
|
||||
<label for="qty" string="Contained quantity"/>
|
||||
<div class="o_row">
|
||||
<field name="qty"/>
|
||||
<field name="product_uom_id" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom"/>
|
||||
</div>
|
||||
<field name="barcode"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_packaging_form_view2" model="ir.ui.view">
|
||||
<field name="name">product.packaging.form.view2</field>
|
||||
<field name="model">product.packaging</field>
|
||||
<field name="mode">primary</field>
|
||||
<field name="inherit_id" ref="product.product_packaging_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='group_product']" position="replace"/>
|
||||
<xpath expr="//field[@name='id']" position="replace"/>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_packaging_view">
|
||||
<field name="name">Product Packagings</field>
|
||||
<field name="res_model">product.packaging</field>
|
||||
<field name="domain">[('product_id', '!=', False)]</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('product_packaging_tree_view')}),
|
||||
(0, 0, {'view_mode': 'form', 'view_id': ref('product_packaging_form_view')})]"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -9,81 +9,102 @@
|
|||
<filter name="Product Rule" domain="[('applied_on', '=', '1_product')]"/>
|
||||
<filter name="Variant Rule" domain="[('applied_on', '=', '0_product_variant')]" groups="product.group_product_variant"/>
|
||||
<separator/>
|
||||
<field name="pricelist_id"/>
|
||||
<field name="pricelist_id" groups="product.group_product_pricelist"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="currency_id" groups="base.group_multi_currency"/>
|
||||
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Product" name="groupby_product" domain="[]" context="{'group_by': 'product_tmpl_id'}"/>
|
||||
<filter string="Variant"
|
||||
name="groupby_product_variant"
|
||||
domain="[('applied_on', '=', '0_product_variant')]"
|
||||
context="{'group_by': 'product_id'}"
|
||||
groups="product.group_product_variant"/>
|
||||
<filter string="Pricelist"
|
||||
name="groupby_vendor"
|
||||
domain="[]"
|
||||
context="{'group_by': 'pricelist_id'}"
|
||||
groups="product.group_product_pricelist"/>
|
||||
<filter string="Active" name="visible" domain="[('pricelist_id.active', '=', True)]"/>
|
||||
<group>
|
||||
<filter
|
||||
string="Product"
|
||||
name="groupby_product"
|
||||
context="{'group_by': 'product_tmpl_id'}"
|
||||
/>
|
||||
<filter
|
||||
string="Variant"
|
||||
name="groupby_product_variant"
|
||||
domain="[('applied_on', '=', '0_product_variant')]"
|
||||
context="{'group_by': 'product_id'}"
|
||||
groups="product.group_product_variant"
|
||||
/>
|
||||
<filter
|
||||
string="Pricelist"
|
||||
name="groupby_vendor"
|
||||
context="{'group_by': 'pricelist_id'}"
|
||||
groups="product.group_product_pricelist"
|
||||
/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_pricelist_item_tree_view" model="ir.ui.view">
|
||||
<field name="name">product.pricelist.item.tree</field>
|
||||
<field name="model">product.pricelist.item</field>
|
||||
<field name="priority">10</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Price Rules">
|
||||
<field name="pricelist_id"/>
|
||||
<field name="name" string="Applied On"/>
|
||||
<field name="price"/>
|
||||
<field name="min_quantity" colspan="4"/>
|
||||
<field name="date_start" optional="hide"/>
|
||||
<field name="date_end" optional="hide"/>
|
||||
<field name="company_id" groups="base.group_multi_company" optional="show"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="name">product.pricelist.item.list</field>
|
||||
<field name="model">product.pricelist.item</field>
|
||||
<field name="priority">10</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Price Rules">
|
||||
<field name="pricelist_id" groups="product.group_product_pricelist" required="is_pricelist_required"/>
|
||||
<field name="name" string="Applied On"/>
|
||||
<field name="price"/>
|
||||
<field name="min_quantity" colspan="4"/>
|
||||
<field name="date_start" optional="hide"/>
|
||||
<field name="date_end" optional="hide"/>
|
||||
<field name="company_id" groups="base.group_multi_company" optional="show"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_pricelist_item_tree_view_from_product" model="ir.ui.view">
|
||||
<!-- Access and edit price rules from a given product/product variant -->
|
||||
<field name="name">product.pricelist.item.tree</field>
|
||||
<field name="name">product.pricelist.item.list</field>
|
||||
<field name="model">product.pricelist.item</field>
|
||||
<field name="priority">100</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Pricelist Rules" editable="bottom">
|
||||
<list string="Pricelist Rules" editable="bottom">
|
||||
<!-- Scope = coming from a product/product template -->
|
||||
<field name="pricelist_id" string="Pricelist" options="{'no_create_edit':1, 'no_open': 1}"/>
|
||||
<field name="name" string="Applied On"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="categ_id" invisible="1"/>
|
||||
<field name="product_tmpl_id"
|
||||
invisible="context.get('active_model')!='product.category'"
|
||||
attrs="{'required': [('applied_on', '=', '1_product')]}"
|
||||
domain="[('categ_id', '=', context.get('default_categ_id', True)), '|', ('company_id', '=', company_id), ('company_id', '=', False)]"
|
||||
options="{'no_create_edit':1, 'no_open': 1}"/>
|
||||
<field name="product_id"
|
||||
groups="product.group_product_variant"
|
||||
invisible="context.get('product_without_variants', False)"
|
||||
readonly="context.get('active_model')=='product.product'"
|
||||
attrs="{'required': [('applied_on', '=', '0_product_variant')]}"
|
||||
domain="['|', '|',
|
||||
('id', '=', context.get('default_product_id', 0)),
|
||||
('product_tmpl_id', '=', context.get('default_product_tmpl_id', 0)),
|
||||
('categ_id', '=', context.get('default_categ_id', 0)), '|', ('company_id', '=', company_id), ('company_id', '=', False)
|
||||
]"
|
||||
options="{'no_create_edit':1, 'no_open': 1}"
|
||||
/>
|
||||
<field
|
||||
name="pricelist_id"
|
||||
options="{'no_create_edit': 1, 'no_open': 1}"
|
||||
required="is_pricelist_required"
|
||||
groups="product.group_product_pricelist"
|
||||
/>
|
||||
<field
|
||||
name="product_id"
|
||||
groups="product.group_product_variant"
|
||||
readonly="context.get('active_model') == 'product.product'"
|
||||
column_invisible="context.get('product_without_variants', False)"
|
||||
required="applied_on == '0_product_variant'"
|
||||
domain="['|', '|',
|
||||
('id', '=', context.get('default_product_id', 0)),
|
||||
('product_tmpl_id', '=', context.get('default_product_tmpl_id', 0)),
|
||||
('categ_id', '=', context.get('default_categ_id', 0)), '|', ('company_id', '=', company_id), ('company_id', '=', False)
|
||||
]"
|
||||
placeholder="All variants"
|
||||
options="{'no_create_edit': 1, 'no_open': 1}"
|
||||
/>
|
||||
<field name="company_id" column_invisible="True"/>
|
||||
<field name="categ_id" column_invisible="True"/>
|
||||
<field
|
||||
name="product_tmpl_id"
|
||||
column_invisible="context.get('active_model') != 'product.category'"
|
||||
required="applied_on == '1_product'"
|
||||
domain="[('categ_id', '=', context.get('default_categ_id', True)), '|', ('company_id', '=', company_id), ('company_id', '=', False)]"
|
||||
options="{'no_create_edit': 1, 'no_open': 1}"
|
||||
/>
|
||||
<field
|
||||
name="fixed_price"
|
||||
widget="monetary"
|
||||
string="Price"
|
||||
options="{'currency_field': 'currency_id', 'field_digits': True}"
|
||||
required="1"
|
||||
/>
|
||||
<field name="min_quantity" colspan="4"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="fixed_price" string="Price" required='1'/>
|
||||
<field name="currency_id" column_invisible="True"/>
|
||||
<field name="date_start" optional="show"/>
|
||||
<field name="date_end" optional="show"/>
|
||||
<field name="applied_on" invisible="1"/>
|
||||
<field name="company_id" groups="base.group_multi_company" optional="show" options="{'no_create':1, 'no_open': 1}"/>
|
||||
</tree>
|
||||
<field name="applied_on" column_invisible="True"/>
|
||||
<field name="company_id" groups="base.group_multi_company" optional="hide" options="{'no_create': 1, 'no_open': 1}"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -95,81 +116,118 @@
|
|||
<sheet>
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<group name="pricelist_rule_computation" groups="product.group_sale_pricelist" string="Price Computation">
|
||||
<field name="price" invisible="1"/>
|
||||
<group name="pricelist_rule_computation">
|
||||
<group name="pricelist_rule_method">
|
||||
<field name="compute_price" string="Computation" widget="radio"/>
|
||||
</group>
|
||||
<div class="alert alert-info" role="alert" groups="uom.group_uom">
|
||||
The computed price is expressed in the default Unit of Measure of the product.
|
||||
</div>
|
||||
</group>
|
||||
<group name="pricelist_rule_base" groups="product.group_sale_pricelist">
|
||||
<group>
|
||||
<field name="price" invisible="1"/>
|
||||
<field name="fixed_price" widget="monetary"
|
||||
attrs="{'invisible': [('compute_price', '!=', 'fixed')]}"
|
||||
options="{'field_digits': True}"/>
|
||||
<label for="percent_price" string="Discount" attrs="{'invisible':[('compute_price', '!=', 'percentage')]}"/>
|
||||
<div class="o_row" attrs="{'invisible':[('compute_price', '!=', 'percentage')]}">
|
||||
<field name="percent_price" class="oe_inline" attrs="{'invisible':[('compute_price', '!=', 'percentage')]}"/>%
|
||||
<field name="applied_on" invisible="1"/>
|
||||
<field name="display_applied_on"
|
||||
string="Apply To"
|
||||
widget="radio"
|
||||
options="{'horizontal': true}"/>
|
||||
<field name="categ_id"
|
||||
options="{'no_create': 1}"
|
||||
invisible="display_applied_on != '2_product_category'"
|
||||
placeholder="All categories"/>
|
||||
<field name="product_tmpl_id"
|
||||
options="{'no_create': 1}"
|
||||
invisible="display_applied_on != '1_product'"
|
||||
placeholder="All products"/>
|
||||
<field name="product_variant_count" invisible="1"/>
|
||||
<field name="product_id"
|
||||
options="{'no_create': 1}"
|
||||
invisible="product_variant_count < 2"
|
||||
placeholder="All variants"/>
|
||||
<field name="compute_price"
|
||||
string="Price Type"
|
||||
widget="radio"
|
||||
options="{'horizontal': true}"
|
||||
invisible="display_applied_on == '1_product' and compute_price == 'fixed_price'"
|
||||
groups="product.group_product_pricelist"
|
||||
/>
|
||||
<label for="fixed_price" invisible="compute_price != 'fixed'"/>
|
||||
<div class="o_row" invisible="compute_price != 'fixed'" style="width: 60% !important;">
|
||||
<field name="fixed_price"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'currency_id', 'field_digits': True}"/>
|
||||
<span class="d-flex gap-2 p-0" invisible="not product_uom_name">per<field
|
||||
name="product_uom_name"/></span>
|
||||
</div>
|
||||
<field name="base" attrs="{'invisible':[('compute_price', '!=', 'formula')]}"/>
|
||||
<field name="base_pricelist_id" attrs="{
|
||||
'invisible': ['|', ('compute_price', '!=', 'formula'), ('base', '!=', 'pricelist')],
|
||||
'required': [('compute_price', '=', 'formula'), ('base', '=', 'pricelist')],
|
||||
'readonly': [('base', '!=', 'pricelist')]}"/>
|
||||
<label for="price_discount" string="Discount" attrs="{'invisible':[('compute_price', '!=', 'formula')]}"/>
|
||||
<div class="o_row" attrs="{'invisible':[('compute_price', '!=', 'formula')]}">
|
||||
<label for="percent_price" string="Discount" invisible="compute_price != 'percentage'"/>
|
||||
<div class="o_row gap-3" invisible="compute_price != 'percentage'">
|
||||
<field name="percent_price"/>
|
||||
<span>%</span>
|
||||
<t groups="product.group_product_pricelist">
|
||||
<span>on</span>
|
||||
<field name="base_pricelist_id" placeholder="sales price" domain="[('id', '!=', pricelist_id)]"/>
|
||||
</t>
|
||||
</div>
|
||||
</group>
|
||||
<group name="pricelist_rule_limits">
|
||||
<field name="min_quantity" string="Min Qty"/>
|
||||
<field name="date_start"
|
||||
string="Validity Period"
|
||||
widget="daterange"
|
||||
options="{'end_date_field': 'date_end'}"/>
|
||||
<field name="date_end" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<group name="pricelist_rule_base" invisible="compute_price != 'formula'">
|
||||
<group>
|
||||
<field name="base" string="Based price"/>
|
||||
<field name="base_pricelist_id"
|
||||
invisible="base != 'pricelist'"
|
||||
readonly="base != 'pricelist'"
|
||||
required="compute_price == 'formula' and base == 'pricelist'"
|
||||
string="Other Pricelist"/>
|
||||
<label for="price_discount" string="Discount"
|
||||
invisible="base == 'standard_price'"/>
|
||||
<div class="o_row" invisible="base == 'standard_price'" style="width: 40% !important;">
|
||||
<field name="price_discount"/>
|
||||
<span>%</span>
|
||||
</div>
|
||||
<label for="price_markup" string="Markup"
|
||||
invisible="base != 'standard_price'"/>
|
||||
<div class="o_row" invisible="base != 'standard_price'" style="width: 40% !important;">
|
||||
<field name="price_markup"/>
|
||||
<span>%</span>
|
||||
</div>
|
||||
<field name="price_round" string="Round off to"/>
|
||||
<field name="price_surcharge"
|
||||
widget="monetary"
|
||||
string="Extra Fee"
|
||||
attrs="{'invisible':[('compute_price', '!=', 'formula')]}"
|
||||
options="{'field_digits': True}"/>
|
||||
<field name="price_round" string="Rounding Method" attrs="{'invisible':[('compute_price', '!=', 'formula')]}"/>
|
||||
<label string="Margins" for="price_min_margin" attrs="{'invisible':[('compute_price', '!=', 'formula')]}"/>
|
||||
<div class="o_row" attrs="{'invisible':[('compute_price', '!=', 'formula')]}">
|
||||
<field name="price_min_margin" string="Min. Margin" class="oe_inline"
|
||||
options="{'currency_field': 'currency_id', 'field_digits': True}"/>
|
||||
<label string="Margins" for="price_min_margin"
|
||||
groups="base.group_no_one"/>
|
||||
<div class="d-flex align-items-baseline" groups="base.group_no_one">
|
||||
<field name="price_min_margin"
|
||||
string="Min. Margin"
|
||||
class="oe_inline"
|
||||
widget="monetary"
|
||||
nolabel="1"
|
||||
options="{'field_digits': True}"/>
|
||||
<i class="fa fa-long-arrow-right mx-2 oe_edit_only" aria-label="Arrow icon" title="Arrow"/>
|
||||
<field name="price_max_margin" string="Max. Margin" class="oe_inline"
|
||||
<i class="fa fa-long-arrow-right mx-2 oe_edit_only"
|
||||
aria-label="Arrow icon" title="Arrow"/>
|
||||
<field name="price_max_margin"
|
||||
string="Max. Margin"
|
||||
class="oe_inline"
|
||||
widget="monetary"
|
||||
nolabel="1"
|
||||
options="{'field_digits': True}"/>
|
||||
</div>
|
||||
</group>
|
||||
<div class="alert alert-info" role="alert" style="white-space: pre;" attrs="{'invisible': [('compute_price', '!=', 'formula')]}">
|
||||
<field name="rule_tip"/>
|
||||
<div>
|
||||
<div class="alert alert-info" role="alert" style="white-space: pre;">
|
||||
<field name="rule_tip"/>
|
||||
</div>
|
||||
<div class="alert alert-info"
|
||||
role="alert"
|
||||
style="white-space: pre;">
|
||||
<b>Tip: want to round at 9.99?</b>
|
||||
<div>round off to 10.00 and set an extra at -0.01</div>
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
|
||||
<group string="Conditions">
|
||||
<group name="pricelist_rule_target">
|
||||
<field name="applied_on" widget="radio"/>
|
||||
<field name="categ_id" options="{'no_create':1}" attrs="{
|
||||
'invisible':[('applied_on', '!=', '2_product_category')],
|
||||
'required':[('applied_on', '=', '2_product_category')]}"/>
|
||||
<field name="product_tmpl_id" options="{'no_create':1}" attrs="{
|
||||
'invisible':[('applied_on', '!=', '1_product')],
|
||||
'required':[('applied_on', '=', '1_product')]}"/>
|
||||
<field name="product_id" options="{'no_create':1}" attrs="{
|
||||
'invisible':[('applied_on', '!=', '0_product_variant')],
|
||||
'required':[('applied_on', '=', '0_product_variant')]}"/>
|
||||
</group>
|
||||
<group name="pricelist_rule_limits">
|
||||
<field name="min_quantity"/>
|
||||
<label for="date_start" string="Validity"/>
|
||||
<div class="o_row">
|
||||
<field name="date_start" widget="daterange" options='{"related_end_date": "date_end"}'/>
|
||||
<i class="fa fa-long-arrow-right mx-2 oe_edit_only" aria-label="Arrow icon" title="Arrow"/>
|
||||
<field name="date_end" widget="daterange" options='{"related_start_date": "date_start"}'/>
|
||||
</div>
|
||||
</group>
|
||||
<group name="pricelist_rule_related" groups="base.group_no_one">
|
||||
<group string="Company Settings" groups="base.group_no_one">
|
||||
<group name="pricelist_rule_related">
|
||||
<field name="pricelist_id" invisible="1"/>
|
||||
<field name="currency_id" groups="base.group_multi_currency"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
|
|
@ -180,4 +238,36 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_pricelist_item_product_template_form_view" model="ir.ui.view">
|
||||
<field name="name">product.pricelist.item.product.template.form.inherit</field>
|
||||
<field name="model">product.pricelist.item</field>
|
||||
<field name="inherit_id" ref="product.product_pricelist_item_form_view"/>
|
||||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="display_applied_on" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
<field name="product_tmpl_id" position="attributes">
|
||||
<attribute name="readonly">1</attribute>
|
||||
<attribute name="force_save">1</attribute>
|
||||
</field>
|
||||
<field name="date_start" position="after">
|
||||
<field name="pricelist_id" groups="product.group_product_pricelist"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_pricelist_item_product_product_form_view" model="ir.ui.view">
|
||||
<field name="name">product.pricelist.item.product.product.form.inherit</field>
|
||||
<field name="model">product.pricelist.item</field>
|
||||
<field name="inherit_id" ref="product.product_pricelist_item_product_template_form_view"/>
|
||||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_id" position="attributes">
|
||||
<attribute name="readonly">1</attribute>
|
||||
<attribute name="force_save">1</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -14,16 +14,18 @@
|
|||
</record>
|
||||
|
||||
<record id="product_pricelist_view_tree" model="ir.ui.view">
|
||||
<field name="name">product.pricelist.tree</field>
|
||||
<field name="name">product.pricelist.list</field>
|
||||
<field name="model">product.pricelist</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Products Price List" sample="1">
|
||||
<list string="Products Price List" sample="1">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="discount_policy" groups="product.group_discount_per_so_line"/>
|
||||
<field name="country_group_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="All countries"/>
|
||||
<field name="currency_id" groups="base.group_multi_currency"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -33,19 +35,10 @@
|
|||
<field name="arch" type="xml">
|
||||
<kanban class="o_kanban_mobile" sample="1">
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_global_click">
|
||||
<div id="product_pricelist" class="o_kanban_record_top mb0">
|
||||
<div class="o_kanban_record_headings">
|
||||
<strong class="o_kanban_record_title">
|
||||
<span><field name="name"/></span>
|
||||
</strong>
|
||||
</div>
|
||||
<strong>
|
||||
<i class="fa fa-money" role="img" aria-label="Currency" title="Currency"></i> <field name="currency_id"/>
|
||||
</strong>
|
||||
</div>
|
||||
<field name="discount_policy" groups="product.group_discount_per_so_line"/>
|
||||
<t t-name="card" class="flex-row fw-bolder">
|
||||
<field name="name"/>
|
||||
<div class="ms-auto align-items-center">
|
||||
<i class="fa fa-money" role="img" aria-label="Currency" title="Currency"></i> <field name="currency_id"/>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
|
|
@ -58,8 +51,11 @@
|
|||
<field name="model">product.pricelist</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Products Price List">
|
||||
<header>
|
||||
<button name="action_open_pricelist_report" type="object" string="Print"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
|
||||
<div class="oe_title">
|
||||
<h1><field name="name" placeholder="e.g. USD Retailers"/></h1>
|
||||
</div>
|
||||
|
|
@ -67,67 +63,41 @@
|
|||
<group name="pricelist_settings">
|
||||
<field name="currency_id" groups="base.group_multi_currency"/>
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}" placeholder="Visible to all"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="country_group_ids" widget="many2many_tags"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="pricelist_rules" string="Price Rules">
|
||||
<page name="pricelist_rules" string="Sales Prices">
|
||||
<field name="item_ids" nolabel="1" context="{'default_base':'list_price'}">
|
||||
<tree groups="!product.group_sale_pricelist" string="Pricelist Rules" editable="bottom">
|
||||
<field name="product_tmpl_id" string="Products" required="1"/>
|
||||
<field name="product_id" string="Variants"
|
||||
groups="product.group_product_variant"
|
||||
domain="[('product_tmpl_id', '=', product_tmpl_id)]"
|
||||
options="{'no_create':1}"/>
|
||||
<field name="min_quantity"/>
|
||||
<field name="fixed_price" string="Price"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="pricelist_id" invisible="1"/>
|
||||
<!-- Pricelist ID is here only for related fields to be correctly computed -->
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<field name="base" invisible="1"/>
|
||||
<field name="applied_on" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
</tree>
|
||||
<!-- When in advanced pricelist mode : pricelist rules
|
||||
Should open in a form view and not be editable inline anymore.
|
||||
-->
|
||||
<tree groups="product.group_sale_pricelist" string="Pricelist Rules">
|
||||
<field name="product_tmpl_id" invisible="1"/>
|
||||
<field name="name" string="Applicable On"/>
|
||||
<field name="min_quantity"/>
|
||||
<list string="Pricelist Rules">
|
||||
<field name="product_tmpl_id" column_invisible="True"/>
|
||||
<field name="name" string="Apply on"/>
|
||||
<field name="price" string="Price"/>
|
||||
<field name="min_quantity"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<field name="base" invisible="1"/>
|
||||
<field name="price_discount" invisible="1"/>
|
||||
<field name="applied_on" invisible="1"/>
|
||||
<field name="compute_price" invisible="1"/>
|
||||
</tree>
|
||||
<field name="base" column_invisible="True"/>
|
||||
<field name="price_discount" column_invisible="True"/>
|
||||
<field name="applied_on" column_invisible="True"/>
|
||||
<field name="compute_price" column_invisible="True"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page name="pricelist_config" string="Configuration">
|
||||
<group>
|
||||
<group name="pricelist_availability" string="Availability">
|
||||
<field name="country_group_ids" widget="many2many_tags"/>
|
||||
</group>
|
||||
<group name="pricelist_discounts" groups="product.group_discount_per_so_line" string="Discounts">
|
||||
<field name="discount_policy" widget="radio"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_pricelist_action2" model="ir.actions.act_window">
|
||||
<field name="name">Pricelists</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.pricelist</field>
|
||||
<field name="view_mode">tree,kanban,form</field>
|
||||
<field name="path">pricelists</field>
|
||||
<field name="view_mode">list,kanban,form</field>
|
||||
<field name="search_view_id" ref="product_pricelist_view_search" />
|
||||
<field name="context">{"default_base":'list_price'}</field>
|
||||
<field name="help" type="html">
|
||||
|
|
@ -144,9 +114,8 @@
|
|||
|
||||
<record id="product_pricelist_item_action" model="ir.actions.act_window">
|
||||
<field name="name">Price Rules</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.pricelist.item</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -21,17 +21,19 @@
|
|||
<group string="Pricelist">
|
||||
<field name="product_tmpl_id" string="Product" invisible="context.get('visible_product_tmpl_id', True)"/>
|
||||
<field name="product_id" groups="product.group_product_variant" options="{'no_create': True}"/>
|
||||
<field name="product_id" groups="!product.group_product_variant" invisible="1"/>
|
||||
<label for="min_qty"/>
|
||||
<div class="o_row">
|
||||
<field name="min_qty"/>
|
||||
<field name="product_uom" groups="uom.group_uom"/>
|
||||
<field name="product_uom_id" groups="uom.group_uom" options="{'no_open': True}" widget="many2one_uom"/>
|
||||
</div>
|
||||
<label for="price" string="Unit Price"/>
|
||||
<div class="o_row">
|
||||
<field name="price" class="oe_inline" /><field name="currency_id" groups="base.group_multi_currency"/>
|
||||
<field name="price" class="oe_inline" /><field name="currency_id" groups="base.group_multi_currency" options="{'no_open': True}"/>
|
||||
</div>
|
||||
<label for="date_start" string="Validity"/>
|
||||
<div class="o_row"><field name="date_start" class="oe_inline"/> to <field name="date_end" class="oe_inline"/></div>
|
||||
<field name="discount"/>
|
||||
<field name="company_id" options="{'no_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
|
|
@ -47,11 +49,13 @@
|
|||
<search string="Vendor">
|
||||
<field name="partner_id"/>
|
||||
<field name="product_tmpl_id"/>
|
||||
<field name="product_name"/>
|
||||
<field name="product_code"/>
|
||||
<filter string="Active Products" name="active_products" domain="['|', ('product_tmpl_id.active', '=', True),('product_id.active', '=', True)]"/>
|
||||
<separator />
|
||||
<filter string="Active" name="active" domain="['|', ('date_end', '=', False), ('date_end', '>=', (context_today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d'))]"/>
|
||||
<filter string="Archived" name="archived" domain="[('date_end', '<', (context_today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d'))]"/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Active" name="active" domain="['|', ('date_end', '=', False), ('date_end', '>=', 'today -1d')]"/>
|
||||
<filter string="Archived" name="archived" domain="[('date_end', '<', 'today -1d')]"/>
|
||||
<group>
|
||||
<filter string="Product" name="groupby_product" domain="[]" context="{'group_by': 'product_tmpl_id'}"/>
|
||||
<filter string="Vendor" name="groupby_vendor" domain="[]" context="{'group_by': 'partner_id'}"/>
|
||||
</group>
|
||||
|
|
@ -64,28 +68,16 @@
|
|||
<field name="model">product.supplierinfo</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban class="o_kanban_mobile">
|
||||
<field name="min_qty"/>
|
||||
<field name="delay"/>
|
||||
<field name="price"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="currency_id"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div class="oe_kanban_global_click">
|
||||
<div class="row mb4">
|
||||
<strong class="col-6">
|
||||
<span t-esc="record.partner_id.value"/>
|
||||
</strong>
|
||||
<strong class="col-6 text-end">
|
||||
<strong><field name="price" widget="monetary"/></strong>
|
||||
</strong>
|
||||
<div class="col-6">
|
||||
<span t-esc="record.min_qty.value"/>
|
||||
</div>
|
||||
<div class="col-6 text-end">
|
||||
<span t-esc="record.delay.value"/> days
|
||||
</div>
|
||||
</div>
|
||||
<t t-name="card">
|
||||
<div class="d-flex fw-bolder mb4">
|
||||
<field name="partner_id" />
|
||||
<field name="price" widget="monetary" class="ms-auto"/>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<field name="min_qty"/>
|
||||
<field name="delay" class="ms-auto me-1"/>days
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
|
|
@ -94,36 +86,39 @@
|
|||
</record>
|
||||
|
||||
<record id="product_supplierinfo_tree_view" model="ir.ui.view">
|
||||
<field name="name">product.supplierinfo.tree.view</field>
|
||||
<field name="name">product.supplierinfo.list.view</field>
|
||||
<field name="model">product.supplierinfo</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Vendor Information" multi_edit="1">
|
||||
<list string="Vendor Information" multi_edit="1">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="partner_id" readonly="1"/>
|
||||
<field name="product_id" readonly="1" optional="hide"
|
||||
invisible="context.get('product_template_invisible_variant', False)"
|
||||
groups="product.group_product_variant"/>
|
||||
<field name="product_tmpl_id" string="Product" readonly="1"
|
||||
invisible="context.get('visible_product_tmpl_id', True)"/>
|
||||
<field name="product_id" optional="hide"
|
||||
readonly="1"
|
||||
column_invisible="context.get('product_template_invisible_variant', False)"
|
||||
groups="product.group_product_variant"
|
||||
domain="[('product_tmpl_id', '=', context.get('default_product_tmpl_id'))] if context.get('default_product_tmpl_id') else [('product_tmpl_id', '=', product_tmpl_id)]"/>
|
||||
<field name="product_tmpl_id" string="Product"
|
||||
readonly="1"
|
||||
column_invisible="context.get('visible_product_tmpl_id', True)"/>
|
||||
<field name="product_name" optional="hide"/>
|
||||
<field name="product_code" optional="hide"/>
|
||||
<field name="date_start" optional="hide"/>
|
||||
<field name="date_end" optional="hide"/>
|
||||
<field name="company_id" readonly="1" groups="base.group_multi_company"/>
|
||||
<field name="min_qty" optional="hide"/>
|
||||
<field name="product_uom" groups="uom.group_uom" optional="hide"/>
|
||||
<field name="price" string="Price"/>
|
||||
<field name="product_uom_id" groups="uom.group_uom" optional="show" options="{'no_quick_create': True}" context="{'product_id': product_id}" widget="many2one_uom"/>
|
||||
<field name="price"/>
|
||||
<field name="discount" optional="hide"/>
|
||||
<field name="currency_id" groups="base.group_multi_currency"/>
|
||||
<field name="delay" optional="hide"/>
|
||||
</tree>
|
||||
<field name="delay" optional="show"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_supplierinfo_type_action" model="ir.actions.act_window">
|
||||
<field name="name">Vendor Pricelists</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.supplierinfo</field>
|
||||
<field name="view_mode">tree,form,kanban</field>
|
||||
<field name="view_mode">list,form,kanban</field>
|
||||
<field name="context">{'visible_product_tmpl_id': False, 'search_default_active_products': True}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
|
|
|
|||
|
|
@ -7,36 +7,58 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Product Tag">
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field
|
||||
name="image"
|
||||
widget="image"
|
||||
class="oe_avatar"
|
||||
invisible="not visible_to_customers"
|
||||
/>
|
||||
<div name="product_tag_form_div" class="oe_title">
|
||||
<label for="name" string="Tag"/>
|
||||
<h1>
|
||||
<field name="name"/>
|
||||
<field name="color" widget="color_picker"/>
|
||||
</group>
|
||||
</group>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<field name="product_ids" widget="many2many_tags"
|
||||
attrs="{'invisible':[('product_ids','=',[])]}"/>
|
||||
<field name="visible_to_customers" widget="boolean_toggle"/>
|
||||
<field name="color"
|
||||
widget='color'
|
||||
invisible="not visible_to_customers"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="product_tag_tree_view" model="ir.ui.view">
|
||||
<field name="name">product.tag.tree</field>
|
||||
<field name="name">product.tag.list</field>
|
||||
<field name="model">product.tag</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Product Tags">
|
||||
<list string="Product Tags" multi_edit="1">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="color" widget="color_picker"/>
|
||||
</tree>
|
||||
<field name="visible_to_customers" optional="show"/>
|
||||
<field name="color"
|
||||
widget="color"
|
||||
optional="hide"
|
||||
readonly="1"
|
||||
invisible="not visible_to_customers"/>
|
||||
<field name="image"
|
||||
widget="image"
|
||||
options="{'size': [0, 30]}"
|
||||
optional="hide"
|
||||
invisible="not visible_to_customers"/>
|
||||
<field name="product_template_ids" widget="many2many_tags" optional="show"/>
|
||||
<field name="product_product_ids" widget="many2many_tags" string="Product Variant" optional="show"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
<record id="product_tag_action" model="ir.actions.act_window">
|
||||
<field name="name">Product Tags</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.tag</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="path">product-tags</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="view_id" eval="False"/>
|
||||
<field name="context">{'create': True}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Define a new tag
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="product_template_attribute_line_view_tree" model="ir.ui.view">
|
||||
<field name="name">product.template.attribute.line.view.list</field>
|
||||
<field name="model">product.template.attribute.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<list editable="bottom" multi_edit="1" create="false">
|
||||
<field name="product_tmpl_id" readonly="1"/>
|
||||
<field name="attribute_id" readonly="1"/>
|
||||
<field name="value_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'no_create_edit': True}"
|
||||
context="{'default_attribute_id': attribute_id}"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -1,36 +1,57 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="product_template_tree_view" model="ir.ui.view">
|
||||
<field name="name">product.template.product.tree</field>
|
||||
<field name="name">product.template.product.list</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="priority">10</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Product" multi_edit="1" sample="1">
|
||||
<header>
|
||||
<button string="Print Labels" type="object" name="action_open_label_layout"/>
|
||||
</header>
|
||||
<field name="product_variant_count" invisible="1"/>
|
||||
<field name="sale_ok" invisible="1"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="cost_currency_id" invisible="1"/>
|
||||
<field name="priority" widget="priority" optional="show" nolabel="1"/>
|
||||
<list string="Product" multi_edit="1" sample="1">
|
||||
<field name="product_variant_count" column_invisible="True"/>
|
||||
<field name="sale_ok" column_invisible="True"/>
|
||||
<field name="currency_id" column_invisible="True"/>
|
||||
<field name="cost_currency_id" column_invisible="True"/>
|
||||
<field name="is_favorite" widget="boolean_favorite" optional="show" nolabel="1"/>
|
||||
<field name="name" string="Product Name"/>
|
||||
<field name="default_code" optional="show"/>
|
||||
<field name="product_tag_ids" widget="many2many_tags" options="{'color_field': 'color'}" optional="show"/>
|
||||
<field name="barcode" optional="hide" attrs="{'readonly': [('product_variant_count', '>', 1)]}"/>
|
||||
<field name="product_tag_ids" widget="many2many_tags" optional="hide"/>
|
||||
<field name="barcode" optional="hide" readonly="product_variant_count != 1"/>
|
||||
<field name="company_id" options="{'no_create': True}"
|
||||
groups="base.group_multi_company" optional="hide"/>
|
||||
<field name="list_price" string="Sales Price" widget='monetary' options="{'currency_field': 'currency_id'}" optional="show" decoration-muted="not sale_ok"/>
|
||||
<field name="standard_price" widget='monetary' options="{'currency_field': 'cost_currency_id'}" optional="show" readonly="1"/>
|
||||
<field name="categ_id" optional="hide"/>
|
||||
<field name="detailed_type" optional="hide" readonly="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="type" optional="hide" readonly="1"/>
|
||||
<field name="uom_id" readonly="1" optional="show" groups="uom.group_uom"/>
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="active" column_invisible="True"/>
|
||||
<field name="activity_exception_decoration" widget="activity_exception"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_template_list_view_sellable" model="ir.ui.view">
|
||||
<field name="name">product.template.list.sellable</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="mode">primary</field>
|
||||
<field name="inherit_id" ref="product.product_template_tree_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='standard_price']" position="attributes">
|
||||
<attribute name="optional">hide</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_template_list_view_purchasable" model="ir.ui.view">
|
||||
<field name="name">product.template.list.purchasable</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="mode">primary</field>
|
||||
<field name="inherit_id" ref="product.product_template_tree_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='list_price']" position="attributes">
|
||||
<attribute name="optional">hide</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_template_only_form_view" model="ir.ui.view">
|
||||
<field name="name">product.template.product.form</field>
|
||||
<field name="model">product.template</field>
|
||||
|
|
@ -42,38 +63,52 @@
|
|||
<attribute name="name">Product Template</attribute>
|
||||
</xpath>
|
||||
<field name="categ_id" position="after">
|
||||
<field name="default_code" attrs="{'invisible': [('product_variant_count', '>', 1)]}"/>
|
||||
<field name="barcode" attrs="{'invisible': [('product_variant_count', '>', 1)]}"/>
|
||||
<field name="default_code" string="Reference" invisible="product_variant_count > 1"/>
|
||||
<field name="valid_product_template_attribute_line_ids" invisible="1"/>
|
||||
<field name="barcode"
|
||||
invisible="product_variant_count > 1
|
||||
or (product_variant_count == 0
|
||||
and valid_product_template_attribute_line_ids)
|
||||
or type in ['service', 'combo']"/>
|
||||
</field>
|
||||
|
||||
<div name="button_box" position="inside">
|
||||
<button name="action_open_documents" position="before">
|
||||
<button name="%(product.product_variant_action)d" type="action"
|
||||
icon="fa-sitemap" class="oe_stat_button"
|
||||
attrs="{'invisible': [('product_variant_count', '<=', 1)]}"
|
||||
invisible="product_variant_count <= 1"
|
||||
groups="product.group_product_variant">
|
||||
<field string="Variants" name="product_variant_count" widget="statinfo" />
|
||||
</button>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<xpath expr="//page[@name='general_information']" position="after">
|
||||
<page name="variants" string="Attributes & Variants" groups="product.group_product_variant">
|
||||
<field name="attribute_line_ids" widget="one2many" context="{'show_attribute': False}">
|
||||
<tree string="Variants" editable="bottom" decoration-info="value_count <= 1">
|
||||
<field name="value_count" invisible="1"/>
|
||||
<field name="attribute_id" attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
<page
|
||||
name="variants"
|
||||
string="Attributes & Variants"
|
||||
groups="product.group_product_variant"
|
||||
invisible="type == 'combo'"
|
||||
>
|
||||
<field name="attribute_line_ids" widget="one2many" context="{'show_attribute': False}" force_save="1">
|
||||
<list string="Variants" editable="bottom" decoration-info="value_count <= 1">
|
||||
<field name="value_count" column_invisible="True"/>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="attribute_id" readonly="id"/>
|
||||
<field name="value_ids" widget="many2many_tags" options="{'no_create_edit': True, 'color_field': 'color'}" context="{'default_attribute_id': attribute_id, 'show_attribute': False}"/>
|
||||
<button string="Configure" class="float-end btn-secondary"
|
||||
type="object" name="action_open_attribute_values"
|
||||
groups="product.group_product_variant"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
<p class="oe_grey oe_edit_only">
|
||||
<p class="opacity-50 oe_edit_only">
|
||||
<strong>Warning</strong>: adding or deleting attributes
|
||||
will delete and recreate existing variants and lead
|
||||
to the loss of their possible customizations.
|
||||
</p>
|
||||
</page>
|
||||
</xpath>
|
||||
<xpath expr="//group[@name='group_standard_price']" position="after">
|
||||
<field name="product_properties" columns="2"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -81,38 +116,40 @@
|
|||
<field name="name">Product.template.product.kanban</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban sample="1" class="o_kanban_product_template">
|
||||
<field name="id"/>
|
||||
<field name="product_variant_count"/>
|
||||
<kanban sample="1">
|
||||
<field name="currency_id"/>
|
||||
<field name="activity_state"/>
|
||||
<field name="categ_id"/>
|
||||
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div class="oe_kanban_card oe_kanban_global_click">
|
||||
<div class="o_kanban_image me-1">
|
||||
<img t-att-src="kanban_image('product.template', 'image_128', record.id.raw_value)" alt="Product" class="o_image_64_contain"/>
|
||||
<t t-name="card" class="flex-row">
|
||||
<main class="pe-2">
|
||||
<div class="mb-1">
|
||||
<div class="d-flex mb-0 h5">
|
||||
<field class="me-1" name="is_favorite" widget="boolean_favorite" nolabel="1"/>
|
||||
<field name="name"/>
|
||||
</div>
|
||||
<span t-if="record.default_code.value">
|
||||
[<field name="default_code"/>]
|
||||
</span>
|
||||
<strong t-if="record.product_variant_count.value > 1">
|
||||
<field name="product_variant_count"/> Variants
|
||||
</strong>
|
||||
</div>
|
||||
<div class="oe_kanban_details">
|
||||
<div class="o_kanban_record_top mb-0">
|
||||
<div class="o_kanban_record_headings">
|
||||
<strong class="o_kanban_record_title">
|
||||
<field name="name"/>
|
||||
</strong>
|
||||
</div>
|
||||
<field name="priority" widget="priority"/>
|
||||
</div>
|
||||
<t t-if="record.default_code.value">[<field name="default_code"/>]</t>
|
||||
<div t-if="record.product_variant_count.value > 1" groups="product.group_product_variant">
|
||||
<strong>
|
||||
<t t-esc="record.product_variant_count.value"/> Variants
|
||||
</strong>
|
||||
</div>
|
||||
<div name="product_lst_price" class="mt-1">
|
||||
Price: <field name="list_price" widget="monetary" options="{'currency_field': 'currency_id', 'field_digits': True}"></field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span>
|
||||
Price: <field name="list_price" widget="monetary" options="{'currency_field': 'currency_id', 'field_digits': True}"/>
|
||||
</span>
|
||||
<field name="product_properties" widget="properties"/>
|
||||
</main>
|
||||
<aside>
|
||||
<field
|
||||
name="image_128"
|
||||
widget="image"
|
||||
alt="Product"
|
||||
options="{'img_class': 'w-100 object-fit-contain'}"
|
||||
invisible="not image_128"
|
||||
/>
|
||||
</aside>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
|
|
@ -128,9 +165,9 @@
|
|||
<templates>
|
||||
<div t-name="activity-box">
|
||||
<img t-att-src="activity_image('product.template', 'image_128', record.id.raw_value)" role="img" t-att-title="record.id.value" t-att-alt="record.id.value"/>
|
||||
<div>
|
||||
<field name="name" display="full"/>
|
||||
<div t-if="record.default_code.value" class="text-muted">
|
||||
<div class="ms-2">
|
||||
<field name="name" display="full" class="o_text_block"/>
|
||||
<div t-if="record.default_code.value" class="o_text_block text-muted">
|
||||
[<field name="default_code"/>]
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -142,9 +179,8 @@
|
|||
|
||||
<record id="product_template_action" model="ir.actions.act_window">
|
||||
<field name="name">Products</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.template</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
<field name="view_id" ref="product_template_kanban_view"/>
|
||||
<field name="search_view_id" ref="product.product_template_search_view"/>
|
||||
<field name="context">{"search_default_filter_to_sell":1}</field>
|
||||
|
|
@ -158,20 +194,29 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_product_template_price_list_report" model="ir.actions.server">
|
||||
<field name="name">Generate Pricelist Report</field>
|
||||
<field name="groups_id" eval="[(4, ref('product.group_product_pricelist'))]"/>
|
||||
<record id="action_product_template_print_labels" model="ir.actions.server">
|
||||
<field name="name">Print Labels</field>
|
||||
<field name="model_id" ref="product.model_product_template"/>
|
||||
<field name="binding_model_id" ref="product.model_product_template"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
if records:
|
||||
action = records.action_open_label_layout()
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_product_template_price_list_report" model="ir.actions.server">
|
||||
<field name="name">Pricelist Report</field>
|
||||
<field name="group_ids" eval="[(4, ref('product.group_product_pricelist'))]"/>
|
||||
<field name="model_id" ref="product.model_product_template"/>
|
||||
<field name="binding_model_id" ref="product.model_product_template"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
ctx = env.context
|
||||
ctx.update({'default_pricelist': env['product.pricelist'].search([], limit=1).id})
|
||||
action = {
|
||||
'name': 'Pricelist Report',
|
||||
'type': 'ir.actions.client',
|
||||
'tag': 'generate_pricelist',
|
||||
'context': ctx,
|
||||
'tag': 'generate_pricelist_report',
|
||||
'context': env.context,
|
||||
}
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
|||
|
|
@ -8,136 +8,221 @@
|
|||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Product">
|
||||
<header>
|
||||
<button string="Print Labels" type="object" name="action_open_label_layout" attrs="{'invisible': [('detailed_type', '==', 'service')]}"/>
|
||||
</header>
|
||||
<sheet name="product_form">
|
||||
<field name='product_variant_count' invisible='1'/>
|
||||
<field name='is_product_variant' invisible='1'/>
|
||||
<field name='attribute_line_ids' invisible='1'/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<!-- Dummy tag for organizing buttons, using position='replace' when inheriting -->
|
||||
<span id="button_website" invisible="1"/>
|
||||
<button class="oe_stat_button"
|
||||
name="open_pricelist_rules"
|
||||
icon="fa-list-ul"
|
||||
groups="product.group_product_pricelist"
|
||||
type="object">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="pricelist_item_count"/>
|
||||
</span>
|
||||
<span attrs="{'invisible': [('pricelist_item_count', '=', 1)]}">
|
||||
Extra Prices
|
||||
</span>
|
||||
<span attrs="{'invisible': [('pricelist_item_count', '!=', 1)]}">
|
||||
Extra Price
|
||||
</span>
|
||||
</div>
|
||||
name="action_open_documents"
|
||||
type="object"
|
||||
icon="fa-file-text-o">
|
||||
<field string="Documents" name="product_document_count" widget="statinfo"/>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
|
||||
<field name="id" invisible="True"/>
|
||||
<field name="image_1920" widget="image" class="oe_avatar" options="{'preview_image': 'image_128'}"/>
|
||||
<field
|
||||
name="image_1920"
|
||||
widget="image"
|
||||
class="oe_avatar"
|
||||
options="{'convert_to_webp': True, 'preview_image': 'image_128'}"
|
||||
/>
|
||||
<div class="oe_title">
|
||||
<label for="name" string="Product Name"/>
|
||||
<label for="name" string="Product"/>
|
||||
<h1>
|
||||
<div class="d-flex">
|
||||
<field name="priority" widget="priority" class="me-3"/>
|
||||
<field class="text-break" name="name" placeholder="e.g. Cheese Burger"/>
|
||||
<field name="is_favorite" widget="boolean_favorite" class="me-2" nolabel="1"/>
|
||||
<field class="text-break" name="name" options="{'line_breaks': False}" widget="text" placeholder="e.g. Cheese Burger"/>
|
||||
</div>
|
||||
</h1>
|
||||
</div>
|
||||
<div name="options">
|
||||
<span class="d-inline-block">
|
||||
<span name="sale_option" class="d-inline-flex">
|
||||
<field name="sale_ok"/>
|
||||
<label for="sale_ok"/>
|
||||
</span>
|
||||
<span class="d-inline-block">
|
||||
<field name="purchase_ok"/>
|
||||
<label for="purchase_ok"/>
|
||||
</span>
|
||||
</div>
|
||||
<notebook>
|
||||
<page string="General Information" name="general_information">
|
||||
<group>
|
||||
<group name="group_general">
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="detailed_type"/>
|
||||
<field name="product_tooltip" string="" class="fst-italic text-muted"/>
|
||||
<field name="uom_id" groups="uom.group_uom" options="{'no_create': True}"/>
|
||||
<field name="uom_po_id" groups="uom.group_uom" options="{'no_create': True}"/>
|
||||
<field name="type" widget="radio" options="{'horizontal': True}"/>
|
||||
<field
|
||||
name="combo_ids"
|
||||
widget="many2many_tags"
|
||||
placeholder="e.g. Starter - Meal - Desert"
|
||||
invisible="type != 'combo'"
|
||||
options="{
|
||||
'no_quick_create': True,
|
||||
'edit_tags': True,
|
||||
}"
|
||||
/>
|
||||
<field name="service_tracking" invisible="1 or type != 'service'"/>
|
||||
<field name="product_tooltip"
|
||||
class="fst-italic text-muted"
|
||||
string=""
|
||||
invisible="not product_tooltip"
|
||||
/>
|
||||
</group>
|
||||
<group name="group_standard_price">
|
||||
<label for="list_price"/>
|
||||
<div name="pricing">
|
||||
<field name="list_price" class="oe_inline" widget='monetary'
|
||||
options="{'currency_field': 'currency_id', 'field_digits': True}"/>
|
||||
</div>
|
||||
<label for="standard_price" attrs="{'invisible': [('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}"/>
|
||||
<div name="standard_price_uom" attrs="{'invisible': [('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}">
|
||||
<field name="standard_price" class="oe_inline" widget='monetary' options="{'currency_field': 'cost_currency_id', 'field_digits': True}"/>
|
||||
<span groups="uom.group_uom" >per
|
||||
<field name="uom_name" class="oe_inline"/>
|
||||
<div name="list_price_uom">
|
||||
<field name="list_price"
|
||||
class="oe_inline"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'currency_id', 'field_digits': True}"/>
|
||||
<span
|
||||
name="uom_span"
|
||||
groups="uom.group_uom"
|
||||
invisible="type == 'combo'"
|
||||
>
|
||||
per
|
||||
<field
|
||||
name="uom_id" widget="many2one_uom"
|
||||
class="oe_inline" style="max-width:136px"
|
||||
options="{'no_quick_create': True}"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
<field name="categ_id" string="Product Category"/>
|
||||
<field name="product_tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
|
||||
<field name="company_id" groups="base.group_multi_company"
|
||||
options="{'no_create': True}"/>
|
||||
<label
|
||||
for="standard_price"
|
||||
invisible="type == 'combo'
|
||||
or (not is_product_variant and (
|
||||
product_variant_count > 1
|
||||
or (product_variant_count == 0 and is_dynamically_created)
|
||||
))"
|
||||
id="standard_price_label"
|
||||
/>
|
||||
<div
|
||||
name="standard_price_uom"
|
||||
invisible="type == 'combo'
|
||||
or (not is_product_variant and (
|
||||
product_variant_count > 1
|
||||
or (product_variant_count == 0 and is_dynamically_created)
|
||||
))"
|
||||
>
|
||||
<field
|
||||
name="standard_price"
|
||||
class="oe_inline"
|
||||
widget="monetary"
|
||||
options="{
|
||||
'currency_field': 'cost_currency_id',
|
||||
'field_digits': True,
|
||||
}"
|
||||
/>
|
||||
<span groups="uom.group_uom">
|
||||
per
|
||||
<field
|
||||
name="uom_id" widget="many2one_uom"
|
||||
class="oe_inline" style="max-width:136px"
|
||||
options="{'no_quick_create': True}"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
<field name="categ_id" string="Category"/>
|
||||
<field name="company_id"
|
||||
groups="base.group_multi_company"
|
||||
options="{'no_create': True}"
|
||||
placeholder="Visible to all"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="cost_currency_id" invisible="1"/>
|
||||
<field name="product_variant_id" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Internal Notes">
|
||||
<group name="internal_notes" string="Internal Notes">
|
||||
<field colspan="2" name="description" nolabel="1" placeholder="This note is only for internal purposes."/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Sales" attrs="{'invisible':[('sale_ok','=',False)]}" name="sales" invisible="1">
|
||||
<page string="Sales" name="sales" invisible="1 or not sale_ok">
|
||||
<group name="sale">
|
||||
<group string="Upsell & Cross-Sell" name="upsell" invisible="1"/>
|
||||
<group string="Upsell & Cross-Sell" name="upsell" invisible="1">
|
||||
<field
|
||||
name="uom_ids"
|
||||
widget="many2many_uom_tags"
|
||||
options="{'no_quick_create': True, 'edit_tags': True}"
|
||||
groups="uom.group_uom"
|
||||
force_save="1"
|
||||
context="{'product_id': product_variant_id if product_variant_count == 1 else False, 'product_ids': product_variant_ids, 'show_variant_name': product_variant_count > 1}"/>
|
||||
</group>
|
||||
<group name="extra_info" string="Extra Info">
|
||||
<field name="product_tag_ids" widget="many2many_tags" context="{'product_template_id': id}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group string="Sales Description" name="description">
|
||||
<group string="Quotation Description" name="description">
|
||||
<field colspan="2" name="description_sale" nolabel="1" placeholder="This note is added to sales orders and invoices."/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Purchase" name="purchase" attrs="{'invisible': [('purchase_ok','=',False)]}" invisible="1">
|
||||
<page
|
||||
string="Prices"
|
||||
name="sales_price"
|
||||
groups="product.group_product_pricelist"
|
||||
invisible="not sale_ok"
|
||||
>
|
||||
<field
|
||||
name="pricelist_rule_ids"
|
||||
context="{
|
||||
'form_view_ref': 'product.product_pricelist_item_product_template_form_view',
|
||||
}"
|
||||
>
|
||||
<list>
|
||||
<control>
|
||||
<create name="add_product_price" string="Add a price"/>
|
||||
</control>
|
||||
<field name="pricelist_id" required="is_pricelist_required"/>
|
||||
<field name="name" string="Applied On" column_invisible="parent.product_variant_count < 2"/>
|
||||
<field name="price"/>
|
||||
<field name="min_quantity"/>
|
||||
<field name="date_start" optional="hide"/>
|
||||
<field name="date_end" optional="hide"/>
|
||||
<field name="company_id" groups="base.group_multi_company" optional="hide"/>
|
||||
|
||||
<!-- Needed for rule edition & creation on product.product form -->
|
||||
<field name="product_tmpl_id" column_invisible="True"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page
|
||||
string="Purchase"
|
||||
name="purchase"
|
||||
invisible="1 or not purchase_ok or type == 'combo'"
|
||||
groups="uom.group_uom"
|
||||
>
|
||||
<group name="purchase">
|
||||
<group string="Vendor Bills" name="bill"/>
|
||||
<group string="Vendor Bills" name="bill">
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Inventory" name="inventory" groups="product.group_stock_packaging" attrs="{'invisible':[('type', '=', 'service')]}">
|
||||
<page
|
||||
string="Inventory"
|
||||
name="inventory"
|
||||
groups="uom.group_uom"
|
||||
invisible="type in ['service', 'combo']"
|
||||
>
|
||||
<group name="inventory">
|
||||
<group name="group_lots_and_weight" string="Logistics" attrs="{'invisible': [('type', 'not in', ['product', 'consu'])]}">
|
||||
<label for="weight" attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}"/>
|
||||
<div class="o_row" name="weight" attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}">
|
||||
<field name="weight" class="oe_inline"/>
|
||||
<group name="group_lots_and_weight" string="Logistics" invisible="type != 'consu'">
|
||||
<label for="weight" invisible="product_variant_count > 1 and not is_product_variant"/>
|
||||
<div class="o_row" name="weight" invisible="product_variant_count > 1 and not is_product_variant">
|
||||
<field name="weight" class="oe_inline" style="max-width: 7rem;"/>
|
||||
<field name="weight_uom_name"/>
|
||||
</div>
|
||||
<label for="volume" attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}"/>
|
||||
<div class="o_row" name="volume" attrs="{'invisible':[('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}">
|
||||
<field name="volume" string="Volume" class="oe_inline"/>
|
||||
<label for="volume" invisible="product_variant_count > 1 and not is_product_variant"/>
|
||||
<div class="o_row" name="volume" invisible="product_variant_count > 1 and not is_product_variant">
|
||||
<field name="volume" string="Volume" class="oe_inline" style="max-width: 7rem;"/>
|
||||
<field name="volume_uom_name"/>
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
<group name="packaging" string="Packaging"
|
||||
colspan="4"
|
||||
attrs="{'invisible':['|', ('type', 'not in', ['product', 'consu']), ('product_variant_count', '>', 1), ('is_product_variant', '=', False)]}"
|
||||
groups="product.group_stock_packaging">
|
||||
<field colspan="2" name="packaging_ids" nolabel="1" context="{'tree_view_ref':'product.product_packaging_tree_view2', 'default_company_id': company_id}"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids"/>
|
||||
<field name="activity_ids"/>
|
||||
<field name="message_ids"/>
|
||||
</div>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -149,32 +234,38 @@
|
|||
<search string="Product">
|
||||
<field name="name" string="Product" filter_domain="['|', '|', '|', ('default_code', 'ilike', self), ('product_variant_ids.default_code', 'ilike', self),('name', 'ilike', self), ('barcode', 'ilike', self)]"/>
|
||||
<field name="categ_id" filter_domain="[('categ_id', 'child_of', raw_value)]"/>
|
||||
<field name="product_tag_ids" string="Tags"/>
|
||||
<separator/>
|
||||
<filter string="Goods" name="goods" domain="[('type', '=', 'consu')]"/>
|
||||
<filter string="Services" name="services" domain="[('type','=','service')]"/>
|
||||
<filter string="Products" name="consumable" domain="[('type', 'in', ['consu', 'product'])]"/>
|
||||
<filter string="Combo" name="combo" domain="[('type', '=', 'combo')]"/>
|
||||
<separator/>
|
||||
<filter string="Can be Sold" name="filter_to_sell" domain="[('sale_ok','=',True)]"/>
|
||||
<filter string="Can be Purchased" name="filter_to_purchase" domain="[('purchase_ok', '=', True)]"/>
|
||||
<filter string="Favorites" name="favorites" domain="[('is_favorite', '=', True)]"/>
|
||||
<separator/>
|
||||
<filter string="Sales" name="filter_to_sell" domain="[('sale_ok','=',True)]"/>
|
||||
<separator/>
|
||||
<field string="Attributes" name="attribute_line_ids" groups="product.group_product_variant"/>
|
||||
<filter invisible="1" string="My Activities" name="filter_activities_my"
|
||||
domain="[('activity_user_id', '=', uid)]"/>
|
||||
<separator invisible="1"/>
|
||||
<filter invisible="1" string="Late Activities" name="activities_overdue"
|
||||
domain="[('my_activity_date_deadline', '<', context_today().strftime('%Y-%m-%d'))]"
|
||||
help="Show all records which has next action date is before today"/>
|
||||
domain="[('my_activity_date_deadline', '<', 'today')]"
|
||||
help="Show all records whose next activity date is past"/>
|
||||
<filter invisible="1" string="Today Activities" name="activities_today"
|
||||
domain="[('my_activity_date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/>
|
||||
domain="[('my_activity_date_deadline', '=', 'today')]"/>
|
||||
<filter invisible="1" string="Future Activities" name="activities_upcoming_all"
|
||||
domain="[('my_activity_date_deadline', '>', context_today().strftime('%Y-%m-%d'))
|
||||
domain="[('my_activity_date_deadline', '>', 'today')
|
||||
]"/>
|
||||
<separator/>
|
||||
<filter string="Favorites" name="favorites" domain="[('priority','=','1')]"/>
|
||||
<separator/>
|
||||
<filter string="Warnings" name="activities_exception"
|
||||
domain="[('activity_exception_decoration', '!=', False)]"/>
|
||||
<separator/>
|
||||
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
|
||||
<group expand="1" string="Group By">
|
||||
<filter string="Product Type" name="type" context="{'group_by':'detailed_type'}"/>
|
||||
<filter string="Product Category" name="categ_id" context="{'group_by':'categ_id'}"/>
|
||||
<group>
|
||||
<filter string="Product Type" name="group_by_type" context="{'group_by':'type'}"/>
|
||||
<filter string="Product Category" name="group_by_categ_id" context="{'group_by':'categ_id'}"/>
|
||||
<filter string="Product Properties" name="group_by_product_properties" context="{'group_by': 'product_properties'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
|
@ -182,9 +273,8 @@
|
|||
|
||||
<record id="product_template_action_all" model="ir.actions.act_window">
|
||||
<field name="name">Products</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.template</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
<field name="context">{}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
|
|
@ -199,6 +289,9 @@
|
|||
<field name="mode">primary</field>
|
||||
<field name="inherit_id" ref="product.product_template_search_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_tag_ids" position="replace">
|
||||
<field name="all_product_tag_ids" string="Tags"/>
|
||||
</field>
|
||||
<field name="name" position="replace">
|
||||
<field name="name" string="Product" filter_domain="['|', '|', ('default_code', 'ilike', self), ('name', 'ilike', self), ('barcode', 'ilike', self)]"/>
|
||||
</field>
|
||||
|
|
@ -206,14 +299,16 @@
|
|||
<field name="product_template_attribute_value_ids" groups="product.group_product_variant"/>
|
||||
<field name="product_tmpl_id" string="Product Template"/>
|
||||
</field>
|
||||
<filter name="group_by_categ_id" position="after">
|
||||
<filter string="Product Template" name="group_by_product_tmpl_id" context="{'group_by':'product_tmpl_id'}"/>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_normal_action" model="ir.actions.act_window">
|
||||
<field name="name">Product Variants</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.product</field>
|
||||
<field name="view_mode">tree,form,kanban,activity</field>
|
||||
<field name="view_mode">list,form,kanban,activity</field>
|
||||
<field name="search_view_id" ref="product_search_form_view"/>
|
||||
<field name="view_id" eval="False"/> <!-- Force empty -->
|
||||
<field name="help" type="html">
|
||||
|
|
@ -232,16 +327,13 @@
|
|||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Variant Information" duplicate="false">
|
||||
<header>
|
||||
<button string="Print Labels" type="object" name="action_open_label_layout"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box"/>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="id" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="image_1920" widget="image" class="oe_avatar" options="{'preview_image': 'image_128'}"/>
|
||||
<field name="image_1920" widget="image" class="oe_avatar" options="{'convert_to_webp': True,'preview_image': 'image_128'}"/>
|
||||
<div class="oe_title">
|
||||
<label for="name" string="Product Name"/>
|
||||
<h1><field name="name" readonly="1" placeholder="e.g. Odoo Enterprise Subscription"/></h1>
|
||||
|
|
@ -261,38 +353,42 @@
|
|||
<field name="product_variant_count" invisible="1"/>
|
||||
<label for="lst_price" string="Sales Price"/>
|
||||
<div class="o_row">
|
||||
<field name="lst_price" class="oe_inline" widget='monetary' options="{'currency_field': 'currency_id', 'field_digits': True}" attrs="{'readonly': [('product_variant_count', '>', 1)]}"/>
|
||||
<field name="lst_price" class="oe_inline" widget='monetary' options="{'currency_field': 'currency_id', 'field_digits': True}" readonly="product_variant_count > 1"/>
|
||||
</div>
|
||||
<label for="standard_price"/>
|
||||
<div class="o_row">
|
||||
<field name="standard_price" widget='monetary' class="oe_inline" options="{'currency_field': 'cost_currency_id'}"/>
|
||||
<field name="standard_price"
|
||||
class="oe_inline"
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'cost_currency_id', 'field_digits': True}"/>
|
||||
</div>
|
||||
<field name="currency_id" invisible='1'/>
|
||||
<field name="cost_currency_id" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group name="weight" string="Logistics" attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}">
|
||||
<group name="weight" string="Logistics" invisible="type != 'consu'">
|
||||
<label for="volume"/>
|
||||
<div class="o_row">
|
||||
<div class="d-flex">
|
||||
<field name="volume" class="oe_inline"/>
|
||||
<span><field name="volume_uom_name"/></span>
|
||||
<field name="volume_uom_name"/>
|
||||
</div>
|
||||
<label for="weight"/>
|
||||
<div class="o_row">
|
||||
<div class="d-flex">
|
||||
<field name="weight" class="oe_inline"/>
|
||||
<span><field name="weight_uom_name"/></span>
|
||||
<field name="weight_uom_name"/>
|
||||
</div>
|
||||
</group>
|
||||
<group name="tags" string="Tags">
|
||||
<field name="product_tag_ids" string="Product Template Tags" widget="many2many_tags" readonly="1" options="{'no_open': True, 'color_field': 'color'}"/>
|
||||
<field name="additional_product_tag_ids" widget="many2many_tags" options="{'no_open': True, 'color_field': 'color'}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group name="packaging" string="Packaging" groups="product.group_stock_packaging">
|
||||
<field colspan="2" name="packaging_ids" nolabel="1"
|
||||
context="{'tree_view_ref':'product.product_packaging_tree_view2', 'default_company_id': company_id}"/>
|
||||
<group name="sales" string="Sales">
|
||||
<field
|
||||
name="uom_ids"
|
||||
widget="many2many_uom_tags"
|
||||
options="{'no_quick_create': True, 'edit_tags': True}"
|
||||
groups="uom.group_uom"
|
||||
force_save="1"
|
||||
context="{'product_id': id}"/>
|
||||
<field name="product_tag_ids" widget="many2many_tags" readonly="1"/>
|
||||
<field name="additional_product_tag_ids" widget="many2many_tags" context="{'product_variant_id': id}"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
|
|
@ -302,13 +398,12 @@
|
|||
|
||||
<record id="product_variant_action" model="ir.actions.act_window">
|
||||
<field name="name">Product Variants</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.product</field>
|
||||
<field name="context">{'search_default_product_tmpl_id': [active_id], 'default_product_tmpl_id': active_id, 'create': False}</field>
|
||||
<field name="search_view_id" ref="product_search_form_view"/>
|
||||
<field name="view_ids"
|
||||
eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree'}),
|
||||
(0, 0, {'view_mode': 'list'}),
|
||||
(0, 0, {'view_mode': 'form', 'view_id': ref('product_variant_easy_edit_view')}),
|
||||
(0, 0, {'view_mode': 'kanban'})]"/>
|
||||
<field name="help" type="html">
|
||||
|
|
@ -324,15 +419,12 @@
|
|||
</record>
|
||||
|
||||
<record id="product_product_tree_view" model="ir.ui.view">
|
||||
<field name="name">product.product.tree</field>
|
||||
<field name="name">product.product.list</field>
|
||||
<field name="model">product.product</field>
|
||||
<field eval="7" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Product Variants" multi_edit="1" duplicate="false" sample="1">
|
||||
<header>
|
||||
<button string="Print Labels" type="object" name="action_open_label_layout"/>
|
||||
</header>
|
||||
<field name="priority" widget="priority" nolabel="1" readonly="1"/>
|
||||
<list string="Product Variants" multi_edit="1" duplicate="false" sample="1" default_order="is_favorite desc, default_code, name, id">
|
||||
<field name="is_favorite" widget="boolean_favorite" nolabel="1" readonly="1"/>
|
||||
<field name="default_code" optional="show" readonly="1"/>
|
||||
<field name="barcode" optional="hide" readonly="1"/>
|
||||
<field name="name" readonly="1"/>
|
||||
|
|
@ -341,12 +433,42 @@
|
|||
<field name="lst_price" optional="show" string="Sales Price"/>
|
||||
<field name="standard_price" optional="show"/>
|
||||
<field name="categ_id" optional="hide"/>
|
||||
<field name="product_tag_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_edit_color': 1}" optional="hide"/>
|
||||
<field name="product_tag_ids" widget="many2many_tags" readonly="1" optional="hide"/>
|
||||
<field name="additional_product_tag_ids" widget="many2many_tags" optional="hide"/>
|
||||
<field name="type" optional="hide" readonly="1"/>
|
||||
<field name="uom_id" options="{'no_open': True, 'no_create': True}" groups="uom.group_uom" optional="show" readonly="1"/>
|
||||
<field name="product_tmpl_id" invisible="1" readonly="1"/>
|
||||
<field name="active" invisible="1"/>
|
||||
</tree>
|
||||
<field name="uom_id" groups="uom.group_uom" optional="show" readonly="1"/>
|
||||
<field name="product_tmpl_id" readonly="1" column_invisible="True"/>
|
||||
<field name="active" column_invisible="True"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="product_template_view_tree_tag">
|
||||
<field name="name">product.template.view.list.tag</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Product Templates" editable="bottom">
|
||||
<field name="name" readonly="1"/>
|
||||
<field name="default_code" readonly="1" optional="show"/>
|
||||
<field name="description" readonly="1" optional="show"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="product_product_view_tree_tag">
|
||||
<field name="name">product.product.view.list.tag</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Product Variants" editable="bottom" default_order="is_favorite desc, default_code, name, id">
|
||||
<field name="name" readonly="1"/>
|
||||
<field name="default_code" readonly="1" optional="show"/>
|
||||
<field name="product_template_variant_value_ids"
|
||||
widget="many2many_tags"
|
||||
groups="product.group_product_variant"
|
||||
readonly="1"
|
||||
/>
|
||||
<field name="description" readonly="1" optional="show"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -357,6 +479,14 @@
|
|||
<field eval="7" name="priority"/>
|
||||
<field name="inherit_id" ref="product.product_template_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='sales_price']/field[@name='pricelist_rule_ids']" position="attributes">
|
||||
<attribute name="context">
|
||||
{
|
||||
'default_product_id': id,
|
||||
'form_view_ref': 'product.product_pricelist_item_product_product_form_view'
|
||||
}
|
||||
</attribute>
|
||||
</xpath>
|
||||
<form position="attributes">
|
||||
<attribute name="string">Product Variant</attribute>
|
||||
<attribute name="duplicate">false</attribute>
|
||||
|
|
@ -365,68 +495,89 @@
|
|||
<field name="default_code"/>
|
||||
<field name="barcode"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='priority']" position="attributes">
|
||||
<xpath expr="//field[@name='is_favorite']" position="attributes">
|
||||
<attribute name="readonly">1</attribute>
|
||||
</xpath>
|
||||
<field name="list_price" position="attributes">
|
||||
<attribute name="attrs">{'readonly': [('product_variant_count', '>', 1)]}</attribute>
|
||||
<attribute name="invisible">1</attribute>
|
||||
<attribute name="readonly">product_variant_count > 1</attribute>
|
||||
</field>
|
||||
<xpath expr="//label[@for='list_price']" position="replace">
|
||||
<label for="list_price" position="replace">
|
||||
<label for="lst_price"/>
|
||||
</xpath>
|
||||
</label>
|
||||
<field name="list_price" position="after">
|
||||
<field name="lst_price" class="oe_inline" widget='monetary' options="{'currency_field': 'currency_id', 'field_digits': True}"/>
|
||||
</field>
|
||||
<group name="packaging" position="attributes">
|
||||
<attribute name="attrs">{'invisible': 0}</attribute>
|
||||
</group>
|
||||
<field name="name" position="after">
|
||||
<field name="product_tmpl_id" class="oe_inline" readonly="1" invisible="1" attrs="{'required': [('id', '!=', False)]}"/>
|
||||
<field name="product_tmpl_id" class="oe_inline" readonly="1" invisible="1" required="id"/>
|
||||
</field>
|
||||
<xpath expr="//div[hasclass('oe_title')]" position="inside">
|
||||
<field name="product_template_variant_value_ids" widget="many2many_tags" readonly="1" groups="product.group_product_variant"/>
|
||||
<field name="product_template_variant_value_ids" widget="many2many_tags" readonly="1" invisible="not product_template_variant_value_ids" groups="product.group_product_variant"/>
|
||||
</xpath>
|
||||
<field name="product_tag_ids" position="attributes">
|
||||
<attribute name="options">{'no_open': True, 'color_field': 'color'}</attribute>
|
||||
<attribute name="options">{'no_open': True}</attribute>
|
||||
<attribute name="context">{'product_template_id': product_tmpl_id}</attribute>
|
||||
</field>
|
||||
<field name="product_tag_ids" position="after">
|
||||
<field name="additional_product_tag_ids" widget="many2many_tags" options="{'no_open': True, 'color_field': 'color'}"/>
|
||||
<field name="additional_product_tag_ids" widget="many2many_tags"/>
|
||||
</field>
|
||||
<field name="uom_ids" position="attributes">
|
||||
<attribute name="context">{'product_id': id}</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_product_view_form_normalized" model="ir.ui.view">
|
||||
<field name="name">product.product.view.form.normalized</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<field name="image_1920" widget="image" class="oe_avatar" nolabel="1" options="{'convert_to_webp': True,'preview_image': 'image_128'}"/>
|
||||
<group name="name">
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="cost_currency_id" invisible="1"/>
|
||||
<field name="name" class="oe_inline" placeholder="e.g. Cheese Burger" string="Product Name"/>
|
||||
<field name="barcode" class="oe_inline" placeholder="e.g. 1234567890"/>
|
||||
<field name="list_price" class="oe_inline" widget="monetary"
|
||||
options="{'currency_field': 'currency_id', 'field_digits': True}"/>
|
||||
<field name="description" invisible="1"/> <!-- Hide the description field for set data in product barcodelookup -->
|
||||
<field name="weight" invisible="1"/> <!-- Hide the weight field for set data in product barcodelookup -->
|
||||
<field name="categ_id" invisible="1"/> <!-- Hide the categ_id field set data in product barcodelookup -->
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_kanban_view" model="ir.ui.view">
|
||||
<field name="name">Product Kanban</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban sample="1">
|
||||
<field name="id"/>
|
||||
<field name="lst_price"/>
|
||||
<kanban sample="1" default_order="is_favorite desc, default_code, name, id">
|
||||
<field name="activity_state"/>
|
||||
<field name="color"/>
|
||||
<progressbar field="activity_state" colors='{"planned": "success", "today": "warning", "overdue": "danger"}'/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div class="oe_kanban_global_click">
|
||||
<div class="o_kanban_image">
|
||||
<img t-att-src="kanban_image('product.product', 'image_128', record.id.raw_value)" alt="Product" class="o_image_64_contain"/>
|
||||
<t t-name="card" class="row g-0">
|
||||
<main class="col-10 pe-2">
|
||||
<div class="d-flex mb-1 h5">
|
||||
<field class="me-1" name="is_favorite" widget="boolean_favorite" nolabel="1"/>
|
||||
<field name="name"/>
|
||||
</div>
|
||||
<div class="oe_kanban_details">
|
||||
<field name="priority" widget="priority" readonly="1"/>
|
||||
<strong class="o_kanban_record_title">
|
||||
<field name="name"/>
|
||||
<small t-if="record.default_code.value">[<field name="default_code"/>]</small>
|
||||
</strong>
|
||||
<div class="o_kanban_tags_section">
|
||||
<field name="product_template_variant_value_ids" groups="product.group_product_variant" widget="many2many_tags" options="{'color_field': 'color'}"/>
|
||||
</div>
|
||||
<ul>
|
||||
<li><strong>Price: <field name="lst_price"></field></strong></li>
|
||||
</ul>
|
||||
<div name="tags"/>
|
||||
</div>
|
||||
</div>
|
||||
<span t-if="record.default_code.value">
|
||||
[<field name="default_code"/>]
|
||||
</span>
|
||||
<field name="product_template_variant_value_ids" groups="product.group_product_variant" widget="many2many_tags" options="{'color_field': 'color'}"/>
|
||||
<span>
|
||||
Price: <field name="lst_price"></field>
|
||||
</span>
|
||||
</main>
|
||||
<aside class="col-2">
|
||||
<field name="image_128" widget="image" options="{'img_class': 'o_image_64_contain mw-100'}" alt="Product"/>
|
||||
</aside>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
|
|
@ -443,9 +594,9 @@
|
|||
<templates>
|
||||
<div t-name="activity-box">
|
||||
<img t-att-src="activity_image('product.product', 'image_128', record.id.raw_value)" role="img" t-att-title="record.id.value" t-att-alt="record.id.value"/>
|
||||
<div>
|
||||
<field name="name" display="full"/>
|
||||
<div t-if="record.default_code.value" class="text-muted">
|
||||
<div class="ms-2">
|
||||
<field name="name" display="full" class="o_text_block"/>
|
||||
<div t-if="record.default_code.value" class="o_text_block text-muted">
|
||||
[<field name="default_code"/>]
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -457,9 +608,8 @@
|
|||
|
||||
<record id="product_normal_action_sell" model="ir.actions.act_window">
|
||||
<field name="name">Product Variants</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.product</field>
|
||||
<field name="view_mode">kanban,tree,form,activity</field>
|
||||
<field name="view_mode">kanban,list,form,activity</field>
|
||||
<field name="context">{"search_default_filter_to_sell":1}</field>
|
||||
<field name="view_id" ref="product_product_tree_view"/>
|
||||
<field name="search_view_id" ref="product_search_form_view"/>
|
||||
|
|
@ -475,22 +625,128 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_product_price_list_report" model="ir.actions.server">
|
||||
<field name="name">Generate Pricelist</field>
|
||||
<field name="groups_id" eval="[(4, ref('group_product_pricelist'))]"/>
|
||||
<record id="action_product_print_labels" model="ir.actions.server">
|
||||
<field name="name">Print Labels</field>
|
||||
<field name="model_id" ref="product.model_product_product"/>
|
||||
<field name="binding_model_id" ref="product.model_product_product"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
if records:
|
||||
action = records.action_open_label_layout()
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_product_price_list_report" model="ir.actions.server">
|
||||
<field name="name">Pricelist Report</field>
|
||||
<field name="group_ids" eval="[(4, ref('group_product_pricelist'))]"/>
|
||||
<field name="model_id" ref="product.model_product_product"/>
|
||||
<field name="binding_model_id" ref="product.model_product_product"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
ctx = env.context
|
||||
ctx.update({'default_pricelist': env['product.pricelist'].search([], limit=1).id})
|
||||
action = {
|
||||
'name': 'Pricelist Report',
|
||||
'type': 'ir.actions.client',
|
||||
'tag': 'generate_pricelist',
|
||||
'context': ctx,
|
||||
'tag': 'generate_pricelist_report',
|
||||
'context': env.context,
|
||||
}
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_view_kanban_catalog" model="ir.ui.view">
|
||||
<field name="name">product.view.kanban.catalog</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban records_draggable="0" js_class="product_kanban_catalog" default_order="is_favorite desc, default_code, name, id">
|
||||
<field name="id"/>
|
||||
<templates>
|
||||
<t t-name="menu">
|
||||
<div class="o_product_catalog_cancel_global_click">
|
||||
<a role="menuitem" type="open" class="dropdown-item border-top-0">Edit</a>
|
||||
</div>
|
||||
<div class="container p-0">
|
||||
<field name="is_favorite" widget="boolean_favorite" class="col-12 pe-0"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="card" class="p-0">
|
||||
<!-- TODO : not getting border when select record -->
|
||||
<div class="d-flex flex-grow-1 m-2">
|
||||
<div class="ps-2 d-flex flex-column m-1 overflow-hidden"
|
||||
t-attf-id="product-{{record.id.raw_value}}">
|
||||
<div class="d-flex">
|
||||
<field name="name" class="fw-bold fs-4 text-reset mb-1 me-2"/>
|
||||
<field class="mt-1 me-1"
|
||||
name="is_favorite"
|
||||
widget="boolean_favorite"
|
||||
invisible="not is_favorite"
|
||||
nolabel="1"
|
||||
readonly="1"/>
|
||||
</div>
|
||||
<!-- Used by @web/product/js/product_catalog/order_line to
|
||||
show the price using a t-portal. -->
|
||||
<div name="o_kanban_price"
|
||||
t-attf-id="product-{{record.id.raw_value}}-price"/>
|
||||
<field name="product_template_attribute_value_ids"
|
||||
widget="many2many_tags"
|
||||
domain="[('id', 'in', parent.ids)]"
|
||||
groups="product.group_product_variant"
|
||||
options="{'color_field': 'color'}"
|
||||
invisible="not product_template_attribute_value_ids"/>
|
||||
</div>
|
||||
<field
|
||||
name="image_128"
|
||||
class="ms-auto"
|
||||
invisible="not image_128"
|
||||
widget="image"
|
||||
options="{'size': [55, 55], 'img_class': 'object-fit-contain'}"
|
||||
alt="Product"
|
||||
/>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_view_search_catalog" model="ir.ui.view">
|
||||
<field name="name">product.view.search.catalog</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Product">
|
||||
<!-- Search field -->
|
||||
<field name="name"
|
||||
string="Product"
|
||||
filter_domain="['|', '|', ('default_code', 'ilike', self), ('name', 'ilike', self), ('barcode', 'ilike', self)]"/>
|
||||
<field name="categ_id" filter_domain="[('categ_id', 'child_of', raw_value)]"/>
|
||||
<field name="product_template_attribute_value_ids"
|
||||
groups="product.group_product_variant"/>
|
||||
<field name="product_tmpl_id" string="Product Template"/>
|
||||
<!-- Filter -->
|
||||
<filter string="Favorites" name="favorites" domain="[('is_favorite', '=', True)]"/>
|
||||
<separator/>
|
||||
<filter string="Services" name="services" domain="[('type', '=', 'service')]"/>
|
||||
<filter string="Goods"
|
||||
name="goods"
|
||||
domain="[('type', '=', 'consu')]"/>
|
||||
<!-- Group By -->
|
||||
<group>
|
||||
<filter string="Product Type" name="type" context="{'group_by':'type'}"/>
|
||||
<filter string="Product Category"
|
||||
name="categ_id"
|
||||
context="{'group_by':'categ_id'}"/>
|
||||
</group>
|
||||
<!-- searchpanel -->
|
||||
<searchpanel>
|
||||
<field name="categ_id"
|
||||
string="Categories"
|
||||
icon="fa-th-list"/>
|
||||
<field name="product_tag_ids"
|
||||
string="Tags"
|
||||
icon="fa-th-list"
|
||||
enable_counters="1"
|
||||
select="multi"/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -6,61 +6,15 @@
|
|||
<field name="inherit_id" ref="base_setup.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@id='companies']" position="after">
|
||||
<h2>Units of Measure</h2>
|
||||
<div class="row mt16 o_settings_container" id="product_general_settings">
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="weight_uom_setting">
|
||||
<div class="o_setting_left_pane">
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="product_weight_in_lbs" string="Weight"/>
|
||||
<div class="text-muted">
|
||||
Define your weight unit of measure
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="mt16">
|
||||
<field name="product_weight_in_lbs" class="o_light_label" widget="radio" options="{'horizontal': true}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="manage_volume_uom_setting">
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="product_volume_volume_in_cubic_feet" string="Volume"/>
|
||||
<div class="text-muted">
|
||||
Define your volume unit of measure
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="mt16">
|
||||
<field name="product_volume_volume_in_cubic_feet" class="o_light_label" widget="radio" options="{'horizontal': true}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<block title="Units of Measure" id="product_general_settings">
|
||||
<setting id="weight_uom_setting" string="Weight" help="Define your weight unit of measure">
|
||||
<field name="product_weight_in_lbs" class="o_light_label" widget="radio"/>
|
||||
</setting>
|
||||
<setting id="manage_volume_uom_setting" string="Volume" help="Define your volume unit of measure">
|
||||
<field name="product_volume_volume_in_cubic_feet" class="o_light_label" widget="radio"/>
|
||||
</setting>
|
||||
</block>
|
||||
</xpath>
|
||||
<xpath expr="//div[@id='product_get_pic_setting']" position="replace">
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="product_get_pic_setting">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_product_images"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_product_images" string="Google Images"/>
|
||||
<a href="https://www.odoo.com/documentation/16.0/applications/sales/sales/products_prices/products/product_images.html"
|
||||
title="Documentation" class="o_doc_link" target="_blank"/>
|
||||
<div class="text-muted">
|
||||
Get product pictures using Barcode
|
||||
</div>
|
||||
<div class="content-group mt16"
|
||||
attrs="{'invisible': [('module_product_images','=',False)]}"
|
||||
id="msg_module_product_images">
|
||||
<div class="mt16 text-warning">
|
||||
<strong>Save</strong> this page and come back
|
||||
here to set up the feature.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -6,10 +6,7 @@
|
|||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="sale">
|
||||
<field name="property_product_pricelist" groups="product.group_product_pricelist" attrs="{'invisible': [('is_company','=',False),('parent_id','!=',False)]}"/>
|
||||
<div name="parent_pricelists" groups="product.group_product_pricelist" colspan="2" attrs="{'invisible': ['|',('is_company','=',True),('parent_id','=',False)]}">
|
||||
<p>Pricelists are managed on <button name="open_commercial_entity" type="object" string="the parent company" class="oe_link"/></p>
|
||||
</div>
|
||||
<field name="property_product_pricelist" groups="product.group_product_pricelist"/>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
|||
36
odoo-bringout-oca-ocb-product/product/views/uom_views.xml
Normal file
36
odoo-bringout-oca-ocb-product/product/views/uom_views.xml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="product_uom_list_view" model="ir.ui.view">
|
||||
<field name="name">product.uom.list</field>
|
||||
<field name="model">product.uom</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Packaging Barcodes" editable="bottom">
|
||||
<field name="product_id"/>
|
||||
<field name="barcode"/>
|
||||
<field name="uom_id" readonly="context.get('default_uom_id')" optional="hide"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="uom_uom_form_view_inherit" model="ir.ui.view">
|
||||
<field name="name">uom.uom.form.inherit</field>
|
||||
<field name="model">uom.uom</field>
|
||||
<field name="inherit_id" ref="uom.product_uom_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//sheet" position="inside">
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
class="oe_stat_button"
|
||||
icon="fa-barcode"
|
||||
type="object"
|
||||
context="{'default_uom_id': id}"
|
||||
name="action_open_packaging_barcodes">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_text">Packaging Barcodes</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue