38 lines
1.8 KiB
Python
38 lines
1.8 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import models, fields, api, exceptions, _
|
|
|
|
class PropertyRentRelief(models.Model):
|
|
_name = 'property.report.repair'
|
|
_description = '报事报修审批'
|
|
_inherit = ['mail.thread.main.attachment', 'mail.activity.mixin', 'soong.workflow.mixin']
|
|
_rec_name = 'name'
|
|
|
|
name = fields.Char(string='标题')
|
|
code = fields.Char(string="编号",
|
|
default=lambda self: self.env['ir.sequence'].next_by_code('property_report_repair_code'))
|
|
property_documents_ids = fields.Many2many('documents.document', string="图片")
|
|
repairer = fields.Char(string="报修人")
|
|
repairer_address = fields.Char(string="报修人地址")
|
|
fault = fields.Char(string="故障")
|
|
dispatch = fields.Char(string="派单")
|
|
situation = fields.Char(string="现场说明情况")
|
|
is_fee = fields.Boolean(string="是否产生费用")
|
|
labor_costs = fields.Float(string="人工费")
|
|
confirmation_repairer = fields.Char(string="报修人确认")
|
|
warehouse_management = fields.Char(string="库管")
|
|
property_repair_relief_ids = fields.One2many('property.repair.relief.line', 'property_repair_relief_id', string="物料清单")
|
|
total = fields.Float(string="总价")
|
|
class PropertyRepairReliefLine(models.Model):
|
|
_name = 'property.repair.relief.line'
|
|
_description = '物料清单明细'
|
|
|
|
property_repair_relief_id = fields.Many2one('property.report.repair', string="关联报事报修审批")
|
|
name = fields.Char(string="名称")
|
|
specs = fields.Char(string="规格")
|
|
unit_price = fields.Float(string="单价")
|
|
quantity = fields.Float(string="数量")
|
|
amount = fields.Float(string="小计")
|
|
total = fields.Float(string="总价")
|