clearcorp team mailing list archive
-
clearcorp team
-
Mailing list archive
-
Message #00094
[Merge] lp:~juan-munoz-clearcorp/openerp-ccorp-addons/rent into lp:openerp-ccorp-addons/6.1
Juan Felipe Muñoz Ramos has proposed merging lp:~juan-munoz-clearcorp/openerp-ccorp-addons/rent into lp:openerp-ccorp-addons/6.1.
Requested reviews:
CLEARCORP development team (clearcorp)
For more details, see:
https://code.launchpad.net/~juan-munoz-clearcorp/openerp-ccorp-addons/rent/+merge/100054
ADD rent field to objects
--
https://code.launchpad.net/~juan-munoz-clearcorp/openerp-ccorp-addons/rent/+merge/100054
Your team CLEARCORP development team is requested to review the proposed merge of lp:~juan-munoz-clearcorp/openerp-ccorp-addons/rent into lp:openerp-ccorp-addons/6.1.
=== modified file 'TODO-6.1/base_import_exchange_rates/currency_rate_update.py'
--- TODO-6.1/base_import_exchange_rates/currency_rate_update.py 2012-01-05 00:24:27 +0000
+++ TODO-6.1/base_import_exchange_rates/currency_rate_update.py 2012-03-29 23:03:19 +0000
@@ -36,8 +36,10 @@
import netsvc
import string
from tools.translate import _
-
-from tools import debug
+import logging
+#from tools import debug
+
+
class res_currency_rate_update_service(osv.osv):
"""Class thats tell for wich services wich currencies
@@ -103,7 +105,7 @@
'function' : 'run_currency_update',
'args' : '()',
}
-
+ logger2 = logging.getLogger('currency.rate.update')
logger = netsvc.Logger()
LOG_NAME = 'cron-rates'
MOD_NAME = 'c2c_currency_rate_update: '
@@ -196,20 +198,21 @@
service.write({'note':error_msg})
def get_next_date(self, cr, uid, context=None):
- tomorrow=datetime.date.today() + datetime.timedelta(days=1)
- pday= tomorrow.day
- pmonth = tomorrow.month
- pyear = tomorrow.year
- phour = "02:00:00"
- string = pyear+"-"+pmonth+"-"+pday+" "+phour
- res = time.strftime("%Y-%m-%d %H:%M:%S", (string).timetuple() )
- debug(res)
- return res
-
-
-
-
-
+ tomorrow=datetime.date.today() + datetime.timedelta(days=1)
+ pday= tomorrow.day
+ pmonth = tomorrow.month
+ pyear = tomorrow.year
+ phour = "02:00:00"
+ string = pyear+"-"+pmonth+"-"+pday+" "+phour
+ res = time.strftime("%Y-%m-%d %H:%M:%S", (string).timetuple() )
+ logger2.info(res)
+ #debug(res)
+ return res
+
+
+
+
+
Currency_rate_update()
@@ -495,7 +498,9 @@
"""Implementation of Currency_getter_factory interface
for PL NBP service"""
+
def get_updated_currency(self, cr, uid, currency_array, main_currency):
+ logger2 = logging.getLogger('bccr_getter')
"""implementation of abstract method of Curreny_getter_interface"""
today = time.strftime('%d/%m/%Y')
url1='http://indicadoreseconomicos.bccr.fi.cr/indicadoreseconomicos/WebServices/wsIndicadoresEconomicos.asmx/ObtenerIndicadoresEconomicos?tcNombre=clearcorp&tnSubNiveles=N&tcFechaFinal=' + today + '&tcFechaInicio='
@@ -531,7 +536,8 @@
url = url + '333' #333: indicator number for EUR rate
if url:
- debug(url)
+ #debug(url)
+ logger2.info(url)
rawstring = self.get_url(url)
dom = parseString(rawstring)
nodes = dom.getElementsByTagName('INGC011_CAT_INDICADORECONOMIC')
@@ -549,5 +555,6 @@
#rate = node[0].firstChild.data
if float(rate) > 0:
self.updated_currency[curr][date_str] = rate
- debug(self.updated_currency)
+ #debug(self.updated_currency)
+ logger2.info(self.updated_currency)
return self.updated_currency, self.log_info
=== modified file 'TODO-6.1/base_import_exchange_rates/currency_rate_update.xml'
--- TODO-6.1/base_import_exchange_rates/currency_rate_update.xml 2012-01-05 00:41:10 +0000
+++ TODO-6.1/base_import_exchange_rates/currency_rate_update.xml 2012-03-29 23:03:19 +0000
@@ -35,12 +35,13 @@
<field name="name">Exchange Rates Cron</field>
<field name="user_id" ref="base.user_root"/>
<field name="interval_type">days</field>
- <field name="interval_number" eval="1"/>
- <field name="numbercall" eval="-1"/>
+ <field name="interval_number" > 1</field>
+ <field name="numbercall" >-1</field>
<!--field name="nextcall" model="currency.rate.update" ='get_next_dat'/-->
<field name="doall" eval="True"/> <!-- Repeat missed calls? -->
<field name="model" eval="'currency.rate.update'"/>
<field name="function" eval="'run_currency_update'"/>
+ <field eval="'()'" name="args"/>
<field name="priority" eval="0"/>
</record>
=== modified file 'rent/rent.py'
--- rent/rent.py 2012-03-29 22:45:09 +0000
+++ rent/rent.py 2012-03-29 23:03:19 +0000
@@ -55,6 +55,7 @@
#Class that represents the estates owned by the user.
#This class also uses the rent.location defined above
class rent_estate(osv.osv):
+<<<<<<< TREE
_name = 'rent.estate'
_rec_name = "estate_number"
@@ -106,10 +107,66 @@
('estate_area_gt_zero', 'CHECK (estate_area!=0)', 'The area for the estate cannot be 0!'),
('estate_number_key','UNIQUE (estate_number)','You can not have two estates with the same number!'),
]
+=======
+ _name = 'rent.estate'
+ _rec_name = "estate_number"
+
+ def write (self, cr, uid,ids,vals,context=None):
+ #Check for the area before saving the changes
+ for obj_estate in self.browse(cr,uid,ids):
+ if obj_estate.estate_area == 0:
+ raise osv.except_osv('Wrong value!', 'The area for the estate has to bee greater than 0')
+ return super(rent_estate,self).write(cr,uid,ids,vals,context)
+ def create(self, cr, uid,vals, context=None):
+ #Check for the area before creating the object
+ if vals['estate_area'] == 0:
+ raise osv.except_osv('Wrong value!', 'The area for the estate has to bee greater than 0')
+ return super(rent_estate,self).create(cr,uid,vals,context)
+
+ def _get_estate_vrm(self,cr,uid,ids,field_name,args,context=None):
+ res = {}
+ for obj_estate in self.pool.get('rent.estate').browse(cr,uid,ids):
+ if obj_estate.estate_area == 0:
+ raise osv.except_osv('Wrong value!', 'The area for the estate has to bee greater than 0')
+ else:
+ res[obj_estate.id] = obj_estate.estate_value / (obj_estate.estate_area == 0 and 1 or obj_estate.estate_area)
+ return res
+
+ def calculate_vrm(self,cr,uid,ids,context):
+ res = {}
+ self.pool.get('rent.estate').write(cr, uid, ids, {}, context)
+ return { 'value' : res}
+ def _determine_rented(self,cr,uid,ids,field_name,args,context):
+ res = {}
+ for estate_id in ids:
+ res[estate_id] = False
+ rent_ids = self.pool.get('rent.rent').search(cr,uid,[('state','=','active'),('rent_related_real','=','estate'),('rent_rent_local_id','=',estate_id)])
+ if rent_ids:
+ res[estate_id] = True
+ return res
+ _columns = {
+ 'estate_owner_id' : fields.many2one('res.company','Owner',required=True),
+ 'estate_number' : fields.char('# estate', size=20,required=True),
+ 'estate_value' : fields.float('VRN Dynamic',required=True),
+ 'estate_area' : fields.float('Area', required=True),
+ 'estate_vrn_per_sqr' : fields.function(_get_estate_vrm,type='float',method=True,string='VRN Din/M2'),#fields.float('VRN Din/M2',store=False, readonly=True),
+ 'estate_buildings_ids': fields.one2many('rent.building','building_estate_id','Buildings'),
+ 'estate_location_id' : fields.many2one('res.partner.address','Location'),
+ 'estate_account_id' : fields.many2one('account.account', 'Cuenta'),
+ 'estate_rented' : fields.function(_determine_rented,type='boolean',method=True,string='Rented',help='Checked if the local is rented', store=True),
+ 'ref' : fields.char('ref', size=64),
+ }
+ _sql_constraints = [
+ ('estate_area_gt_zero', 'CHECK (estate_area!=0)', 'The area for the estate cannot be 0!'),
+ ('estate_number_key','UNIQUE (estate_number)','You can not have two estates with the same number!'),
+ ]
+rent_estate()
+>>>>>>> MERGE-SOURCE
#Class building to represente a Real Estate, that is on any land previously define by the user
#this class contains the necesary data to determine the value for rent of the building
class rent_building(osv.osv):
+<<<<<<< TREE
_name = 'rent.building'
def write (self, cr, uid,ids,vals,context=None):
@@ -158,6 +215,58 @@
('building_area_gt_zero', 'CHECK (building_area!=0)', 'The area for the building cannot be 0!'),
('building_code','UNIQUE (building_code)','You can not have two buildings with the same code!'),
]
+=======
+ _name = 'rent.building'
+
+ def write (self, cr, uid,ids,vals,context=None):
+ #Check for the area before saving the changes
+ for obj_building in self.browse(cr,uid,ids):
+ if obj_building.building_area == 0:
+ raise osv.except_osv('Wrong value!', 'The area for the building has to bee greater than 0')
+ return super(rent_building,self).write(cr,uid,ids,vals,context)
+ def create(self, cr, uid,vals, context=None):
+ #Check for the area before creating the object
+ if vals['building_area'] == 0:
+ raise osv.except_osv('Wrong value!', 'The area for the building has to bee greater than 0')
+ return super(rent_building,self).create(cr,uid,vals,context)
+
+ def _get_building_vrm(self,cr,uid,ids,field_name,args,context=None):
+ #This method calculates the vrn acording to the value an area of the building
+ res = {}
+ for building_id in ids:
+ obj_building = self.pool.get('rent.building').browse(cr,uid,building_id)
+ try:
+ res[building_id] = obj_building.building_value / obj_building.building_area
+ except:
+ res[building_id] = 0
+ return res
+
+ _columns = {
+ 'building_capacity' : fields.integer('Capacity'),
+ 'building_date_construction' : fields.date('Construction Date'),
+ 'building_elevator' : fields.boolean('Elevadores',help='Select if the building has at least one elevator'),
+ 'building_elevators_number' : fields.integer('Elvetators number',readonly=True,help='If checkbox of elevators is no selected this will be 0'),
+ 'building_stairs' : fields.boolean('Stairs',help='Select if the building has at least one elevator'),
+ 'building_stairs_number' : fields.integer('Stairs number',readonly=True,help='If checkbox of stairs is no selected this will be 0'),
+ 'name' : fields.char('Name', size=40,required=True),
+ 'building_value' : fields.float('VRN Dynamic',required=True),
+ 'building_area' : fields.float('Area',required=True),
+ 'building_estate_id' : fields.many2one('rent.estate', 'estate',required=True),
+ 'building_photo' : fields.binary('Photo'),
+ 'building_gallery_photo' : fields.char('Gallery of Photos', size=64),
+ 'building_floors_ids' : fields.one2many('rent.floor','floor_building_id','Floors'),
+ 'building_vrn_per_sqr' : fields.function(_get_building_vrm,type='float',method=True,string='VRN Din/M2'),
+ 'building_code' : fields.char('Code', size=4, required=True),
+ #'building_asset_id' : fields.many2one('account.asset.asset','Asset'),
+ 'building_company_id' : fields.many2one('res.company','Company',required=True),
+ 'ref' : fields.char('ref', size=64),
+ }
+ _sql_constraints = [
+ ('building_area_gt_zero', 'CHECK (building_area!=0)', 'The area for the building cannot be 0!'),
+ ('building_code','UNIQUE (building_code)','You can not have two buildings with the same code!'),
+ ]
+rent_building()
+>>>>>>> MERGE-SOURCE
#Class that represents every single floor contained on the building, defined above
#All floors are differenced by the number starting from 0 (basement), then higher
@@ -231,6 +340,7 @@
res.append((record['id'], name))
return res
+<<<<<<< TREE
_columns = {
'floor_number' : fields.char('# Floor',size=16,required=True, help='Number of the floor in the building, starts from 0 (Basement)'),
'floor_thickness' : fields.float('Thickness'),
@@ -246,6 +356,25 @@
('floor_area_gt_zero', 'CHECK (floor_area!=0)', 'The area for the floor cannot be 0!'),
('floor_building_number_key','UNIQUE(floor_number,floor_building_id)','You can not have two floors with the same number at the same building!'),
]
+=======
+ _columns = {
+ 'floor_number' : fields.char('# Floor',size=16,required=True, help='Number of the floor in the building, starts from 0 (Basement)'),
+ 'floor_thickness' : fields.float('Thickness'),
+ 'floor_durability' : fields.integer('Durability', help='Indicate the durability in years'),
+ 'floor_area' : fields.float('Area',required=True),
+ 'floor_value' : fields.function(_calculate_floor_value,type='float',method=True,string='Value',help='This value is calculated using the estate and building area and values'),
+ 'floor_acabado' : fields.char('Acabado',size=64),
+ 'floor_parking_ids' : fields.one2many('rent.floor.parking','parking_floor_id','Parking'),
+ 'floor_building_id' : fields.many2one('rent.building','Building'),
+ 'complete_name' : fields.function(_get_fullname,type='char',method=True,string='Name',help='This name uses the code of the building and the floor name'),
+ 'ref' : fields.char('ref', size=64),
+ }
+ _sql_constraints = [
+ ('floor_area_gt_zero', 'CHECK (floor_area!=0)', 'The area for the floor cannot be 0!'),
+ ('floor_building_number_key','UNIQUE(floor_number,floor_building_id)','You can not have two floors with the same number at the same building!'),
+ ]
+rent_floor()
+>>>>>>> MERGE-SOURCE
#Class representing the local, on every floor. This class has a relation
#with the floor throught the class rent_local_floor
@@ -293,6 +422,7 @@
total = 0
return res
+<<<<<<< TREE
#def name_get(self, cr, uid, ids, context=None):
# if not len(ids):
# return []
@@ -331,6 +461,48 @@
_sql_constraints = [
('local_huella_gt_zero', 'CHECK (local_huella!=0)', 'The area for the floor cannot be 0!'),
]
+=======
+ #def name_get(self, cr, uid, ids, context=None):
+ # if not len(ids):
+ # return []
+ # reads = self.read(cr, uid, ids, ['local_number','local_building'], context=context)
+ # res = []
+ # for record in reads:
+ # if record['local_number'] and record['local_building'] and record['local_building'][1]:
+ # name = 'Local #' + str(record['local_number']) + ' , ' + record['local_building'][1]
+ # res.append((record['id'], name))
+ # return res
+
+ #This method takes the area of every record of local_by_floor and calculates the total area
+ def _local_area(self,cr,uid,ids,field_name,args,context):
+ res = {}
+ for obj_local in self.pool.get('rent.floor.local').browse(cr,uid,ids):
+ total = 0
+ for obj_local_floor in obj_local.local_local_by_floor_ids:
+ total += obj_local_floor.local_floor_area
+ res[obj_local.id] = total
+ return res
+
+ _columns = {
+ 'local_area' : fields.function(_local_area,type='float',method=True,string='VRN Dynamic'),
+ 'local_number' : fields.char('# Local',required=True, size=64),
+ 'ref' : fields.char('ref', size=64),
+ 'local_huella' : fields.float('Huella',required=True),
+ 'local_water_meter_number' : fields.char('Water Meter',size=64),
+ 'local_light_meter_number' : fields.char('Electric Meter', size=64),
+ 'local_rented' : fields.function(_determine_rented,type='boolean',method=True,string='Rented',help='Check if the local is rented',store=True),
+ 'local_local_by_floor_ids' : fields.one2many('rent.local.floor','local_local_floor_id','Local floors'),
+ 'local_building' : fields.function(_get_building_local,type='many2one',obj='rent.building',method=True,string='Building'),
+ 'local_gallery_photo' : fields.char('Photo Gallery', size=64),
+ 'local_photo' : fields.binary('Main photo'),
+ 'local_rise_historic_ids' : fields.one2many('rent.rent.anual.value','anual_value_local_ids','Historic', readonly=True),
+ 'local_notes' : fields.text('Notes'),
+ }
+ _sql_constraints = [
+ ('local_huella_gt_zero', 'CHECK (local_huella!=0)', 'The area for the floor cannot be 0!'),
+ ]
+rent_floor_local()
+>>>>>>> MERGE-SOURCE
##Class used to connect the local to the floor, its a many to one relation with the floor, allowing to locate it
##in one or more floors of the same building
@@ -400,6 +572,7 @@
#many2one with the floor
#
class rent_floor_parking(osv.osv):
+<<<<<<< TREE
_name = 'rent.floor.parking'
_rec_name = 'parking_number'
@@ -476,6 +649,86 @@
('local_floor_side_gt_zero', 'CHECK (local_floor_side!=0)', 'The side for the local cannot be 0!'),
('parking_number_key','UNIQUE (parking_number,parking_floor_id)','You can not repeat the parking number at the same floor!'),
]
+=======
+ _name = 'rent.floor.parking'
+ _rec_name = 'parking_number'
+
+ def _parking_sqr_price(self,cr,uid,ids,field_name,args,context):
+ res = {}
+ for parking_id in ids:
+ obj = self.pool.get('rent.floor.parking').browse(cr,uid,parking_id)
+ obj_build = obj.parking_floor_id.floor_building_id
+ res[parking_id] = obj_build._get_building_vrm(obj_build.id,None,None)[obj_build.id]
+ return res
+
+ def _parking_value(self,cr,uid,ids,field_name,args,context):
+ res = {}
+ for parking_id in ids:
+ obj = self.pool.get('rent.floor.parking').browse(cr,uid,parking_id)
+ areas = obj._parking_area(parking_id,None,None)
+ obj_build = obj.parking_floor_id.floor_building_id
+ res[parking_id] = areas[parking_id] * obj_build._get_building_vrm(obj_build.id,None,None)[obj_build.id]
+ return res
+
+ def _parking_area(self,cr,uid,ids,field_name,args,context):
+ res = {}
+ for parking_id in ids:
+ obj = self.pool.get('rent.floor.parking').browse(cr,uid,parking_id)
+ res[parking_id] = obj.parking_large * obj.parking_width
+ return res
+
+ #def name_get(self, cr, uid, ids, context=None):
+ # if not len(ids):
+ # return []
+ # reads = self.read(cr, uid, ids, ['parking_number','parking_floor_id'], context=context)
+ # res = []
+ # #debug('NOMBREPARKEO+==================================')
+ # for record in reads:
+ # #debug(record)
+ # #debug(record['parking_floor_id'][1])
+ # name = 'Parking #' + str(record['parking_number']) + ' , ' + record['parking_floor_id'][1]
+ # # for subrecord in subreads
+ # # name += ', ' + subrecord['local_floor_building']
+ # res.append((record['id'], name))
+ # return res
+
+ def _determine_rented(self,cr,uid,ids,field_name,args,context):
+ res = {}
+ for parking_id in ids:
+ res[parking_id] = False
+ rent_ids = self.pool.get('rent.rent').search(cr,uid,[('state','=','active'),('rent_related_real','=','parking'),('rent_rent_parking_id','=',parking_id)])
+ if rent_ids:
+ res[parking_id] = True
+ return res
+ def onchange_floor(self,cr,uid,ids,floor_id):
+ res = {}
+ obj_floor = self.pool.get('rent.floor').browse(cr,uid,floor_id)
+ res['parking_floor_building'] = obj_floor.floor_building_id.id
+ return {'value' : res}
+
+ _columns = {
+ 'parking_area' : fields.function(_parking_area,type='float',method=True,string='Area'),
+ 'parking_value' : fields.function(_parking_value,type='float',method=True,string='Value'),
+ #'parking_number' : fields.integer('# Parking',required=True),
+ 'parking_number' : fields.char('# Parking',required=True, size=64),
+ 'parking_huella' : fields.float('Huella',required=True),
+ 'parking_sqrmeter_price' : fields.function(_parking_sqr_price,type='float',method=True,string='Sqr Meter Value'),
+ 'parking_rented' : fields.function(_determine_rented,type='boolean',method=True,string='Rented',help='Checked if the parking is rented'),
+ 'parking_floor_id' : fields.many2one('rent.floor','# Floor',required=True),
+ 'parking_large' : fields.float('Large Meters'),
+ 'parking_width' : fields.float('Width Meters'),
+ 'parking_floor_building' : fields.related('parking_floor_id','floor_building_id',type='many2one',relation='rent.building',string='Building', readonly=True, store=False),
+ 'ref' : fields.char('ref', size=64),
+ }
+ _sql_constraints = [
+ ('parking_huella_gt_zero', 'CHECK (parking_area!=0)', 'The huella for the parking cannot be 0!'),
+ ('parking_large_gt_zero', 'CHECK (parking_large!=0)', 'The large for the parking cannot be 0!'),
+ ('parking_width_gt_zero', 'CHECK (parking_width!=0)', 'The width for the parking cannot be 0!'),
+ ('local_floor_side_gt_zero', 'CHECK (local_floor_side!=0)', 'The side for the local cannot be 0!'),
+ ('parking_number_key','UNIQUE (parking_number,parking_floor_id)','You can not repeat the parking number at the same floor!'),
+ ]
+rent_floor_parking()
+>>>>>>> MERGE-SOURCE
class rent_rent_group(osv.osv):
_name = 'rent.rent.group'
=== modified file 'rent/rent_view.xml'
--- rent/rent_view.xml 2012-03-29 21:41:33 +0000
+++ rent/rent_view.xml 2012-03-29 23:03:19 +0000
@@ -8,6 +8,7 @@
-->
<menuitem id = "rent_manager" name = "Rent" web_icon="data/rent.png"
web_icon_hover="data/rent-hover.png"/>
+<<<<<<< TREE
<menuitem id = "rent_client_menu" name = "Customers" parent = "rent_manager"/>
<menuitem id="menu_account_customer" name="Customers"
parent="rent_client_menu"
@@ -1450,6 +1451,1500 @@
</field>
</record>
</data>
+=======
+ <menuitem id = "rent_client_menu" name = "Clients" parent = "rent_manager"/>
+ <menuitem id = "rent_client_submenu" name = "Client" parent = "rent_client_menu" action = "action_client_form_view"/>
+
+
+ <!--
+ ======================================
+ CONTACTS
+ ======================================
+ -->
+ <record model = "ir.ui.view" id = "client_contact_form_view">
+ <field name = "name">res.partner.contact.form</field>
+ <field name = "model">res.partner.contact</field>
+ <field name = "type">form</field>
+ <field name="inherit_id" ref="base_contact.view_partner_contact_form"/>
+ <field name="arch" type="xml">
+ <data>
+ <field name = "birthdate" position = "replace"/>
+ <field name = "first_name" position = "after">
+ <field name = "birthdate" attrs = "{'required': 'True'}"/>
+ </field>
+ </data>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "client_contact_tree_view">
+ <field name = "name">res.partner.contact.tree2</field>
+ <field name = "model">res.partner.contact</field>
+ <field name = "type">tree</field>
+ <field name="inherit_id" ref="base_contact.view_partner_contact_tree"/>
+ <field name="arch" type="xml">
+ <data>
+ <field name = "function" position = "after">
+ <field name = "birthdate"/>
+ </field>
+ </data>
+ </field>
+ </record>
+
+ <record model = "ir.actions.act_window" id = "action_client_contact_form_view">
+ <field name = "name">Contacts</field>
+ <field name = "res_model">res.partner.contact</field>
+ <field name = "type">ir.actions.act_window</field>
+ <field name = "view_type">form</field>
+ <field name = "view_mode">tree,form</field>
+ <field name = "view_id" ref = "client_contact_tree_view"/>
+ </record>
+ <!-- <menuitem id = "rent_client_contact_submenu" name = "Contacts" parent = "rent_client_menu" action = "action_client_contact_form_view"/>-->
+ <!--
+ ======================================
+ ESTATES
+ ======================================
+ -->
+ <record id = "view_estate_filter" model = "ir.ui.view">
+ <field name = "name">rent.estate.select</field>
+ <field name = "model">rent.estate</field>
+ <field name = "type">search</field>
+ <field name = "arch" type = "xml">
+ <search string = "Search Estate">
+ <group>
+ <filter string = "Rented" icon = "terp-sale" domain = "[('estate_rented','=',True)]"/>
+ <filter string = "Not Rented" icon = "gtk-cancel" domain = "[('estate_rented','=',False)]"/>
+ <separator orientation="vertical"/>
+ <field name="estate_number"/>
+ <field name="estate_owner_id"/>
+ </group>
+ <newline/>
+ <group expand = "0" string = "Group By...">
+ <filter string = "Owners" icon = "terp-personal" domain = "[]" context="{'group_by' : 'estate_owner_id'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+ <record model = "ir.ui.view" id = "estate_form_view">
+ <field name = "name">rent.estate.form</field>
+ <field name = "model">rent.estate</field>
+ <field name = "type">form</field>
+ <field name = "arch" type = "xml">
+ <form string = "estate Detail">
+ <group col = "4" colspan = "4">
+ <separator string = "General Information" col = "4" colspan = "4"/>
+ <field name = "estate_owner_id"/>
+ <field name = "estate_number"/>
+ <field name="ref"/>
+ <field name = "estate_value" />
+ <field name = "estate_area" />
+ <field name = "estate_vrn_per_sqr"/>
+ <field name = "estate_account_id"/>
+ <field name = "estate_rented"/>
+ <button colspan="2" name="calculate_vrm" string="Compute Values" type="object" groups="base.group_user" icon="terp-stock_format-scientific"/>
+ </group>
+ <notebook colspan = "4">
+ <page string = "Location">
+ <field name = "estate_location_id" colspan="4" nolabel="1" select="1" attrs = "{'readonly' : [('estate_owner_id','=','')]}" domain="[('partner_id','=',estate_owner_id)]"/>
+ </page>
+ <page string = "Buildings">
+ <field name = "estate_buildings_ids" context="{'form_view_ref' : 'rent.building_form_view3', 'tree_view_ref' : 'rent.building_tree_view'}" nolabel="1"/>
+ </page>
+ </notebook>
+ </form>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "estate_tree_view">
+ <field name = "name">rent.estate.tree</field>
+ <field name = "model">rent.estate</field>
+ <field name = "type">tree</field>
+ <field name = "arch" type = "xml">
+ <tree string = "estate Detail">
+ <field name = "estate_number" select = "1"/>
+ <field name = "estate_owner_id" select = "1"/>
+ <field name = "estate_area" />
+ <field name = "estate_value"/>
+ <field name = "estate_vrn_per_sqr"/>
+ <field name = "estate_rented"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model = "ir.actions.act_window" id = "action_estate_form_view">
+ <field name = "name">estate Detail</field>
+ <field name = "res_model">rent.estate</field>
+ <field name = "type">ir.actions.act_window</field>
+ <field name = "view_type">form</field>
+ <field name = "view_mode">tree,form</field>
+ <field name = "view_id" ref="estate_tree_view"/>
+ <!--field name="domain">[('estate_owner_id','=',user.company_id.id)]</field-->
+ <field name = "search_view_id" ref = "view_estate_filter"/>
+ <field name="help">Manage the estates that your company owns, to have them available in your system, an estate is a portion of land commonly used for construction, in some cases it can have more than a single estructure, for example
+ a building. Here yo can set the main data for the estate and also create the buildings that belongs to it.</field>
+ </record>
+
+ <!--
+ ======================================
+ ESTATE MENU
+ ======================================
+ -->
+ <menuitem id = "rent_estate_menu" name = "Real Estate" parent = "rent_manager"/>
+ <menuitem id = "rent_estate_submenu" name = "Estate" parent = "rent_estate_menu" action = "action_estate_form_view"/>
+
+
+ <!--
+ ======================================
+ BUILDING
+ ======================================
+ -->
+
+ <record id = "view_building_filter" model = "ir.ui.view">
+ <field name = "name">rent.building.select</field>
+ <field name = "model">rent.building</field>
+ <field name = "type">search</field>
+ <field name = "arch" type = "xml">
+ <search string = "Search Building">
+ <group>
+ <separator orientation="vertical"/>
+ <field name="name"/>
+ <field name="building_estate_id"/>
+ <field name="building_code"/>
+ </group>
+ <group expand = "0" string = "Group By...">
+ <filter string = "Estates" icon = "terp-go-home" domain = "[]" context="{'group_by' : 'building_estate_id'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "building_tree_view">
+ <field name = "name">rent.building.tree</field>
+ <field name = "model">rent.building</field>
+ <field name = "type">tree</field>
+ <field name = "arch" type = "xml">
+ <tree string="Building Details">
+ <field name="name"/>
+ <field name="building_company_id"/>
+ <field name="building_date_construction"/>
+ <field name="building_value"/>
+ <field name="building_area"/>
+ <field name = "building_vrn_per_sqr"/>
+ <field name="building_capacity"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model ="ir.ui.view" id = "building_form_view3">
+ <field name = "name">rent.building.form3</field>
+ <field name = "model">rent.building</field>
+ <field name = "type">form</field>
+ <field name = "arch" type = "xml">
+ <form string = "Building Details">
+ <group col = "4" colspan = "2">
+ <separator string = "General Information" col = "4" colspan = "4"/>
+ <field name = "name" select = "1"/>
+ <field name = "building_code"/>
+ <field name="ref"/>
+ <field name = "building_company_id"/>
+ <field name = "building_date_construction" select = "1"/>
+ <field name = "building_area"/>
+ <field name = "building_value"/>
+ <field name = "building_capacity"/>
+ <field name = "building_vrn_per_sqr"/>
+ </group>
+ <group col = "4" colspan = "2">
+ <separator string = "Photos" col = "4" colspan = "4"/>
+ <field name = "building_photo" widget = "image" nolabel="1" img_width="200" img_height="180" colspan = "4"/>
+ <field name = "building_gallery_photo" widget = "url" />
+ </group>
+ <notebook>
+ <page string = "Floors">
+ <field name = "building_floors_ids" mode = "form,tree" nolabel = "1">
+ <form string = "Floor Details">
+ <group col = "4" colspan = "2">
+ <separator string = "General Information" col = "4" colspan = "4"/>
+ <field name = "floor_number"/>
+ <field name = "floor_area"/>
+ <field name = "floor_value"/>
+ </group>
+ <group col = "4" colspan = "2">
+ <separator string = "Design Information" col = "4" colspan = "4"/>
+ <field name = "floor_thickness"/>
+ <field name = "floor_durability"/>
+ <field name = "floor_acabado"/>
+ </group>
+ </form>
+ <tree string="Floor Details">
+ <field name="floor_number"/>
+ <field name="floor_value"/>
+ <field name="floor_area"/>
+ </tree>
+ </field>
+ </page>
+ <!--<page string = "Assets">
+ <field name = "building_asset_id"/>
+ </page>-->
+ <page string = "Machinery">
+ <group col = "4" colspan = "4">
+ <separator string = "Machinery" col = "4" colspan = "4"/>
+ <field name = "building_elevator"/>
+ <field name = "building_elevators_number" attrs="{'readonly':[('building_elevator','!=','True')]}"/>
+ <field name = "building_stairs"/>
+ <field name = "building_stairs_number" attrs="{'readonly':[('building_stairs','!=','True')]}"/>
+ </group>
+ </page>
+ </notebook>
+ </form>
+ </field>
+ </record>
+
+
+ <record model = "ir.ui.view" id = "building_tree_view2">
+ <field name = "name">rent.building.tree2</field>
+ <field name = "model">rent.building</field>
+ <field name = "type">tree</field>
+ <field name = "arch" type = "xml">
+ <tree string="Building Details">
+ <field name="name"/>
+ <field name="building_estate_id"/>
+ <field name="building_company_id"/>
+ <field name="building_date_construction"/>
+ <field name="building_value"/>
+ <field name="building_area"/>
+ <field name = "building_vrn_per_sqr"/>
+ <field name="building_capacity"/>
+ </tree>
+ </field>
+ </record>
+
+
+ <record model ="ir.ui.view" id = "building_form_view2">
+ <field name = "name">rent.building.form2</field>
+ <field name = "model">rent.building</field>
+ <field name = "type">form</field>
+ <field name = "arch" type = "xml">
+ <form string = "Building Details">
+ <group col = "4" colspan = "2">
+ <separator string = "General Information" col = "4" colspan = "4"/>
+ <field name = "name" select = "1"/>
+ <field name = "building_code"/>
+ <field name = "building_estate_id"/>
+ <field name = "building_company_id"/>
+ <field name="ref"/>
+ <field name = "building_date_construction" select = "1"/>
+ <field name = "building_area"/>
+ <field name = "building_value"/>
+ <field name = "building_capacity"/>
+ <field name = "building_vrn_per_sqr"/>
+ </group>
+ <group col = "4" colspan = "2">
+ <separator string = "Photos" col = "4" colspan = "4"/>
+ <field name = "building_photo" widget = "image" nolabel="1" img_width="200" img_height="180" colspan = "4"/>
+ <field name = "building_gallery_photo" widget = "url" />
+ </group>
+ <notebook>
+ <page string = "Floors">
+ <field name = "building_floors_ids" mode = "form,tree" nolabel = "1">
+ <form string = "Floor Details">
+ <group col = "4" colspan = "2">
+ <separator string = "General Information" col = "4" colspan = "4"/>
+ <field name = "floor_number"/>
+ <field name = "floor_area"/>
+ <field name = "floor_value"/>
+ </group>
+ <group col = "4" colspan = "2">
+ <separator string = "Design Information" col = "4" colspan = "4"/>
+ <field name = "floor_thickness"/>
+ <field name = "floor_durability"/>
+ <field name = "floor_acabado"/>
+ </group>
+ </form>
+ <tree string="Floor Details">
+ <field name="floor_number"/>
+ <field name="floor_value"/>
+ <field name="floor_area"/>
+ </tree>
+ </field>
+ </page>
+ <!--<page string = "Assets">
+ <field name = "building_asset_id"/>
+ </page>-->
+ <page string = "Machinery">
+ <group col = "4" colspan = "4">
+ <separator string = "Machinery" col = "4" colspan = "4"/>
+ <field name = "building_elevator"/>
+ <field name = "building_elevators_number" attrs="{'readonly':[('building_elevator','!=','True')]}"/>
+ <field name = "building_stairs"/>
+ <field name = "building_stairs_number" attrs="{'readonly':[('building_stairs','!=','True')]}"/>
+ </group>
+ </page>
+ </notebook>
+ </form>
+ </field>
+ </record>
+
+ <!--<record model = "ir.actions.act_window" id = "action_building_form_view">
+ <field name = "name">Building Detail</field>
+ <field name = "res_model">rent.building</field>
+ <field name = "type">ir.actions.act_window</field>
+ <field name = "view_type">form</field>
+ <field name = "view_mode">tree,form</field>
+ <field name = "search_view_id" ref = "view_building_filter"/>
+ </record>-->
+
+
+ <record id="action_building_form" model="ir.actions.act_window">
+ <field name="name">building</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">rent.building</field>
+ <field name="view_type">form</field>
+ <!--field name="domain">[('building_estate_id.estate_owner_id', '=', uid.company_id.id)]</field-->
+ <field name="help">Manage every parking that belongs to a determined estate. This is the main view where you can create a building record
+ but you can still do it from the estate form</field>
+ </record>
+
+ <record id="action_building_tree_view2" model="ir.actions.act_window.view">
+ <field name="view_mode">tree</field>
+ <field name="view_id" ref="building_tree_view2"/>
+ <field name="act_window_id" ref="action_building_form"/>
+ </record>
+
+ <record id="action_building_form_view2" model="ir.actions.act_window.view">
+ <field name="view_mode">form</field>
+ <field name="view_id" ref="building_form_view2"/>
+ <field name="act_window_id" ref="action_building_form"/>
+ </record>
+
+ <!--
+ ======================================
+ BUILDING MENU
+ ======================================
+ -->
+ <menuitem id = "rent_building_submenu" name = "Building" parent = "rent_estate_menu" action = "action_building_form" sequence="10"/>
+
+ <!--
+ ======================================
+ FLOOR MENU
+ ======================================
+ -->
+ <record id = "view_floor_filter" model = "ir.ui.view">
+ <field name = "name">rent.floor.select</field>
+ <field name = "model">rent.floor</field>
+ <field name = "type">search</field>
+ <field name = "arch" type = "xml">
+ <search string = "Search Floor">
+ <group>
+ <field name="floor_building_id"/>
+ </group>
+ <group expand = "0" string = "Group By...">
+ <filter string = "Edificio" icon = "terp-go-home" domain = "[]" context="{'group_by' : 'floor_building_id'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record model ="ir.ui.view" id = "floor_form_view">
+ <field name = "name">rent.floor.form2</field>
+ <field name = "model">rent.floor</field>
+ <field name = "type">form</field>
+ <field name = "arch" type = "xml">
+ <form string = "Floor Details">
+ <group col = "4" colspan = "2">
+ <separator string = "General Information" col = "4" colspan = "4"/>
+ <field name = "floor_building_id" select = "1"/>
+ <field name = "floor_number"/>
+ <field name="ref"/>
+ <field name = "floor_area"/>
+ <field name = "floor_value"/>
+ </group>
+ <group col = "4" colspan = "2">
+ <separator string = "Design Information" col = "4" colspan = "4"/>
+ <field name = "floor_thickness"/>
+ <field name = "floor_durability"/>
+ <field name = "floor_acabado"/>
+ </group>
+ <notebook colspan = "4">
+ <!--<page string = "Local">
+ <field name = "floor_local" nolabel="1"/>
+ </page>-->
+ <page string = "Parking">
+ <field name = "floor_parking_ids" context="{'form_view_ref' : 'rent.parking_form_view', 'tree_view_ref' : 'rent.parking_tree_view'}" nolabel="1"/>
+ </page>
+ </notebook>
+ </form>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "floor_tree_view">
+ <field name = "name">rent.floor.tree</field>
+ <field name = "model">rent.floor</field>
+ <field name = "type">tree</field>
+ <field name = "arch" type = "xml">
+ <tree string="Floor Details">
+ <field name="complete_name"/>
+ <field name = "floor_building_id"/>
+ <field name="floor_value"/>
+ <field name="floor_area"/>
+ </tree>
+ </field>
+ </record>
+
+
+ <record id="action_floor_form" model="ir.actions.act_window">
+ <field name="name">Floors</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">rent.floor</field>
+ <field name="view_type">form</field>
+ <field name = "search_view_id" ref = "view_floor_filter"/>
+ <!--field name="domain">[('floor_building_id.building_estate_id.estate_owner_id','=',uid.company_id.id)]</field-->
+ <field name="help">Manage every floor that belongs to a determined Building. This is the main view where you can create a floor record
+ but you can still do it from the building form</field>
+ </record>
+ <record id="action_floor_form_view1" model="ir.actions.act_window.view">
+ <field eval="10" name="sequence"/>
+ <field name="view_mode">tree</field>
+ <field name="view_id" ref="floor_tree_view"/>
+ <field name="act_window_id" ref="action_floor_form"/>
+ </record>
+ <record id="action_floor_form_view2" model="ir.actions.act_window.view">
+ <field eval="20" name="sequence"/>
+ <field name="view_mode">form</field>
+ <field name="view_id" ref="floor_form_view"/>
+ <field name="act_window_id" ref="action_floor_form"/>
+ </record>
+ <!--
+ ======================================
+ FLOOR MENU
+ ======================================
+ -->
+ <menuitem id = "rent_floor_submenu" name = "Floors" parent = "rent_estate_menu" action = "action_floor_form"/>
+
+
+ <!--
+ ======================================
+ LOCAL
+ ======================================
+ -->
+ <record id = "view_local_filter" model = "ir.ui.view">
+ <field name = "name">rent.floor.local.select</field>
+ <field name = "model">rent.floor.local</field>
+ <field name = "type">search</field>
+ <field name = "arch" type = "xml">
+ <search string = "Search Local">
+ <group>
+ <filter string = "Rented" icon = "terp-sale" domain = "[('local_rented','=',True)]"/>
+ <filter string = "Not Rented" icon = "gtk-cancel" domain = "[('local_rented','=',False)]"/>
+ <separator orientation="vertical"/>
+ <field name="local_number"/>
+ <field name="local_building"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "local_form_view">
+ <field name = "name">rent.floor.local.form</field>
+ <field name = "model">rent.floor.local</field>
+ <field name = "type">form</field>
+ <field name = "arch" type = "xml">
+ <form string = "Local Details">
+ <group col = "4" colspan = "2">
+ <separator string = "Photos" col = "4" colspan = "4"/>
+ <field name = "local_photo" widget = "image" nolabel="1" img_width="200" img_height="180" colspan = "4"/>
+ <field name = "local_gallery_photo" widget = "url" colspan = "4"/>
+ </group>
+ <group col = "4" colspan = "2">
+ <separator string = "General Information"/>
+ <field name = "local_building"/>
+ <field name = "local_number"/>
+ <field name="ref"/>
+ <field name = "local_area"/>
+ <field name = "local_huella"/>
+ <separator string = "Miscelanius Information"/>
+ <!--<field name = "local_sqrmeter_price"/>-->
+ <field name = "local_rented"/>
+ <field name = "local_water_meter_number"/>
+ <field name = "local_light_meter_number"/>
+ </group>
+ <notebook>
+ <page string = "Floor List">
+
+ <field name = "local_local_by_floor_ids" nolabel="1"/>
+
+ </page>
+ <page string = "Price historic">
+ <field name = "local_rise_historic_ids" nolabel="1"/>
+ </page>
+ <page string = "Notes">
+ <field name = "local_notes" nolabel="1"/>
+ </page>
+ </notebook>
+ </form>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "local_tree_view">
+ <field name = "name">rent.floor.local.tree</field>
+ <field name = "model">rent.floor.local</field>
+ <field name = "type">tree</field>
+ <field name = "arch" type = "xml">
+ <tree string = "Local List">
+ <field name = "local_building"/>
+ <field name = "local_number"/>
+ <!--<field name = "local_value"/>-->
+ <field name = "local_area"/>
+ <field name = "local_rented"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model = "ir.actions.act_window" id = "action_local_form_view">
+ <field name = "name">Local Detail</field>
+ <field name = "res_model">rent.floor.local</field>
+ <field name = "type">ir.actions.act_window</field>
+ <field name = "view_type">form</field>
+ <field name = "view_mode">tree,form</field>
+ <field name = "view_id" ref = "local_tree_view"/>
+ <field name = "search_view_id" ref = "view_local_filter"/>
+ <field name="help">Manage every local that belongs to a determined floor. This is the only view where you can create a floor record</field>
+ </record>
+
+ <menuitem id = "rent_local_submenu" name = "Locals" parent = "rent_estate_menu" action = "action_local_form_view"/>
+
+ <!--
+ ======================================
+ LOCAL BY FLOOR
+ ======================================
+ -->
+
+ <record model = "ir.ui.view" id = "local_floor_form_view">
+ <field name = "name">rent.local.floor.form</field>
+ <field name = "model">rent.local.floor</field>
+ <field name = "type">form</field>
+ <field name = "arch" type = "xml">
+ <form string = "Local Details">
+ <group col = "4" colspan = "4">
+ <separator string = "General Information"/>
+ <field name = "local_floor_floor_id" select = "1" on_change = "onchange_floor(local_floor_floor_id)"/>
+ <field name = "local_floor_building" select = "1"/>
+ <!---->
+ </group>
+ <group col = "4" colspan = "4">
+ <separator string = "Floor Specifications"/>
+ <field name = "local_local_floor_id"/>
+ <field name = "local_floor_front"/>
+ <field name = "local_floor_side"/>
+ <field name = "local_sqrmeter_price"/>
+ <field name = "local_floor_value"/>
+ <!---->
+ </group>
+ </form>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "local_floor_tree_view">
+ <field name = "name">rent.local.floor.tree</field>
+ <field name = "model">rent.local.floor</field>
+ <field name = "type">tree</field>
+ <field name = "arch" type = "xml">
+ <tree string = "Location in floor list" editable="bottom">
+ <field name = "local_floor_building" select = "1" />
+ <field name = "local_floor_floor_id" select = "1" on_change = "onchange_floor(local_floor_floor_id)"/>
+ <field name = "local_floor_front"/>
+ <field name = "local_floor_side"/>
+ <field name = "local_floor_area"/>
+ <field name = "local_sqrmeter_price" sum = "Sqr Meter Total"/>
+ <field name = "local_floor_value" sum = "Total"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model = "ir.actions.act_window" id = "action_local_floor_form_view">
+ <field name = "name">Local Detail</field>
+ <field name = "res_model">rent.local.floor</field>
+ <field name = "type">ir.actions.act_window</field>
+ <field name = "view_type">form</field>
+ <field name = "view_mode">tree,form</field>
+ </record>
+
+ <!--
+ ======================================
+ PARKING
+ ======================================
+ -->
+ <record id = "view_parking_filter" model = "ir.ui.view">
+ <field name = "name">rent.floor.parking.select</field>
+ <field name = "model">rent.floor.parking</field>
+ <field name = "type">search</field>
+ <field name = "arch" type = "xml">
+ <search string = "Search Parking">
+ <group>
+ <filter string = "Rented" icon = "gtk-check" domain = "[('parking_rented','=',True)]"/>
+ <filter string = "Not Rented" icon = "gtk-cancel" domain = "[('parking_rented','=',False)]"/>
+ <separator orientation="vertical"/>
+ <field name="parking_floor_id"/>
+ <field name="parking_number"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "parking_tree_view">
+ <field name = "name">rent.floor.parking.tree</field>
+ <field name = "model">rent.floor.parking</field>
+ <field name = "type">tree</field>
+ <field name = "arch" type = "xml">
+ <tree string = "Parking List">
+ <field name = "parking_number"/>
+ <field name = "parking_value"/>
+ <field name = "parking_area"/>
+ <field name = "parking_rented"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "parking_form_view">
+ <field name = "name">rent.floor.parking.form</field>
+ <field name = "model">rent.floor.parking</field>
+ <field name = "type">form</field>
+ <field name = "arch" type = "xml">
+ <form string = "Parking Details">
+ <group col = "4" colspan = "4">
+ <separator string = "General Information"/>
+ <field name = "parking_number"/>
+ <field name="ref"/>
+ <field name = "parking_value"/>
+ <field name = "parking_sqrmeter_price"/>
+ <field name = "parking_rented"/>
+ </group>
+ <group col = "4" colspan = "4">
+ <separator string = "Area Specifications Information"/>
+ <field name = "parking_large"/>
+ <field name = "parking_width"/>
+ <field name = "parking_area"/>
+ <field name = "parking_huella"/>
+ </group>
+ </form>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "parking_tree_view2">
+ <field name = "name">rent.floor.parking.tree2</field>
+ <field name = "model">rent.floor.parking</field>
+ <field name = "type">tree</field>
+ <field name = "arch" type = "xml">
+ <tree string = "Parking List">
+ <field name = "parking_floor_building"/>
+ <field name = "parking_floor_id"/>
+ <field name = "parking_number"/>
+ <field name = "parking_value"/>
+ <field name = "parking_area"/>
+ <field name = "parking_rented"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "parking_form_view2">
+ <field name = "name">rent.floor.parking.form2</field>
+ <field name = "model">rent.floor.parking</field>
+ <field name = "type">form</field>
+ <field name = "arch" type = "xml">
+ <form string = "Parking Details">
+ <group col = "4" colspan = "4">
+ <separator string = "General Information"/>
+ <field name = "parking_floor_building"/>
+ <field name = "parking_floor_id" on_change="onchange_floor(parking_floor_id)"/>
+ <field name = "parking_number"/>
+ <field name="ref"/>
+ <field name = "parking_value"/>
+ <field name = "parking_sqrmeter_price"/>
+ <field name = "parking_rented"/>
+ </group>
+ <group col = "4" colspan = "4">
+ <separator string = "Area Specifications Information"/>
+ <field name = "parking_large"/>
+ <field name = "parking_width"/>
+ <field name = "parking_area"/>
+ <field name = "parking_huella"/>
+ </group>
+ </form>
+ </field>
+ </record>
+
+ <record id="action_parking_form" model="ir.actions.act_window">
+ <field name="name">Parking</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">rent.floor.parking</field>
+ <field name="view_type">form</field>
+ <!--field name="domain">[('parking_floor_id.floor_building_id.building_estate_id.estate_owner_id.id','=',user.company_id.id)]</field-->
+ <field name = "search_view_id" ref = "view_parking_filter"/>
+ <field name="help">Manage every parking that belongs to a determined floor. This is the main view where you can create a parking record
+ but you can still do it from the floor form</field>
+ </record>
+
+ <record id="action_parking_tree_view1" model="ir.actions.act_window.view">
+ <field name="view_mode">tree</field>
+ <field name="view_id" ref="parking_tree_view2"/>
+ <field name="act_window_id" ref="action_parking_form"/>
+ </record>
+
+ <record id="action_parking_form_view1" model="ir.actions.act_window.view">
+ <field name="view_mode">form</field>
+ <field name="view_id" ref="parking_form_view2"/>
+ <field name="act_window_id" ref="action_parking_form"/>
+ </record>
+
+ <!--
+ ======================================
+ PARKING MENU
+ ======================================
+ -->
+ <menuitem id = "rent_parking_submenu" name = "Parking" parent = "rent_estate_menu" action = "action_parking_form" sequence="10"/>
+ <!--
+ ======================================
+ RENT
+ ======================================
+ -->
+ <record id = "view_rent_rent_filter" model = "ir.ui.view">
+ <field name = "name">rent.rent.select</field>
+ <field name = "model">rent.rent</field>
+ <field name = "type">search</field>
+ <field name = "arch" type = "xml">
+ <search string = "Search Rents">
+ <group>
+ <filter string = "Draft" name ="draft" icon = "terp-document-new" domain = "[('state','=','draft')]"/>
+ <filter string = "Active" name = "active" icon = "terp-camera_test" domain = "[('state','=','active')]" />
+ <filter string = "Finished" icon = "gtk-cancel" domain = "[('state','=','finished')]"/>
+ <separator orientation="vertical"/>
+ <field name="name"/>
+ <field name="rent_related_real"/>
+ <field name="rent_start_date"/>
+ <field name="rent_end_date"/>
+ </group>
+ <newline/>
+ <group colspan="4" expand = "0" string = "Group By...">
+ <filter string = "Type" icon = "terp-stock_symbol-selection" domain = "[]" context="{'group_by' : 'rent_type'}"/>
+ <filter string = "Status" icon = "terp-stock_zoom" domain = "[]" context="{'group_by' : 'state'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "rent_form_view">
+ <field name = "name">rent.rent.form</field>
+ <field name = "model">rent.rent</field>
+ <field name = "type">form</field>
+ <field name = "arch" type = "xml">
+ <form string = "Rent Detail">
+ <group col = "4" colspan = "4">
+ <separator string = "Information" colspan = "4"/>
+ <field name = "name"/>
+ <field name = "ref"/>
+ <field name = "rent_rent_client_id" select = "1"/>
+ <field name = "rent_type"/>
+ <field name = "rent_group_id" />
+ <field name = "rent_related_real" />
+ <group colspan = "2" col = "6">
+ <field name = "active"/>
+ <field name = "rent_include_water" attrs = "{'invisible' : [('rent_related_real','not in',['local'])], 'readonly' : [('rent_rent_local_id.local_water_meter_number','=','')]}"/>
+ </group>
+ <group colspan = "2" col = "6">
+ <field name = "rent_main_inc"/>
+ <field name = "company_id"/>
+ </group>
+ </group>
+ <notebook>
+ <page string = "Rent">
+ <group col = "4" colspan = "4">
+ <separator string = "Accounting" colspan = "4"/>
+ <field name="rent_rent_account_id" domain="[('type','<>','view'),('type','<>','consolidation')]" groups="base.group_extended"/>
+ <field name="rent_rent_acc_int_id" domain="[('type','<>','view'),('type','<>','consolidation')]" groups="base.group_extended"/>
+ <field name="rent_inv_account_id" domain="[('type','<>','view'),('type','<>','consolidation')]" groups="base.group_extended"/>
+ <field name="rent_inv_water_account_id" domain="[('type','<>','view'),('type','<>','consolidation')]" groups="base.group_extended"/>
+ </group>
+ <group col = "4" colspan = "4">
+ <field name = "rent_charge_day"/>
+ <field name = "rent_invoiced_day"/>
+ <field name = "rent_grace_period"/>
+ <field name = "rent_years"/>
+ <field name = "rent_start_date" attrs = "{'readonly' : ['|',('state','!=','draft'),('rent_type','!=','Contract')]}"/>
+ <field name = "rent_end_date"/>
+ </group>
+ <group col = "4" colspan = "2">
+ <separator string = "Negotiation Information" colspan = "4"/>
+ <field name = "rent_amount_base"/>
+ <field name = "rent_total"/>
+ <field name = "rent_rise_year2"/>
+ <field name = "rent_performance"/>
+ <field name = "rent_rise_year3"/>
+ <field name = "rent_amount_per_sqr"/>
+ <field name = "rent_rise"/>
+ <field name = "rent_rent_real_area"/>
+ <field name = "rent_deposit"/>
+ <field name = "currency_id"/>
+ <!--<field name = "rent_rise_chart_years" on_change = "onchange_rise_years(rent_rise_chart_years,rent_amount_base,rent_rise)"/>-->
+ <label string = " "/>
+ <button name = "calculate_negotiation" string="Compute Values" type="object" icon="terp-stock_format-scientific"/>
+ <field name = "rent_show_us_eq"/>
+ <!-- <field name = "rent_rise_chart_ids" nolabel="1" colspan = "4"/> -->
+ </group>
+ <group col = "4" colspan = "2" attrs = "{'invisible': [('rent_show_us_eq','!=','True')]}">
+ <separator string = "USD Currency Equivalence" colspan = "4"/>
+ <field name = "rent_amountd_base"/>
+ <field name = "rent_total_us"/>
+ <field name = "rent_rise_year2d"/>
+ <field name = "rent_amountd_per_sqr"/>
+ <field name = "rent_rise_year3d"/>
+ <field name = "eqv_currency_id"/>
+ </group>
+ <group col = "4" colspan = "4" attrs = "{'invisible':[('state','!=','finished')]}">
+ <separator string = "Contract Termination" colspan = "4"/>
+ <field name = "rent_ending_motif"/>
+ <field name = "rent_ending_motif_desc"/>
+ </group>
+ <notebook>
+ <page string = "Detail">
+ <group col = "4" colspan = "4" attrs = "{'invisible':[('rent_related_real','=','')]}">
+ <separator string = "Real Estate Information" colspan = "4"/>
+ <field name = "rent_rent_local_id" attrs = "{ 'required' : [('rent_related_real','=','local'),('state','=','draft')], 'invisible': ['|',('rent_related_real','=',''),('rent_related_real','!=','local')], 'readonly': ['|',('rent_related_real','!=','local'),('state','!=','draft')]}"/>
+ <field name = "rent_rent_parking_id" attrs = " { 'required' : [('rent_related_real','=','parking'),('state','=','draft')], 'invisible': ['|',('rent_related_real','=',''),('rent_related_real','!=','parking')], 'readonly': ['|',('rent_related_real','!=','parking'),('state','!=','draft')]}"/>
+ <field name = "rent_rent_estate_id" attrs = " { 'required' : [('rent_related_real','=','estate'),('state','=','draft')], 'invisible': ['|',('rent_related_real','=',''),('rent_related_real','!=','estate')], 'readonly': ['|',('rent_related_real','!=','estate'),('state','!=','draft')]}"/>
+ </group>
+ </page>
+ <page string = "Calculations">
+ <field name = "rent_estimates_ids" nolabel="1"/>
+ </page>
+ <page string = "Aumentos" attrs = "{'invisible': [('rent_type','!=','Contract')]}">
+ <field name = "rent_historic_ids" nolabel="1"/>
+ </page>
+ <page string = "Facturas" attrs = "{'invisible': [('rent_type','!=','Contract')]}">
+ <field name = "rent_invoice_ids" nolabel="1"/>
+ </page>
+ <page string = "Modifications" attrs = "{'invisible': [('rent_type','!=','Contract')]}">
+ <field name = "rent_modif" attrs="{'readonly' : [('rent_type','!=','Contract')]}"
+ default_get = "{
+ 'rent_type' : 'Adendum',
+ 'rent_rent_account_id': rent_rent_account_id,
+ 'rent_rent_acc_int_id': rent_rent_acc_int_id,
+ }"
+ nolabel="1"
+ context="{'tree_view_ref' : 'rent.rent_adendum_tree_view'}"/>
+ </page>
+ <page string = "Notes">
+ <field name = "rent_notes" nolabel="1"/>
+ </page>
+ </notebook>
+ </page>
+
+ <page string = "Maintenance">
+ <group col = "4" colspan = "4">
+ <separator string = "General Information" colspan = "4"/>
+ <field name = "rent_main_company_id" attrs = "{'readonly' : ['|',('rent_main_inc','!=','True'),('state','!=','draft')], 'required' : [('rent_main_inc','=','True'),('state','!=','draft')]}"/>
+ <field name = "rent_main_start_date" attrs = "{'readonly' : ['|',('rent_main_inc','!=','True'),('state','!=','draft')], 'required' : [('rent_main_inc','=','True'),('state','!=','draft')]}"/>
+ <field name = "rent_main_end_date" attrs = "{'readonly' : ['|',('rent_main_inc','!=','True'),('state','!=','draft')], 'required' : [('rent_main_inc','=','True'),('state','!=','draft')]}"/>
+ </group>
+ <group col = "4" colspan = "4">
+ <separator string = "Accounting" colspan = "4"/>
+ <field name="rent_rent_main_account_id" domain="[('type','<>','view'),('type','<>','consolidation')]" groups="base.group_extended" attrs = "{'readonly' : ['|',('rent_main_inc','!=','True'),('state','!=','draft')], 'required' : [('rent_main_inc','=','True'),('state','!=','draft')]}"/>
+ <field name="rent_rent_main_acc_int_id" domain="[('type','<>','view'),('type','<>','consolidation')]" groups="base.group_extended" attrs = "{'readonly' : ['|',('rent_main_inc','!=','True'),('state','!=','draft')], 'required' : [('rent_main_inc','=','True'),('state','!=','draft')]}"/>
+ <field name="rent_inv_main_account_id" domain="[('type','<>','view'),('type','<>','consolidation')]" groups="base.group_extended" attrs = "{'readonly' : ['|',('rent_main_inc','!=','True'),('state','!=','draft')], 'required' : [('rent_main_inc','=','True'),('state','!=','draft')]}"/>
+ <field name = "rent_main_charge_day" attrs = "{'readonly' : ['|',('state','!=','draft'),('rent_main_inc','!=','True')], 'required' : [('rent_main_inc','=','True'),('state','!=','draft')]}"/>
+ <field name = "rent_main_invoiced_day" attrs = "{'readonly' : ['|',('state','!=','draft'),('rent_main_inc','!=','True')], 'required' : [('rent_main_inc','=','True'),('state','!=','draft')]}"/>
+ <field name = "rent_main_grace_period" attrs = "{'readonly' : ['|',('state','!=','draft'),('rent_main_inc','!=','True')], 'required' : [('rent_main_inc','=','True'),('state','!=','draft')]}"/>
+
+ </group>
+ <group col = "4" colspan = "2">
+ <separator string = "Financial Information" colspan = "4"/>
+ <field name = "rent_main_amount_base" attrs = "{'readonly' : ['|',('state','!=','draft'),('rent_main_inc','!=','True')], 'required' : [('rent_main_inc','=','True'),('state','!=','draft')]}"/>
+ <field name = "rent_main_total" attrs = "{'readonly' : ['|',('state','!=','draft'),('rent_main_inc','!=','True')], 'required' : [('rent_main_inc','=','True'),('state','!=','draft')]}"/>
+ <field name = "rent_main_rise_year2"/>
+ <field name = "rent_main_performance"/>
+ <field name = "rent_main_rise_year3"/>
+ <field name = "rent_main_rise" attrs = "{'readonly' : ['|',('state','!=','draft'),('rent_main_inc','!=','True')], 'required' : [('rent_main_inc','=','True'),('state','!=','draft')]}"/>
+ <field name = "main_currency_id"/>
+ <field name = "rent_main_show_us_eq"/>
+ <label string = " "/>
+ <button name = "calculate_negotiation" string="Compute Values" type="object" icon="terp-stock_format-scientific"/>
+ </group>
+ <group col = "2" colspan = "2" attrs = "{'invisible': [('rent_main_show_us_eq','!=','True')]}">
+ <separator string = "USD Currency Equivalence" colspan = "4"/>
+ <field name = "rent_main_amountd_base"/>
+ <field name = "rent_main_rise_year2d"/>
+ <field name = "rent_main_rise_year3d"/>
+ <field name = "main_eqv_currency_id"/>
+ </group>
+ <notebook>
+ <page string = "Calculations">
+ <field name = "rent_main_estimates_ids" nolabel="1" attrs = "{'readonly' : [('rent_main_inc','!=','True')]}"/>
+ </page>
+ <page string = "Aumentos">
+ <field name = "rent_main_historic_ids" nolabel="1"/>
+ </page>
+ <page string = "Facturas">
+ <field name = "rent_main_invoice_ids" nolabel="1"/>
+ </page>
+ <page string = "Notes">
+ <field name = "main_notes" nolabel="1"/>
+ </page>
+ </notebook>
+ </page>
+ </notebook>
+ <group col = "6" colspan = "4">
+ <field name = "state"/>
+ <button name = "cron_rent_invoice" string="Check for Invoices" type="object" icon="terp-stock_format-scientific"/>
+ <button name="rent_finish" states="active" string="Finish" icon="gtk-cancel" attrs = "{'invisible': [('rent_type','!=','Contract')]}"/>
+ <button name="rent_active" states="draft" string="Approve" icon="terp-camera_test"/>
+ <button
+ name="%(action_view_rent_make_group)d"
+ string="Create new Group"
+ type="action"
+ states="active"
+ icon="gtk-go-forward"
+ attrs="{'invisible': ['|',('rent_type', '!=', 'Contract'),('state', '!=', 'active')]}"/>
+ </group>
+ </form>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "rent_tree_view">
+ <field name = "name">rent.rent.tree</field>
+ <field name = "model">rent.rent</field>
+ <field name = "type">tree</field>
+ <field name = "arch" type = "xml">
+ <tree string = "Rent List" colors="blue:state in ('draft');black:state in ('active');gray:state in ('finished')">
+ <field name = "name"/>
+ <field name = "rent_type"/>
+ <field name = "rent_related_real"/>
+ <field name = "state"/>
+ <field name = "rent_start_date"/>
+ <field name = "rent_end_date"/>
+ <field name = "rent_amount_base"/>
+ <field name = "rent_rise"/>
+ <button name="rent_active" states="draft" string="Approve" icon="terp-camera_test"/>
+ <button name="rent_finish" states="active" string="Finish" icon="gtk-cancel"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "rent_tree_view2">
+ <field name = "name">rent.rent.tree2</field>
+ <field name = "model">rent.rent</field>
+ <field name = "type">tree</field>
+ <field name = "arch" type = "xml">
+ <tree string = "Rent List" colors="blue:state in ('draft');black:state in ('active');gray:state in ('finished')">
+ <field name = "name"/>
+ <field name = "rent_rent_client_id"/>
+ <field name = "rent_related_real"/>
+ <field name = "rent_amount_base"/>
+ <field name = "currency_id"/>
+ <field name = "rent_rise"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "rent_adendum_tree_view">
+ <field name = "name">rent.rent.adendum.tree</field>
+ <field name = "model">rent.rent</field>
+ <field name = "type">tree</field>
+ <field name = "arch" type = "xml">
+ <tree string = "Adendum List" colors="blue:state in ('draft');black:state in ('active');gray:state in ('finished')">
+ <field name = "rent_type"/>
+ <field name = "rent_related_real"/>
+ <field name = "state"/>
+ <field name = "rent_end_date"/>
+ <field name = "rent_amount_base"/>
+ <field name = "rent_rise"/>
+ <field name = "currency_id"/>
+ <field name = "rent_modif_date"/>
+ <button name="rent_active" states="draft" string="Approve" icon="terp-camera_test"/>
+ </tree>
+ </field>
+ </record>
+ <record model = "ir.actions.act_window" id = "action_rent_form_view">
+ <field name = "name">Rent Details</field>
+ <field name = "res_model">rent.rent</field>
+ <field name = "type">ir.actions.act_window</field>
+ <field name = "view_type">form</field>
+ <field name = "view_mode">tree,form</field>
+ <field name = "view_id" ref = "rent_tree_view"/>
+ <field name="domain">[('rent_type','=','Contract')]</field>
+ <field name="context">{"search_default_active":1}</field>
+ <field name = "search_view_id" ref = "view_rent_rent_filter"/>
+ </record>
+
+ <!--
+ ======================================
+ RENT MENU
+ ======================================
+ -->
+ <menuitem id = "rent_rent_menu" name = "Rent" parent = "rent_manager"/>
+ <menuitem id = "rent_rent_submenu" name = "Rents" parent = "rent_rent_menu" action = "action_rent_form_view"/>
+
+
+ <!--
+ ======================================
+ RENT estimateS
+ ======================================
+ -->
+
+ <record model = "ir.ui.view" id = "rent_estimate_tree_view">
+ <field name = "name">rent.rent.estimate.tree</field>
+ <field name = "model">rent.rent.estimate</field>
+ <field name = "type">tree</field>
+ <field name = "arch" type = "xml">
+ <tree editable = "top" string = "Calculations List" colors="green:estimate_state in ('final');blue:estimate_state in ('recommend');red:estimate_state in ('min');gray:estimate_state in ('norec')">
+ <field name = "estimate_date"/>
+ <field name = "estimate_performance"/>
+ <field name = "estimate_years"/>
+ <field name = "estimate_amountc"/>
+ <field name = "estimate_amountd"/>
+ <field name = "estimate_colones"/>
+ <field name = "estimate_dollars"/>
+ <field name = "estimate_state"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "rent_estimate_form_view">
+ <field name = "name">rent.rent.estimate.form</field>
+ <field name = "model">rent.rent.estimate</field>
+ <field name = "type">form</field>
+ <field name = "arch" type = "xml">
+ <form string = "Estimates">
+ <group col="4" colspan="4">
+ <separator colspan = "4" string = "Calculos"/>
+ <group>
+ <field name = "estimate_performance"/>
+ <field name = "estimate_years"/>
+ </group>
+ <group>
+ <field name = "estimate_amountc"/>
+ <field name = "estimate_date"/>
+ <field name = "estimate_colones"/>
+ </group>
+ </group>
+ </form>
+ </field>
+ </record>
+
+ <record model = "ir.actions.act_window" id = "action_rent_estimate_form_view">
+ <field name = "name">Calculations Details</field>
+ <field name = "res_model">rent.rent.estimate</field>
+ <field name = "type">ir.actions.act_window</field>
+ <field name = "view_type">form</field>
+ <field name = "view_mode">tree,form</field>
+ <field name = "view_id" ref = "rent_estimate_tree_view"/>
+ </record>
+
+
+
+
+ <!--
+ ======================================
+ RENT MAINTENANCE estimateS
+ ======================================
+ -->
+
+ <record model = "ir.ui.view" id = "rent_main_estimate_tree_view">
+ <field name = "name">rent.rent.main.estimate.tree</field>
+ <field name = "model">rent.rent.main.estimate</field>
+ <field name = "type">tree</field>
+ <field name = "arch" type = "xml">
+ <tree editable = "top" string = "Calculations List" colors="green:estimate_state in ('final');blue:estimate_state in ('recommend');red:estimate_state in ('min');gray:estimate_state in ('norec')">
+ <field name = "estimate_date"/>
+ <field name = "estimate_performance"/>
+ <field name = "estimate_years"/>
+ <field name = "estimate_amountc"/>
+ <field name = "estimate_amountd"/>
+ <field name = "estimate_colones"/>
+ <field name = "estimate_dollars"/>
+ <field name = "estimate_state"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "rent_main_estimate_form_view">
+ <field name = "name">rent.rent.main.estimate.form</field>
+ <field name = "model">rent.rent.main.estimate.</field>
+ <field name = "type">form</field>
+ <field name = "arch" type = "xml">
+ <form string = "Estimates">
+ <group col="4" colspan="4">
+ <separator colspan = "4" string = "Calculos"/>
+ <group>
+ <field name = "estimate_performance"/>
+ <field name = "estimate_years"/>
+ </group>
+ <group>
+ <field name = "estimate_amountc"/>
+ <field name = "estimate_date"/>
+ <field name = "estimate_colones"/>
+ </group>
+ </group>
+ </form>
+ </field>
+ </record>
+
+ <record model = "ir.actions.act_window" id = "action_rent_main_estimate_form_view">
+ <field name = "name">Calculations Details</field>
+ <field name = "res_model">rent.rent.estimate</field>
+ <field name = "type">ir.actions.act_window</field>
+ <field name = "view_type">form</field>
+ <field name = "view_mode">tree,form</field>
+ <field name = "view_id" ref = "rent_main_estimate_tree_view"/>
+ </record>
+
+
+
+ <!--
+ ======================================
+ RENT History
+ ======================================
+ -->
+
+ <record model = "ir.ui.view" id = "rent_anual_value_tree_view">
+ <field name = "name">rent.rent.estimate.tree</field>
+ <field name = "model">rent.rent.anual.value</field>
+ <field name = "type">tree</field>
+ <field name = "arch" type = "xml">
+ <tree string = "Value History">
+ <field name = "anual_value_date"/>
+ <field name = "anual_value_value"/>
+ <field name = "anual_value_prev_value"/>
+ <field name = "anual_value_rate"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "rent_anual_value_form_view">
+ <field name = "name">rent.rent.estimate.form</field>
+ <field name = "model">rent.rent.anual.value</field>
+ <field name = "type">form</field>
+ <field name = "arch" type = "xml">
+ <form string = "Estimates">
+ <group col="4" colspan="4">
+ <separator colspan = "4" string = "Calculos"/>
+ <group>
+ <field name = "anual_value_value"/>
+ <field name = "anual_value_rate"/>
+ <field name = "anual_value_date"/>
+ </group>
+ </group>
+ </form>
+ </field>
+ </record>
+
+ <record model = "ir.actions.act_window" id = "action_rent_anual_value_form_view">
+ <field name = "name">Calculations Details</field>
+ <field name = "res_model">rent.rent.anual.value</field>
+ <field name = "type">ir.actions.act_window</field>
+ <field name = "view_type">form</field>
+ <field name = "view_mode">tree,form</field>
+ <field name = "view_id" ref = "rent_anual_value_tree_view"/>
+ </record>
+
+ <!--
+ ======================================
+ RENT INVOICE LINE
+ ======================================
+ -->
+ <record model = "ir.ui.view" id = "rent_invoice_form_view">
+ <field name = "name">rent.invoice.form</field>
+ <field name = "model">account.invoice.line</field>
+ <field name = "type">form</field>
+ <field name = "inherit_id" ref = "account.view_invoice_line_form"/>
+ <field name = "arch" type="xml">
+ <data>
+ <field name="product_id" position="before">
+ <field name = "invoice_type" on_change = "onchange_type(invoice_type)"/>
+ </field>
+ <field name="product_id" position="replace"/>
+ <field name="uos_id" position="replace"/>
+ <field name="invoice_type" position="after">
+ <field name = "invoice_rent_id" on_change="rent_id_change(invoice_rent_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.address_invoice_id, parent.currency_id, {'company_id': parent.company_id})" attrs="{'invisible' : [('invoice_type','=','product')]}"
+ context="{'tree_view_ref' : 'rent.rent_tree_view2'}"/>
+ </field>
+ <field name="invoice_rent_id" position="after">
+ <field name = "product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.address_invoice_id, parent.currency_id, {'company_id': parent.company_id})" attrs="{'invisible' : [('invoice_type','=','rent')]}"/>
+ <field name="uos_id" on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.address_invoice_id, parent.currency_id, {'company_id': parent.company_id})" attrs="{'invisible' : [('invoice_type','=','rent')]}"/>
+ </field>
+ </data>
+ </field>
+ </record>
+
+
+ <!--
+ ======================================
+ RENT INVOICE
+ ======================================
+ -->
+ <record model = "ir.ui.view" id = "rent_invoices_form_view">
+ <field name = "name">rent.invoice.rent.form</field>
+ <field name = "model">rent.invoice.rent</field>
+ <field name = "type">form</field>
+ <field name = "arch" type="xml">
+ <form string = "Invoices">
+ <field name="invoice_id"/>
+ <field name="invoice_date"/>
+ <field name="invoice_state"/>
+ <field name="invoice_number"/>
+ <field name="invouce_residual"/>
+ </form>
+ </field>
+ </record>
+
+
+ <record model = "ir.ui.view" id = "rent_invoices_tree_view">
+ <field name = "name">rent.invoice.rent.tree</field>
+ <field name = "model">rent.invoice.rent</field>
+ <field name = "type">tree</field>
+ <field name = "arch" type="xml">
+ <tree string = "Invoices">
+ <field name="invoice_id"/>
+ <field name="invoice_date"/>
+ <field name="invoice_state"/>
+ <field name="invoice_number"/>
+ <field name="invouce_residual"/>
+ </tree>
+ </field>
+ </record>
+ <!--
+ ======================================
+ CONTRACTS
+ ======================================
+ -->
+ <record model = "ir.ui.view" id = "contract_form_view">
+ <field name = "name">rent.contract.form</field>
+ <field name = "model">rent.contract</field>
+ <field name = "type">form</field>
+ <field name = "arch" type = "xml">
+ <form string = "Contrato">
+ <group col = "4" colspan = "4">
+ <separator colspan = "4" string = "General Data"/>
+ <field name = "name"/>
+ <field name = "contract_rent_id" domain = "['|',('state','=','draft'), ('state','=','active'),('rent_type'.'!=','Adendum')]"/>
+ </group>
+ <group col = "4" colspan = "4">
+ <separator colspan = "4" string = "General Data"/>
+ <field colspan = "4" name = "contract_clauses_ids" nolabel = "1"/>
+ <!--<field name = "contract_design"/>-->
+ </group>
+ <group col="4" colspan="4">
+ <separator colspan = "4" string = "Legend"/>
+ <label string = "Use any of the code down to specife where should go special data to be retreived such as partners name, date, and others. Place it in the body of the clause as you need it"/>
+ <group>
+ <label colspan="4" string="Client name : %%(cli)s"/>
+ <label colspan="4" string="Company name: %%(com)s"/>
+ </group>
+ <group>
+ <label colspan="4" string="Total paid: %%(tot)s"/>
+ <label colspan="4" string="Starting Date: %%(sd)s"/>
+ <label colspan="4" string="Ending Date: %%(ed)s"/>
+ </group>
+ </group>
+ </form>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "contract_tree_view">
+ <field name = "name">rent.contract.tree</field>
+ <field name = "model">rent.contract</field>
+ <field name = "type">tree</field>
+ <field name = "arch" type = "xml">
+ <tree string = "Contract">
+ <field name = "name"/>
+ <field name = "contract_rent_id"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model = "ir.actions.act_window" id = "action_contract_form_view">
+ <field name = "name">Contracts</field>
+ <field name = "res_model">rent.contract</field>
+ <field name = "type">ir.actions.act_window</field>
+ <field name = "view_type">form</field>
+ <field name = "view_mode">tree,form</field>
+ </record>
+
+ <!--
+ ======================================
+ CONTRACT MENU
+ ======================================
+ -->
+ <!--<menuitem id = "rent_contract_submenu" name = "Contracts" parent = "rent_rent_menu" action = "action_contract_form_view"/>-->
+
+ <!--
+ ======================================
+ CLAUSES
+ ======================================
+ -->
+
+ <record model = "ir.ui.view" id = "contract_clause_form_view">
+ <field name = "name">rent.contract.clause.form</field>
+ <field name = "model">rent.contract.clause</field>
+ <field name = "type">form</field>
+ <field name = "arch" type = "xml">
+ <form string = "Clauses">
+ <group col = "4" colspan = "4">
+ <separator colspan = "4" string = "Reference Data"/>
+ <field name = "clause_code" select = "1"/>
+ <field name = "clause_is_basic" select = "1"/>
+ <field name = "clause_subject" select = "1"/>
+
+ </group>
+ <group col = "4" colspan = "4">
+ <separator colspan = "4" string = "Body"/>
+ <field name = "clause_body" nolabel="1"/>
+ </group>
+ <group col="4" colspan="4">
+ <separator colspan = "4" string = "Legend"/>
+ <label string = "Use any of the code down to specife where should go special data to be retreived such as partners name, date, and others. Place it in the body of the clause as you need it"/>
+ <group>
+ <label colspan="4" string="Client name : %%(cli)s"/>
+ <label colspan="4" string="Company name: %%(com)s"/>
+ </group>
+ <group>
+ <label colspan="4" string="Total paid: %%(tot)s"/>
+ <label colspan="4" string="Starting Date: %%(sd)s"/>
+ <label colspan="4" string="Ending Date: %%(ed)s"/>
+ </group>
+ </group>
+ </form>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "contract_clause_tree_view">
+ <field name = "name">rent.contract.clause.tree</field>
+ <field name = "model">rent.contract.clause</field>
+ <field name = "type">tree</field>
+ <field name = "arch" type = "xml">
+ <tree string = "Clause">
+ <field name = "clause_code" select = "1"/>
+ <field name = "clause_subject" select = "1"/>
+ <field name = "clause_is_basic" select = "1"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model = "ir.actions.act_window" id = "action_contract_clause_form_view">
+ <field name = "name">Clauses</field>
+ <field name = "res_model">rent.contract.clause</field>
+ <field name = "type">ir.actions.act_window</field>
+ <field name = "view_type">form</field>
+ <field name = "view_mode">tree,form</field>
+ </record>
+
+ <!--
+ ======================================
+ CONTRACT CLAUSE MENU
+ ======================================
+ -->
+ <!--<menuitem id = "rent_contract_clause_submenu" name = "Clauses" parent = "rent_rent_menu" action = "action_contract_clause_form_view"/>-->
+
+ <!--
+ ======================================
+ CLAUSE BY CONTRACT MENU
+ ======================================
+ -->
+ <record model = "ir.ui.view" id = "clause_by_contract_form_view">
+ <field name = "name">clause.contract.clause.rel.form</field>
+ <field name = "model">rent.contract.clause.rel</field>
+ <field name = "type">form</field>
+ <field name = "arch" type = "xml">
+ <form string = "Clausula de Contrato">
+ <field name = "sequence"/>
+ <field name = "rent_contract_clause_id"/>
+ </form>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "clause_by_contract_tree_view">
+ <field name = "name">clause.contract.clause.rel.tree</field>
+ <field name = "model">rent.contract.clause.rel</field>
+ <field name = "type">tree</field>
+ <field name = "arch" type = "xml">
+ <tree string = "Clausula de Contrato">
+ <field name = "sequence"/>
+ <field name = "rent_contract_clause_id"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model = "ir.actions.act_window" id = "action_clause_by_contract_form_view">
+ <field name = "name">Clause by Contract</field>
+ <field name = "res_model">rent.contract.clause.rel</field>
+ <field name = "type">ir.actions.act_window</field>
+ <field name = "view_type">form</field>
+ <field name = "view_mode">tree,form</field>
+ <field name = "view_id" ref = "clause_by_contract_tree_view"/>
+ </record>
+
+
+ <!--
+ ======================================
+ RENT GROUP
+ ======================================
+ -->
+ <record model = "ir.ui.view" id = "rent_rent_group_form_view">
+ <field name = "name">rent.rent.group.form</field>
+ <field name = "model">rent.rent.group</field>
+ <field name = "type">form</field>
+ <field name = "arch" type = "xml">
+ <form string = "Rent Group">
+ <group col = "4" colspan = "4">
+ <separator string = "Details" colspan = "4"/>
+ <field name = "name"/>
+ </group>
+ <group col = "4" colspan = "4">
+ <separator string = "Rents" colspan = "4"/>
+ <field name = "rent_rent_ids" context="{'tree_view_ref' : 'rent.rent_tree_view'}" nolabel="1"/>
+ </group>
+ </form>
+ </field>
+ </record>
+
+ <record model = "ir.ui.view" id = "rent_rent_group_tree_view">
+ <field name = "name">rent.rent.group.tree</field>
+ <field name = "model">rent.rent.group</field>
+ <field name = "type">tree</field>
+ <field name = "arch" type = "xml">
+ <tree string = "Rent Group List">
+ <field name = "name"/>
+ <field name = "rent_rent_ids"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model = "ir.actions.act_window" id = "action_rent_group_form_view">
+ <field name = "name">Rent Group</field>
+ <field name = "res_model">rent.rent.group</field>
+ <field name = "type">ir.actions.act_window</field>
+ <field name = "view_type">form</field>
+ <field name = "view_mode">tree,form</field>
+ <field name = "view_id" ref = "rent_rent_group_tree_view"/>
+ </record>
+ <menuitem id = "rent_rent_group_submenu" name = "Rent group" parent = "rent_rent_menu" action = "action_rent_group_form_view"/>
+
+
+ <!--
+ ======================================
+ RENT RISE ESTIMATE
+ ======================================
+ -->
+
+ <record model = "ir.ui.view" id = "rent_rent_group_tree_view">
+ <field name = "name">rent.rise.estimate.tree</field>
+ <field name = "model">rent.rise.estimate</field>
+ <field name = "type">tree</field>
+ <field name = "arch" type = "xml">
+ <tree string = "Rise Estimation">
+ <field name = "year"/>
+ <field name = "amount"/>
+ </tree>
+ </field>
+ </record>
+ </data>
+>>>>>>> MERGE-SOURCE
</openerp>
Follow ups