@@ -456,6 +456,8 @@ class PropertyLeaseContract(models.Model):
|
||||
record.name = self._description
|
||||
|
||||
def update_property(self):
|
||||
existing_lines = self.env['property.contract.line'].search([])
|
||||
existing_lines.unlink()
|
||||
contract_ids = self.env["property.lease.contract"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
for contract_id in contract_ids:
|
||||
|
||||
@@ -896,13 +896,13 @@
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.trigger_lease_ids()</field>
|
||||
</record>
|
||||
<!-- <record id="all_data_update_property_contract" model="ir.actions.server">-->
|
||||
<!-- <field name="name">更新物业合同</field>-->
|
||||
<!-- <field name="model_id" ref="yuthon_property_approval.model_property_lease_contract"/>-->
|
||||
<!-- <field name="binding_model_id" ref="yuthon_property_approval.model_property_lease_contract"/>-->
|
||||
<!-- <field name="state">code</field>-->
|
||||
<!-- <field name="code">action = model.update_property()</field>-->
|
||||
<!-- </record>-->
|
||||
<record id="all_data_update_property_contract" model="ir.actions.server">
|
||||
<field name="name">关联物业</field>
|
||||
<field name="model_id" ref="yuthon_property_approval.model_property_lease_contract"/>
|
||||
<field name="binding_model_id" ref="yuthon_property_approval.model_property_lease_contract"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.update_property()</field>
|
||||
</record>
|
||||
<record id="administrator_forcibly_closes" model="ir.actions.server">
|
||||
<field name="name">管理员强制结束</field>
|
||||
<field name="model_id" ref="yuthon_property_approval.model_property_lease_contract"/>
|
||||
|
||||
Reference in New Issue
Block a user