@@ -43,6 +43,13 @@ class PropertyAccountsReceivable(models.Model):
|
||||
bank_id = fields.Many2one('property.bank.statements', string='流水记录')
|
||||
receivable_log = fields.Text(string='应收日志')
|
||||
|
||||
def update_is_reconciliation(self):
|
||||
record_ids = self.env["property.accounts.receivable"].browse(
|
||||
self._context.get("active_ids", self._context.get("active_id"))
|
||||
)
|
||||
for record in record_ids:
|
||||
record.is_reconciliation = True
|
||||
|
||||
@api.depends('original_amount', 'delivered1')
|
||||
def compute_submitted(self):
|
||||
for record in self:
|
||||
|
||||
@@ -39,6 +39,13 @@
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.initialize_wizard()</field>
|
||||
</record>
|
||||
<record id="update_is_reconciliation" 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.update_is_reconciliation()</field>
|
||||
</record>
|
||||
<record id="template_downloads_invoicing_basic_action" model="ir.actions.act_url">
|
||||
<field name="name">发票基本信息模板下载</field>
|
||||
<field name="target">self</field>
|
||||
|
||||
@@ -30,8 +30,9 @@ class PropertyReconciliationWizard(models.Model):
|
||||
for rec in self:
|
||||
rec.amount_reconciled = rec.actual_total - rec.amount_been_reconciled - sum(line.amount for line in rec.reconciliation_line_ids)
|
||||
for line in rec.reconciliation_line_ids:
|
||||
if line.rent_month == line.amount and line.collection_type == 'rent' and line.due_date.year != rec.actual_date.year or line.due_date.month != rec.actual_date.month:
|
||||
line.remake = str(rec.actual_date) + '补' + str(line.due_date)
|
||||
if line.amount:
|
||||
if line.rent_month == line.amount and line.collection_type == 'rent' and (line.due_date.year != rec.actual_date.year or line.due_date.month != rec.actual_date.month):
|
||||
line.remake = str(rec.actual_date) + '补' + str(line.due_date)
|
||||
|
||||
@api.depends('reconciliation_line_ids')
|
||||
def _compute_receivable_total(self):
|
||||
|
||||
Reference in New Issue
Block a user