修复bug
This commit is contained in:
@@ -18,13 +18,17 @@
|
||||
<xpath expr="//form/header/button[@name='action_rfq_send'][1]" position="after">
|
||||
<button name="sf_sale.action_purchase_order_check_wizard" string="审核" type="action"
|
||||
context="{'default_order_id':active_id}" groups="sf_base.group_purchase_director"
|
||||
attrs="{'invisible': ['&',('check_status','in', ['approved']),('state', 'in', ['draft','send','purchase'])]}"
|
||||
attrs="{'invisible': ['&',('check_status','in', ['approved',False]),('state', 'in', ['purchase'])]}"
|
||||
class="oe_highlight"/>
|
||||
|
||||
</xpath>
|
||||
<xpath expr="//form/header/button[@name='button_confirm'][2]" position="replace">
|
||||
<button name="button_confirm" type="object" context="{'validate_analytic': True}"
|
||||
string="确认订单" id="draft_confirm"
|
||||
attrs="{'invisible': ['|','&',('check_status','in', ['approved','fail','pending']),('state', 'in', ['draft','purchase']),('state', 'in', ['purchase'])]}"
|
||||
string="确认" id="draft_confirm"
|
||||
/>
|
||||
<button name="button_confirming" type="object"
|
||||
string="确认订单"
|
||||
attrs="{'invisible': ['&',('check_status','!=', False),('state', 'not in', ['draft','send'])]}"
|
||||
/>
|
||||
</xpath>
|
||||
|
||||
@@ -129,12 +133,15 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_purchase_order_kpis_tree_inherit_sf" model="ir.ui.view">
|
||||
<record id="view_purchase_order_view_tree_inherit_sf" model="ir.ui.view">
|
||||
<field name="name">purchase.order.tree.inherit.sf</field>
|
||||
<field name="model">purchase.order</field>
|
||||
<field name="inherit_id" ref="purchase.purchase_order_kpis_tree"/>
|
||||
<field name="inherit_id" ref="purchase.purchase_order_view_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="state" position="after">
|
||||
<tree position="attributes">
|
||||
<attribute name="default_order">check_status desc,date_approve asc</attribute>
|
||||
</tree>
|
||||
<field name="amount_total" position="after">
|
||||
<field name="check_status" widget="badge"
|
||||
decoration-success="check_status == 'approved'"
|
||||
decoration-warning="check_status == 'pending'"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form position="attributes">
|
||||
<attribute name="delete">false</attribute>
|
||||
<attribute name="edit">false</attribute>
|
||||
</form>
|
||||
<field name="vat" position="after">
|
||||
<field name="customer_rank" invisible="1"/>
|
||||
|
||||
@@ -1,6 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="sale_order_view_search_inherit_sf" model="ir.ui.view">
|
||||
<field name="name">sale.order.search.inherit.sf</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="mode">primary</field>
|
||||
<field name="inherit_id" ref="sale.view_sales_order_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<filter name="my_sale_orders_filter" position="replace">
|
||||
<field name="campaign_id"/>
|
||||
<separator/>
|
||||
<filter string="报价" name="draft" domain="[('state','in',('draft', 'sent'))]"/>
|
||||
<filter string="销售订单" name="sales" domain="[('state','in',('sale','done'))]"/>
|
||||
<separator/>
|
||||
<filter string="创建日期" name="filter_create_date" date="create_date"/>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_quotations_with_onboarding_inherit_sf" model="ir.actions.act_window">
|
||||
<field name="name">报价</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">sale.order</field>
|
||||
<field name="view_id" ref="sale.view_quotation_tree_with_onboarding"/>
|
||||
<field name="view_mode">tree,kanban,form,calendar,pivot,graph,activity</field>
|
||||
<field name="search_view_id" ref="sale_order_view_search_inherit_sf"/>
|
||||
<field name="context">{'search_default_my_quotation': 1}</field>
|
||||
<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>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- <menuitem id="menu_sale_quotations">-->
|
||||
<!-- <field name="active" eval="False"/>-->
|
||||
<!-- </menuitem>-->
|
||||
|
||||
<menuitem id="menu_sale_quotations_inherit_sf"
|
||||
action="action_quotations_with_onboarding_inherit_sf"
|
||||
groups="sales_team.group_sale_salesman,sf_base.group_sale_salemanager,sf_base.group_sale_director"
|
||||
parent="sale.sale_order_menu"
|
||||
sequence="10"/>
|
||||
|
||||
<record model="ir.ui.view" id="view_sale_order_form_inherit_sf">
|
||||
<field name="name">sale.order.form.inherit.sf</field>
|
||||
<field name="model">sale.order</field>
|
||||
@@ -36,7 +84,8 @@
|
||||
attrs="{'invisible': ['|','&',('check_status', '!=', 'approved'),('state', 'in', ['draft','cancel']),'&',('check_status', '=', 'approved'),('state', 'in', ['sale','cancel'])]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//form/header/button[@name='action_cancel']" position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('check_status', '=', False)]}
|
||||
<attribute name="attrs">{'invisible': ['|',('state', 'in', ['cancel']),('check_status', 'in',
|
||||
[False,'approved'])]}
|
||||
</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//form/header/button[@name='action_draft']" position="attributes">
|
||||
@@ -119,7 +168,6 @@
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale_management.sale_order_form_quote"/>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<field name="date_order" position="attributes">
|
||||
<attribute name="string">下单日期</attribute>
|
||||
</field>
|
||||
@@ -141,6 +189,7 @@
|
||||
<field name="inherit_id" ref="sale.view_quotation_tree_with_onboarding"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree position="attributes">
|
||||
<attribute name="default_order">check_status desc,create_date asc</attribute>
|
||||
<attribute name="delete">False</attribute>
|
||||
</tree>
|
||||
<field name="name" position="attributes">
|
||||
@@ -164,6 +213,7 @@
|
||||
<field name="inherit_id" ref="sale.view_order_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree position="attributes">
|
||||
<attribute name="default_order">schedule_status desc,date_order asc</attribute>
|
||||
<attribute name="create">False</attribute>
|
||||
</tree>
|
||||
<field name="name" position="attributes">
|
||||
|
||||
Reference in New Issue
Block a user