[IMP] sale_management: xml files cleanup
* Indentation * replace xpath expressions by simpler references when possible * ordered import of xml files in manifest
This commit is contained in:
@@ -47,11 +47,14 @@ The Dashboard for the Sales Manager will include
|
||||
|
||||
'report/sale_report_templates.xml',
|
||||
|
||||
'views/sale_portal_templates.xml',
|
||||
# Define SO template views & actions before their place of use
|
||||
'views/sale_order_template_views.xml',
|
||||
'views/res_config_settings_views.xml',
|
||||
|
||||
'views/digest_views.xml',
|
||||
'views/res_config_settings_views.xml',
|
||||
'views/sale_order_views.xml',
|
||||
'views/sale_portal_templates.xml',
|
||||
|
||||
'views/sale_management_menus.xml',
|
||||
],
|
||||
'demo': [
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="digest_digest_view_form" model="ir.ui.view">
|
||||
<field name="name">digest.digest.view.form.inherit.sale.order</field>
|
||||
<field name="model">digest.digest</field>
|
||||
<field name="priority">10</field>
|
||||
<field name="inherit_id" ref="digest.digest_digest_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='kpi_sales']" position="attributes">
|
||||
<group name="kpi_sales" position="attributes">
|
||||
<attribute name="string">Sales</attribute>
|
||||
<attribute name="groups">sales_team.group_sale_salesman_all_leads</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//group[@name='kpi_sales']" position="inside">
|
||||
</group>
|
||||
<group name="kpi_sales" position="inside">
|
||||
<field name="kpi_all_sale_total"/>
|
||||
</xpath>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -57,4 +57,5 @@
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<record id="sale_order_form_quote" model="ir.ui.view">
|
||||
<field name="name">sale.order.form.payment</field>
|
||||
<field name="name">sale.order.form.inherit.sale_management</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<xpath expr="//page/field[@name='order_line']/.." position="after">
|
||||
<page string="Optional Products" name="optional_products" attrs="{'invisible': [('state', 'not in', ['draft', 'sent'])]}">
|
||||
<page name="order_lines" position="after">
|
||||
<page string="Optional Products"
|
||||
name="optional_products"
|
||||
attrs="{'invisible': [('state', 'not in', ['draft', 'sent'])]}">
|
||||
<field name="sale_order_option_ids" mode="tree,form,kanban">
|
||||
<form string="Optional Products">
|
||||
<group>
|
||||
<field name="product_id" domain="[('sale_ok', '=', True), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
|
||||
<field name="product_id"
|
||||
domain="[('sale_ok', '=', True), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
|
||||
<field name="name"/>
|
||||
<field name="quantity"/>
|
||||
<field name="product_uom_category_id" invisible="1"/>
|
||||
@@ -39,7 +42,11 @@
|
||||
</strong>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button name="button_add_to_order" class="btn btn-link oe_link fa fa-shopping-cart" title="Add to order lines" type="object" attrs="{'invisible': [('is_present', '=', True)]}"/>
|
||||
<button name="button_add_to_order"
|
||||
class="btn btn-link oe_link fa fa-shopping-cart"
|
||||
title="Add to order lines"
|
||||
type="object"
|
||||
attrs="{'invisible': [('is_present', '=', True)]}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -63,43 +70,42 @@
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
<tree string="Sales Quotation Template Lines" editable="bottom" decoration-success="is_present == True">
|
||||
<tree string="Sales Quotation Template Lines"
|
||||
editable="bottom"
|
||||
decoration-success="is_present == True">
|
||||
<control>
|
||||
<create name="add_product_control" string="Add a product"/>
|
||||
</control>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="product_id" domain="[('sale_ok', '=', True), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
|
||||
<field name="product_id"
|
||||
domain="[('sale_ok', '=', True), '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
|
||||
<field name="name" optional="show"/>
|
||||
<field name="quantity"/>
|
||||
<field name="uom_id" string="UoM" groups="uom.group_uom" optional="show"/>
|
||||
<field name="product_uom_category_id" invisible="1"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="discount" string="Disc.%" groups="product.group_discount_per_so_line" optional="show"/>
|
||||
<field name="discount"
|
||||
string="Disc.%"
|
||||
groups="product.group_discount_per_so_line"
|
||||
optional="show"/>
|
||||
<field name="is_present" invisible="1" />
|
||||
<button name="button_add_to_order" class="oe_link" icon="fa-shopping-cart" title="Add to order lines" type="object" attrs="{'invisible': [('is_present', '=', True)]}"/>
|
||||
<button name="button_add_to_order"
|
||||
type="object"
|
||||
class="oe_link"
|
||||
icon="fa-shopping-cart"
|
||||
title="Add to order lines"
|
||||
attrs="{'invisible': [('is_present', '=', True)]}"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</xpath>
|
||||
</page>
|
||||
|
||||
<xpath expr="//field[@name='partner_shipping_id']" position="after">
|
||||
<field name="sale_order_template_id" context="{'company_id': company_id}"
|
||||
<field name="partner_shipping_id" position="after">
|
||||
<field name="sale_order_template_id"
|
||||
options="{'no_create': True, 'no_open': True}"
|
||||
groups="sale_management.group_sale_order_template"
|
||||
/>
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sale.action_quotations" model="ir.actions.act_window">
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create a new quotation, the first step of a new sale!
|
||||
</p>
|
||||
<p>
|
||||
Once the quotation is confirmed by the customer, it becomes a sales order.<br/> You will be able to create an invoice and collect the payment.
|
||||
</p>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user