Merge pull request !3583 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2025-06-30 02:17:07 +00:00
committed by Gitee
4 changed files with 19 additions and 7 deletions
@@ -5,6 +5,7 @@
<field name="model">property.bank.statements</field>
<field name="arch" type="xml">
<tree string="对账" editable="bottom" js_class="custom_statements_list_button" limit="20">
<button name="binding_information" type="object" class="oe_highlight" string="绑定信息"/>
<field name="start_time"/>
<field name="company_id" optional="hide"/>
<field name="bank_name" optional="hide"/>
@@ -21,14 +22,13 @@
<field name="no_amount"/>
<field name="contract_account" optional="hide"/>
<field name="contract_penalty" optional="hide"/>
<field name="property_ids" widget="many2many_tags"/>
<field name="property_ids" widget="many2many_tags" readonly="1"/>
<field name="bank_number" optional="hide"/>
<field name="message" optional="hide"/>
<field name="number" optional="hide"/>
<field name="bank_state"/>
<field name="voucher_type" optional="hide"/>
<field name="is_reconciliation" column_invisible="1"/>
<button name="binding_information" type="object" class="oe_highlight" string="绑定信息"/>
</tree>
</field>
</record>
@@ -38,6 +38,12 @@ class PropertyBankStatements(models.Model):
for record in receivable_ids:
record.bank_state = 'reconciled'
def button_state(self):
receivable_ids = self.env["property.bank.statements"].browse(
self._context.get('active_ids', self._context.get('active_id')))
for record in receivable_ids:
record.bank_state = 'not_reconciled'
def contract_penalty(self):
statements_ids = self.env['property.bank.statements'].search([('is_put', '=', True)])
for record in statements_ids:
@@ -590,9 +590,9 @@
<field name="inherit_id" ref="yuthon_property.view_property_bank_statements_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='property_ids']" position="before">
<field name="contract_ids" string="合同编号" widget="many2many_tags"/>
<field name="contract_ids" string="合同编号" widget="many2many_tags" readonly="1"/>
</xpath>
<xpath expr="//field[@name='voucher_type']" position="after">
<xpath expr="//field[@name='start_time']" position="before">
<button name="button_reconciliation" type="object" string="对账" class="btn btn-primary" invisible="is_reconciliation"/>
</xpath>
</field>
@@ -604,6 +604,13 @@
<field name="state">code</field>
<field name="code">action = model.button_bank_state()</field>
</record>
<record id="button_state" model="ir.actions.server">
<field name="name">恢复</field>
<field name="model_id" ref="yuthon_property.model_property_bank_statements"/>
<field name="binding_model_id" ref="yuthon_property.model_property_bank_statements"/>
<field name="state">code</field>
<field name="code">action = model.button_state()</field>
</record>
<!-- 违约金 -->
<record id="inherit_view_property_penalty_list_tree" model="ir.ui.view">
<field name="name">property.penalty.list.tree</field>
@@ -43,9 +43,8 @@ class ClickReconciliationWizard(models.Model):
])
if bank_lines:
record.bank_state = 'reconciled'
record.yes_amount = amount_been_reconciled
record.no_amount = amount_reconciled
record.yes_amount = amount_reconciled
record.no_amount = amount_been_reconciled
first_line = bank_lines[0]
# 直接使用all_vals中的数据更新应收账款