Skip to content

Commit

Permalink
微信用户表单视图相关优化
Browse files Browse the repository at this point in the history
  • Loading branch information
JoneXiong committed Jul 11, 2019
1 parent c044b6e commit c3a9001
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions models/user_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,6 @@ class wx_corpuser(models.Model):

_sql_constraints = [
('userid_key', 'UNIQUE (userid)', '账号已存在 !'),
('email_key', 'UNIQUE (email)', '邮箱已存在 !'),
('mobile_key', 'UNIQUE (mobile)', '手机号已存在 !')
]

def update_last_uuid(self, uuid):
Expand Down
8 changes: 4 additions & 4 deletions views/wx_corpuser_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
<field name="arch" type="xml">
<tree string="企业号用户">
<field name="avatarimg"/>
<field name="userid"/>
<field name="email"/>
<field name="gender"/>
<field name="mobile"/>
<field name="gender"/>
<field name="name"/>
<field name="position"/>
<field name="userid"/>
<field name="status"/>
</tree>
</field>
Expand All @@ -24,7 +24,7 @@
<field name="model">wx.corpuser</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="企业号用户" version="7.0">
<form string="企业号用户" version="7.0" duplicate="0">
<header>
<button name="send_text_confirm" string="发送微信消息" type="object" attrs="{'invisible': [('id', '=', False)]}"/>
</header>
Expand Down Expand Up @@ -95,4 +95,4 @@
<menuitem action="wx_corpuser_action_server_359" id="wx_corpuser_menuitem_270" name="同步用户" parent="parent_menu_286" sequence="11"/>

</data>
</openerp>
</openerp>
4 changes: 2 additions & 2 deletions views/wx_user_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<field name="model">wx.user</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="微信用户" version="7.0">
<form string="微信用户" version="7.0" duplicate="0">
<header>
<button name="send_text_confirm" string="发送微信消息" type="object" attrs="{'invisible': [('id', '=', False)]}"/>
<button name="send_template_confirm" string="发送模板消息" type="object" attrs="{'invisible': [('id', '=', False)]}"/>
Expand Down Expand Up @@ -117,4 +117,4 @@
<menuitem action="wx_user_action_server_sync" id="wx_user_sync_menuitem" name="同步用户" parent="parent_menu_120" sequence="10"/>

</data>
</openerp>
</openerp>

0 comments on commit c3a9001

Please sign in to comment.