Files
gzth/yuthon_property/models/property_accounting_unit.py
T
2025-01-20 19:32:51 +08:00

23 lines
920 B
Python

from odoo import models, fields, api
class PropertyAccountingUnit(models.Model):
_name = 'property.accounting.unit'
_description = '核算单位'
name = fields.Char(string='单位名称', required=True)
aptitude = fields.Char(string='资质')
legal = fields.Char(string='法人')
valid_date = fields.Date(string='有效日期')
documents_ids = fields.Many2many('ir.attachment', string="附件")
method_ids = fields.One2many('property.billing.method.line', 'accounting_id', string="关联结算方式")
class BillingMethodLine(models.Model):
_name = 'property.billing.method.line'
_description = '合同结算方式'
name = fields.Char(string='名称', required=True)
amount_range = fields.Char(string='金额范围')
consultation_fees = fields.Float(string='咨询费')
accounting_id = fields.Many2one('property.accounting.unit', string='关联核算单位')