Merge pull request #2536 from expsa/samir-aladawi-properties-module
[UPD] property_management: update filters and mak som fields stored
This commit is contained in:
commit
0e0273533d
|
|
@ -614,6 +614,7 @@ msgstr "مستحق"
|
|||
#: model:ir.actions.server,name:property_management.custom_action_server
|
||||
#: model:ir.model.fields,field_description:property_management.field_annual_raise__due_date_raise
|
||||
#: model:ir.model.fields,field_description:property_management.field_rent_payment__due_date
|
||||
#: model_terms:ir.ui.view,arch_db:property_management.rent_payment_filter_view
|
||||
msgid "Due Date"
|
||||
msgstr "تحقق الاستحقاق"
|
||||
|
||||
|
|
@ -1537,6 +1538,12 @@ msgstr "العقار"
|
|||
msgid "Property & Unit Information"
|
||||
msgstr "معلومات العقار و الوحدة"
|
||||
|
||||
#. module: property_management
|
||||
#: model:ir.model.fields,field_description:property_management.field_rental_contract__property_city_id
|
||||
#: model_terms:ir.ui.view,arch_db:property_management.view_rental_contract_filter
|
||||
msgid "Property City"
|
||||
msgstr "مدينة العقار"
|
||||
|
||||
#. modules: property_management, property_management_menu
|
||||
#: model:ir.actions.act_window,name:property_management_menu.property_maintenance_action
|
||||
#: model:ir.model,name:property_management.model_property_management_maintenance
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ class RentalContract(models.Model):
|
|||
rent_method = fields.Selection([('property', 'Property'),
|
||||
('unit', 'Unit')], string="Rent Method")
|
||||
property_id = fields.Many2one('internal.property', string="Property", tracking=True,)
|
||||
property_city_id = fields.Many2one(related='property_id.city_id', string="Property City", store=True)
|
||||
unit_ids = fields.Many2many('re.unit', string="Units", tracking=True)
|
||||
contract_type = fields.Selection(
|
||||
[('residential', 'Residential'), ('commercial', 'Commercial'), ('lands', 'Lands')],
|
||||
|
|
@ -235,8 +236,8 @@ class RentalContract(models.Model):
|
|||
readonly=False,
|
||||
store=True
|
||||
)
|
||||
tax_amount = fields.Float(compute="_compute_amounts")
|
||||
total_amount_with_tax = fields.Float(compute="_compute_amounts")
|
||||
tax_amount = fields.Float(compute="_compute_amounts", store=True)
|
||||
total_amount_with_tax = fields.Float(compute="_compute_amounts", store=True)
|
||||
|
||||
|
||||
@api.depends('tax_id', 'cal_rent_amount')
|
||||
|
|
|
|||
|
|
@ -119,6 +119,7 @@
|
|||
|
||||
<separator/>
|
||||
<filter name="payment_state" string="Not Canceled Payment" domain="[('state','!=','cancel')]"/>
|
||||
<filter name="due_date_filter" string="Due Date" date="due_date"/>
|
||||
<separator/>
|
||||
|
||||
<group expand="0" string="Group By">
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@
|
|||
('action_type', '=', 'rent')]" widget="many2many_tags" attrs="{'readonly':[('state','!=','draft')], 'invisible':[('rent_method','in',['property', False])],
|
||||
'required':[('rent_method','not in',['property', False])]}"/>
|
||||
<field name="contract_type" attrs="{'readonly': [('state', '!=', 'draft')]}" />
|
||||
<field name="property_city_id" />
|
||||
<field name="user_id" readonly="1"/>
|
||||
<field name="company_id" readonly="1"/>
|
||||
</group>
|
||||
|
|
@ -329,10 +330,10 @@
|
|||
<field name="date"/>
|
||||
<field name="date_from"/>
|
||||
<field name="state"/>
|
||||
<field name="property_city_id" invisible="1" />
|
||||
<separator/>
|
||||
<filter string="My Contract" name="my_reports" domain="[('user_id', '=', uid)]"/>
|
||||
<separator/>
|
||||
|
||||
<filter string="Draft" name="draft" domain="[('state','=','draft')]"/>
|
||||
<separator/>
|
||||
<filter name="expired_contracts" string="Expired"
|
||||
|
|
@ -353,6 +354,7 @@
|
|||
<filter string="Property" name="property_id" domain="[]" context="{'group_by': 'property_id'}"/>
|
||||
<filter string="Renter" name="partner_id" domain="[]" context="{'group_by': 'partner_id'}"/>
|
||||
<filter string="Rent kind" name="rent_kind" domain="[]" context="{'group_by': 'rent_kind'}"/>
|
||||
<filter string="Property City" name="property_city_id" domain="[]" context="{'group_by': 'property_city_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
|
|
|||
Loading…
Reference in New Issue