接口
This commit is contained in:
@@ -88,11 +88,11 @@
|
||||
<field name="related_issues_id" invisible="is_issues == False"/>
|
||||
<field name="reason_application"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<!-- <field name="department_ids" widget="many2many_tags" invisible="1"/>-->
|
||||
<field name="department_ids" widget="many2many_tags" invisible="1"/>
|
||||
<field name="employee_ids" widget="many2many_tags" options="{'no_create': True}" domain="[('department_id', 'in', department_ids)] if department_ids else [('company_id', '=', company_id)]"/>
|
||||
<field name="is_issues" invisible="is_issues == False"/>
|
||||
<field name="meal"/>
|
||||
<!-- <field name="documents_ids" widget="preview_many2many"/>-->
|
||||
<field name="documents_ids" widget="preview_many2many"/>
|
||||
<field name="details"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
</group>
|
||||
|
||||
@@ -16,7 +16,7 @@ class IssueLibrary(models.Model):
|
||||
topic_content = fields.Text(string='事项背景')
|
||||
will_based = fields.Text(string='上会依据')
|
||||
deliberation_content = fields.Text(string='请示事项', default='建议同意')
|
||||
handling_situation = fields.Text(string='办理情况')
|
||||
handling_situation = fields.Text(string='办理情况', help="(存在问题)")
|
||||
is_invisible_workflow = fields.Boolean(string="流程隐藏的判断")
|
||||
code = fields.Char(string='编号', required=True, copy=False,
|
||||
default=lambda self: self.env['ir.sequence'].next_by_code('issue_library_code'))
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
<group>
|
||||
<field name="name" required="1" force_save="1" invisible="is_invisible_workflow" readonly="issue_state not in ['draft', 'cancel']"/>
|
||||
<field name="topic_content" invisible="is_invisible_workflow" readonly="issue_state not in ['draft', 'cancel']"/>
|
||||
<field name="handling_situation" string="办理情况(存在问题)" readonly="issue_state not in ['draft', 'cancel']"/>
|
||||
<field name="handling_situation" string="办理情况" placeholder="(存在问题)" readonly="issue_state not in ['draft', 'cancel']"/>
|
||||
<field name="deliberation_content" readonly="issue_state not in ['draft', 'cancel']"/>
|
||||
<field name="will_based" readonly="issue_state not in ['draft', 'cancel']"/>
|
||||
</group>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<field name="host"/>
|
||||
<field name="room_users_ids" widget="many2many_tags"/>
|
||||
<field name="meeting_date"/>
|
||||
<field name="meeting_type_id"/>
|
||||
<field name="number_of_meetings"/>
|
||||
<field name="meeting_resolution"/>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
@@ -8,9 +8,26 @@ from urllib.parse import quote
|
||||
class YuthonWillTask(http.Controller):
|
||||
|
||||
@http.route('/party/list', methods=['POST'], type='http', auth='public', csrf=False)
|
||||
def party_list(self, kwargs):
|
||||
# yuthon.salary.party
|
||||
pass
|
||||
def party_list(self, **kwargs):
|
||||
party_ids = request.env['yuthon.salary.party'].sudo().search([('employee_id.id', '=', kwargs.get('employee_id'))])
|
||||
data_list = []
|
||||
for party in party_ids:
|
||||
result = {
|
||||
'id': party.id,
|
||||
'select_year': party.select_year,
|
||||
'select_time': party.select_time,
|
||||
'fee': party.fee,
|
||||
'payment': party.payment,
|
||||
'total_payment': party.total_payment,
|
||||
'toll_state': party.toll_state,
|
||||
}
|
||||
data_list.append(result)
|
||||
return json.dumps({'data': data_list, 'code': 200, 'message': 'success'})
|
||||
|
||||
@http.route('/party/list/confirm', methods=['POST'], type='http', auth='public', csrf=False)
|
||||
def meal_list_confirm(self, **kwargs):
|
||||
meal_id = request.env['yuthon.salary.party'].sudo().search([('id', '=', kwargs.get('id'))])
|
||||
meal_id.write({'toll_state': 'done'})
|
||||
|
||||
@http.route('/meal/list', methods=['POST'], type='http', auth='public', csrf=False)
|
||||
def meal_list(self, **kwargs):
|
||||
@@ -18,13 +35,13 @@ class YuthonWillTask(http.Controller):
|
||||
data_list = []
|
||||
for meal in meal_ids:
|
||||
result = {
|
||||
'year': meal.year,
|
||||
'id': meal.id,
|
||||
'field': '',
|
||||
'field2': '',
|
||||
'field3': '',
|
||||
'field4': '',
|
||||
'field5': '',
|
||||
'select_year': meal.select_year,
|
||||
'select_time': meal.select_time,
|
||||
'number_breakfasts': meal.number_breakfasts,
|
||||
'number_lunches': meal.number_lunches,
|
||||
'total_payments': meal.total_payments,
|
||||
'toll_state': meal.toll_state,
|
||||
}
|
||||
data_list.append(result)
|
||||
return json.dumps({'data': data_list, 'code': 200, 'message': 'success'})
|
||||
|
||||
@@ -4,7 +4,7 @@ from datetime import datetime
|
||||
|
||||
class YuthonSalaryParty(models.Model):
|
||||
_name = 'yuthon.salary.party'
|
||||
_description = '党建'
|
||||
_description = '党费'
|
||||
|
||||
employee_id = fields.Many2one('hr.employee', string='姓名')
|
||||
card = fields.Char(string='身份证')
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<field name="name">yuthon.salary.party.tree</field>
|
||||
<field name="model">yuthon.salary.party</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="党建" editable="bottom" js_class="custom_party_button">
|
||||
<tree string="党费" editable="bottom" js_class="custom_party_button">
|
||||
<field name="select_time"/>
|
||||
<field name="select_year"/>
|
||||
<field name="employee_id"/>
|
||||
@@ -22,10 +22,10 @@
|
||||
<field name="name">yuthon.my.salary.party.tree</field>
|
||||
<field name="model">yuthon.salary.party</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="党建" editable="bottom">
|
||||
<tree string="党费" editable="bottom">
|
||||
<field name="select_time"/>
|
||||
<field name="select_year"/>
|
||||
<field name="employee_id" column_invisible="1"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="fee"/>
|
||||
<field name="payment"/>
|
||||
<field name="total_payment"/>
|
||||
@@ -36,14 +36,14 @@
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_yuthon_salary_party_action" model="ir.actions.act_window">
|
||||
<field name="name">党建</field>
|
||||
<field name="name">党费</field>
|
||||
<field name="res_model">yuthon.salary.party</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_salary.view_yuthon_salary_party_tree')})]"/>
|
||||
</record>
|
||||
<record id="view_my_yuthon_salary_party_action" model="ir.actions.act_window">
|
||||
<field name="name">党建</field>
|
||||
<field name="name">党费</field>
|
||||
<field name="res_model">yuthon.salary.party</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="domain">[('employee_id.user_id', '=', uid)]</field>
|
||||
|
||||
Reference in New Issue
Block a user