@@ -52,6 +52,7 @@
|
||||
'views/yuthon_customer_planning_views.xml',
|
||||
'views/planning_slot_template_views.xml',
|
||||
'views/hr_attendance_month_views.xml',
|
||||
'views/wife_message_view.xml',
|
||||
'views/hr_attendance_portal_templates.xml',
|
||||
'wizard/hr_attendance_month_wizard_views.xml',
|
||||
'wizard/yuthon_delete_planning_wizard_views.xml',
|
||||
|
||||
@@ -12,8 +12,10 @@ class AppletAddress(models.Model):
|
||||
address_name = fields.Char('地址名称')
|
||||
address_name2 = fields.Text('详细地址')
|
||||
employee_ids = fields.Many2many('hr.employee', string="员工")
|
||||
company_id = fields.Many2one('res.company', string="公司")
|
||||
longitude = fields.Float(string="经度", digits=(16, 10))
|
||||
latitude = fields.Float(string="纬度", digits=(16, 10))
|
||||
wife_name_ids = fields.Many2many('wife.message', string="wife名称")
|
||||
card_rice = fields.Integer(string="打卡范围(米)")
|
||||
|
||||
def update_employee(self):
|
||||
|
||||
@@ -25,6 +25,7 @@ from . import yuthon_customer_planning
|
||||
from . import hr_attendance_wechat
|
||||
from . import hr_attendance_detail_wechat
|
||||
from . import hr_attendance_month
|
||||
from . import wife_message
|
||||
|
||||
|
||||
# from odoo.tools import SQL
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import api, fields, models, tools, _
|
||||
from datetime import datetime, time, timedelta
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
class WifeMessage(models.Model):
|
||||
_name = 'wife.message'
|
||||
_description = 'wife名称管理'
|
||||
|
||||
ip = fields.Char(string='IP')
|
||||
name = fields.Char(string='名称')
|
||||
company_id = fields.Many2one("res.company", string="公司", default=lambda self: self.env.company)
|
||||
@@ -59,3 +59,4 @@ access_yuthon_integrated_wizard,yuthon.integrated.wizard,model_yuthon_integrated
|
||||
access_applet_address,applet.address,model_applet_address,base.group_user,1,1,1,1
|
||||
access_applet_security,applet.security,model_applet_security,base.group_user,1,1,1,1
|
||||
access_applet_security_setting,applet.security.setting,model_applet_security_setting,base.group_user,1,1,1,1
|
||||
access_wife_message,wife.message,model_wife_message,base.group_user,1,1,1,1
|
||||
|
||||
|
@@ -24,6 +24,11 @@
|
||||
<field name="model_id" ref="model_hr_attendance_detail"/>
|
||||
<field name="domain_force">[('company_id', 'in', company_ids)]</field>
|
||||
</record>
|
||||
<record model="ir.rule" id="applet_address_rule">
|
||||
<field name="name">小程序地址管理公司过滤</field>
|
||||
<field name="model_id" ref="model_applet_address"/>
|
||||
<field name="domain_force">[('company_id', 'in', company_ids)]</field>
|
||||
</record>
|
||||
<record model="ir.rule" id="hr_attendance_rule">
|
||||
<field name="name">考勤记录多公司</field>
|
||||
<field name="model_id" ref="model_hr_attendance"/>
|
||||
|
||||
@@ -8,9 +8,11 @@
|
||||
<field name="address_name"/>
|
||||
<field name="address_name2"/>
|
||||
<field name="employee_ids" widget="many2many_tags" column_invisible="1"/>
|
||||
<field name="wife_name_ids" widget="many2many_tags" domain="[('company_id', '=', company_id)]"/>
|
||||
<field name="longitude"/>
|
||||
<field name="latitude"/>
|
||||
<field name="card_rice"/>
|
||||
<field name="company_id" optional="hide"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="view_wife_message_tree" model="ir.ui.view">
|
||||
<field name="name">wife.message.tree</field>
|
||||
<field name="model">wife.message</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Wife管理" editable="bottom">
|
||||
<field name="ip"/>
|
||||
<field name="name"/>
|
||||
<field name="company_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_wife_message_action" model="ir.actions.act_window">
|
||||
<field name="name">Wife名称管理</field>
|
||||
<field name="res_model">wife.message</field>
|
||||
<field name="view_mode">tree</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -169,6 +169,11 @@
|
||||
parent="hr_attendance_root_board_menu"
|
||||
sequence="15"
|
||||
action="yuthon_hr_attendance.hr_attendance_detail_action"/>
|
||||
<menuitem id="menu_hr_attendance_wife_view_attendances"
|
||||
name="wife名称管理"
|
||||
parent="hr_attendance_root_board_menu"
|
||||
sequence="15"
|
||||
action="yuthon_hr_attendance.view_wife_message_action"/>
|
||||
<menuitem id="menu_applet_address_board"
|
||||
name="小程序地址管理"
|
||||
parent="hr_attendance_root_board_menu"
|
||||
|
||||
Reference in New Issue
Block a user