mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-27 08:52:02 +02:00
19.0 vanilla
This commit is contained in:
parent
79f83631d5
commit
73afc09215
6267 changed files with 1534193 additions and 1130106 deletions
|
|
@ -7,30 +7,34 @@
|
|||
<field name="inherit_id" ref="product.product_template_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<page name="sales" position="attributes">
|
||||
<attribute name="invisible">0</attribute>
|
||||
<attribute name="invisible" remove="1" separator="or"/>
|
||||
</page>
|
||||
<field name="product_variant_count" position="after">
|
||||
<field name="service_type" widget="radio" invisible="True"/>
|
||||
<field name="visible_expense_policy" invisible="1"/>
|
||||
</field>
|
||||
<field name="detailed_type" position="after">
|
||||
<field name="invoice_policy" required="1"/>
|
||||
<field name="expense_policy" widget="radio" attrs="{'invisible': [('visible_expense_policy', '=', False)]}"/>
|
||||
<field name="type" position="after">
|
||||
<field
|
||||
name="invoice_policy"
|
||||
required="1"
|
||||
invisible="not sale_ok or type == 'combo'"
|
||||
/>
|
||||
</field>
|
||||
<field name="product_tooltip" position="after">
|
||||
<label for="product_tooltip" string=""
|
||||
attrs="{'invisible': ['|', ('type', 'not in', ('product', 'consu')), ('invoice_policy', '!=', 'order')]}"/>
|
||||
<div attrs="{'invisible': ['|', ('type', 'not in', ('product', 'consu')), ('invoice_policy', '!=', 'order')]}"
|
||||
class="fst-italic text-muted">
|
||||
You can invoice them before they are delivered.
|
||||
</div>
|
||||
<label for="product_tooltip" string=""
|
||||
attrs="{'invisible': ['|', ('type', 'not in', ('product', 'consu')), ('invoice_policy', '!=', 'delivery')]}"/>
|
||||
<div attrs="{'invisible': ['|', ('type', 'not in', ('product', 'consu')), ('invoice_policy', '!=', 'delivery')]}"
|
||||
class="fst-italic text-muted">
|
||||
Invoice after delivery, based on quantities delivered, not ordered.
|
||||
</div>
|
||||
<field name="service_tracking" position="attributes">
|
||||
<attribute name="invisible" add="not sale_ok" separator="or"/>
|
||||
</field>
|
||||
<group name="description" position="after">
|
||||
<t groups="sales_team.group_sale_salesman">
|
||||
<group string="Warning on Sales Orders" groups="sale.group_warning_sale">
|
||||
<field name="sale_line_warn_msg"
|
||||
placeholder="e.g. This product is defective."
|
||||
nolabel="1" colspan="2"/>
|
||||
</group>
|
||||
</t>
|
||||
<group name="expense_info" string="Expense" invisible="not visible_expense_policy">
|
||||
<field name="expense_policy" widget="radio"/>
|
||||
</group>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -47,25 +51,16 @@
|
|||
icon="fa-signal"
|
||||
help="Sold in the last 365 days"
|
||||
groups="sales_team.group_sale_salesman"
|
||||
attrs="{'invisible': [('sale_ok', '=', False)]}">
|
||||
invisible="not sale_ok">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="sales_count" widget="statinfo" nolabel="1" class="mr4"/>
|
||||
<field name="uom_name"/>
|
||||
<span class="o_stat_value d-flex gap-1">
|
||||
<field name="sales_count" widget="statinfo" nolabel="1" class="oe_inline"/>
|
||||
<field name="uom_name" class="oe_inline" groups="uom.group_uom"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Sold</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<group name="description" position="after">
|
||||
<t groups="sales_team.group_sale_salesman">
|
||||
<group string="Warning when Selling this Product" groups="sale.group_warning_sale">
|
||||
<field name="sale_line_warn" nolabel="1" colspan="2"/>
|
||||
<field name="sale_line_warn_msg" colspan="2" nolabel="1" placeholder="Type a message..."
|
||||
attrs="{'required':[('sale_line_warn','!=','no-message')],'readonly':[('sale_line_warn','=','no-message')]}"/>
|
||||
</group>
|
||||
</t>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -74,40 +69,34 @@
|
|||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_only_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button name="action_open_documents" position="after">
|
||||
<button class="oe_stat_button"
|
||||
name="action_view_sales"
|
||||
type="object" icon="fa-signal"
|
||||
help="Sold in the last 365 days"
|
||||
groups="sales_team.group_sale_salesman"
|
||||
attrs="{'invisible': [('sale_ok', '=', False)]}">
|
||||
invisible="not sale_ok">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="sales_count" widget="statinfo" nolabel="1" class="mr4"/>
|
||||
<field name="uom_name"/>
|
||||
<span class="o_stat_value d-flex gap-1">
|
||||
<field name="sales_count" widget="statinfo" nolabel="1" class="oe_inline"/>
|
||||
<field name="uom_name" class="oe_inline" groups="uom.group_uom"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Sold</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<group name="description" position="after">
|
||||
<t groups="sales_team.group_sale_salesman">
|
||||
<group string="Warning when Selling this Product" groups="sale.group_warning_sale">
|
||||
<field name="sale_line_warn" string="Warning"/>
|
||||
<field name="sale_line_warn_msg" string="Message" placeholder="Type a message..."
|
||||
attrs="{'required':[('sale_line_warn','!=','no-message')],'readonly':[('sale_line_warn','=','no-message')], 'invisible':[('sale_line_warn','=','no-message')]}"/>
|
||||
</group>
|
||||
</t>
|
||||
</group>
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<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,activity</field>
|
||||
<field name="view_id" ref="product.product_template_kanban_view"/>
|
||||
<field name="path">products</field>
|
||||
<field name="view_ids" eval="[Command.clear(),
|
||||
Command.create({'view_mode': 'kanban'}),
|
||||
Command.create({'view_mode': 'list', 'view_id': ref('account.product_template_list_view_sellable_inherit')}),
|
||||
Command.create({'view_mode': 'form'}),
|
||||
Command.create({'view_mode': 'activity'})]"/>
|
||||
<field name="search_view_id" ref="product.product_template_search_view"/>
|
||||
<field name="context">{"search_default_filter_to_sell":1, "sale_multi_pricelist_product_template": 1}</field>
|
||||
<field name="help" type="html">
|
||||
|
|
@ -120,4 +109,29 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_view_kanban_catalog" model="ir.ui.view">
|
||||
<field name="name">product.view.kanban.catalog.inherit.sale</field>
|
||||
<field name="inherit_id" ref="product.product_view_kanban_catalog"/>
|
||||
<field name="model">product.product</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//t[@t-name='menu']" position="attributes">
|
||||
<attribute name="groups">sales_team.group_sale_manager</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_view_search_catalog" model="ir.ui.view">
|
||||
<field name="name">product.view.search.catalog.inherit.sale</field>
|
||||
<field name="inherit_id" ref="product.product_view_search_catalog"/>
|
||||
<field name="model">product.product</field>
|
||||
<field name="arch" type="xml">
|
||||
<filter name="goods" position="after">
|
||||
<filter string="In the Order"
|
||||
invisible="context.get('active_model', '') != 'sale.order.line'"
|
||||
name="products_in_sale_order"
|
||||
domain="[('product_catalog_product_is_in_sale_order', '=', True)]"/>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue