客户页面优化编辑
This commit is contained in:
@@ -9,8 +9,8 @@
|
|||||||
<xpath expr="//page[last()]" position="before">
|
<xpath expr="//page[last()]" position="before">
|
||||||
<page string="token和密钥">
|
<page string="token和密钥">
|
||||||
<group>
|
<group>
|
||||||
<field name="sf_token"/>
|
<field name="sf_token" readonly="1"/>
|
||||||
<field name="sf_secret_key"/>
|
<field name="sf_secret_key" readonly="1"/>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import os
|
|||||||
from odoo import models, fields, api, _
|
from odoo import models, fields, api, _
|
||||||
from odoo.exceptions import ValidationError
|
from odoo.exceptions import ValidationError
|
||||||
from odoo.modules import get_resource_path
|
from odoo.modules import get_resource_path
|
||||||
# from OCC.Extend.DataExchange import read_step_file
|
from OCC.Extend.DataExchange import read_step_file
|
||||||
# from OCC.Extend.DataExchange import write_stl_file
|
from OCC.Extend.DataExchange import write_stl_file
|
||||||
|
|
||||||
|
|
||||||
class ResProductMo(models.Model):
|
class ResProductMo(models.Model):
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import logging
|
import logging
|
||||||
from odoo.modules import get_resource_path
|
from odoo.modules import get_resource_path
|
||||||
from odoo import fields, models, api
|
from odoo import fields, models, api
|
||||||
# from quatotion import readSql, feature_recognize, auto_quatotion
|
from quatotion import readSql, feature_recognize, auto_quatotion
|
||||||
|
|
||||||
__author__ = 'jinling.yang'
|
__author__ = 'jinling.yang'
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import os
|
|||||||
import json
|
import json
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import requests
|
import requests
|
||||||
# from OCC.Extend.DataExchange import read_step_file
|
from OCC.Extend.DataExchange import read_step_file
|
||||||
# from OCC.Extend.DataExchange import write_stl_file
|
from OCC.Extend.DataExchange import write_stl_file
|
||||||
from odoo import models, fields, api
|
from odoo import models, fields, api
|
||||||
from odoo.modules import get_resource_path
|
from odoo.modules import get_resource_path
|
||||||
from odoo.exceptions import ValidationError, UserError
|
from odoo.exceptions import ValidationError, UserError
|
||||||
|
|||||||
@@ -10,6 +10,12 @@
|
|||||||
<attribute name="delete">false</attribute>
|
<attribute name="delete">false</attribute>
|
||||||
<!-- <attribute name="edit">false</attribute>-->
|
<!-- <attribute name="edit">false</attribute>-->
|
||||||
</form>
|
</form>
|
||||||
|
<field name="name" position="attributes">
|
||||||
|
<attribute name="attrs">{'readonly': [('id','!=', False)]}</attribute>
|
||||||
|
</field>
|
||||||
|
<field name="company_type" position="attributes">
|
||||||
|
<attribute name="attrs">{'readonly': [('id','!=', False)]}</attribute>
|
||||||
|
</field>
|
||||||
<field name="vat" position="after">
|
<field name="vat" position="after">
|
||||||
<field name="customer_rank" invisible="1"/>
|
<field name="customer_rank" invisible="1"/>
|
||||||
<field name="supplier_rank" invisible="1"/>
|
<field name="supplier_rank" invisible="1"/>
|
||||||
@@ -66,9 +72,12 @@
|
|||||||
<field name="industry_id" position="attributes">
|
<field name="industry_id" position="attributes">
|
||||||
<attribute name="attrs">{'readonly': [('id','!=', False)]}</attribute>
|
<attribute name="attrs">{'readonly': [('id','!=', False)]}</attribute>
|
||||||
</field>
|
</field>
|
||||||
<field name="comment" position="attributes">
|
<xpath expr="//field[@name='comment']" position="attributes">
|
||||||
<attribute name="attrs">{'readonly': [('id','!=', False)]}</attribute>
|
<attribute name="attrs">{'readonly': [('id','!=', False)]}</attribute>
|
||||||
</field>
|
</xpath>
|
||||||
|
<xpath expr="//page[@name='internal_notes']/field[@name='comment']" position="attributes">
|
||||||
|
<attribute name="attrs">{'readonly': [('id','!=', False)]}</attribute>
|
||||||
|
</xpath>
|
||||||
<field name="zip" position="attributes">
|
<field name="zip" position="attributes">
|
||||||
<attribute name="attrs">{'readonly': [('id','!=', False)]}</attribute>
|
<attribute name="attrs">{'readonly': [('id','!=', False)]}</attribute>
|
||||||
</field>
|
</field>
|
||||||
@@ -84,8 +93,8 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record model="ir.ui.view" id="view_partner_property_form_inherit_sf">
|
<record model="ir.ui.view" id="view_partner_property_form_account_inherit_sf">
|
||||||
<field name="name">res.partner.property.form.inherit.sf</field>
|
<field name="name">res.partner.account.form.inherit.sf</field>
|
||||||
<field name="model">res.partner</field>
|
<field name="model">res.partner</field>
|
||||||
<field name="inherit_id" ref="account.view_partner_property_form"/>
|
<field name="inherit_id" ref="account.view_partner_property_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
@@ -94,6 +103,79 @@
|
|||||||
widget="many2one_avatar_user"
|
widget="many2one_avatar_user"
|
||||||
attrs="{'required' : [('supplier_rank','>', 0)],'readonly': [('customer_rank','>', 0)]}"/>
|
attrs="{'required' : [('supplier_rank','>', 0)],'readonly': [('customer_rank','>', 0)]}"/>
|
||||||
</field>
|
</field>
|
||||||
|
<xpath expr="//field[@name='property_account_position_id']" position="attributes">
|
||||||
|
<attribute name="attrs">{'readonly': [('id','!=', False)]}</attribute>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='property_payment_term_id']" position="attributes">
|
||||||
|
<attribute name="attrs">{'readonly': [('id','!=', False)]}</attribute>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='property_supplier_payment_term_id']" position="attributes">
|
||||||
|
<attribute name="attrs">{'readonly': [('id','!=', False)]}</attribute>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='bank_ids']" position="attributes">
|
||||||
|
<attribute name="attrs">{'readonly': [('id','!=', False)]}</attribute>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="view_partner_delivery_form_inherit_sf">
|
||||||
|
<field name="name">res.partner.delivery.form.inherit.sf</field>
|
||||||
|
<field name="model">res.partner</field>
|
||||||
|
<field name="inherit_id" ref="delivery.view_partner_property_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='property_delivery_carrier_id']" position="attributes">
|
||||||
|
<attribute name="attrs">{'readonly': [('id','!=', False)]}</attribute>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="view_partner_stock_form_inherit_sf">
|
||||||
|
<field name="name">res.partner.stock.form.inherit.sf</field>
|
||||||
|
<field name="model">res.partner</field>
|
||||||
|
<field name="inherit_id" ref="stock.view_partner_stock_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='property_stock_customer']" position="attributes">
|
||||||
|
<attribute name="attrs">{'readonly': [('id','!=', False)]}</attribute>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='property_stock_supplier']" position="attributes">
|
||||||
|
<attribute name="attrs">{'readonly': [('id','!=', False)]}</attribute>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="view_partner_mrp_subcontracting_form_inherit_sf">
|
||||||
|
<field name="name">res.partner.mrp.subcontracting.form.inherit.sf</field>
|
||||||
|
<field name="model">res.partner</field>
|
||||||
|
<field name="inherit_id" ref="mrp_subcontracting.view_partner_mrp_subcontracting_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='property_stock_subcontractor']" position="attributes">
|
||||||
|
<attribute name="attrs">{'readonly': [('id','!=', False)]}</attribute>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="view_partner_purchase_form_inherit_sf">
|
||||||
|
<field name="name">res.partner.purchase.form.inherit.sf</field>
|
||||||
|
<field name="model">res.partner</field>
|
||||||
|
<field name="inherit_id" ref="purchase.view_partner_property_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='receipt_reminder_email']" position="attributes">
|
||||||
|
<attribute name="attrs">{'readonly': [('id','!=', False)]}</attribute>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='property_purchase_currency_id']" position="attributes">
|
||||||
|
<attribute name="attrs">{'readonly': [('id','!=', False)]}</attribute>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="view_partner_team_form_inherit_sf">
|
||||||
|
<field name="name">res.partner.team.form.inherit.sf</field>
|
||||||
|
<field name="model">res.partner</field>
|
||||||
|
<field name="inherit_id" ref="sales_team.res_partner_view_team"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='team_id'][2]" position="attributes">
|
||||||
|
<attribute name="attrs">{'readonly': [('id','!=', False)]}</attribute>
|
||||||
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user