modifications on units
This commit is contained in:
parent
78f28fff9a
commit
e4e17f6733
File diff suppressed because it is too large
Load Diff
|
|
@ -445,6 +445,7 @@ class Property(models.Model):
|
|||
self.write({'unlock':False})
|
||||
else:
|
||||
self.write({'unlock':True})
|
||||
|
||||
class PropertyUnitDetails(models.Model):
|
||||
_name = 'floor.unit.details'
|
||||
_description = 'Floor Unit Details'
|
||||
|
|
@ -462,3 +463,15 @@ class PropertyUnitDetails(models.Model):
|
|||
for record in self:
|
||||
record.total = record.no_of_house + record.no_of_shop + record.no_of_other_unit
|
||||
|
||||
|
||||
|
||||
|
||||
class PropertyContentDetails(models.Model):
|
||||
_name = 'property.content.details'
|
||||
_description = 'Property Unit Details'
|
||||
|
||||
property_id = fields.Many2one('internal.property', string='Property', required=True, ondelete='cascade')
|
||||
content_id = fields.Many2one('property.contents','Property Content')
|
||||
qty = fields.Integer('QTY')
|
||||
desc = fields.Char('Description')
|
||||
attachment = fields.Binary(string="Property Docs")
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ class Unit(models.Model):
|
|||
('commercial', 'Commercial'),
|
||||
('lands', 'Lands') ], string="Unit Category")
|
||||
attach_nbr = fields.Integer(compute='get_attachments')
|
||||
content_ids= fields.One2many(comodel_name='property.content.details', inverse_name='property_id',string='')
|
||||
active = fields.Boolean(default=True)
|
||||
role_id = fields.Many2one('property.role', string='Role')
|
||||
unlock = fields.Boolean(default=True, string="Unlock")
|
||||
|
|
@ -230,3 +231,16 @@ class Unit(models.Model):
|
|||
else:
|
||||
self.write({'unlock': True})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class PropertyContentDetails(models.Model):
|
||||
_name = 'property.content.details'
|
||||
_description = 'Property Unit Details'
|
||||
|
||||
property_id = fields.Many2one('internal.property', string='Property', required=True, ondelete='cascade')
|
||||
content_id = fields.Many2one('property.contents','Property Content')
|
||||
qty = fields.Integer('QTY')
|
||||
desc = fields.Char('Description')
|
||||
attachment = fields.Binary(string="Property Docs")
|
||||
|
|
|
|||
|
|
@ -22,6 +22,14 @@ class sketchs(models.Model):
|
|||
|
||||
|
||||
|
||||
class PropertyContent(models.Model):
|
||||
_name = "property.contents"
|
||||
_description = "Contents Property"
|
||||
_rec_name = 'content_name'
|
||||
|
||||
content_name = fields.Char(string='Content name', required=True)
|
||||
|
||||
|
||||
class PropertyType(models.Model):
|
||||
_name = 'internal.property.type'
|
||||
_description = 'Property Type'
|
||||
|
|
|
|||
|
|
@ -8,4 +8,6 @@ access_realestate_re_unit,re.unit,model_re_unit,real_estate.group_real_estate_us
|
|||
access_realestate_configuration_property_sketchs,sketchs.sketchs,model_sketchs_sketchs,real_estate.group_real_estate_user,1,1,1,1
|
||||
access_realestate_role_property,role.property,model_property_role,,1,1,1,1
|
||||
access_realestate_floor_property,floor.property,model_floor_unit_details,,1,1,1,1
|
||||
access_property_contents,property.contents,model_property_contents,,1,1,1,1
|
||||
access_property_content_details,property.content.details,model_property_content_details,,1,1,1,1
|
||||
|
||||
|
|
|
|||
|
|
|
@ -461,9 +461,9 @@
|
|||
help="Confirmed Property"/>
|
||||
<filter domain="[('state', '=', 'approve')]" string="Approved" name="approve"
|
||||
help="Approved Property"/>
|
||||
<filter domain="[('state', '=', 'reserve')]" string="Reserved" name="Reserved"
|
||||
<filter domain="[('state', '=', 'reserved')]" string="Reserved" name="Reserved"
|
||||
help="Reserved Property"/>
|
||||
<filter domain="[('state', '=', 'rent')]" string="Rented" name="rent"/>
|
||||
<filter domain="[('state', '=', 'rented')]" string="Rented" name="rent"/>
|
||||
<separator/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Status" name="state" domain="[]" context="{'group_by': 'state'}"/>
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@
|
|||
<field name="stamping"/>
|
||||
<field name="stamping_date"/>
|
||||
<field name="stamping_attach"/>
|
||||
<!-- <field name="stamping_state"/>-->
|
||||
<!-- <field name="stamping_state"/>-->
|
||||
</group>
|
||||
<group string="Second Stamping"
|
||||
attrs="{'invisible':['|',('stamping_count','=','1'),('stamping_count','=',False)]}">
|
||||
|
|
@ -150,6 +150,18 @@
|
|||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page attrs="{'readonly':[('state','=','approve')]}" name="contents"
|
||||
string="Property Contents">
|
||||
<field attrs="{'readonly':[('state','=','approve')]}" name="content_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="content_id"/>
|
||||
<field name="qty"/>
|
||||
<field name="desc"/>
|
||||
<field name="attachment"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
|
|
@ -257,9 +269,9 @@
|
|||
<filter domain="[('state', '=', 'draft')]" string="Draft" name="draft" help="Unit in Draft"/>
|
||||
<filter domain="[('state', '=', 'available')]" string="Available" name="available"
|
||||
help="Confirmed Unit"/>
|
||||
<filter domain="[('state', '=', 'reserve')]" string="Reserved" name="Reserved"
|
||||
<filter domain="[('state', '=', 'reserved')]" string="Reserved" name="Reserved"
|
||||
help="Reserved Unit"/>
|
||||
<filter domain="[('state', '=', 'rent')]" string="Rented" name="rent"
|
||||
<filter domain="[('state', '=', 'rented')]" string="Rented" name="rent"
|
||||
help="Rented Unit"/>
|
||||
<separator/>
|
||||
<group expand="0" string="Group By">
|
||||
|
|
|
|||
|
|
@ -18,6 +18,29 @@
|
|||
|
||||
</field>
|
||||
</record>
|
||||
<record id="property_contents_form_view" model="ir.ui.view">
|
||||
<field name="name">Property Contents</field>
|
||||
<field name="model">property.contents</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="content_name" required="1"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
<record id="property_contents_tree_view" model="ir.ui.view">
|
||||
<field name="name">Property sketchs</field>
|
||||
<field name="model">property.contents</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="content_name" required="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="property_sketchs_action" model="ir.actions.act_window">
|
||||
<field name="name">Property sketchs</field>
|
||||
|
|
@ -133,7 +156,6 @@
|
|||
</record>
|
||||
|
||||
|
||||
|
||||
<record id="property_type_action" model="ir.actions.act_window">
|
||||
<field name="name">Property Type</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
|
|
@ -163,6 +185,13 @@
|
|||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<record id="property_contents_action" model="ir.actions.act_window">
|
||||
<field name="name">Property Contents</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">property.contents</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
|
||||
<menuitem name="Property State" id="property_state_menu" parent="configuration_main_menu"
|
||||
action="property_state_action" sequence="1"/>
|
||||
|
|
@ -173,6 +202,9 @@
|
|||
<menuitem name="Property Sketchs" id="property_sketchs_menu" parent="configuration_main_menu"
|
||||
action="property_sketchs_action" sequence="9"/>
|
||||
|
||||
<menuitem name="Property Contents" id="property_contents_menu" parent="configuration_main_menu"
|
||||
action="property_contents_action" sequence="9"/>
|
||||
|
||||
<menuitem name="Property Face" id="property_face_menu" parent="configuration_main_menu"
|
||||
action="property_face_action" sequence="3"/>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue