添加功能
This commit is contained in:
@@ -17,8 +17,7 @@ class PropertyDeviceRelief(models.Model):
|
||||
company_id = fields.Many2one(related='users_id.employee_id.company_id', string="公司")
|
||||
software_processing_id = fields.Many2one('software.issues.processing', string="设备类型")
|
||||
problem_description = fields.Text(string="问题描述")
|
||||
start_date = fields.Date(string="开始日期")
|
||||
remake = fields.Text(string="备注")
|
||||
remake = fields.Text(string="问题描述")
|
||||
report_state = fields.Selection([('to', '待处理'), ('done', '已处理')], string='状态', default='to')
|
||||
create_time = fields.Date(string="创建日期", default=fields.Datetime.now)
|
||||
urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度',
|
||||
@@ -26,6 +25,7 @@ class PropertyDeviceRelief(models.Model):
|
||||
documents_ids = fields.Many2many('ir.attachment', string="附件")
|
||||
active = fields.Boolean('Active', default=True, tracking=True)
|
||||
work_end = fields.Boolean(string="结束")
|
||||
processing_order_id = fields.Many2one('processing.order.approval', string="处理单流程")
|
||||
self_users_ids = fields.Many2many('res.users', string="当前经办人",
|
||||
default=lambda self: [(6, 0, [self.env.user.id])])
|
||||
def _get_default_name_title(self):
|
||||
@@ -41,16 +41,28 @@ class PropertyDeviceRelief(models.Model):
|
||||
|
||||
|
||||
def pull_order(self):
|
||||
soong_workflow_line_list = []
|
||||
self.report_state = 'done'
|
||||
order_id = self.env['processing.order.approval'].create({
|
||||
'device_id': self.id,
|
||||
})
|
||||
workflow_record_id = self.env['soong.workflow.record'].search([
|
||||
('code', '=', self.code),
|
||||
])
|
||||
soong_workflow_line_list.append((0, 0, {
|
||||
'model': 'processing.order.approval',
|
||||
'res_id': order_id.id,
|
||||
'workflow_record_id': workflow_record_id.id
|
||||
}))
|
||||
order_id.soong_record_ids = soong_workflow_line_list
|
||||
self.processing_order_id = order_id.id
|
||||
return {
|
||||
'name': '报事报修',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'processing.order.approval',
|
||||
'type': 'ir.actions.act_window',
|
||||
'context': {'default_device_id': self.id},
|
||||
'res_id': order_id.id,
|
||||
}
|
||||
|
||||
|
||||
class PropertyDeviceLine(models.Model):
|
||||
_name = 'property.device.line'
|
||||
_description = '设备信息'
|
||||
|
||||
@@ -32,6 +32,7 @@ class PropertyRentRelief(models.Model):
|
||||
self_users_ids = fields.Many2many('res.users', string="当前经办人",
|
||||
default=lambda self: [(6, 0, [self.env.user.id])])
|
||||
create_time = fields.Date(string="创建日期", default=fields.Datetime.now)
|
||||
processing_order_id = fields.Many2one('processing.order.approval', string="处理单流程")
|
||||
def _get_default_name_title(self):
|
||||
return self._description if self._description else self._name
|
||||
|
||||
@@ -65,14 +66,27 @@ class PropertyRentRelief(models.Model):
|
||||
|
||||
def pull_order(self):
|
||||
self.report_state = 'done'
|
||||
soong_workflow_line_list = []
|
||||
order_id = self.env['processing.order.approval'].create({
|
||||
'repair_id': self.id,
|
||||
})
|
||||
workflow_record_id = self.env['soong.workflow.record'].search([
|
||||
('code', '=', self.code),
|
||||
])
|
||||
soong_workflow_line_list.append((0, 0, {
|
||||
'model': 'processing.order.approval',
|
||||
'res_id': order_id.id,
|
||||
'workflow_record_id': workflow_record_id.id
|
||||
}))
|
||||
self.processing_order_id = order_id.id
|
||||
return {
|
||||
'name': '报事报修',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'processing.order.approval',
|
||||
'type': 'ir.actions.act_window',
|
||||
'context': {'default_repair_id': self.id},
|
||||
'res_id': order_id.id,
|
||||
}
|
||||
|
||||
|
||||
class PropertyDeviceLine(models.Model):
|
||||
_name = 'property.device.line'
|
||||
_description = '设备信息'
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
invisible="urgency_level != 'emergency'"/>
|
||||
<group col="3">
|
||||
<group>
|
||||
<field name="code" string="保修编号" readonly="1"/>
|
||||
<field name="code" string="处理编号" readonly="1"/>
|
||||
<field name="work_end" invisible="1"/>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
@@ -48,13 +48,14 @@
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="self_users_ids" invisible="1"/>
|
||||
<field name="processing_order_id" invisible="not processing_order_id"/>
|
||||
<field name="remake"/>
|
||||
<field name="documents_ids" widget="preview_many2many"/>
|
||||
</group>
|
||||
<group string="维修详情">
|
||||
<field name="start_date"/>
|
||||
<field name="problem_description"/>
|
||||
</group>
|
||||
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="self_users_ids" invisible="1"/>
|
||||
<field name="processing_order_id" invisible="not processing_order_id"/>
|
||||
<field name="remake"/>
|
||||
<field name="documents_ids" widget="preview_many2many"/>
|
||||
</group>
|
||||
|
||||
@@ -28,7 +28,6 @@ class PropertyAccountsReceivable(models.Model):
|
||||
red_date = fields.Date(string='红冲日期')
|
||||
is_suspend = fields.Boolean(string='是否挂起')
|
||||
create_time = fields.Datetime(string='创建时间', default=fields.Datetime.now)
|
||||
is_billing = fields.Boolean(string='开票')
|
||||
is_reconciliation = fields.Boolean(string='对账')
|
||||
difference_amount = fields.Float(string='差额')
|
||||
delivered1 = fields.Float(string='已交')
|
||||
@@ -56,7 +55,7 @@ class PropertyAccountsReceivable(models.Model):
|
||||
@api.onchange('is_invalid')
|
||||
def _onchange_is_invalid(self):
|
||||
if self.is_invalid:
|
||||
self.void_date = fields.Date.today()
|
||||
self.void_date = fields.Date.today()- timedelta(hours=8),
|
||||
else:
|
||||
self.void_date = False
|
||||
|
||||
@@ -64,7 +63,7 @@ class PropertyAccountsReceivable(models.Model):
|
||||
def _onchange_discount_amount(self):
|
||||
for record in self:
|
||||
if record.discount_amount:
|
||||
record.discount_date = fields.Date.today()
|
||||
record.discount_date = fields.Date.today() - timedelta(hours=8),
|
||||
else:
|
||||
record.discount_date = False
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
<field name="remark"/>
|
||||
<field name="is_has"/>
|
||||
<field name="last_update_time" optional="hide" readonly="0"/>
|
||||
<field name="is_billing" column_invisible="1"/>
|
||||
<field name="is_invalid" column_invisible="1"/>
|
||||
<field name="void_date" column_invisible="1"/>
|
||||
<field name="is_red" column_invisible="1"/>
|
||||
|
||||
@@ -13,4 +13,9 @@ class PropertyPaymentNotice(models.Model):
|
||||
print_date = fields.Date(string='打印日期')
|
||||
document_id = fields.Many2one('ir.attachment', string="附件")
|
||||
is_print = fields.Boolean(string='是否打印')
|
||||
is_voicing = fields.Boolean(string='是否开票')
|
||||
invoice_date = fields.Date(string='开票日期')
|
||||
invoicing_type = fields.Selection([('spot', '专票'), ('cape', '普票')], string="开票类型")
|
||||
invoicing_id = fields.Many2one('ir.attachment', string="开票附件")
|
||||
|
||||
|
||||
|
||||
@@ -885,9 +885,13 @@
|
||||
<tree editable="bottom">
|
||||
<field name="contract_id" column_invisible="1"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="is_print"/>
|
||||
<field name="print_date"/>
|
||||
<field name="document_id" widget="preview_many2one"/>
|
||||
<field name="is_print"/>
|
||||
<field name="is_voicing"/>
|
||||
<field name="invoicing_type"/>
|
||||
<field name="invoice_date"/>
|
||||
<field name="invoicing_id" widget="preview_many2one"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
|
||||
@@ -7,9 +7,13 @@
|
||||
<tree string="缴费通知单" editable="bottom">
|
||||
<field name="contract_id"/>
|
||||
<field name="lessee_id"/>
|
||||
<field name="is_print"/>
|
||||
<field name="print_date"/>
|
||||
<field name="document_id" widget="preview_many2one"/>
|
||||
<field name="is_print"/>
|
||||
<field name="is_voicing"/>
|
||||
<field name="invoicing_type"/>
|
||||
<field name="invoice_date"/>
|
||||
<field name="invoicing_id" widget="preview_many2one"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user