@@ -512,7 +512,7 @@
|
||||
</header>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='property_ids']" position="before">
|
||||
<field name="contract_ids" string="合同编号" widget="many2many_tags" readonly="1"/>
|
||||
<field name="contract_ids" string="合同编号" widget="many2many_tags" readonly="1" domain="[('lessor_id.name', '=', your_own_unit)]"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='start_time']" position="before">
|
||||
<button name="button_reconciliation" type="object" string="对账" class="btn btn-primary" invisible="bank_state != 'not_reconciled'"/>
|
||||
|
||||
@@ -87,6 +87,7 @@ class PropertyReconciliationWizard(models.Model):
|
||||
last_day_of_last_month = start_time.replace(day=1) - relativedelta(days=1)
|
||||
contract_receivables = self.env['property.accounts.receivable'].search([
|
||||
('contract_id', '=', contract_id.id),
|
||||
('contract_id.lessor_id.name', '=', self.bank_id.your_own_unit),
|
||||
('due_date', '>=', first_day_of_last_month.strftime('%Y-%m-%d')),
|
||||
('due_date', '<=', last_day_of_last_month.strftime('%Y-%m-%d')),
|
||||
('management_type_id.name', '=', '租金')
|
||||
@@ -385,9 +386,9 @@ class PropertyReconciliationWizard(models.Model):
|
||||
else:
|
||||
is_reconciliation = False
|
||||
if line.collection_type != 'penalty':
|
||||
receivable.delivered1 = receivable.delivered1 + line.amount
|
||||
receivable.write({
|
||||
'is_reconciliation': is_reconciliation,
|
||||
'delivered1': line.amount,
|
||||
'payout_date': rec.actual_date,
|
||||
'remark': line.remake,
|
||||
'reconciliation_time': fields.Datetime.now(),
|
||||
|
||||
Reference in New Issue
Block a user