diff --git a/yuthon_property_approval/models/property_bills_payable.py b/yuthon_property_approval/models/property_bills_payable.py index b88921b11..ff980d856 100644 --- a/yuthon_property_approval/models/property_bills_payable.py +++ b/yuthon_property_approval/models/property_bills_payable.py @@ -70,9 +70,10 @@ class PropertyBillsPayable(models.Model): record.amount_upper = rmb_upper(record.actual_amount) remarks = fields.Text(string='正文') document_ids = fields.Many2many('ir.attachment', string="附件") + attachment_count = fields.Char(string='附件张数') active = fields.Boolean('Active', default=True, tracking=True) work_end = fields.Boolean(string="结束") - business_type = fields.Char(string='业务类型') + business_type_id = fields.Many2one('property.business.type', string='业务类型') payment_account = fields.Selection([ ('basic', '基本户'), ('loan', '贷款户'), @@ -84,13 +85,7 @@ class PropertyBillsPayable(models.Model): payee_id = fields.Many2one('property.tenant.information', string='收款单位/收款人') payee_bank = fields.Char(string='开户行') payee_account = fields.Char(string='银行账号') - payment_type = fields.Selection([ - ('deposit_refund', '退押'), - ('lease_refund', '退租'), - ('engineering', '工程款'), - ('agency_fee', '中介费'), - ('other', '其他') - ], string='付款类型') + payment_type_id = fields.Many2one('property.payment.type', string='付款类型') def _get_default_name_title(self): return self._description if self._description else self._name @@ -131,4 +126,22 @@ class PropertyBillsPayable(models.Model): class PropertyBillsLine(models.Model): _name = 'property.bills.line' - _description = '账单明细' \ No newline at end of file + _description = '账单明细' + + +class PropertyBusinessType(models.Model): + _name = 'property.business.type' + _description = '业务类型' + + name = fields.Char(string='业务类型名称', required=True) + code = fields.Char(string='编码') + active = fields.Boolean('Active', default=True) + + +class PropertyPaymentType(models.Model): + _name = 'property.payment.type' + _description = '付款类型' + + name = fields.Char(string='付款类型名称', required=True) + code = fields.Char(string='编码') + active = fields.Boolean('Active', default=True) \ No newline at end of file diff --git a/yuthon_property_approval/security/ir.model.access.csv b/yuthon_property_approval/security/ir.model.access.csv index b085ab4aa..278bc8e7c 100644 --- a/yuthon_property_approval/security/ir.model.access.csv +++ b/yuthon_property_approval/security/ir.model.access.csv @@ -140,4 +140,6 @@ access_property_fee_form,property_fee_form,model_property_fee_form,base.group_us access_property_fee_form_line,property_fee_form_line,model_property_fee_form_line,base.group_user,1,1,1,1 access_refund_wizard,refund_wizard,model_refund_wizard,base.group_user,1,1,1,1 -access_refund_wizard_line,refund_wizard_line,model_refund_wizard_line,base.group_user,1,1,1,1 \ No newline at end of file +access_refund_wizard_line,refund_wizard_line,model_refund_wizard_line,base.group_user,1,1,1,1 +access_property_business_type,property_business_type,model_property_business_type,base.group_user,1,1,1,1 +access_property_payment_type,property_payment_type,model_property_payment_type,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/yuthon_property_approval/views/property_bills_payable_views.xml b/yuthon_property_approval/views/property_bills_payable_views.xml index 251dbff0b..e80f330b1 100644 --- a/yuthon_property_approval/views/property_bills_payable_views.xml +++ b/yuthon_property_approval/views/property_bills_payable_views.xml @@ -23,59 +23,87 @@ invisible="urgency_level != 'urgent'"/> - + + - + - - - -
-

- -

-
- - - + + + + + + - - - - - + + + - + + + - - + - + + + + - + + + + + + + + + - + + +
+ + + + + + + + + + + + + +
+ + - - - - - - + + + + + + + + + +