Compare commits

...

2 Commits

Author SHA1 Message Date
guanhuan
56f1ba0f25 用户新增企业微信id 2024-09-20 14:24:50 +08:00
guanhuan
d067c5b8c4 左侧图标修改 2024-09-20 09:49:13 +08:00
13 changed files with 46 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 B

View File

@@ -234,7 +234,7 @@
</record>
<menuitem name="系统工单" id="work_order_1_list" web_icon="jikimo_system_order,static/description/icon.png"/>
<menuitem name="系统工单" id="work_order_1_list" web_icon="jikimo_system_order,static/description/系统工单.png"/>
<menuitem name="工单" id="work_order" parent="work_order_1_list" action="system_order"/>
<menuitem name="工单模板" id="work_order_template" parent="work_order_1_list" action="work_template" groups="jikimo_system_order.group_operations_permissions_rwc"/>
<menuitem name="工单分类" id="work_order_type" parent="work_order_1_list" action="classify" groups="jikimo_system_order.group_operations_permissions_rwc"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 702 B

View File

@@ -1024,7 +1024,7 @@
<menuitem
id="menu_quality_root"
name="Quality"
web_icon="quality_control,static/description/icon.svg"
web_icon="quality_control,static/description/质量.png"
sequence="150"
groups="quality.group_quality_user"/>

View File

@@ -7,10 +7,11 @@
'sequence': 1,
'category': 'sf',
'website': 'https://www.sf.jikimo.com',
'depends': ['hr'],
'depends': ['base', 'hr'],
'data': [
'views/hr_employee.xml',
'views/res_config_settings_views.xml',
'views/res_users_view.xml',
'data/cron_data.xml',
],
'demo': [

View File

@@ -2,3 +2,4 @@
from . import hr_employee
from . import res_config_setting
from . import res_users

View File

@@ -20,7 +20,9 @@ class JkmPracticeEmployee(models.Model):
if result['employee_list']:
for employee_info in result['employee_list']:
if employee_info['work_email']:
self.sudo().search([('work_email', '=', employee_info['work_email'])]).write(
{'we_id': employee_info['we_id']})
hr_employee = self.sudo().search([('work_email', '=', employee_info['work_email'])])
hr_employee.write({'we_id': employee_info['we_id']})
if hr_employee.user_id:
hr_employee.user_id.write({'we_employee_id': employee_info['we_id']})
else:
logging.info('_employee_info_sync error:%s' % result['message'])

12
sf_hr/models/res_users.py Normal file
View File

@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
from odoo import models, fields, api
import logging
_logger = logging.getLogger(__name__)
class ResUsers(models.Model):
_inherit = 'res.users'
we_employee_id = fields.Char(string=u'企业微信账号', default="")

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_users_account_form" model="ir.ui.view">
<field name="name">res.users.account.form</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<page name="preferences" position="after">
<page name="account" string="企业微信">
<group>
<field name="we_employee_id"/>
</group>
</page>
</page>
</field>
</record>
</data>
</odoo>

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

View File

@@ -1230,5 +1230,9 @@
action="hr_equipment_action1"
sequence="0"/>
<menuitem
id="maintenance.menu_maintenance_title"
web_icon="sf_maintenance,static/description/维护.png"/>
</odoo>

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

View File

@@ -278,6 +278,7 @@
sequence="150"
action="sf_production_plan_action"
groups="sf_base.group_plan_dispatch"
web_icon="sf_plan,static/description/计划.png"
/>
<!-- <record model="ir.ui.menu" id="mrp_custom_menu" inherit_id="mrp.menu_mrp_manufacturing"> -->