添加功能
This commit is contained in:
@@ -11,9 +11,6 @@
|
||||
'data/sale_renting_code_data.xml',
|
||||
'data/property_contract_time.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'views/inherit_rent_list_views.xml',
|
||||
'views/inherit_property_management_list.xml',
|
||||
'views/inherit_property_deposit_list.xml',
|
||||
'views/property_billing_confirmation.xml',
|
||||
'views/property_approval_views.xml',
|
||||
'views/property_business_confirm.xml',
|
||||
|
||||
@@ -37,3 +37,4 @@ from . import property_merge_approval
|
||||
from . import property_split_approval
|
||||
from . import property_intention_approval
|
||||
from . import property_transfer_approval
|
||||
from . import inherit_yuthon_property
|
||||
|
||||
@@ -0,0 +1,449 @@
|
||||
from datetime import datetime, timedelta, date
|
||||
from odoo.tools.float_utils import float_round
|
||||
from numpy.ma.core import default_filler
|
||||
|
||||
from odoo import models, fields, api, exceptions, _
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
|
||||
class YuthonProperty(models.Model):
|
||||
_inherit = 'yuthon.property'
|
||||
|
||||
property_contract_ids = fields.One2many('property.contract.line', 'yuthon_property_id', string="关联物业合同明细行")
|
||||
|
||||
# 银行流水
|
||||
class PropertyBankStatements(models.Model):
|
||||
_inherit = 'property.bank.statements'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
|
||||
class PropertyBankLine(models.Model):
|
||||
_inherit = 'property.bank.line'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
# 应收账单
|
||||
class PropertyAccountsReceivable(models.Model):
|
||||
_inherit = 'property.accounts.receivable'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
def receivable_return(self):
|
||||
model_type_data = {
|
||||
'水费': 'property.water.list',
|
||||
'电费': 'property.tariff.list',
|
||||
'押金': 'property.deposit.list',
|
||||
'租金': 'property.rent.list'
|
||||
}
|
||||
for rec in self:
|
||||
model_type = model_type_data.get(rec.management_type_id.name)
|
||||
if model_type:
|
||||
model_id = self.env[model_type].search([('contract_id', '=', rec.contract_id.id)])
|
||||
if model_id:
|
||||
model_id.write({'is_push': False})
|
||||
#删除原记录
|
||||
rec.unlink()
|
||||
|
||||
def batch_receivable_return(self):
|
||||
model_type_data = {
|
||||
'水费': 'property.water.list',
|
||||
'电费': 'property.tariff.list',
|
||||
'押金': 'property.deposit.list',
|
||||
'租金': 'property.rent.list'
|
||||
}
|
||||
archives_ids = self.env["property.accounts.receivable"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
for rec in archives_ids:
|
||||
model_type = model_type_data.get(rec.management_type_id.name)
|
||||
if model_type:
|
||||
model_id = self.env[model_type].search([('contract_id', '=', rec.contract_id.id)])
|
||||
if model_id:
|
||||
model_id.write({'is_push': False})
|
||||
rec.unlink()
|
||||
|
||||
# 租金
|
||||
class PropertyRentList(models.Model):
|
||||
_inherit = 'property.rent.list'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
def push_rent(self):
|
||||
for rec in self:
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '租金')], limit=1)
|
||||
if not management_type_id:
|
||||
management_type_id = self.env['yuthon.management.type'].create({'name': '租金'})
|
||||
self.env['property.accounts.receivable'].create({
|
||||
'contract_id': rec.contract_id.id,
|
||||
'property_id': rec.property_id.id,
|
||||
'lessee_id':rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'original_amount' : rec.original_amount,
|
||||
'due_date': rec.due_date,
|
||||
'create_time': datetime.now(),
|
||||
'management_type_id':management_type_id.id,
|
||||
})
|
||||
rec.is_push = True
|
||||
|
||||
def batch_push_rent(self):
|
||||
archives_ids = self.env["property.rent.list"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '租金')], limit=1)
|
||||
for rec in archives_ids:
|
||||
self.env['property.accounts.receivable'].create({
|
||||
'contract_id': rec.contract_id.id,
|
||||
'property_id': rec.property_id.id,
|
||||
'lessee_id': rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'original_amount': rec.original_amount,
|
||||
'due_date': rec.due_date,
|
||||
'create_time': datetime.now(),
|
||||
'management_type_id': management_type_id.id,
|
||||
})
|
||||
rec.is_push = True
|
||||
|
||||
# 押金
|
||||
class PropertyDepositList(models.Model):
|
||||
_inherit = 'property.deposit.list'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
deposit = fields.Float(related='contract_id.deposit', string="押金/履约保证金", store=True)
|
||||
performance_bonds = fields.Float(related='contract_id.performance_bonds', string="经营履约保证金")
|
||||
utility_bills = fields.Float(related='contract_id.utility_bills', string="水电费押金")
|
||||
renovation_deposit = fields.Float(related='contract_id.renovation_deposit', string="装修押金")
|
||||
aggregate = fields.Float(string="合计", store=True, compute='_compute_aggregate')
|
||||
|
||||
def push_deposit(self):
|
||||
for rec in self:
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '押金')], limit=1)
|
||||
if not management_type_id:
|
||||
management_type_id = self.env['yuthon.management.type'].create({'name': '押金'})
|
||||
self.env['property.accounts.receivable'].create({
|
||||
'contract_id': rec.contract_id.id,
|
||||
'property_id': rec.property_id.id,
|
||||
'lessee_id':rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'original_amount' : rec.aggregate,
|
||||
'create_time': datetime.now(),
|
||||
'management_type_id':management_type_id.id,
|
||||
})
|
||||
rec.is_push = True
|
||||
|
||||
def batch_push_deposit(self):
|
||||
archives_ids = self.env["property.deposit.list"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '押金')], limit=1)
|
||||
for rec in archives_ids:
|
||||
self.env['property.accounts.receivable'].create({
|
||||
'contract_id': rec.contract_id.id,
|
||||
'property_id': rec.property_id.id,
|
||||
'lessee_id': rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'original_amount': rec.aggregate,
|
||||
'create_time': datetime.now(),
|
||||
'management_type_id': management_type_id.id,
|
||||
})
|
||||
rec.is_push = True
|
||||
|
||||
@api.depends('deposit', 'performance_bonds', 'utility_bills', 'renovation_deposit')
|
||||
def _compute_aggregate(self):
|
||||
for rec in self:
|
||||
rec.aggregate = rec.deposit + rec.performance_bonds + rec.utility_bills + rec.renovation_deposit
|
||||
|
||||
# 管理费
|
||||
class PropertyManagementList(models.Model):
|
||||
_inherit = 'property.management.list'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
def push_management(self):
|
||||
for rec in self:
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '管理费')], limit=1)
|
||||
if not management_type_id:
|
||||
management_type_id = self.env['yuthon.management.type'].create({'name': '管理费'})
|
||||
self.env['property.accounts.receivable'].create({
|
||||
'contract_id': rec.contract_id.id,
|
||||
'property_id': rec.property_id.id,
|
||||
'lessee_id':rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'original_amount' : rec.original_amount,
|
||||
'due_date':rec.due_date,
|
||||
'create_time': datetime.now(),
|
||||
'management_type_id':management_type_id.id,
|
||||
})
|
||||
rec.is_push = True
|
||||
|
||||
def batch_push_management(self):
|
||||
archives_ids = self.env["property.management.list"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '电费')], limit=1)
|
||||
for rec in archives_ids:
|
||||
self.env['property.accounts.receivable'].create({
|
||||
'contract_id': rec.contract_id.id,
|
||||
'property_id': rec.property_id.id,
|
||||
'lessee_id': rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'original_amount': rec.original_amount,
|
||||
'create_time': datetime.now(),
|
||||
'management_type_id': management_type_id.id,
|
||||
})
|
||||
rec.is_push = True
|
||||
|
||||
# 电费
|
||||
class PropertyTariffList(models.Model):
|
||||
_inherit = 'property.tariff.list'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
def push_tariff(self):
|
||||
for rec in self:
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '电费')], limit=1)
|
||||
if not management_type_id:
|
||||
management_type_id = self.env['yuthon.management.type'].create({'name': '电费'})
|
||||
self.env['property.accounts.receivable'].create({
|
||||
'contract_id': rec.contract_id.id,
|
||||
'property_id': rec.property_id.id,
|
||||
'lessee_id':rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'original_amount' : rec.original_amount,
|
||||
'due_date': rec.due_date,
|
||||
'create_time': datetime.now(),
|
||||
'management_type_id':management_type_id.id,
|
||||
})
|
||||
rec.is_push = True
|
||||
|
||||
def batch_push_tariff(self):
|
||||
archives_ids = self.env["property.tariff.list"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '电费')], limit=1)
|
||||
for rec in archives_ids:
|
||||
self.env['property.accounts.receivable'].create({
|
||||
'contract_id': rec.contract_id.id,
|
||||
'property_id': rec.property_id.id,
|
||||
'lessee_id': rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'original_amount': rec.original_amount,
|
||||
'due_date': rec.due_date,
|
||||
'create_time': datetime.now(),
|
||||
'management_type_id': management_type_id.id,
|
||||
})
|
||||
rec.is_push = True
|
||||
|
||||
# 水费
|
||||
class PropertyWaterList(models.Model):
|
||||
_inherit = 'property.water.list'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
def push_water(self):
|
||||
for rec in self:
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '水费')], limit=1)
|
||||
if not management_type_id:
|
||||
management_type_id = self.env['yuthon.management.type'].create({'name': '水费'})
|
||||
self.env['property.accounts.receivable'].create({
|
||||
'contract_id': rec.contract_id.id,
|
||||
'property_id': rec.property_id.id,
|
||||
'lessee_id': rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'original_amount': rec.original_amount,
|
||||
'create_time': datetime.now(),
|
||||
'management_type_id': management_type_id.id,
|
||||
})
|
||||
rec.is_push = True
|
||||
|
||||
def batch_push_water(self):
|
||||
archives_ids = self.env["property.water.list"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '水费')], limit=1)
|
||||
for rec in archives_ids:
|
||||
self.env['property.accounts.receivable'].create({
|
||||
'contract_id': rec.contract_id.id,
|
||||
'property_id': rec.property_id.id,
|
||||
'lessee_id': rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'original_amount': rec.original_amount,
|
||||
'create_time': datetime.now(),
|
||||
'management_type_id': management_type_id.id,
|
||||
})
|
||||
rec.is_push = True
|
||||
|
||||
# 电表抄表
|
||||
class PropertyElectricReading(models.Model):
|
||||
_inherit = 'property.electric.reading'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
def button_push_electric(self):
|
||||
for rec in self:
|
||||
if rec.is_push:
|
||||
raise UserError("该抄表已经推送,不能重复推送")
|
||||
self.env["property.tariff.list"].create({
|
||||
'tariff_meter_number': rec.code,
|
||||
'property_id': rec.property_id.id if rec.property_id else None,
|
||||
'contract_id': rec.contract_id.id if rec.contract_id else None,
|
||||
'lessee_id':rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'fee_id': rec.fee_id.id if rec.fee_id else None,
|
||||
'due_date': rec.meter_date,
|
||||
'original_amount':rec.fee_id.amount * rec.dosage if rec.fee_id.amount else 0,
|
||||
'tariff_meter_reading': rec.dosage
|
||||
})
|
||||
rec.write({
|
||||
'is_push': True,
|
||||
})
|
||||
def batch_reading_electric(self):
|
||||
archives_ids = self.env["property.electric.reading"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
for record in archives_ids:
|
||||
if record.is_push:
|
||||
raise UserError(f"该{record.name}仪表已经推送,不能重复推送")
|
||||
self.env["property.water.list"].create({
|
||||
'tariff_meter_number': record.code,
|
||||
'property_id': record.property_id.id if record.property_id else None,
|
||||
'contract_id': record.contract_id.id if record.contract_id else None,
|
||||
'lessee_id': record.contract_id.lessee_id.id if record.contract_id.lessee_id else None,
|
||||
'fee_id': record.fee_id.id if record.fee_id else None,
|
||||
'due_date': record.meter_date,
|
||||
'original_amount': record.fee_id.amount * record.dosage if record.fee_id.amount else 0,
|
||||
'tariff_meter_reading': record.dosage
|
||||
})
|
||||
record.write({
|
||||
'is_push': True,
|
||||
})
|
||||
|
||||
# 水表抄表
|
||||
class PropertyWaterReading(models.Model):
|
||||
_inherit = 'property.water.reading'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
def button_push_water(self):
|
||||
for rec in self:
|
||||
if rec.is_push:
|
||||
raise UserError("该抄表已经推送,不能重复推送")
|
||||
self.env["property.water.list"].create({
|
||||
'water_meter_number': rec.code,
|
||||
'property_id': rec.property_id.id if rec.property_id else None,
|
||||
'fee_id': rec.fee_id.id if rec.fee_id else None,
|
||||
'lessee_id': rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'contract_id': rec.contract_id.id if rec.contract_id else None,
|
||||
'original_amount': rec.fee_id.amount * rec.dosage if rec.fee_id.amount else 0,
|
||||
'due_date': rec.meter_date,
|
||||
'water_meter_reading':rec.dosage
|
||||
})
|
||||
rec.write({
|
||||
'is_push': True,
|
||||
})
|
||||
def batch_reading_water(self):
|
||||
archives_ids = self.env["property.water.reading"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
for record in archives_ids:
|
||||
if record.is_push:
|
||||
raise UserError(f"该{record.name}仪表已经推送,不能重复推送")
|
||||
self.env["property.water.list"].create({
|
||||
'water_meter_number': record.code,
|
||||
'property_id': record.property_id.id if record.property_id else None,
|
||||
'contract_id': record.contract_id.id if record.contract_id else None,
|
||||
'lessee_id': record.contract_id.lessee_id.id if record.contract_id.lessee_id else None,
|
||||
'fee_id': record.fee_id.id if record.fee_id else None,
|
||||
'due_date': record.meter_date,
|
||||
'original_amount': record.fee_id.amount * record.dosage if record.fee_id.amount else 0,
|
||||
'water_meter_reading':record.dosage
|
||||
})
|
||||
record.write({
|
||||
'is_push': True,
|
||||
})
|
||||
|
||||
# 电表库
|
||||
class PropertyMeterArchives(models.Model):
|
||||
_inherit = 'property.meter.archives'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
def batch_contract_association(self):
|
||||
archives_ids = self.env["property.meter.archives"].browse(self._context.get('active_ids', self._context.get('active_id')))
|
||||
for record in archives_ids:
|
||||
if record.yuthon_property_id.id:
|
||||
contract_id = self.env["property.lease.contract.line"].search([('address_id', '=', record.yuthon_property_id.id)], limit=1)
|
||||
if contract_id:
|
||||
record.sudo().write({
|
||||
'contract_id': contract_id.lease_id.id})
|
||||
|
||||
def button_reading_push(self):
|
||||
for rec in self:
|
||||
if rec.is_push:
|
||||
raise UserError("该仪表已经推送,不能重复推送")
|
||||
self.env["property.electric.reading"].create({
|
||||
'code': rec.name,
|
||||
'property_id': rec.yuthon_property_id.id if rec.yuthon_property_id else None,
|
||||
'fee_id': rec.fee_id.id if rec.standards_id else None,
|
||||
'lessee_id': rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'ratio': rec.gauge_magnification,
|
||||
'position': rec.unit_number,
|
||||
'type': rec.type,
|
||||
'contract_id':rec.contract_id.id
|
||||
})
|
||||
rec.write({
|
||||
'is_push': True,
|
||||
})
|
||||
|
||||
def batch_reading_push(self):
|
||||
archives_ids = self.env["property.meter.archives"].browse(self._context.get('active_ids', self._context.get('active_id')))
|
||||
for record in archives_ids:
|
||||
if record.is_push:
|
||||
raise UserError(f"该{record.name}仪表已经推送,不能重复推送")
|
||||
self.env["property.electric.reading"].create({
|
||||
'code': record.name,
|
||||
'property_id': record.yuthon_property_id.id if record.yuthon_property_id else None,
|
||||
'fee_id': record.standards_id.id if record.standards_id else None,
|
||||
'lessee_id': record.contract_id.lessee_id.id if record.contract_id.lessee_id else None,
|
||||
'ratio': record.gauge_magnification,
|
||||
'position': record.unit_number,
|
||||
'type': record.type,
|
||||
'contract_id':record.contract_id.id
|
||||
})
|
||||
record.write({
|
||||
'is_push': True,
|
||||
})
|
||||
|
||||
# 水表库
|
||||
class PropertyMeterWater(models.Model):
|
||||
_inherit = 'property.meter.water'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
def button_reading_water_push(self):
|
||||
for rec in self:
|
||||
if rec.is_push:
|
||||
raise UserError(f"该仪表已经推送,不能重复推送")
|
||||
self.env["property.water.reading"].create({
|
||||
'code': rec.name ,
|
||||
'property_id': rec.yuthon_property_id.id if rec.yuthon_property_id else None,
|
||||
'ratio': rec.gauge_magnification,
|
||||
'fee_id': rec.standards_id.id if rec.standards_id else None,
|
||||
'lessee_id': rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'position': rec.unit_number ,
|
||||
'type': rec.type,
|
||||
'contract_id': rec.contract_id.id
|
||||
})
|
||||
rec.write({
|
||||
'is_push': True,
|
||||
})
|
||||
|
||||
def batch_reading_water_push(self):
|
||||
water_ids = self.env["property.meter.water"].browse(self._context.get('active_ids', self._context.get('active_id')))
|
||||
for record in water_ids:
|
||||
record.write({
|
||||
'is_push': True,
|
||||
})
|
||||
if record.is_push:
|
||||
raise UserError(f"该{record.unit_number}仪表已经推送,不能重复推送")
|
||||
self.env["property.water.reading"].create({
|
||||
'code': record.name,
|
||||
'property_id': record.yuthon_property_id.id if record.yuthon_property_id else None,
|
||||
'fee_id': record.standards_id.id if record.standards_id else None,
|
||||
'lessee_id': record.contract_id.lessee_id.id if record.contract_id.lessee_id else None,
|
||||
'ratio': record.gauge_magnification,
|
||||
'position': record.unit_number,
|
||||
'type': record.type,
|
||||
'contract_id': record.contract_id.id
|
||||
})
|
||||
|
||||
def batch_contract_association_water(self):
|
||||
archives_ids = self.env["property.meter.water"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
for record in archives_ids:
|
||||
if record.yuthon_property_id.id:
|
||||
contract_id = self.env["property.lease.contract.line"].search(
|
||||
[('address_id', '=', record.yuthon_property_id.id)], limit=1)
|
||||
if contract_id:
|
||||
record.sudo().write({
|
||||
'contract_id': contract_id.lease_id.id})
|
||||
@@ -11,440 +11,6 @@ from odoo import models, fields, api, exceptions, _
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
|
||||
|
||||
class PropertyAccountsReceivable(models.Model):
|
||||
_inherit = 'property.accounts.receivable'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
def receivable_return(self):
|
||||
model_type_data = {
|
||||
'水费': 'property.water.list',
|
||||
'电费': 'property.tariff.list',
|
||||
'押金': 'property.deposit.list',
|
||||
'租金': 'property.rent.list'
|
||||
}
|
||||
for rec in self:
|
||||
model_type = model_type_data.get(rec.management_type_id.name)
|
||||
if model_type:
|
||||
model_id = self.env[model_type].search([('contract_id', '=', rec.contract_id.id)])
|
||||
if model_id:
|
||||
model_id.write({'is_push': False})
|
||||
#删除原记录
|
||||
rec.unlink()
|
||||
|
||||
def batch_receivable_return(self):
|
||||
model_type_data = {
|
||||
'水费': 'property.water.list',
|
||||
'电费': 'property.tariff.list',
|
||||
'押金': 'property.deposit.list',
|
||||
'租金': 'property.rent.list'
|
||||
}
|
||||
archives_ids = self.env["property.accounts.receivable"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
for rec in archives_ids:
|
||||
model_type = model_type_data.get(rec.management_type_id.name)
|
||||
if model_type:
|
||||
model_id = self.env[model_type].search([('contract_id', '=', rec.contract_id.id)])
|
||||
if model_id:
|
||||
model_id.write({'is_push': False})
|
||||
rec.unlink()
|
||||
|
||||
class PropertyRentList(models.Model):
|
||||
_inherit = 'property.rent.list'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
def push_rent(self):
|
||||
for rec in self:
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '租金')], limit=1)
|
||||
if not management_type_id:
|
||||
management_type_id = self.env['yuthon.management.type'].create({'name': '租金'})
|
||||
self.env['property.accounts.receivable'].create({
|
||||
'contract_id': rec.contract_id.id,
|
||||
'property_id': rec.property_id.id,
|
||||
'lessee_id':rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'original_amount' : rec.original_amount,
|
||||
'due_date': rec.due_date,
|
||||
'create_time': datetime.now(),
|
||||
'management_type_id':management_type_id.id,
|
||||
})
|
||||
rec.is_push = True
|
||||
|
||||
def batch_push_rent(self):
|
||||
archives_ids = self.env["property.rent.list"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '租金')], limit=1)
|
||||
for rec in archives_ids:
|
||||
self.env['property.accounts.receivable'].create({
|
||||
'contract_id': rec.contract_id.id,
|
||||
'property_id': rec.property_id.id,
|
||||
'lessee_id': rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'original_amount': rec.original_amount,
|
||||
'due_date': rec.due_date,
|
||||
'create_time': datetime.now(),
|
||||
'management_type_id': management_type_id.id,
|
||||
})
|
||||
rec.is_push = True
|
||||
|
||||
class PropertyDepositList(models.Model):
|
||||
_inherit = 'property.deposit.list'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
deposit = fields.Float(related='contract_id.deposit', string="押金/履约保证金", store=True)
|
||||
performance_bonds = fields.Float(related='contract_id.performance_bonds', string="经营履约保证金")
|
||||
utility_bills = fields.Float(related='contract_id.utility_bills', string="水电费押金")
|
||||
renovation_deposit = fields.Float(related='contract_id.renovation_deposit', string="装修押金")
|
||||
aggregate = fields.Float(string="合计", store=True, compute='_compute_aggregate')
|
||||
|
||||
def push_deposit(self):
|
||||
for rec in self:
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '押金')], limit=1)
|
||||
if not management_type_id:
|
||||
management_type_id = self.env['yuthon.management.type'].create({'name': '押金'})
|
||||
self.env['property.accounts.receivable'].create({
|
||||
'contract_id': rec.contract_id.id,
|
||||
'property_id': rec.property_id.id,
|
||||
'lessee_id':rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'original_amount' : rec.aggregate,
|
||||
'create_time': datetime.now(),
|
||||
'management_type_id':management_type_id.id,
|
||||
})
|
||||
rec.is_push = True
|
||||
|
||||
def batch_push_deposit(self):
|
||||
archives_ids = self.env["property.deposit.list"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '押金')], limit=1)
|
||||
for rec in archives_ids:
|
||||
self.env['property.accounts.receivable'].create({
|
||||
'contract_id': rec.contract_id.id,
|
||||
'property_id': rec.property_id.id,
|
||||
'lessee_id': rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'original_amount': rec.aggregate,
|
||||
'create_time': datetime.now(),
|
||||
'management_type_id': management_type_id.id,
|
||||
})
|
||||
rec.is_push = True
|
||||
|
||||
@api.depends('deposit', 'performance_bonds', 'utility_bills', 'renovation_deposit')
|
||||
def _compute_aggregate(self):
|
||||
for rec in self:
|
||||
rec.aggregate = rec.deposit + rec.performance_bonds + rec.utility_bills + rec.renovation_deposit
|
||||
|
||||
class PropertyManagementList(models.Model):
|
||||
_inherit = 'property.management.list'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
def push_management(self):
|
||||
for rec in self:
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '管理费')], limit=1)
|
||||
if not management_type_id:
|
||||
management_type_id = self.env['yuthon.management.type'].create({'name': '管理费'})
|
||||
self.env['property.accounts.receivable'].create({
|
||||
'contract_id': rec.contract_id.id,
|
||||
'property_id': rec.property_id.id,
|
||||
'lessee_id':rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'original_amount' : rec.original_amount,
|
||||
'due_date':rec.due_date,
|
||||
'create_time': datetime.now(),
|
||||
'management_type_id':management_type_id.id,
|
||||
})
|
||||
rec.is_push = True
|
||||
|
||||
def batch_push_management(self):
|
||||
archives_ids = self.env["property.management.list"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '电费')], limit=1)
|
||||
for rec in archives_ids:
|
||||
self.env['property.accounts.receivable'].create({
|
||||
'contract_id': rec.contract_id.id,
|
||||
'property_id': rec.property_id.id,
|
||||
'lessee_id': rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'original_amount': rec.original_amount,
|
||||
'create_time': datetime.now(),
|
||||
'management_type_id': management_type_id.id,
|
||||
})
|
||||
rec.is_push = True
|
||||
|
||||
class YuthonProperty(models.Model):
|
||||
_inherit = 'yuthon.property'
|
||||
|
||||
property_contract_ids = fields.One2many('property.contract.line', 'yuthon_property_id', string="关联物业合同明细行")
|
||||
|
||||
|
||||
class PropertyBankStatements(models.Model):
|
||||
_inherit = 'property.bank.statements'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
|
||||
class PropertyBankLine(models.Model):
|
||||
_inherit = 'property.bank.line'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
|
||||
class PropertyTariffList(models.Model):
|
||||
_inherit = 'property.tariff.list'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
def push_tariff(self):
|
||||
for rec in self:
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '电费')], limit=1)
|
||||
if not management_type_id:
|
||||
management_type_id = self.env['yuthon.management.type'].create({'name': '电费'})
|
||||
self.env['property.accounts.receivable'].create({
|
||||
'contract_id': rec.contract_id.id,
|
||||
'property_id': rec.property_id.id,
|
||||
'lessee_id':rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'original_amount' : rec.original_amount,
|
||||
'due_date': rec.due_date,
|
||||
'create_time': datetime.now(),
|
||||
'management_type_id':management_type_id.id,
|
||||
})
|
||||
rec.is_push = True
|
||||
|
||||
def batch_push_tariff(self):
|
||||
archives_ids = self.env["property.tariff.list"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '电费')], limit=1)
|
||||
for rec in archives_ids:
|
||||
self.env['property.accounts.receivable'].create({
|
||||
'contract_id': rec.contract_id.id,
|
||||
'property_id': rec.property_id.id,
|
||||
'lessee_id': rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'original_amount': rec.original_amount,
|
||||
'due_date': rec.due_date,
|
||||
'create_time': datetime.now(),
|
||||
'management_type_id': management_type_id.id,
|
||||
})
|
||||
rec.is_push = True
|
||||
|
||||
|
||||
class PropertyWaterList(models.Model):
|
||||
_inherit = 'property.water.list'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
def push_water(self):
|
||||
for rec in self:
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '水费')], limit=1)
|
||||
if not management_type_id:
|
||||
management_type_id = self.env['yuthon.management.type'].create({'name': '水费'})
|
||||
self.env['property.accounts.receivable'].create({
|
||||
'contract_id': rec.contract_id.id,
|
||||
'property_id': rec.property_id.id,
|
||||
'lessee_id': rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'original_amount': rec.original_amount,
|
||||
'create_time': datetime.now(),
|
||||
'management_type_id': management_type_id.id,
|
||||
})
|
||||
rec.is_push = True
|
||||
|
||||
def batch_push_water(self):
|
||||
archives_ids = self.env["property.water.list"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
management_type_id = self.env['yuthon.management.type'].search([('name', '=', '水费')], limit=1)
|
||||
for rec in archives_ids:
|
||||
self.env['property.accounts.receivable'].create({
|
||||
'contract_id': rec.contract_id.id,
|
||||
'property_id': rec.property_id.id,
|
||||
'lessee_id': rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'original_amount': rec.original_amount,
|
||||
'create_time': datetime.now(),
|
||||
'management_type_id': management_type_id.id,
|
||||
})
|
||||
rec.is_push = True
|
||||
|
||||
class PropertyElectricReading(models.Model):
|
||||
_inherit = 'property.electric.reading'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
def button_push_electric(self):
|
||||
for rec in self:
|
||||
if rec.is_push:
|
||||
raise UserError("该抄表已经推送,不能重复推送")
|
||||
self.env["property.tariff.list"].create({
|
||||
'tariff_meter_number': rec.code,
|
||||
'property_id': rec.property_id.id if rec.property_id else None,
|
||||
'contract_id': rec.contract_id.id if rec.contract_id else None,
|
||||
'lessee_id':rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'fee_id': rec.fee_id.id if rec.fee_id else None,
|
||||
'due_date': rec.meter_date,
|
||||
'original_amount':rec.fee_id.amount * rec.dosage if rec.fee_id.amount else 0,
|
||||
'tariff_meter_reading': rec.dosage
|
||||
})
|
||||
rec.write({
|
||||
'is_push': True,
|
||||
})
|
||||
def batch_reading_electric(self):
|
||||
archives_ids = self.env["property.electric.reading"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
for record in archives_ids:
|
||||
if record.is_push:
|
||||
raise UserError(f"该{record.name}仪表已经推送,不能重复推送")
|
||||
self.env["property.water.list"].create({
|
||||
'tariff_meter_number': record.code,
|
||||
'property_id': record.property_id.id if record.property_id else None,
|
||||
'contract_id': record.contract_id.id if record.contract_id else None,
|
||||
'lessee_id': record.contract_id.lessee_id.id if record.contract_id.lessee_id else None,
|
||||
'fee_id': record.fee_id.id if record.fee_id else None,
|
||||
'due_date': record.meter_date,
|
||||
'original_amount': record.fee_id.amount * record.dosage if record.fee_id.amount else 0,
|
||||
'tariff_meter_reading': record.dosage
|
||||
})
|
||||
record.write({
|
||||
'is_push': True,
|
||||
})
|
||||
class PropertyWaterReading(models.Model):
|
||||
_inherit = 'property.water.reading'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
def button_push_water(self):
|
||||
for rec in self:
|
||||
if rec.is_push:
|
||||
raise UserError("该抄表已经推送,不能重复推送")
|
||||
self.env["property.water.list"].create({
|
||||
'water_meter_number': rec.code,
|
||||
'property_id': rec.property_id.id if rec.property_id else None,
|
||||
'fee_id': rec.fee_id.id if rec.fee_id else None,
|
||||
'lessee_id': rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'contract_id': rec.contract_id.id if rec.contract_id else None,
|
||||
'original_amount': rec.fee_id.amount * rec.dosage if rec.fee_id.amount else 0,
|
||||
'due_date': rec.meter_date,
|
||||
'water_meter_reading':rec.dosage
|
||||
})
|
||||
rec.write({
|
||||
'is_push': True,
|
||||
})
|
||||
def batch_reading_water(self):
|
||||
archives_ids = self.env["property.water.reading"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
for record in archives_ids:
|
||||
if record.is_push:
|
||||
raise UserError(f"该{record.name}仪表已经推送,不能重复推送")
|
||||
self.env["property.water.list"].create({
|
||||
'water_meter_number': record.code,
|
||||
'property_id': record.property_id.id if record.property_id else None,
|
||||
'contract_id': record.contract_id.id if record.contract_id else None,
|
||||
'lessee_id': record.contract_id.lessee_id.id if record.contract_id.lessee_id else None,
|
||||
'fee_id': record.fee_id.id if record.fee_id else None,
|
||||
'due_date': record.meter_date,
|
||||
'original_amount': record.fee_id.amount * record.dosage if record.fee_id.amount else 0,
|
||||
'water_meter_reading':record.dosage
|
||||
})
|
||||
record.write({
|
||||
'is_push': True,
|
||||
})
|
||||
class PropertyMeterArchives(models.Model):
|
||||
_inherit = 'property.meter.archives'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
def batch_contract_association(self):
|
||||
archives_ids = self.env["property.meter.archives"].browse(self._context.get('active_ids', self._context.get('active_id')))
|
||||
for record in archives_ids:
|
||||
if record.yuthon_property_id.id:
|
||||
contract_id = self.env["property.lease.contract.line"].search([('address_id', '=', record.yuthon_property_id.id)], limit=1)
|
||||
if contract_id:
|
||||
record.sudo().write({
|
||||
'contract_id': contract_id.lease_id.id})
|
||||
|
||||
def button_reading_push(self):
|
||||
for rec in self:
|
||||
if rec.is_push:
|
||||
raise UserError("该仪表已经推送,不能重复推送")
|
||||
self.env["property.electric.reading"].create({
|
||||
'code': rec.name,
|
||||
'property_id': rec.yuthon_property_id.id if rec.yuthon_property_id else None,
|
||||
'fee_id': rec.fee_id.id if rec.standards_id else None,
|
||||
'lessee_id': rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'ratio': rec.gauge_magnification,
|
||||
'position': rec.unit_number,
|
||||
'type': rec.type,
|
||||
'contract_id':rec.contract_id.id
|
||||
})
|
||||
rec.write({
|
||||
'is_push': True,
|
||||
})
|
||||
|
||||
def batch_reading_push(self):
|
||||
archives_ids = self.env["property.meter.archives"].browse(self._context.get('active_ids', self._context.get('active_id')))
|
||||
for record in archives_ids:
|
||||
if record.is_push:
|
||||
raise UserError(f"该{record.name}仪表已经推送,不能重复推送")
|
||||
self.env["property.electric.reading"].create({
|
||||
'code': record.name,
|
||||
'property_id': record.yuthon_property_id.id if record.yuthon_property_id else None,
|
||||
'fee_id': record.standards_id.id if record.standards_id else None,
|
||||
'lessee_id': record.contract_id.lessee_id.id if record.contract_id.lessee_id else None,
|
||||
'ratio': record.gauge_magnification,
|
||||
'position': record.unit_number,
|
||||
'type': record.type,
|
||||
'contract_id':record.contract_id.id
|
||||
})
|
||||
record.write({
|
||||
'is_push': True,
|
||||
})
|
||||
|
||||
|
||||
class PropertyMeterWater(models.Model):
|
||||
_inherit = 'property.meter.water'
|
||||
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
|
||||
def button_reading_water_push(self):
|
||||
for rec in self:
|
||||
if rec.is_push:
|
||||
raise UserError(f"该仪表已经推送,不能重复推送")
|
||||
self.env["property.water.reading"].create({
|
||||
'code': rec.name ,
|
||||
'property_id': rec.yuthon_property_id.id if rec.yuthon_property_id else None,
|
||||
'ratio': rec.gauge_magnification,
|
||||
'fee_id': rec.standards_id.id if rec.standards_id else None,
|
||||
'lessee_id': rec.contract_id.lessee_id.id if rec.contract_id.lessee_id else None,
|
||||
'position': rec.unit_number ,
|
||||
'type': rec.type,
|
||||
'contract_id': rec.contract_id.id
|
||||
})
|
||||
rec.write({
|
||||
'is_push': True,
|
||||
})
|
||||
|
||||
def batch_reading_water_push(self):
|
||||
water_ids = self.env["property.meter.water"].browse(self._context.get('active_ids', self._context.get('active_id')))
|
||||
for record in water_ids:
|
||||
record.write({
|
||||
'is_push': True,
|
||||
})
|
||||
if record.is_push:
|
||||
raise UserError(f"该{record.unit_number}仪表已经推送,不能重复推送")
|
||||
self.env["property.water.reading"].create({
|
||||
'code': record.name,
|
||||
'property_id': record.yuthon_property_id.id if record.yuthon_property_id else None,
|
||||
'fee_id': record.standards_id.id if record.standards_id else None,
|
||||
'lessee_id': record.contract_id.lessee_id.id if record.contract_id.lessee_id else None,
|
||||
'ratio': record.gauge_magnification,
|
||||
'position': record.unit_number,
|
||||
'type': record.type,
|
||||
'contract_id': record.contract_id.id
|
||||
})
|
||||
|
||||
def batch_contract_association_water(self):
|
||||
archives_ids = self.env["property.meter.water"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
for record in archives_ids:
|
||||
if record.yuthon_property_id.id:
|
||||
contract_id = self.env["property.lease.contract.line"].search(
|
||||
[('address_id', '=', record.yuthon_property_id.id)], limit=1)
|
||||
if contract_id:
|
||||
record.sudo().write({
|
||||
'contract_id': contract_id.lease_id.id})
|
||||
|
||||
class PropertyContractLine(models.Model):
|
||||
_name = 'property.contract.line'
|
||||
_description = '物业合同明细行'
|
||||
|
||||
@@ -65,3 +65,4 @@ access_property_subset_contract,property_subset_contract,model_property_subset_c
|
||||
access_property_contract_line,property_contract_line,model_property_contract_line,base.group_user,1,1,1,1
|
||||
access_choose_property_wizard,choose_property_wizard,model_choose_property_wizard,base.group_user,1,1,1,1
|
||||
access_property_rental_wizard,property_rental_wizard,model_property_rental_wizard,base.group_user,1,1,1,1
|
||||
|
||||
|
||||
|
@@ -1,31 +0,0 @@
|
||||
<odoo>
|
||||
<record id="inherit_property_deposit_list_tree" model="ir.ui.view">
|
||||
<field name="name">property.deposit.list.tree</field>
|
||||
<field name="model">property.deposit.list</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_deposit_list_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='lessee_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
<field name="deposit"/>
|
||||
<field name="performance_bonds"/>
|
||||
<field name="utility_bills"/>
|
||||
<field name="renovation_deposit"/>
|
||||
<field name="aggregate"/>
|
||||
<button name="push_deposit" string="推送" type="object" class="oe_highlight"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="all_property_deposit_push" model="ir.actions.server">
|
||||
<field name="name">批量推送</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_deposit_list"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_deposit_list"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_push_deposit()</field>
|
||||
</record>
|
||||
<record id="property_deposit_list_action" model="ir.actions.act_window">
|
||||
<field name="name">押金列表</field>
|
||||
<field name="res_model">property.deposit.list</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="domain">[('is_push', '=', False)]</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -1,28 +0,0 @@
|
||||
<odoo>
|
||||
<record id="inherit_property_management_list_tree" model="ir.ui.view">
|
||||
<field name="name">property.management.list.tree</field>
|
||||
<field name="model">property.management.list</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_management_list_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='lessee_id']" position="before">
|
||||
<field name="contract_id" string="合同"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='remarks']" position="after">
|
||||
<button name="push_management" string="推送" type="object" class="oe_highlight"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="all_property_management_push" model="ir.actions.server">
|
||||
<field name="name">批量推送</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_management_list"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_management_list"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_push_management()</field>
|
||||
</record>
|
||||
<record id="property_management_list_action" model="ir.actions.act_window">
|
||||
<field name="name">管理费列表</field>
|
||||
<field name="res_model">property.management.list</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="domain">[('is_push', '=', False)]</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -1,323 +0,0 @@
|
||||
<odoo>
|
||||
<record id="inherit_property_rent_list_tree" model="ir.ui.view">
|
||||
<field name="name">property.lease.contract.tree</field>
|
||||
<field name="model">property.rent.list</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_rent_list_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='property_id']" position="before">
|
||||
<field name="contract_id" string="合同"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='is_reconciliation']" position="after">
|
||||
<button name="push_rent" type="object" string="推送" class="oe_highlight"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="inherit_property_rent_list_search" model="ir.ui.view">
|
||||
<field name="name">property.lease.contract.search</field>
|
||||
<field name="model">property.rent.list</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_rent_list_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//filter[@name='group_property_id']" position="after">
|
||||
<filter name="group_contract_id" string="合同" context="{'group_by':'contract_id'}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="all_property_rent_list_push" model="ir.actions.server">
|
||||
<field name="name">批量推送</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_rent_list"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_rent_list"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_push_rent()</field>
|
||||
</record>
|
||||
<record id="view_property_rent_list_action" model="ir.actions.act_window">
|
||||
<field name="name">租金列表</field>
|
||||
<field name="res_model">property.rent.list</field>
|
||||
<field name="view_mode">tree,search</field>
|
||||
<!-- <field name="domain">[('is_push', '=', False)]</field>-->
|
||||
<field name="context">{'search_default_group_contract_id': 1}</field>
|
||||
</record>
|
||||
<record id="inherit_property_deposit_list_tree" model="ir.ui.view">
|
||||
<field name="name">property.deposit.list.tree</field>
|
||||
<field name="model">property.deposit.list</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_deposit_list_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
<field name="deposit"/>
|
||||
<field name="performance_bonds"/>
|
||||
<field name="utility_bills"/>
|
||||
<field name="renovation_deposit"/>
|
||||
<field name="aggregate"/>
|
||||
<button name="push_deposit" string="推送" type="object" class="oe_highlight"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="all_property_deposit_push" model="ir.actions.server">
|
||||
<field name="name">批量推送</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_deposit_list"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_deposit_list"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_push_deposit()</field>
|
||||
</record>
|
||||
<record id="property_deposit_list_action" model="ir.actions.act_window">
|
||||
<field name="name">押金列表</field>
|
||||
<field name="res_model">property.deposit.list</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="domain">[('is_push', '=', False)]</field>
|
||||
</record>
|
||||
<record id="inherit_property_tariff_list_tree" model="ir.ui.view">
|
||||
<field name="name">property.tariff.list.tree</field>
|
||||
<field name="model">property.tariff.list</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_tariff_list_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
</xpath>
|
||||
<xpath expr="//tree/field[@name='remarks']" position="after">
|
||||
<button name="push_tariff" string="推送" type="object" class="oe_highlight"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="all_property_tariff_list_push" model="ir.actions.server">
|
||||
<field name="name">批量推送</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_tariff_list"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_tariff_list"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_push_tariff()</field>
|
||||
</record>
|
||||
<record id='view_property_tariff_list_action' model="ir.actions.act_window">
|
||||
<field name="name">电费列表</field>
|
||||
<field name="res_model">property.tariff.list</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="domain">[('is_push', '=', False)]</field>
|
||||
</record>
|
||||
<record id="inherit_property_water_list_tree" model="ir.ui.view">
|
||||
<field name="name">property.water.list.tree</field>
|
||||
<field name="model">property.water.list</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_water_list_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
</xpath>
|
||||
<xpath expr="//tree/field[@name='remarks']" position="after">
|
||||
<button name="push_water" string="推送" type="object" class="oe_highlight"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="all_property_water_list_push" model="ir.actions.server">
|
||||
<field name="name">批量推送</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_water_list"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_water_list"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_push_water()</field>
|
||||
</record>
|
||||
<record id='view_property_water_list_action' model="ir.actions.act_window">
|
||||
<field name="name">水费列表</field>
|
||||
<field name="res_model">property.water.list</field>
|
||||
<field name="view_mode">tree,form,search</field>
|
||||
<field name="domain">[('is_push', '=', False)]</field>
|
||||
</record>
|
||||
<record id="inherit_property_electric_reading_tree" model="ir.ui.view">
|
||||
<field name="name">property.electric.reading.tree</field>
|
||||
<field name="model">property.electric.reading</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_electric_reading_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='type']" position="after">
|
||||
<button name="button_push_electric" type="object" string="推送" class="btn-primary"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="all_property_electric_reading_push" model="ir.actions.server">
|
||||
<field name="name">批量推送</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_electric_reading"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_electric_reading"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_reading_electric()</field>
|
||||
</record>
|
||||
<record id='view_property_electric_reading_action' model="ir.actions.act_window">
|
||||
<field name="name">电费抄表任务</field>
|
||||
<field name="res_model">property.electric.reading</field>
|
||||
<field name="view_mode">tree,form,search</field>
|
||||
</record>
|
||||
<record id="inherit_property_water_reading_tree" model="ir.ui.view">
|
||||
<field name="name">property.water.reading.tree</field>
|
||||
<field name="model">property.water.reading</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_water_reading_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='type']" position="after">
|
||||
<button name="button_push_water" type="object" string="推送" class="btn-primary"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="all_property_water_reading_push" model="ir.actions.server">
|
||||
<field name="name">批量推送</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_water_reading"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_water_reading"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_reading_water()</field>
|
||||
</record>
|
||||
<record id='view_property_water_reading_action' model="ir.actions.act_window">
|
||||
<field name="name">水费抄表任务</field>
|
||||
<field name="res_model">property.water.reading</field>
|
||||
<field name="view_mode">tree,form,search</field>
|
||||
</record>
|
||||
<record id="inherit_property_meter_archives_tree" model="ir.ui.view">
|
||||
<field name="name">property.meter.archives.tree</field>
|
||||
<field name="model">property.meter.archives</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_meter_archives_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='pre_existing_balances']" position="after">
|
||||
<button name="button_reading_push" type="object" string="推送" class="btn-primary"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="inherit_property_meter_archives_form" model="ir.ui.view">
|
||||
<field name="name">property.meter.archives.tree</field>
|
||||
<field name="model">property.meter.archives</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_meter_archives_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='yuthon_property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="all_batch_archives_reading_push" model="ir.actions.server">
|
||||
<field name="name">批量推送</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_meter_archives"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_meter_archives"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_reading_push()</field>
|
||||
</record>
|
||||
<record id="all_batch_contract_association" model="ir.actions.server">
|
||||
<field name="name">批量关联合同</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_meter_archives"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_meter_archives"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_contract_association()</field>
|
||||
</record>
|
||||
<record id="action_property_meter_archives" model="ir.actions.act_window">
|
||||
<field name="name">电表仪表库档案</field>
|
||||
<field name="res_model">property.meter.archives</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<record id="inherit_property_meter_water_tree" model="ir.ui.view">
|
||||
<field name="name">property.meter.water.tree</field>
|
||||
<field name="model">property.meter.water</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_meter_water_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='pre_existing_balances']" position="after">
|
||||
<button name="button_reading_water_push" type="object" string="推送" class="btn-primary"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="inherit_property_meter_water_form" model="ir.ui.view">
|
||||
<field name="name">property.meter.water.tree</field>
|
||||
<field name="model">property.meter.water</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_meter_water_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='yuthon_property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_property_meter_water" model="ir.actions.act_window">
|
||||
<field name="name">水表仪表库档案</field>
|
||||
<field name="res_model">property.meter.water</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<record id="all_batch_water_reading_push" model="ir.actions.server">
|
||||
<field name="name">批量推送</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_meter_water"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_meter_water"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_reading_water_push()</field>
|
||||
</record>
|
||||
<record id="all_batch_contract_association_water" model="ir.actions.server">
|
||||
<field name="name">批量关联合同</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_meter_water"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_meter_water"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_contract_association_water()</field>
|
||||
</record>
|
||||
<!--应收账单 -->
|
||||
<record id="inherit_property_accounts_receivable_form" model="ir.ui.view">
|
||||
<field name="name">property.accounts.receivable.tree</field>
|
||||
<field name="model">property.accounts.receivable</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_accounts_receivable_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='is_reconciliation']" position="after">
|
||||
<button name="receivable_return" string="退回" class="btn-primary" type="object"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_property_rent_billing_action" model="ir.actions.act_window">
|
||||
<field name="name">已开票</field>
|
||||
<field name="res_model">property.accounts.receivable</field>
|
||||
<field name="view_mode">tree,search</field>
|
||||
<field name="domain">[('is_billing', '=', True), ('is_push', '=', True)]</field>
|
||||
<field name="context">{'search_default_group_lessee_id': 1}</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_property.view_property_accounts_receivable_tree2')})]"/>
|
||||
</record>
|
||||
<record id="view_property_rent_not_billing_action" model="ir.actions.act_window">
|
||||
<field name="name">待开票</field>
|
||||
<field name="res_model">property.accounts.receivable</field>
|
||||
<field name="view_mode">tree,search</field>
|
||||
<field name="domain">[('is_billing', '=', False)]</field>
|
||||
<field name="context">{'search_default_group_lessee_id': 1}</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_property.view_property_accounts_receivable_tree')})]"/>
|
||||
</record>
|
||||
<record id="view_property_rent_reconciliation_action" model="ir.actions.act_window">
|
||||
<field name="name">对账</field>
|
||||
<field name="res_model">property.accounts.receivable</field>
|
||||
<field name="view_mode">tree,search</field>
|
||||
<field name="context">{'search_default_group_lessee_id': 1}</field>
|
||||
<field name="domain">[('is_reconciliation', '=', True), ('is_billing', '=', True)]</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_property.view_property_accounts_receivable_tree')})]"/>
|
||||
</record>
|
||||
<record id="view_property_rent_not_reconciliation_action" model="ir.actions.act_window">
|
||||
<field name="name">未对账</field>
|
||||
<field name="res_model">property.accounts.receivable</field>
|
||||
<field name="view_mode">tree,search</field>
|
||||
<field name="context">{'search_default_group_lessee_id': 1}</field>
|
||||
<field name="domain">[('is_reconciliation', '=', False), ('is_billing', '=', True)]</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_property.view_property_accounts_receivable_tree')})]"/>
|
||||
</record>
|
||||
<record id="view_property_rent_red_action" model="ir.actions.act_window">
|
||||
<field name="name">红冲</field>
|
||||
<field name="res_model">property.accounts.receivable</field>
|
||||
<field name="view_mode">tree,search</field>
|
||||
<field name="context">{'search_default_group_lessee_id': 1}</field>
|
||||
<field name="domain">[('condition', '=', 'red')]</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_property.view_property_accounts_receivable_tree')})]"/>
|
||||
</record>
|
||||
<record id="view_property_rent_invalid_action" model="ir.actions.act_window">
|
||||
<field name="name">作废</field>
|
||||
<field name="res_model">property.accounts.receivable</field>
|
||||
<field name="view_mode">tree,search</field>
|
||||
<field name="context">{'search_default_group_lessee_id': 1}</field>
|
||||
<field name="domain">[('condition', '=', 'invalid')]</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_property.view_property_accounts_receivable_tree')})]"/>
|
||||
</record>
|
||||
<record id="all_button_return_property" model="ir.actions.server">
|
||||
<field name="name">批量退回</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_accounts_receivable"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_accounts_receivable"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_receivable_return()</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -20,4 +20,360 @@
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<!--租金-->
|
||||
<record id="inherit_property_rent_list_tree" model="ir.ui.view">
|
||||
<field name="name">property.lease.contract.tree</field>
|
||||
<field name="model">property.rent.list</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_rent_list_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='property_id']" position="before">
|
||||
<field name="contract_id" string="合同"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='is_reconciliation']" position="after">
|
||||
<button name="push_rent" type="object" string="推送" class="oe_highlight"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="inherit_property_rent_list_search" model="ir.ui.view">
|
||||
<field name="name">property.lease.contract.search</field>
|
||||
<field name="model">property.rent.list</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_rent_list_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//filter[@name='group_property_id']" position="after">
|
||||
<filter name="group_contract_id" string="合同" context="{'group_by':'contract_id'}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="all_property_rent_list_push" model="ir.actions.server">
|
||||
<field name="name">批量推送</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_rent_list"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_rent_list"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_push_rent()</field>
|
||||
</record>
|
||||
<record id="view_property_rent_list_action" model="ir.actions.act_window">
|
||||
<field name="name">租金列表</field>
|
||||
<field name="res_model">property.rent.list</field>
|
||||
<field name="view_mode">tree,search</field>
|
||||
<!-- <field name="domain">[('is_push', '=', False)]</field>-->
|
||||
<field name="context">{'search_default_group_contract_id': 1}</field>
|
||||
</record>
|
||||
<!--押金-->
|
||||
<record id="inherit_property_deposit_list_tree" model="ir.ui.view">
|
||||
<field name="name">property.deposit.list.tree</field>
|
||||
<field name="model">property.deposit.list</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_deposit_list_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
<field name="deposit"/>
|
||||
<field name="performance_bonds"/>
|
||||
<field name="utility_bills"/>
|
||||
<field name="renovation_deposit"/>
|
||||
<field name="aggregate"/>
|
||||
<button name="push_deposit" string="推送" type="object" class="oe_highlight"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="all_property_deposit_push" model="ir.actions.server">
|
||||
<field name="name">批量推送</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_deposit_list"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_deposit_list"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_push_deposit()</field>
|
||||
</record>
|
||||
<record id="property_deposit_list_action" model="ir.actions.act_window">
|
||||
<field name="name">押金列表</field>
|
||||
<field name="res_model">property.deposit.list</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="domain">[('is_push', '=', False)]</field>
|
||||
</record>
|
||||
<!--电费-->
|
||||
<record id="inherit_property_tariff_list_tree" model="ir.ui.view">
|
||||
<field name="name">property.tariff.list.tree</field>
|
||||
<field name="model">property.tariff.list</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_tariff_list_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
</xpath>
|
||||
<xpath expr="//tree/field[@name='remarks']" position="after">
|
||||
<button name="push_tariff" string="推送" type="object" class="oe_highlight"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="all_property_tariff_list_push" model="ir.actions.server">
|
||||
<field name="name">批量推送</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_tariff_list"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_tariff_list"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_push_tariff()</field>
|
||||
</record>
|
||||
<record id='view_property_tariff_list_action' model="ir.actions.act_window">
|
||||
<field name="name">电费列表</field>
|
||||
<field name="res_model">property.tariff.list</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="domain">[('is_push', '=', False)]</field>
|
||||
</record>
|
||||
<!--水费-->
|
||||
<record id="inherit_property_water_list_tree" model="ir.ui.view">
|
||||
<field name="name">property.water.list.tree</field>
|
||||
<field name="model">property.water.list</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_water_list_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
</xpath>
|
||||
<xpath expr="//tree/field[@name='remarks']" position="after">
|
||||
<button name="push_water" string="推送" type="object" class="oe_highlight"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="all_property_water_list_push" model="ir.actions.server">
|
||||
<field name="name">批量推送</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_water_list"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_water_list"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_push_water()</field>
|
||||
</record>
|
||||
<record id='view_property_water_list_action' model="ir.actions.act_window">
|
||||
<field name="name">水费列表</field>
|
||||
<field name="res_model">property.water.list</field>
|
||||
<field name="view_mode">tree,form,search</field>
|
||||
<field name="domain">[('is_push', '=', False)]</field>
|
||||
</record>
|
||||
<!--电表抄表-->
|
||||
<record id="inherit_property_electric_reading_tree" model="ir.ui.view">
|
||||
<field name="name">property.electric.reading.tree</field>
|
||||
<field name="model">property.electric.reading</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_electric_reading_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='type']" position="after">
|
||||
<button name="button_push_electric" type="object" string="推送" class="btn-primary"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="all_property_electric_reading_push" model="ir.actions.server">
|
||||
<field name="name">批量推送</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_electric_reading"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_electric_reading"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_reading_electric()</field>
|
||||
</record>
|
||||
<record id='view_property_electric_reading_action' model="ir.actions.act_window">
|
||||
<field name="name">电费抄表任务</field>
|
||||
<field name="res_model">property.electric.reading</field>
|
||||
<field name="view_mode">tree,form,search</field>
|
||||
</record>
|
||||
<!--水表抄表-->
|
||||
<record id="inherit_property_water_reading_tree" model="ir.ui.view">
|
||||
<field name="name">property.water.reading.tree</field>
|
||||
<field name="model">property.water.reading</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_water_reading_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='type']" position="after">
|
||||
<button name="button_push_water" type="object" string="推送" class="btn-primary"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="all_property_water_reading_push" model="ir.actions.server">
|
||||
<field name="name">批量推送</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_water_reading"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_water_reading"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_reading_water()</field>
|
||||
</record>
|
||||
<record id='view_property_water_reading_action' model="ir.actions.act_window">
|
||||
<field name="name">水费抄表任务</field>
|
||||
<field name="res_model">property.water.reading</field>
|
||||
<field name="view_mode">tree,form,search</field>
|
||||
</record>
|
||||
<!--电表库-->
|
||||
<record id="inherit_property_meter_archives_tree" model="ir.ui.view">
|
||||
<field name="name">property.meter.archives.tree</field>
|
||||
<field name="model">property.meter.archives</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_meter_archives_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='pre_existing_balances']" position="after">
|
||||
<button name="button_reading_push" type="object" string="推送" class="btn-primary"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="inherit_property_meter_archives_form" model="ir.ui.view">
|
||||
<field name="name">property.meter.archives.tree</field>
|
||||
<field name="model">property.meter.archives</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_meter_archives_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='yuthon_property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="all_batch_archives_reading_push" model="ir.actions.server">
|
||||
<field name="name">批量推送</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_meter_archives"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_meter_archives"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_reading_push()</field>
|
||||
</record>
|
||||
<record id="all_batch_contract_association" model="ir.actions.server">
|
||||
<field name="name">批量关联合同</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_meter_archives"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_meter_archives"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_contract_association()</field>
|
||||
</record>
|
||||
<record id="action_property_meter_archives" model="ir.actions.act_window">
|
||||
<field name="name">电表仪表库档案</field>
|
||||
<field name="res_model">property.meter.archives</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<!--水表库-->
|
||||
<record id="inherit_property_meter_water_tree" model="ir.ui.view">
|
||||
<field name="name">property.meter.water.tree</field>
|
||||
<field name="model">property.meter.water</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_meter_water_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='pre_existing_balances']" position="after">
|
||||
<button name="button_reading_water_push" type="object" string="推送" class="btn-primary"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="inherit_property_meter_water_form" model="ir.ui.view">
|
||||
<field name="name">property.meter.water.tree</field>
|
||||
<field name="model">property.meter.water</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_meter_water_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='yuthon_property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_property_meter_water" model="ir.actions.act_window">
|
||||
<field name="name">水表仪表库档案</field>
|
||||
<field name="res_model">property.meter.water</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<record id="all_batch_water_reading_push" model="ir.actions.server">
|
||||
<field name="name">批量推送</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_meter_water"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_meter_water"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_reading_water_push()</field>
|
||||
</record>
|
||||
<record id="all_batch_contract_association_water" model="ir.actions.server">
|
||||
<field name="name">批量关联合同</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_meter_water"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_meter_water"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_contract_association_water()</field>
|
||||
</record>
|
||||
<!--管理费-->
|
||||
<record id="inherit_property_management_list_tree" model="ir.ui.view">
|
||||
<field name="name">property.management.list.tree</field>
|
||||
<field name="model">property.management.list</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_management_list_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='lessee_id']" position="before">
|
||||
<field name="contract_id" string="合同"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='remarks']" position="after">
|
||||
<button name="push_management" string="推送" type="object" class="oe_highlight"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="all_property_management_push" model="ir.actions.server">
|
||||
<field name="name">批量推送</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_management_list"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_management_list"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_push_management()</field>
|
||||
</record>
|
||||
<record id="property_management_list_action" model="ir.actions.act_window">
|
||||
<field name="name">管理费列表</field>
|
||||
<field name="res_model">property.management.list</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="domain">[('is_push', '=', False)]</field>
|
||||
</record>
|
||||
<!--应收账单 -->
|
||||
<record id="inherit_property_accounts_receivable_form" model="ir.ui.view">
|
||||
<field name="name">property.accounts.receivable.tree</field>
|
||||
<field name="model">property.accounts.receivable</field>
|
||||
<field name="inherit_id" ref="yuthon_property.view_property_accounts_receivable_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='property_id']" position="after">
|
||||
<field name="contract_id" string="合同"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='is_reconciliation']" position="after">
|
||||
<button name="receivable_return" string="退回" class="btn-primary" type="object"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_property_rent_billing_action" model="ir.actions.act_window">
|
||||
<field name="name">已开票</field>
|
||||
<field name="res_model">property.accounts.receivable</field>
|
||||
<field name="view_mode">tree,search</field>
|
||||
<field name="domain">[('is_billing', '=', True), ('is_push', '=', True)]</field>
|
||||
<field name="context">{'search_default_group_lessee_id': 1}</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_property.view_property_accounts_receivable_tree2')})]"/>
|
||||
</record>
|
||||
<record id="view_property_rent_not_billing_action" model="ir.actions.act_window">
|
||||
<field name="name">待开票</field>
|
||||
<field name="res_model">property.accounts.receivable</field>
|
||||
<field name="view_mode">tree,search</field>
|
||||
<field name="domain">[('is_billing', '=', False)]</field>
|
||||
<field name="context">{'search_default_group_lessee_id': 1}</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_property.view_property_accounts_receivable_tree')})]"/>
|
||||
</record>
|
||||
<record id="view_property_rent_reconciliation_action" model="ir.actions.act_window">
|
||||
<field name="name">对账</field>
|
||||
<field name="res_model">property.accounts.receivable</field>
|
||||
<field name="view_mode">tree,search</field>
|
||||
<field name="context">{'search_default_group_lessee_id': 1}</field>
|
||||
<field name="domain">[('is_reconciliation', '=', True), ('is_billing', '=', True)]</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_property.view_property_accounts_receivable_tree')})]"/>
|
||||
</record>
|
||||
<record id="view_property_rent_not_reconciliation_action" model="ir.actions.act_window">
|
||||
<field name="name">未对账</field>
|
||||
<field name="res_model">property.accounts.receivable</field>
|
||||
<field name="view_mode">tree,search</field>
|
||||
<field name="context">{'search_default_group_lessee_id': 1}</field>
|
||||
<field name="domain">[('is_reconciliation', '=', False), ('is_billing', '=', True)]</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_property.view_property_accounts_receivable_tree')})]"/>
|
||||
</record>
|
||||
<record id="view_property_rent_red_action" model="ir.actions.act_window">
|
||||
<field name="name">红冲</field>
|
||||
<field name="res_model">property.accounts.receivable</field>
|
||||
<field name="view_mode">tree,search</field>
|
||||
<field name="context">{'search_default_group_lessee_id': 1}</field>
|
||||
<field name="domain">[('condition', '=', 'red')]</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_property.view_property_accounts_receivable_tree')})]"/>
|
||||
</record>
|
||||
<record id="view_property_rent_invalid_action" model="ir.actions.act_window">
|
||||
<field name="name">作废</field>
|
||||
<field name="res_model">property.accounts.receivable</field>
|
||||
<field name="view_mode">tree,search</field>
|
||||
<field name="context">{'search_default_group_lessee_id': 1}</field>
|
||||
<field name="domain">[('condition', '=', 'invalid')]</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_property.view_property_accounts_receivable_tree')})]"/>
|
||||
</record>
|
||||
<record id="all_button_return_property" model="ir.actions.server">
|
||||
<field name="name">批量退回</field>
|
||||
<field name="model_id" ref="yuthon_property.model_property_accounts_receivable"/>
|
||||
<field name="binding_model_id" ref="yuthon_property.model_property_accounts_receivable"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.batch_receivable_return()</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user