Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/产品验证
# Conflicts: # sf_manufacturing/models/stock.py # sf_wxwork_approval/models/model.py
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import logging
|
||||
from odoo import fields, models
|
||||
|
||||
@@ -32,9 +31,3 @@ class WxWorkApproval(models.Model):
|
||||
# ], string='请假类型')
|
||||
# leave_days = fields.Float(string='Leave Days')
|
||||
# overtime_hours = fields.Float(string='Overtime Hours')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -80,7 +80,8 @@ class WxSettings(models.Model):
|
||||
# 'control_type': child_data.get('property', {}).get('control', None),
|
||||
# 'unique_control_id': child_data.get('property', {}).get('id', None),
|
||||
# 'title': child_data.get('property', {}).get('title', [{}])[0].get('text', None),
|
||||
# 'placeholder': child_data.get('property', {}).get('placeholder', [{}])[0].get('text', None),
|
||||
# 'placeholder': child_data.get('property', {}).get('placeholder', [{}])[0].
|
||||
# get('text', None),
|
||||
# 'require': child_data.get('property', {}).get('require', None),
|
||||
# 'un_print': child_data.get('property', {}).get('un_print', None),
|
||||
# 'un_replace': child_data.get('property', {}).get('un_replace', None),
|
||||
@@ -99,7 +100,8 @@ class WxSettings(models.Model):
|
||||
# 例如:
|
||||
config_id_data = {
|
||||
'date_type': [(0, 0, {'date_type': child_data.get('config', {}).get('date', {}).get('type',
|
||||
None)})] if 'date' in child_data.get(
|
||||
None)})]
|
||||
if 'date' in child_data.get(
|
||||
'config', {}) else [],
|
||||
'selector_type': [(0, 0, {
|
||||
'selector_type': 'single',
|
||||
@@ -108,26 +110,14 @@ class WxSettings(models.Model):
|
||||
'contact_type': [
|
||||
(0, 0, {'contact_type': config_data.get('contact', {}).get('type', None),
|
||||
'contact_mode': config_data.get('contact', {}).get('mode',
|
||||
None)})] if 'contact' in child_data.get(
|
||||
None)})] if 'contact' in
|
||||
child_data.get(
|
||||
'config', {}).get('contact', {}) else [],
|
||||
'file_type': [
|
||||
(0, 0, {'is_only_photo': config_data.get('file', {}).get('is_only_photo',
|
||||
None)})] if 'file' in child_data.get(
|
||||
None)})] if 'file' in
|
||||
child_data.get(
|
||||
'config', {}).get('file', {}) else [],
|
||||
# 'table_type': [(0, 0, {
|
||||
# 'table_children': [
|
||||
# (0, 0, {'control_type': config_data.get('table', {}).get('children', None)[0].get('property', {}).get('control', None),
|
||||
# 'unique_control_id': config_data.get('table', {}).get('children', None)[0].get('property', {}).get('id', None),
|
||||
# 'title': config_data.get('table', {}).get('children', None)[0].get('property', {}).get('title', None)[0].get('text', None),
|
||||
# 'placeholder': config_data.get('table', {}).get('children', None)[0].get('property', {}).get('placeholder', None)[0].get('text', None),
|
||||
# 'require': config_data.get('table', {}).get('children', None)[0].get('property', {}).get('require', None),
|
||||
# 'un_print': config_data.get('table', {}).get('children', None)[0].get('property', {}).get('un_print', None),
|
||||
# 'un_replace': config_data.get('table', {}).get('children', None)[0].get('property', {}).get('un_replace', None),
|
||||
# 'display': config_data.get('table', {}).get('children', None)[0].get('property', {}).get('display', None),
|
||||
# })],
|
||||
# })] if 'table' in config_data else [],
|
||||
# 'attendance_type': [(0, 0, {'attendance_type': '1',
|
||||
# 'attendance_date_range_type': 'hour'})] if 'attendance' in config_data else [],
|
||||
}
|
||||
|
||||
# 将config_id_data添加到property_data中(如果有的话)
|
||||
@@ -152,16 +142,9 @@ class WxSettings(models.Model):
|
||||
'display': property_data.get('display', None),
|
||||
})],
|
||||
'config_id': [(0, 0, {
|
||||
'date_type': [(0, 0, {'date_type': config_data.get('date', {}).get('type',
|
||||
None)})] if 'date' in config_data else [],
|
||||
# 'selector_type': [(0, 0, {
|
||||
# 'selector_type': config_data['table']['children'][0].get('config', {}).get(
|
||||
# 'selector', {}).get('type', None),
|
||||
# 'options': [
|
||||
# (0, 0, {'key': option['key'], 'text': option['value'][0]['text']})
|
||||
# for option in config_data['table']['children'][0].get('config', {}).get('selector', {}).get('options', [])
|
||||
# ],
|
||||
# })] if 'selector' in config_data else [],
|
||||
'date_type': [(0, 0, {'date_type':
|
||||
config_data.get('date', {}).get(
|
||||
'type', None)})] if 'date' in config_data else [],
|
||||
'selector_type': [
|
||||
(0, 0, {
|
||||
'selector_type': child.get('config', {}).get('selector', {}).get('type', None),
|
||||
@@ -177,10 +160,12 @@ class WxSettings(models.Model):
|
||||
'contact_type': [
|
||||
(0, 0, {'contact_type': config_data.get('contact', {}).get('type', None),
|
||||
'contact_mode': config_data.get('contact', {}).get('mode',
|
||||
None)})] if 'contact' in config_data else [],
|
||||
None)})]
|
||||
if 'contact' in config_data else [],
|
||||
'file_type': [
|
||||
(0, 0, {'is_only_photo': config_data.get('file', {}).get('is_only_photo',
|
||||
None)})] if 'file' in config_data else [],
|
||||
None)})]
|
||||
if 'file' in config_data else [],
|
||||
'table_type': [(0, 0, {
|
||||
'table_children': table_children_records,
|
||||
})] if 'table' in config_data else [],
|
||||
@@ -200,7 +185,8 @@ class WxSettings(models.Model):
|
||||
# # 'title': '文本框2'})]
|
||||
|
||||
'attendance_type': [(0, 0, {'attendance_type': '1',
|
||||
'attendance_date_range_type': 'hour'})] if 'attendance' in config_data else [],
|
||||
'attendance_date_range_type': 'hour'})]
|
||||
if 'attendance' in config_data else [],
|
||||
})],
|
||||
}),
|
||||
# 在这里添加更多的控件数据
|
||||
|
||||
Reference in New Issue
Block a user