← Back to team overview

clearcorp team mailing list archive

[Merge] lp:~juan-munoz-clearcorp/openerp-ccorp-addons/featuresJuan into lp:openerp-ccorp-addons

 

Juan Felipe Muñoz Ramos has proposed merging lp:~juan-munoz-clearcorp/openerp-ccorp-addons/featuresJuan into lp:openerp-ccorp-addons.

Requested reviews:
  Carlos Vásquez (carlos.vasquez)

For more details, see:
https://code.launchpad.net/~juan-munoz-clearcorp/openerp-ccorp-addons/featuresJuan/+merge/87561

Fixed some Bugs with private methods
Fixed Cron-Job 
-- 
The attached diff has been truncated due to its size.
https://code.launchpad.net/~juan-munoz-clearcorp/openerp-ccorp-addons/featuresJuan/+merge/87561
Your team CLEARCORP development team is subscribed to branch lp:openerp-ccorp-addons.
=== added directory 'account_company_shortcut'
=== added file 'account_company_shortcut/__init__.py'
--- account_company_shortcut/__init__.py	1970-01-01 00:00:00 +0000
+++ account_company_shortcut/__init__.py	2012-01-05 00:57:30 +0000
@@ -0,0 +1,1 @@
+import account_company_shortcut_rename

=== added file 'account_company_shortcut/__openerp__.py'
--- account_company_shortcut/__openerp__.py	1970-01-01 00:00:00 +0000
+++ account_company_shortcut/__openerp__.py	2012-01-05 00:57:30 +0000
@@ -0,0 +1,48 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    account_company_shorcut_rename.py
+#    account_company_shorcut_rename
+#    First author: Mag Guevara <mag.guevara@xxxxxxxxxxxxxxx> (ClearCorp S.A.)
+#    Copyright (c) 2011-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserved.
+#    
+#    Redistribution and use in source and binary forms, with or without modification, are
+#    permitted provided that the following conditions are met:
+#    
+#       1. Redistributions of source code must retain the above copyright notice, this list of
+#          conditions and the following disclaimer.
+#    
+#       2. Redistributions in binary form must reproduce the above copyright notice, this list
+#          of conditions and the following disclaimer in the documentation and/or other materials
+#          provided with the distribution.
+#    
+#    THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND ANY EXPRESS OR IMPLIED
+#    WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+#    FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
+#    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+#    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+#    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+#    ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+#    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+#    ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#    
+#    The views and conclusions contained in the software and documentation are those of the
+#    authors and should not be interpreted as representing official policies, either expressed
+#    or implied, of ClearCorp S.A..
+#    
+##############################################################################
+{
+	"name"        : "Accounting Company Shorcut rename",
+	"author"      : "CLEARCORP S.A.",
+	"version"     : "1.0",
+	"description" : """
+	This module creates a field for the company shortcut to later use it a the chart of accounts as part for the complete name of each
+	account
+	""",
+	"depends"     : ["base","account"],
+	"init_xml"    : [],
+	"update_xml"  : ["account_company_shortcut_rename_view.xml"],
+	"category"    : "Accounting",
+	"active"      : False,
+	"instalable"  : True,
+}

=== added file 'account_company_shortcut/account_company_shortcut_rename.py'
--- account_company_shortcut/account_company_shortcut_rename.py	1970-01-01 00:00:00 +0000
+++ account_company_shortcut/account_company_shortcut_rename.py	2012-01-05 00:57:30 +0000
@@ -0,0 +1,80 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    account_company_shortcut_rename.py
+#    account_company_shortcut_rename
+#    First author: Mag Guevara <mag.guevara@xxxxxxxxxxxxxxx> (ClearCorp S.A.)
+#    Copyright (c) 2011-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserved.
+#    
+#    Redistribution and use in source and binary forms, with or without modification, are
+#    permitted provided that the following conditions are met:
+#    
+#       1. Redistributions of source code must retain the above copyright notice, this list of
+#          conditions and the following disclaimer.
+#    
+#       2. Redistributions in binary form must reproduce the above copyright notice, this list
+#          of conditions and the following disclaimer in the documentation and/or other materials
+#          provided with the distribution.
+#    
+#    THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND ANY EXPRESS OR IMPLIED
+#    WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+#    FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
+#    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+#    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+#    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+#    ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+#    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+#    ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#    
+#    The views and conclusions contained in the software and documentation are those of the
+#    authors and should not be interpreted as representing official policies, either expressed
+#    or implied, of ClearCorp S.A..
+#    
+##############################################################################
+from osv import osv, fields
+from tools import debug
+from tools.translate import _
+
+class account_account(osv.osv):
+	_name = "account.account"
+	_inherit = "account.account"
+	
+	def name_get(self, cr, uid, ids, context=None):
+		if not ids:
+			return []
+		res = []
+		for obj_account in self.browse(cr,uid,ids):
+			data = []
+			account = obj_account.parent_id
+			if account.parent_id:
+				while account.parent_id:
+					data.insert(0,(account.shortcut or account.name))
+					account = account.parent_id
+			data.append(obj_account.name)
+			data = '/'.join(data)
+			company = obj_account.company_id
+			data = (company and company.shortcut + "-" or '')  + obj_account.code + ' ' + data
+			res.append((obj_account.id, data))  
+		return res
+	
+	def _complete_name(self, cr, uid, ids, name, args, context=None):
+		""" Forms complete name of account from parent account to child account.
+		@return: Dictionary of values
+		"""
+		res = {}
+		name_list = self.name_get(cr,uid,ids,context)
+		for name in name_list:
+			res[name[0]] = name[1]
+		return res
+	_columns = {
+		'complete_name': fields.function(_complete_name, method=True, type='char', size=100, string="Account Name"),
+	}
+account_account()
+
+class res_company(osv.osv):
+	_name = 'res.company'
+	_inherit = 'res.company'
+	_columns = {
+		'shortcut'  : fields.char('Shortcut', size=8,help='Shortcut for the company, It would be added on some places as part of the name that will be shown'),
+	}	
+res_company()

=== added file 'account_company_shortcut/account_company_shortcut_rename_view.xml'
--- account_company_shortcut/account_company_shortcut_rename_view.xml	1970-01-01 00:00:00 +0000
+++ account_company_shortcut/account_company_shortcut_rename_view.xml	2012-01-05 00:57:30 +0000
@@ -0,0 +1,25 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<openerp>
+	<data>
+
+		<!--
+		======================================
+					accounts
+		======================================
+		-->
+		<record model = "ir.ui.view" id = "account_company_rename_form_view">
+			<field name = "name">res.company.rename.form</field>
+			<field name = "model">res.company</field>
+			<field name = "type">tree</field>
+			<field name="inherit_id" ref="base.view_company_form"/>
+			<field name = "arch" type = "xml">
+				<data>
+					<field name = "parent_id" position = "after">
+						<field name = "shortcut"/>
+					</field>
+				</data>
+			</field>
+		</record>
+	</data>
+</openerp>
+

=== added file 'account_invoice_global_discount/i18n/ar.po'
--- account_invoice_global_discount/i18n/ar.po	1970-01-01 00:00:00 +0000
+++ account_invoice_global_discount/i18n/ar.po	2012-01-05 00:57:30 +0000
@@ -0,0 +1,86 @@
+# Arabic translation for openerp-ccorp-addons
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openerp-ccorp-addons package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openerp-ccorp-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2010-08-15 05:20+0000\n"
+"PO-Revision-Date: 2011-11-21 12:07+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Arabic <ar@xxxxxx>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-11-29 06:07+0000\n"
+"X-Generator: Launchpad (build 14399)\n"
+
+#. module: account_invoice_global_discount
+#: view:account.invoice:0
+msgid "Compute Totals"
+msgstr ""
+
+#. module: account_invoice_global_discount
+#: view:account.invoice:0
+msgid "Discounted amount"
+msgstr ""
+
+#. module: account_invoice_global_discount
+#: wizard_field:invoice.discount,init,discount:0
+msgid "Discount percentage"
+msgstr ""
+
+#. module: account_invoice_global_discount
+#: model:ir.module.module,shortdesc:account_invoice_global_discount.module_meta_information
+msgid "Global invoice discount"
+msgstr ""
+
+#. module: account_invoice_global_discount
+#: model:ir.module.module,description:account_invoice_global_discount.module_meta_information
+msgid ""
+"Adds a discount feature for invoice.\n"
+"    With it one can add a discount percent to all invoice lines on an "
+"invoice.\n"
+"    It adds the discounted and undiscounted amounts on the invoice totals.\n"
+"    "
+msgstr ""
+
+#. module: account_invoice_global_discount
+#: field:account.invoice,amount_discounted:0
+#: model:ir.actions.wizard,name:account_invoice_global_discount.invoice_discount
+msgid "Discount"
+msgstr ""
+
+#. module: account_invoice_global_discount
+#: wizard_view:invoice.discount,init:0
+msgid "Discount:"
+msgstr ""
+
+#. module: account_invoice_global_discount
+#: view:account.invoice:0
+msgid "Untaxed amount"
+msgstr ""
+
+#. module: account_invoice_global_discount
+#: wizard_button:invoice.discount,init,end:0
+msgid "Cancel"
+msgstr "إلغاء"
+
+#. module: account_invoice_global_discount
+#: view:account.invoice:0
+#: wizard_button:invoice.discount,init,apply_discount:0
+msgid "Apply Discount"
+msgstr ""
+
+#. module: account_invoice_global_discount
+#: field:account.invoice,amount_untaxed_not_discounted:0
+#: field:account.invoice.line,price_subtotal_not_discounted:0
+msgid "Subtotal"
+msgstr "المجموع الفرعي"
+
+#. module: account_invoice_global_discount
+#: field:account.invoice,invoice_discount:0
+msgid "Discount (%)"
+msgstr "الخصم (%)"

=== modified file 'account_invoice_global_discount/i18n/es.po'
--- account_invoice_global_discount/i18n/es.po	2011-02-26 05:56:15 +0000
+++ account_invoice_global_discount/i18n/es.po	2012-01-05 00:57:30 +0000
@@ -8,14 +8,14 @@
 "Project-Id-Version: openerp-ccorp-addons\n"
 "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
 "POT-Creation-Date: 2010-08-15 05:20+0000\n"
-"PO-Revision-Date: 2010-08-16 08:51+0000\n"
+"PO-Revision-Date: 2011-11-16 05:10+0000\n"
 "Last-Translator: ClearCorp S.A. <Unknown>\n"
 "Language-Team: Spanish <es@xxxxxx>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-02-26 05:56+0000\n"
-"X-Generator: Launchpad (build 12351)\n"
+"X-Launchpad-Export-Date: 2011-11-29 06:07+0000\n"
+"X-Generator: Launchpad (build 14399)\n"
 
 #. module: account_invoice_global_discount
 #: view:account.invoice:0

=== added directory 'account_multicompany_relation'
=== added file 'account_multicompany_relation/__init__.py'
--- account_multicompany_relation/__init__.py	1970-01-01 00:00:00 +0000
+++ account_multicompany_relation/__init__.py	2012-01-05 00:57:30 +0000
@@ -0,0 +1,1 @@
+import account_multicompany_relation

=== added file 'account_multicompany_relation/__openerp__.py'
--- account_multicompany_relation/__openerp__.py	1970-01-01 00:00:00 +0000
+++ account_multicompany_relation/__openerp__.py	2012-01-05 00:57:30 +0000
@@ -0,0 +1,13 @@
+{
+	"name" : "Account Multicompany Relation",
+	"author" : "CLEARCORP S.A",
+	"version" : "0.1",
+	"depends" : ["account_voucher"],
+	"init_xml" : [],
+	"update_xml" : [
+		"account_multicompany_relation.xml"
+		],
+	"category" : "",
+	"active": False,
+	"installable": True
+}

=== added file 'account_multicompany_relation/account_multicompany_relation.py'
--- account_multicompany_relation/account_multicompany_relation.py	1970-01-01 00:00:00 +0000
+++ account_multicompany_relation/account_multicompany_relation.py	2012-01-05 00:57:30 +0000
@@ -0,0 +1,48 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    Author: Mag Guevara. Copyright ClearCorp SA
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import osv, fields
+
+class account_multicompany_relation(osv.osv):
+	_name = "account.multicompany.relation"
+	_columns = {
+		'name'              :    fields.char('Name',size=64, required=True,help='Name for the mirror object relation'),
+		'origin_account'    :    fields.many2one('account.account', 'Original Account',help='Indicate the original account where the transaction is taking place'),
+		'targ_account'      :    fields.many2one('account.account', 'Target Account',help='Indicate the target account where the transaction of the original account has to be seen, this is an account from another company'),
+		'origin_journal'    :    fields.many2one('account.journal', 'Original Journal',help='Indicate the original journal where the transaction is taking place'),
+		'targ_journal'      :    fields.many2one('account.journal', 'Target Journal',help='Indicate the original account where the transaction is taking place'),
+	}
+account_multicompany_relation()
+
+class account_journal(osv.osv):
+	_name = 'account.journal'
+	_inherit = 'account.journal'
+	_columns = {
+		'journal_mirror'   :   fields.many2one('account.multicompany.relation','Mirror Relation'),
+	}
+account_journal()
+
+class account_account(osv.osv):
+	_name = 'account.account'
+	_inherit = 'account.account'
+	_columns = {
+		'account_mirror'   :   fields.many2one('account.multicompany.relation','Mirror Relation'),
+	}
+account_account()

=== added file 'account_multicompany_relation/account_multicompany_relation.xml'
--- account_multicompany_relation/account_multicompany_relation.xml	1970-01-01 00:00:00 +0000
+++ account_multicompany_relation/account_multicompany_relation.xml	2012-01-05 00:57:30 +0000
@@ -0,0 +1,97 @@
+<openerp>
+	<data>
+		
+		<!-- Account voucher payment and purchase inherit -->
+		
+		<record model="ir.ui.view" id="view_account_multi_relation">
+			<field name="name">account.multicompany.relation.form</field>
+			<field name="model">account.multicompany.relation</field>
+			<field name="type">form</field>
+			<field name="arch" type="xml">
+				<form string = "Account Multicompany Relation">
+					<field name = "name"/>
+					<field name = "origin_account"/>
+					<field name = "targ_account"/>
+					<field name = "origin_journal"/>
+					<field name = "targ_journal"/>
+				</form>
+			</field>
+		</record>
+		
+		<record model="ir.ui.view" id="view_account_multi_relation_tree">
+			<field name="name">account.multicompany.relation.tree</field>
+			<field name="model">account.multicompany.relation</field>
+			<field name="type">tree</field>
+			<field name="arch" type="xml">
+				<tree string = "Account Multicompany Relation" editable = "bottom">
+					<field name = "name"/>
+					<field name = "origin_account"/>
+					<field name = "targ_account"/>
+					<field name = "origin_journal"/>
+					<field name = "targ_journal"/>
+				</tree>
+			</field>
+		</record>
+		
+		<!--<record id="action_account_multi_relation" model="ir.actions.act_window">
+			<field name="name">Account Multicompany Relation</field>
+			<field name="res_model">account.multicompany.relation</field>
+			<field name="view_type">form</field>
+			<field name="view_id" eval="False"/>
+			<field name="target">current</field>
+			<field name="help">The account multicompany relation form allows you to create a connection between two companies that have payments and need to alter an account from one company to another</field>
+		</record>
+		<record id="action_account_multi_relation_tree" model="ir.actions.act_window.view">
+			<field eval="1" name="sequence"/>
+			<field name="view_mode">tree</field>
+			<field name="view_id" ref="view_account_multi_relation_tree"/>
+			<field name="act_window_id" ref="action_account_multi_relation"/>
+		</record>
+		<record id="action_account_multi_relation_form" model="ir.actions.act_window.view">
+			<field eval="2" name="sequence"/>
+			<field name="view_mode">form</field>
+			<field name="view_id" ref="view_account_multi_relation"/>
+			<field name="act_window_id" ref="action_account_multi_relation"/>
+		</record>
+		-->
+		<record id="action_account_multi_relation_fix" model="ir.actions.act_window">
+			<field name="name">Account Multicompany Relation</field>
+			<field name="type">ir.actions.act_window</field>
+			<field name="res_model">account.multicompany.relation</field>
+			<field name="view_type">form</field>
+			<field name="view_id" ref="view_account_multi_relation_tree"/>
+		</record>
+		<menuitem id = "account_multi_relation_menu" name = "Relation Multicompany" parent="account.menu_configuration_misc" action = "action_account_multi_relation_fix"/>
+		
+		
+		
+		<record model="ir.ui.view" id="view_account_account_mirror_ext">
+			<field name="name">account.account.relation.form</field>
+			<field name="model">account.account</field>
+			<field name="type">form</field>
+			<field name="inherit_id" ref = "account.view_account_form"/>
+			<field name="arch" type="xml">
+				<data>
+					<field name = "user_type" position = "after">
+						<field name = "account_mirror"/>
+					</field>
+				</data>
+			</field>
+		</record>
+		
+		
+		<record model="ir.ui.view" id="view_account_journal_mirror_ext">
+			<field name="name">account.journal.relation.form2</field>
+			<field name="model">account.journal</field>
+			<field name="type">form</field>
+			<field name="inherit_id" ref = "account.view_account_journal_form"/>
+			<field name="arch" type="xml">
+				<data>
+					<field name = "type" position = "after">
+						<field name = "journal_mirror"/>
+					</field>
+				</data>
+			</field>
+		</record>
+	</data>
+</openerp>

=== modified file 'account_voucher_check/__openerp__.py'
--- account_voucher_check/__openerp__.py	2011-11-09 17:51:47 +0000
+++ account_voucher_check/__openerp__.py	2012-01-05 00:57:30 +0000
@@ -35,9 +35,9 @@
 	"name"        : "Voucher Check",
 	"author"      : "ClearCorp S.A.",
 	"version"     : "0.1",
-	"depends"     : ["base","account"],
+	"depends"     : ["base","account",'report_webkit',],
 	"init_xml"    : [],
-	"update_xml"  : ['account_voucher_check_view.xml',],
+	"update_xml"  : ['account_voucher_check_view.xml','account_voucher_check_report.xml',],
 	"category"    : "Accounting",
 	"active"      : False,
 	"instalable"  : True,

=== modified file 'account_voucher_check/account_voucher_check.py'
--- account_voucher_check/account_voucher_check.py	2011-11-09 21:51:05 +0000
+++ account_voucher_check/account_voucher_check.py	2012-01-05 00:57:30 +0000
@@ -47,6 +47,6 @@
 	_description = 'Accounting Voucher'
 
 	_columns = {
-		'amount_text'     :   fields.char('On text the amount',size=256,required=True),
+		'amount_text'     :   fields.char('On text the amount',size=256),
 	}
 account_voucher_check()

=== added file 'account_voucher_check/account_voucher_check_report.xml'
--- account_voucher_check/account_voucher_check_report.xml	1970-01-01 00:00:00 +0000
+++ account_voucher_check/account_voucher_check_report.xml	2012-01-05 00:57:30 +0000
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<openerp>
+	<data>
+		<report auto="False" 
+				id="account_voucher.report_check_voucher" 
+				model="account.voucher" 
+				name="check.voucher.layout_ccorp"  
+				file="account_voucher_check/report/check_voucher.mako" 
+				string="Check Print" 
+				report_type="webkit"
+				header =  "False"
+				/>
+	</data>
+</openerp>

=== modified file 'account_voucher_check/account_voucher_check_view.xml'
--- account_voucher_check/account_voucher_check_view.xml	2011-11-09 21:51:05 +0000
+++ account_voucher_check/account_voucher_check_view.xml	2012-01-05 00:57:30 +0000
@@ -16,11 +16,11 @@
 				<field name="arch" type="xml">
 					<data>
 						<field name = "company_id" position = "after">
-							<field name = "amount_text"/>
+							<field name = "amount_text" required="1"/>
 						</field>
 					</data>
 				</field>
-			</record>
+		</record>
 
 			<record id="action_check_payment" model="ir.actions.act_window">
 				<field name="name">Check Payment</field>

=== added directory 'account_voucher_check/report'
=== added file 'account_voucher_check/report/__init__.py'
--- account_voucher_check/report/__init__.py	1970-01-01 00:00:00 +0000
+++ account_voucher_check/report/__init__.py	2012-01-05 00:57:30 +0000
@@ -0,0 +1,35 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    __init__.py
+#    check_voucher
+#    First author: Mag Guevara <mag.guevara@xxxxxxxxxxxxxxx> (ClearCorp S.A.)
+#    Copyright (c) 2011-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserved.
+#    
+#    Redistribution and use in source and binary forms, with or without modification, are
+#    permitted provided that the following conditions are met:
+#    
+#       1. Redistributions of source code must retain the above copyright notice, this list of
+#          conditions and the following disclaimer.
+#    
+#       2. Redistributions in binary form must reproduce the above copyright notice, this list
+#          of conditions and the following disclaimer in the documentation and/or other materials
+#          provided with the distribution.
+#    
+#    THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND ANY EXPRESS OR IMPLIED
+#    WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+#    FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
+#    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+#    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+#    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+#    ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+#    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+#    ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#    
+#    The views and conclusions contained in the software and documentation are those of the
+#    authors and should not be interpreted as representing official policies, either expressed
+#    or implied, of ClearCorp S.A..
+#    
+##############################################################################
+
+import check_voucher

=== added file 'account_voucher_check/report/account_voucher_check.css'
--- account_voucher_check/report/account_voucher_check.css	1970-01-01 00:00:00 +0000
+++ account_voucher_check/report/account_voucher_check.css	2012-01-05 00:57:30 +0000
@@ -0,0 +1,126 @@
+body {
+
+}
+
+#wrapper{
+
+}
+
+#document_data{
+	padding : 5px;
+	width : 100%;
+	height : 210px;
+}
+
+#date {
+	margin : 20px 0px 5px 400px;
+}
+
+#detail {
+	margin-top : 20px;
+	width : 100%;
+}
+
+.amount_detail {
+	margin : 0px 0px 0px 10px;
+}
+
+#accounting_data {
+	margin : 5px;
+}
+
+#document_desc {
+	height : 110px;
+	margin-bottom : 7px;
+	width : 100%;
+}
+
+#accounts{
+	margin-left : 0px;
+	margin-top : 8px;
+	margin-bottom : 13px;
+	height : 290px;
+}
+
+#table_account{}
+
+#footer_data{}
+
+.detail_desc{
+	font-family : courier, arial, sans, serif;
+	font-size : 10px;
+	font-style : italic;
+}
+
+.text_font{
+	font-family : courier, arial, sans, serif;
+	font-size : 10px;
+}
+
+.amount{
+	font-family : courier, arial, sans, serif;
+	font-size : 10px;
+	font-style : italic;
+}
+
+.account_line{
+	font-family : courier, arial, sans, serif;
+	font-size : 10px;
+	text-align : center;
+}
+.detail_line{
+	width : 70%;
+	float : left;
+	margin-left : 70px;
+}
+.amount_text{
+	margin : 5px;
+	width : 100%;
+	margin-top : 20px;
+	margin-left : 70px;
+}
+
+.account_id{
+	width : 270px;
+}
+
+.code_cell {
+	width : 130px;
+}
+
+.code_div {
+	float : left;
+	width : 130px;
+	
+}
+
+.amount_acc {
+	width : 140px;
+}
+
+.made_by{
+	float : left;
+	width : 100px;
+	font-family : courier, arial, sans, serif;
+	font-size : 10px;
+	text-align : center;
+	border: 1px solid #000; border-collapse: collapse;
+}
+
+#receipt {
+	float : left;
+	border: 1px solid #000; border-collapse: collapse;
+	margin-left : 5px;
+}
+
+#related{
+	float : left;
+}
+
+.sub_receipt{
+	width : 140px;
+	font-family : courier, arial, sans, serif;
+	font-size : 10px;
+	text-align : center;
+}
+ td {border: 1px solid #000; border-collapse: collapse; }

=== added file 'account_voucher_check/report/account_voucher_check_dot_matrix.css'
--- account_voucher_check/report/account_voucher_check_dot_matrix.css	1970-01-01 00:00:00 +0000
+++ account_voucher_check/report/account_voucher_check_dot_matrix.css	2012-01-05 00:57:30 +0000
@@ -0,0 +1,128 @@
+body {
+	margin-top : 10px;/*cambio de 20 a 10*/
+}
+
+#wrapper{
+
+}
+
+#document_data{
+	padding : 5px;
+	width : 100%;
+	height : 200px;/*cambio de 210 a 200*/
+}
+
+#date {
+	margin : 20px 0px 5px 300px;/*cambio de 400 a 200*/
+}
+
+#detail {
+	margin-top : 20px;
+	width : 100%;
+	
+}
+
+.amount_detail {
+	margin : 0px 0px 0px 300px;/*cambio de 400 a 200*/
+	
+}
+
+#accounting_data {
+	margin-right : 100px;
+	
+}
+
+#document_desc {
+	height : 90px;/*cambio de 110 a 90*/
+	margin-bottom : 3px;/*cambio de 7 a 3*/
+	width : 100%;
+}
+
+#accounts{
+	margin-left : 0px;
+	margin-top : 2px;/*cambio de 8 a 2*/
+	margin-bottom : 7px;/*cambio de 13 a 7*/
+	height : 250px;/*cambio de 290 a 250*/
+	width : 660px; /*643*/
+}
+
+#table_account{}
+
+#footer_data{}
+
+.detail_desc{
+	font-family : courier, arial, sans, serif;
+	font-size : 14px;
+	font-style : italic;
+}
+
+.text_font{
+	font-family : courier, arial, sans, serif;
+	font-size : 14px;
+}
+
+.amount{
+	font-family : courier, arial, sans, serif;
+	font-size : 14px;
+	font-style : italic;
+}
+
+.account_line{
+	font-family : courier, arial, sans, serif;
+	font-size : 14px;
+	text-align : center;
+}
+.detail_line{
+	width : 60%;/*cambio de 70 a 30*/
+	float : left;
+	margin-left : 30px;/*cambio de 70 a 30*/
+}
+.amount_text{
+	margin : 5px;
+	width : 100%;
+	margin-top : 20px;
+	margin-left : 30px;/*cambio de 70 a 30*/
+}
+
+.account_id{
+	width : 290px;
+}
+
+.code_cell {
+	width : 125px;
+}
+
+.code_div {
+	float : left;
+	width : 120px;
+	
+}
+
+.amount_acc {
+	width : 130px;
+}
+
+.made_by{
+	float : left;
+	width : 85px;
+	margin-left : 5px;
+	font-family : courier, arial, sans, serif;
+	font-size : 14px;
+	text-align : center;
+}
+
+#receipt {
+	float : left;
+	margin-left : 15px;
+}
+
+#related{
+	float : left;
+}
+
+.sub_receipt{
+	width : 140px;
+	font-family : courier, arial, sans, serif;
+	font-size : 10px;
+	text-align : center;
+}

=== added file 'account_voucher_check/report/account_voucher_check_page.css'
--- account_voucher_check/report/account_voucher_check_page.css	1970-01-01 00:00:00 +0000
+++ account_voucher_check/report/account_voucher_check_page.css	2012-01-05 00:57:30 +0000
@@ -0,0 +1,128 @@
+body {
+	margin-top : 20px;
+}
+
+#wrapper{
+
+}
+
+#document_data{
+	padding : 5px;
+	width : 100%;
+	height : 210px;
+}
+
+#date {
+	margin : 20px 0px 5px 400px;
+}
+
+#detail {
+	margin-top : 20px;
+	width : 100%;
+	
+}
+
+.amount_detail {
+	margin : 0px 0px 0px 400px;
+	
+}
+
+#accounting_data {
+	margin : 5px;
+	
+}
+
+#document_desc {
+	height : 110px;
+	margin-bottom : 7px;
+	width : 100%;
+}
+
+#accounts{
+	margin-left : 0px;
+	margin-top : 8px;
+	margin-bottom : 13px;
+	height : 290px;
+	width : 660px; /*643*/
+}
+
+#table_account{}
+
+#footer_data{}
+
+.detail_desc{
+	font-family : courier, arial, sans, serif;
+	font-size : 10px;
+	font-style : italic;
+}
+
+.text_font{
+	font-family : courier, arial, sans, serif;
+	font-size : 10px;
+}
+
+.amount{
+	font-family : courier, arial, sans, serif;
+	font-size : 10px;
+	font-style : italic;
+}
+
+.account_line{
+	font-family : courier, arial, sans, serif;
+	font-size : 10px;
+	text-align : center;
+}
+.detail_line{
+	width : 75%;
+	float : left;
+	margin-left : 70px;
+}
+.amount_text{
+	margin : 5px;
+	width : 100%;
+	margin-top : 20px;
+	margin-left : 70px;
+}
+
+.account_id{
+	width : 290px;
+}
+
+.code_cell {
+	width : 125px;
+}
+
+.code_div {
+	float : left;
+	width : 120px;
+	
+}
+
+.amount_acc {
+	width : 130px;
+}
+
+.made_by{
+	float : left;
+	width : 85px;
+	margin-left : 5px;
+	font-family : courier, arial, sans, serif;
+	font-size : 10px;
+	text-align : center;
+}
+
+#receipt {
+	float : left;
+	margin-left : 15px;
+}
+
+#related{
+	float : left;
+}
+
+.sub_receipt{
+	width : 140px;
+	font-family : courier, arial, sans, serif;
+	font-size : 10px;
+	text-align : center;
+}

=== added file 'account_voucher_check/report/check_voucher.mako'
--- account_voucher_check/report/check_voucher.mako	1970-01-01 00:00:00 +0000
+++ account_voucher_check/report/check_voucher.mako	2012-01-05 00:57:30 +0000
@@ -0,0 +1,88 @@
+<html>
+<head>
+	<style style="text/css">
+		${css}
+	</style>
+</head>
+<body class = "data">
+	%for check in objects :
+	<% setLang(check.partner_id.lang) %>
+	<div id="wrapper">
+		<div id = "document_data">
+			<div id = "date">
+				<span class="text_font">${check.date or ''|entity}</span>
+			</div>
+			<div id = "detail">
+				<div class = "detail_line">
+					<span class="text_font">${check.partner_id.name or ''|entity}</span>
+				</div>
+				<div class = "amount_detail">
+					<span class = "amount">${formatLang(check.amount)}</span>
+				</div>
+			</div>
+			<div class = "amount_text">
+				<span class="text_font">${check.amount_text or check.partner_id.name or ''|entity}</span>
+			</div>
+		</div>
+		<div id = "accounting_data">
+			<div id = "document_desc">
+				<p>&nbsp;</p>
+				<div class = "detail_desc">
+					%if check.narration:
+					<span class = "text_font">${check.narration or ''|entity}</span>
+					%else:
+					<span>&nbsp;</span>
+					%endif
+				</div>
+			</div>
+			<div id = "accounts">
+				<table width = "100%" id = "table_account">
+					<thead><tr><th>&nbsp;</th><th>&nbsp;</th><th>&nbsp;</th><th>&nbsp;</th><tr></thead>
+					<tbody>
+					%for line in check.line_cr_ids :
+					<tr class = "account_line">
+						<td valign="top" class = "code_cell">
+							${line.account_id.code}
+						</td>
+						<td valign="top" class = "account_id">
+							${line.account_id.name}
+						</td>
+						<td valign="top" class = "amount_acc">
+							${line.account_id.currency_id.symbol_prefix or ''|entity} ${formatLang(line.account_id.credit)} ${line.account_id.currency_id.symbol_suffix or ''|entity}
+						</td>
+						<td valign="top" class = "amount_acc">
+							${line.account_id.currency_id.symbol_prefix or ''|entity} ${formatLang(line.account_id.credit)} ${line.account_id.currency_id.symbol_suffix or ''|entity}
+						</td>
+					</tr>
+					%endfor
+					%for line in check.line_dr_ids :
+					<tr class = "account_line">
+						<td valign="top" class = "code_cell">${line.account_id.code}</td>
+						<td valign="top" class = "account_id">
+							${line.account_id.name}
+						</td>
+						<td valign="top" class = "amount_acc">${line.account_id.currency_id.symbol_prefix or ''|entity} ${formatLang(line.account_id.credit)} ${line.account_id.currency_id.symbol_suffix or ''|entity}</td>
+						<td valign="top" class = "amount_acc">${line.account_id.currency_id.symbol_prefix or ''|entity} ${formatLang(line.account_id.credit)} ${line.account_id.currency_id.symbol_suffix or ''|entity}</td>
+					</tr>
+					%endfor
+					</tbody>
+				</table>
+			</div>
+			<div id = "footer">
+				<div width = "100%" id = "footer_data">
+					<div class = "code_div">&nbsp;</div>
+					<div id = "related">
+						<div class = "made_by">${user.name}</div>
+						<div class = "made_by">${user.name}</div>
+					</div>
+					<div id = "receipt">
+						<div class = "sub_receipt">${check.partner_id.name or ''|entity}</div>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+	<p style="page-break-after:always"></p>
+%endfor
+</body>
+</html>

=== added file 'account_voucher_check/report/check_voucher.py'
--- account_voucher_check/report/check_voucher.py	1970-01-01 00:00:00 +0000
+++ account_voucher_check/report/check_voucher.py	2012-01-05 00:57:30 +0000
@@ -0,0 +1,57 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    check_voucher.py
+#    account_voucher_check
+#    First author: Mag Guevara <mag.guevara@xxxxxxxxxxxxxxx> (ClearCorp S.A.)
+#    Copyright (c) 2010-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserved.
+#    
+#    Redistribution and use in source and binary forms, with or without modification, are
+#    permitted provided that the following conditions are met:
+#    
+#       1. Redistributions of source code must retain the above copyright notice, this list of
+#          conditions and the following disclaimer.
+#    
+#       2. Redistributions in binary form must reproduce the above copyright notice, this list
+#          of conditions and the following disclaimer in the documentation and/or other materials
+#          provided with the distribution.
+#    
+#    THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND ANY EXPRESS OR IMPLIED
+#    WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+#    FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> OR
+#    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+#    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+#    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+#    ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+#    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+#    ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#    
+#    The views and conclusions contained in the software and documentation are those of the
+#    authors and should not be interpreted as representing official policies, either expressed
+#    or implied, of ClearCorp S.A..
+#    
+##############################################################################
+
+import time
+import pooler
+from report import report_sxw
+import locale
+
+class check_voucher(report_sxw.rml_parse):
+
+	def __init__(self, cr, uid, name, context):
+		super(check_voucher, self).__init__(cr, uid, name, context=context)
+		self.localcontext.update({
+			'time': time,
+			'cr'  : cr,
+			'uid' : uid,
+		})
+		self.context = context
+		self._node = None
+
+report_sxw.report_sxw(
+    'report.check.voucher.layout_ccorp',
+    'account.voucher',
+    'addons/account_voucher_check/report/check_voucher.mako',
+    parser=check_voucher
+)

=== modified file 'account_voucher_payment_method/__openerp__.py'
--- account_voucher_payment_method/__openerp__.py	2011-09-01 14:52:40 +0000
+++ account_voucher_payment_method/__openerp__.py	2012-01-05 00:57:30 +0000
@@ -5,7 +5,8 @@
 	"depends" : ["account_voucher"],
 	"init_xml" : [],
 	"update_xml" : [
-		"account_voucher_payment_method.xml"
+		"account_voucher_payment_workflow.xml",
+		"account_voucher_payment_method.xml",
 		],
 	"category" : "",
 	"active": False,

=== modified file 'account_voucher_payment_method/account_voucher_payment_method.py'
--- account_voucher_payment_method/account_voucher_payment_method.py	2011-11-08 22:23:03 +0000
+++ account_voucher_payment_method/account_voucher_payment_method.py	2012-01-05 00:57:30 +0000
@@ -19,163 +19,409 @@
 ##############################################################################
 
 from osv import osv, fields
+from tools import debug
 
 class account_journal(osv.osv):
 	_name = "account.journal"
 	_inherit = "account.journal"
 	_columns = {
-		'type': fields.selection([('sale', 'Sale'),
-								('sale_refund','Sale Refund'), 
-								('purchase', 'Purchase'), 
-								('purchase_refund','Purchase Refund'), 
-								('cash', 'Cash'), 
-								('bank', 'Bank and Cheques'), 
-								('general', 'General'), 
-								('situation', 'Opening/Closing Situation'),
-								('payment','Payment method')], 'Type', size=32, required=True,
-								help="Select 'Sale' for Sale journal to be used at the time of making invoice."\
-								" Select 'Purchase' for Purchase Journal to be used at the time of approving purchase order."\
-								" Select 'Cash' to be used at the time of making payment."\
-								" Select 'General' for miscellaneous operations."\
-								" Select 'Opening/Closing Situation' to be used at the time of new fiscal year creation or end of year entries generation."),
+		#'type': fields.selection([('sale', 'Sale'),
+		#						('sale_refund','Sale Refund'), 
+		#						('purchase', 'Purchase'), 
+		#						('purchase_refund','Purchase Refund'), 
+		#						('cash', 'Cash'), 
+		#						('bank', 'Bank and Cheques'), 
+		#						('general', 'General'), 
+		#						('situation', 'Opening/Closing Situation'),
+		#						('payment','Payment method')], 'Type', size=32, required=True,
+		#						help="Select 'Sale' for Sale journal to be used at the time of making invoice."\
+		#						" Select 'Purchase' for Purchase Journal to be used at the time of approving purchase order."\
+		#						" Select 'Cash' to be used at the time of making payment."\
+		#						" Select 'General' for miscellaneous operations."\
+		#						" Select 'Opening/Closing Situation' to be used at the time of new fiscal year creation or end of year entries generation."),
+		'payment_method'            : fields.boolean('Payment method'),
+		'payment_verification'      : fields.boolean('Payment Verification'),
 	}
 account_journal()
 
 class account_voucher_journal_payment(osv.osv):
-    _name = 'account.voucher'
-    _inherit = 'account.voucher'
-    _description = 'Accounting Voucher'
-  
-    def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, date, context=None):
-        """price
-        Returns a dict that contains new values and context
-
-        @param partner_id: latest value from user input for field partner_id
-        @param args: other arguments
-        @param context: context arguments, like lang, time zone
-
-        @return: Returns a dict which contains new values, and context
-        """
-        if context is None:
-            context = {}
-        if not journal_id:
-            return {}
-        context_multi_currency = context.copy()
-        if date:
-            context_multi_currency.update({'date': date})
-
-        line_pool = self.pool.get('account.voucher.line')
-        line_ids = ids and line_pool.search(cr, uid, [('voucher_id', '=', ids[0])]) or False
-        if line_ids:
-            line_pool.unlink(cr, uid, line_ids)
-
-        currency_pool = self.pool.get('res.currency')
-        move_line_pool = self.pool.get('account.move.line')
-        partner_pool = self.pool.get('res.partner')
-        journal_pool = self.pool.get('account.journal')
-
-        vals = self.onchange_journal(cr, uid, ids, journal_id, [], False, partner_id, context)
-        vals = vals.get('value')
-        currency_id = vals.get('currency_id', currency_id)
-        default = {
-            'value':{'line_ids':[], 'line_dr_ids':[], 'line_cr_ids':[], 'pre_line': False, 'currency_id':currency_id},
-        }
-
-        if not partner_id:
-            return default
-
-        if not partner_id and ids:
-            line_ids = line_pool.search(cr, uid, [('voucher_id', '=', ids[0])])
-            if line_ids:
-                line_pool.unlink(cr, uid, line_ids)
-            return default
-
-        journal = journal_pool.browse(cr, uid, journal_id, context=context)
-        partner = partner_pool.browse(cr, uid, partner_id, context=context)
-        account_id = False
-        if journal.type in ('sale','sale_refund'):
-            account_id = partner.property_account_receivable.id
-        elif journal.type in ('purchase', 'purchase_refund','expense'):
-            account_id = partner.property_account_payable.id
-        else:
-            account_id = journal.default_credit_account_id.id or journal.default_debit_account_id.id
-
-        default['value']['account_id'] = account_id
-
-        if journal.type not in ('cash', 'bank','payment'):
-            return default
-
-        total_credit = 0.0
-        total_debit = 0.0
-        account_type = 'receivable'
-        if ttype == 'payment':
-            account_type = 'payable'
-            total_debit = price or 0.0
-        else:
-            total_credit = price or 0.0
-            account_type = 'receivable'
-
-        if not context.get('move_line_ids', False):
-            domain = [('state','=','valid'), ('account_id.type', '=', account_type), ('reconcile_id', '=', False), ('partner_id', '=', partner_id)]
-            if context.get('invoice_id', False):
-	            domain.append(('invoice', '=', context['invoice_id']))
-            ids = move_line_pool.search(cr, uid, domain, context=context)
-        else:
-            ids = context['move_line_ids']
-        ids.reverse()
-        moves = move_line_pool.browse(cr, uid, ids, context=context)
-
-        company_currency = journal.company_id.currency_id.id
-        if company_currency != currency_id and ttype == 'payment':
-            total_debit = currency_pool.compute(cr, uid, currency_id, company_currency, total_debit, context=context_multi_currency)
-        elif company_currency != currency_id and ttype == 'receipt':
-            total_credit = currency_pool.compute(cr, uid, currency_id, company_currency, total_credit, context=context_multi_currency)
-
-        for line in moves:
-            if line.credit and line.reconcile_partial_id and ttype == 'receipt':
-                continue
-            if line.debit and line.reconcile_partial_id and ttype == 'payment':
-                continue
-            total_credit += line.credit or 0.0
-            total_debit += line.debit or 0.0
-        for line in moves:
-            if line.credit and line.reconcile_partial_id and ttype == 'receipt':
-                continue
-            if line.debit and line.reconcile_partial_id and ttype == 'payment':
-                continue
-            original_amount = line.credit or line.debit or 0.0
-            amount_unreconciled = currency_pool.compute(cr, uid, line.currency_id and line.currency_id.id or company_currency, currency_id, abs(line.amount_residual_currency), context=context_multi_currency)
-            rs = {
-                'name':line.move_id.name,
-                'type': line.credit and 'dr' or 'cr',
-                'move_line_id':line.id,
-                'account_id':line.account_id.id,
-                'amount_original': currency_pool.compute(cr, uid, line.currency_id and line.currency_id.id or company_currency, currency_id, line.currency_id and abs(line.amount_currency) or original_amount, context=context_multi_currency),
-                'date_original':line.date,
-                'date_due':line.date_maturity,
-                'amount_unreconciled': amount_unreconciled,
-            }
-
-            if line.credit:
-                amount = min(amount_unreconciled, currency_pool.compute(cr, uid, company_currency, currency_id, abs(total_debit), context=context_multi_currency))
-                rs['amount'] = amount
-                total_debit -= amount
-            else:
-                amount = min(amount_unreconciled, currency_pool.compute(cr, uid, company_currency, currency_id, abs(total_credit), context=context_multi_currency))
-                rs['amount'] = amount
-                total_credit -= amount
-
-            default['value']['line_ids'].append(rs)
-            if rs['type'] == 'cr':
-                default['value']['line_cr_ids'].append(rs)
-            else:
-                default['value']['line_dr_ids'].append(rs)
-
-            if ttype == 'payment' and len(default['value']['line_cr_ids']) > 0:
-                default['value']['pre_line'] = 1
-            elif ttype == 'receipt' and len(default['value']['line_dr_ids']) > 0:
-                default['value']['pre_line'] = 1
-            default['value']['writeoff_amount'] = self._compute_writeoff_amount(cr, uid, default['value']['line_dr_ids'], default['value']['line_cr_ids'], price)
-
-        return default
+	_name = 'account.voucher'
+	_inherit = 'account.voucher'
+	_description = 'Accounting Voucher'
+	
+	def _compute_writeoff_amount(self, cr, uid, line_dr_ids, line_cr_ids, amount):
+		debit = credit = 0.0
+		for l in line_dr_ids:
+			debit += l['amount']
+		for l in line_cr_ids:
+			credit += l['amount']
+		return abs(amount - abs(credit - debit))
+	
+	def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, date, context=None):
+		"""price
+		Returns a dict that contains new values and context
+
+		@param partner_id: latest value from user input for field partner_id
+		@param args: other arguments
+		@param context: context arguments, like lang, time zone
+
+		@return: Returns a dict which contains new values, and context
+		"""
+		if context is None:
+			context = {}
+		if not journal_id:
+			return {}
+		context_multi_currency = context.copy()
+		if date:
+			context_multi_currency.update({'date': date})
+
+		line_pool = self.pool.get('account.voucher.line')
+		line_ids = ids and line_pool.search(cr, uid, [('voucher_id', '=', ids[0])]) or False
+		if line_ids:
+			line_pool.unlink(cr, uid, line_ids)
+
+		currency_pool = self.pool.get('res.currency')
+		move_line_pool = self.pool.get('account.move.line')
+		partner_pool = self.pool.get('res.partner')
+		journal_pool = self.pool.get('account.journal')
+
+		vals = self.onchange_journal(cr, uid, ids, journal_id, [], False, partner_id, context)
+		vals = vals.get('value')
+		currency_id = vals.get('currency_id', currency_id)
+		default = {
+			'value':{'line_ids':[], 'line_dr_ids':[], 'line_cr_ids':[], 'pre_line': False, 'currency_id':currency_id},
+		}
+
+		if not partner_id:
+			debug("DEFAULT EN EL IF SIN PARTNER")
+			debug(default)
+			return default
+
+		if not partner_id and ids:
+			line_ids = line_pool.search(cr, uid, [('voucher_id', '=', ids[0])])
+			if line_ids:
+				line_pool.unlink(cr, uid, line_ids)
+			return default
+
+		journal = journal_pool.browse(cr, uid, journal_id, context=context)
+		partner = partner_pool.browse(cr, uid, partner_id, context=context)
+		account_id = False
+		if journal.type in ('sale','sale_refund'):
+			account_id = partner.property_account_receivable.id
+		elif journal.type in ('purchase', 'purchase_refund','expense'):
+			account_id = partner.property_account_payable.id
+		else:
+			account_id = journal.default_credit_account_id.id or journal.default_debit_account_id.id
+
+		default['value']['account_id'] = account_id
+
+		if journal.type not in ('cash', 'bank','payment'):
+			debug("DEFAULT EN EL IF journal no de dinero banco o pagos")
+			debug(default)
+			return default
+
+		total_credit = 0.0
+		total_debit = 0.0
+		account_type = 'receivable'
+		if ttype == 'payment':
+			account_type = 'payable'
+			total_debit = price or 0.0
+		else:
+			total_credit = price or 0.0
+			account_type = 'receivable'
+
+		if not context.get('move_line_ids', False):
+			domain = [('state','=','valid'), ('account_id.type', '=', account_type), ('reconcile_id', '=', False), ('partner_id', '=', partner_id), ('journal_id.payment_method','=',False)]
+			if context.get('invoice_id', False):
+				domain.append(('invoice', '=', context['invoice_id']))
+			ids = move_line_pool.search(cr, uid, domain, context=context)
+			debug("no encuentra movelines en el contexto")
+			debug(ids)
+		else:
+			ids = context['move_line_ids']
+			debug("SI encuentra movelines en el contexto")
+			debug(ids)
+		ids.reverse()
+		moves = move_line_pool.browse(cr, uid, ids, context=context)
+
+		company_currency = journal.company_id.currency_id.id
+		if company_currency != currency_id and ttype == 'payment':
+			total_debit = currency_pool.compute(cr, uid, currency_id, company_currency, total_debit, context=context_multi_currency)
+		elif company_currency != currency_id and ttype == 'receipt':
+			total_credit = currency_pool.compute(cr, uid, currency_id, company_currency, total_credit, context=context_multi_currency)
+
+		for line in moves:
+			if line.credit and line.reconcile_partial_id and ttype == 'receipt':
+				continue
+			if line.debit and line.reconcile_partial_id and ttype == 'payment':
+				continue
+			total_credit += line.credit or 0.0
+			total_debit += line.debit or 0.0
+		for line in moves:
+			if line.credit and line.reconcile_partial_id and ttype == 'receipt':
+				continue
+			if line.debit and line.reconcile_partial_id and ttype == 'payment':
+				continue
+			original_amount = line.credit or line.debit or 0.0
+			amount_unreconciled = currency_pool.compute(cr, uid, line.currency_id and line.currency_id.id or company_currency, currency_id, abs(line.amount_residual_currency), context=context_multi_currency)
+			rs = {
+				'name':line.move_id.name,
+				'type': line.credit and 'dr' or 'cr',
+				'move_line_id':line.id,
+				'account_id':line.account_id.id,
+				'amount_original': currency_pool.compute(cr, uid, line.currency_id and line.currency_id.id or company_currency, currency_id, line.currency_id and abs(line.amount_currency) or original_amount, context=context_multi_currency),
+				'date_original':line.date,
+				'date_due':line.date_maturity,
+				'amount_unreconciled': amount_unreconciled,
+			}
+
+			if line.credit:
+				amount = min(amount_unreconciled, currency_pool.compute(cr, uid, company_currency, currency_id, abs(total_debit), context=context_multi_currency))
+				rs['amount'] = amount
+				total_debit -= amount
+			else:
+				amount = min(amount_unreconciled, currency_pool.compute(cr, uid, company_currency, currency_id, abs(total_credit), context=context_multi_currency))
+				rs['amount'] = amount
+				total_credit -= amount
+
+			default['value']['line_ids'].append(rs)
+			if rs['type'] == 'cr':
+				default['value']['line_cr_ids'].append(rs)
+			else:
+				default['value']['line_dr_ids'].append(rs)
+
+			if ttype == 'payment' and len(default['value']['line_cr_ids']) > 0:
+				default['value']['pre_line'] = 1
+			elif ttype == 'receipt' and len(default['value']['line_dr_ids']) > 0:
+				default['value']['pre_line'] = 1
+			default['value']['writeoff_amount'] = self._compute_writeoff_amount(cr, uid, default['value']['line_dr_ids'], default['value']['line_cr_ids'], price)
+		debug(price)
+		debug(default)
+		return default
+	
+	def proforma_voucher_mirror(self, cr, uid, ids, context=None):
+		super(account_voucher_journal_payment, self).action_move_line_create(cr, uid, ids, context=context)
+		voucher = self.browse(cr,1,ids,context=context)[0]
+		if voucher.journal_id.journal_mirror:
+			mirror_journal = voucher.journal_id.journal_mirror
+			targ_journal =  mirror_journal.targ_journal
+			targ_account = mirror_journal.targ_account
+			company_id = self.pool.get('res.company').browse(cr,1,1)
+			partner_id = company_id.partner_id
+			
+			period_id  = self.pool.get('account.period').search(cr,1,['|',('name','=',voucher.period_id.name), ('code','=',voucher.period_id.code),('company_id','=',company_id.id)])[0]
+			
+			period = self.pool.get('account.period').browse(cr,1,period_id)
+			args = {
+				'journal' : targ_journal,
+				'account' : targ_account,
+				'partner' : partner_id,
+				'period'  : period,
+			}
+			self.action_move_line_create_mirror(cr,1,ids,args,context=context)
+		return True    
+	
+	def action_move_line_create_mirror(self, cr, uid, ids,args, context=None):
+		def _get_payment_term_lines(term_id, amount):
+			term_pool = self.pool.get('account.payment.term')
+			if term_id and amount:
+				terms = term_pool.compute(cr, uid, term_id, amount)
+				return terms
+			return False
+		if context is None:
+			context = {}
+		move_pool = self.pool.get('account.move')
+		move_line_pool = self.pool.get('account.move.line')
+		currency_pool = self.pool.get('res.currency')
+		tax_obj = self.pool.get('account.tax')
+		seq_obj = self.pool.get('ir.sequence')
+		
+		for inv in self.browse(cr, uid, ids, context=context):
+			debug("DENTRO DEL FOR")
+			mirror_journal_id = args.get('journal',False)
+			mirror_account_id = args.get('account',False)
+			period_id = args.get('period',False)
+			partner_id = args.get('partner',False)
+			
+			#if inv.move_id:
+			#	continue
+			context_multi_currency = context.copy()
+			context_multi_currency.update({'date': inv.date})
+			
+			if inv.number:
+				name = inv.number
+			elif mirror_journal_id.sequence_id:
+				name = seq_obj.get_id(cr, uid, mirror_journal_id.sequence_id.id)
+			else:
+				raise osv.except_osv(_('Error !'), _('Please define a sequence on the journal !'))
+			if not inv.reference:
+				ref = name.replace('/','')
+			else:
+				ref = inv.reference
+
+			move = {
+				'name': name,
+				'journal_id': mirror_journal_id and mirror_journal_id.id or inv.journal_id.id,
+				'narration': inv.narration,
+				'date': inv.date,
+				'ref': ref,
+				'period_id': period_id and period_id.id or (inv.period_id and inv.period_id.id or False)
+			}
+			move_id = move_pool.create(cr, uid, move)
+			
+			#create the first line manually
+			company_currency = mirror_journal_id and mirror_journal_id.company_id.currency_id.id or inv.journal_id.company_id.currency_id.id
+			current_currency = mirror_journal_id and mirror_journal_id.currency.id or inv.currency_id.id
+			debit = 0.0
+			credit = 0.0
+			# TODO: is there any other alternative then the voucher type ??
+			# -for sale, purchase we have but for the payment and receipt we do not have as based on the bank/cash journal we can not know its payment or receipt
+			if inv.type in ('purchase', 'payment'):
+				credit = currency_pool.compute(cr, uid, current_currency, company_currency, inv.amount, context=context_multi_currency)
+			elif inv.type in ('sale', 'receipt'):
+				debit = currency_pool.compute(cr, uid, current_currency, company_currency, inv.amount, context=context_multi_currency)
+			if debit < 0:
+				credit = -debit
+				debit = 0.0
+			if credit < 0:
+				debit = -credit
+				credit = 0.0
+			sign = debit - credit < 0 and -1 or 1
+			
+			#create the first line of the voucher
+			move_line = {
+				'name': inv.name or '/',
+				'debit': debit,
+				'credit': credit,
+				#'account_id': mirror_account_id and mirror_account_id.id or inv.account_id.id,
+				'account_id': mirror_journal_id and mirror_journal_id.default_debit_account_id.id or inv.account_id.id,
+				'move_id': move_id,
+				'journal_id': mirror_journal_id and mirror_journal_id.id or inv.journal_id.id,
+				'period_id': period_id and period_id.id or inv.period_id.id,
+				'partner_id': partner_id and partner_id.id or inv.partner_id.id,
+				'currency_id': company_currency <> current_currency and  current_currency or False,
+				'amount_currency': company_currency <> current_currency and sign * inv.amount or 0.0,
+				'date': inv.date,
+				'date_maturity': inv.date_due
+			}
+			debug(move_line)
+			move_line_id = move_line_pool.create(cr, uid, move_line)
+			rec_list_ids = []
+			line_total = debit - credit
+			debug(line_total)
+			if inv.type == 'sale':
+				line_total = line_total - currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.tax_amount, context=context_multi_currency)
+			elif inv.type == 'purchase':
+				line_total = line_total + currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.tax_amount, context=context_multi_currency)
+
+			debug(inv.line_ids)
+			debug(line_total)
+			for line in inv.line_ids:
+				debug("for de los lines")
+				debug(line.amount)
+				debug(line.amount_unreconciled)
+				debug(line.untax_amount)
+				debug("for de los lines")
+				#create one move line per voucher line where amount is not 0.0
+				if not line.amount:
+					continue
+				#we check if the voucher line is fully paid or not and create a move line to balance the payment and initial invoice if needed
+				if line.amount == line.amount_unreconciled:
+					amount = line.amount #residual amount in company currency
+				else:
+					amount = currency_pool.compute(cr, uid, current_currency, company_currency, line.amount or line.untax_amount, context=context_multi_currency)
+				
+				move_line = {
+					'journal_id': mirror_journal_id and mirror_journal_id.id or inv.journal_id.id,
+					'period_id': period_id and period_id.id or inv.period_id.id,
+					'name': line.name and line.name or '/',
+					'account_id': mirror_account_id and mirror_account_id.id or line.account_id.id,
+					'move_id': move_id,
+					'partner_id': partner_id and  partner_id.id or inv.partner_id.id,
+					'currency_id': company_currency <> current_currency and current_currency or False,
+					'analytic_account_id': line.account_analytic_id and line.account_analytic_id.id or False,
+					'quantity': 1,
+					'credit': 0.0,
+					'debit': 0.0,
+					'date': inv.date
+				}
+				debug(line.amount)
+				debug(amount)
+				debug(line.move_line_id.amount_residual)
+				if amount < 0:
+					amount = -amount
+					if line.type == 'dr':
+						line.type = 'cr'
+					else:
+						line.type = 'dr'
+
+				if (line.type=='dr'):
+					debug("DEBITO")
+					debug(line_total)
+					debug(amount)
+					line_total += amount
+					move_line['debit'] = amount
+					move_line['account_id'] = mirror_journal_id.default_debit_account_id.id
+				else:
+					debug("CREDITO")
+					debug(line_total)
+					debug(amount)
+					line_total -= amount
+					move_line['credit'] = amount
+					move_line['account_id'] = mirror_account_id.id
+
+				#if inv.tax_id and inv.type in ('sale', 'purchase'):
+				#	move_line.update({
+				#		'account_tax_id': inv.tax_id.id,
+				#	})
+				#if move_line.get('account_tax_id', False):
+				#	tax_data = tax_obj.browse(cr, uid, [move_line['account_tax_id']], context=context)[0]
+				#	if not (tax_data.base_code_id and tax_data.tax_code_id):
+				#		raise osv.except_osv(_('No Account Base Code and Account Tax Code!'),_("You have to configure account base code and account tax code on the '%s' tax!") % (tax_data.name))
+				#sign = (move_line['debit'] - move_line['credit']) < 0 and -1 or 1
+				debug(move_line)
+				debug(line.type)
+				move_line['amount_currency'] = company_currency <> current_currency and sign * line.amount or 0.0
+				if move_line['debit'] == 0 and move_line['credit'] == 0:
+					continue
+				voucher_line = move_line_pool.create(cr, uid, move_line)
+				#if line.move_line_id.id:
+				#	rec_ids = [voucher_line, line.move_line_id.id]
+				#	rec_list_ids.append(rec_ids)
+
+			#VER QUE HACER CON LAS DE AJUSTE
+			inv_currency_id = self.pool.get('res.currency').browse(cr,uid,current_currency) or mirror_journal_id.currency or mirror_journal_id.company_id.currency_id
+			if not currency_pool.is_zero(cr, uid, inv_currency_id, line_total):
+				diff = line_total
+				account_id = False
+				if inv.payment_option == 'with_writeoff':
+					account_id = mirror_account_id and mirror_account_id.id or inv.writeoff_acc_id.id
+				elif inv.type in ('sale', 'receipt'):
+					account_id = mirror_account_id and mirror_account_id.id or (partner_id and partner_id.property_account_receivable.id or inv.partner_id.property_account_receivable.id)
+				else:
+					account_id = mirror_account_id and mirror_account_id.id or (partner_id and partner_id.property_account_payable.id or inv.partner_id.property_account_payable.id)
+				move_line = {
+					'name': name,
+					'account_id': account_id,
+					'move_id': move_id,
+					'partner_id': partner_id and partner_id.id or inv.partner_id.id,
+					'date': inv.date,
+					'credit': diff > 0 and diff or 0.0,
+					'debit': diff < 0 and -diff or 0.0,
+					#'amount_currency': company_currency <> current_currency and currency_pool.compute(cr, uid, company_currency, current_currency, diff * -1, context=context_multi_currency) or 0.0,
+					#'currency_id': company_currency <> current_currency and current_currency or False,
+				}
+				debug(move_line)
+				move_line_pool.create(cr, uid, move_line)
+			debug("LLEGO AL POST")
+			move_pool.post(cr, uid, [move_id], context={})
+		return True    
 account_voucher_journal_payment()
+
+class account_voucher_line(osv.osv):
+	_name = 'account.voucher.line'
+	_inherit = 'account.voucher.line'
+	_columns = {
+		'currency_id' :  fields.related('move_line_id', 'currency_id', type = 'many2one', relation = 'account.invoice', string = 'Currency', readonly=True,store=False),
+	}
+account_voucher_line()

=== modified file 'account_voucher_payment_method/account_voucher_payment_method.xml'
--- account_voucher_payment_method/account_voucher_payment_method.xml	2011-11-09 21:51:05 +0000
+++ account_voucher_payment_method/account_voucher_payment_method.xml	2012-01-05 00:57:30 +0000
@@ -3,7 +3,7 @@
 		
 		<!-- Account voucher payment and purchase inherit -->
 		
-		<record model="ir.ui.view" id="view_vendor_receipt_form">
+		<record model="ir.ui.view" id="view_customer_receipt_form">
 			<field name="name">account.voucher.receipt.form</field>
 			<field name="model">account.voucher</field>
 			<field name="inherit_id" ref="account_voucher.view_vendor_receipt_form"/>
@@ -12,7 +12,7 @@
 				<data>
 					<field name="journal_id" position="replace">
 						<field name="journal_id"
-								domain="[('type','in',['payment'])]"
+								domain="[('payment_method','=','True')]"
 								widget="selection" select="1"
 								on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)"
 								string="Payment Method"/>
@@ -30,7 +30,7 @@
 				<data>
 					<field name="journal_id" position="replace">
 						<field name="journal_id"
-							domain="[('type','in',['payment'])]"
+							domain="[('payment_method','=','True')]"
 							widget="selection" select="1"
 							on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)"
 							string="Payment Method"/>
@@ -39,12 +39,40 @@
 			</field>
 		</record>
 		
+		<record id="action_vendor_reciept2" model="ir.actions.act_window">
+			<field name="name">Customer Payment</field>
+			<field name="res_model">account.voucher</field>
+			<field name="view_type">form</field>
+			<field name="domain">[('journal_id.payment_method', '=', 'True'), ('type','=','receipt')]</field>
+			<field name="context">{'type' : 'receipt','payment_method':'True'}</field>
+			<field name="view_id" eval="False"/>
+			<field name="search_view_id" ref="account_voucher.view_voucher_filter_vendor_pay"/>
+			<field name="target">current</field>
+			<field name="help">Sales payment allows you to register the payments you receive from your customers. In order to record a payment, you must enter the customer, the payment method (=the journal) and the payment amount. OpenERP will propose to you automatically the reconciliation of this payment with the open invoices or sales receipts.</field>
+		</record>
+		<record id="action_vendor_reciept_tree" model="ir.actions.act_window.view">
+			<field eval="1" name="sequence"/>
+			<field name="view_mode">tree</field>
+			<field name="act_window_id" ref="action_vendor_reciept2"/>
+		</record>
+		<record id="action_vendor_reciept_form" model="ir.actions.act_window.view">
+			<field eval="2" name="sequence"/>
+			<field name="view_mode">form</field>
+			<field name="view_id" ref="account_voucher.view_vendor_receipt_form"/>
+			<field name="act_window_id" ref="action_vendor_reciept2"/>
+		</record>
+		
+		<record id="account_voucher.menu_action_vendor_receipt" model="ir.ui.menu">
+			<field name="action" ref="action_vendor_reciept2"/>
+		</record>
+		
+		
 		<record id="action_vendor_payment2" model="ir.actions.act_window">
 			<field name="name">Supplier Payment</field>
 			<field name="res_model">account.voucher</field>
 			<field name="view_type">form</field>
-			<field name="domain">[('journal_id.type', 'in', ['bank', 'cash','payment']), ('type','=','payment')]</field>
-			<field name="context">{'type':'payment'}</field>
+			<field name="domain">[('journal_id.payment_method', '=', 'True'), ('type','=','payment')]</field>
+			<field name="context">{'type':'payment','payment_method':'True'}</field>
 			<field name="view_id" eval="False"/>
 			<field name="search_view_id" ref="account_voucher.view_voucher_filter_vendor_pay"/>
 			<field name="target">current</field>
@@ -65,5 +93,73 @@
 		<record id="account_voucher.menu_action_vendor_payment" model="ir.ui.menu" >
 			<field name="action" ref="action_vendor_payment2"/>
 		</record>
+		
+		<!--
+		
+		ACCOUNT.VOUCHER.LINE MODIFICATION
+		
+		-->
+		<record model = "ir.ui.view" id = "view_account_voucher_line_mod">
+			<field name = "name">account.voucher.line.mod</field>
+			<field name = "model">account.voucher</field>
+			<field name = "type">tree</field>
+			<field name = "inherit_id" ref = "account_voucher.view_vendor_receipt_form"/>
+			<field name = "arch" type = "xml">
+				<data>
+						<xpath expr = "//field[@name='line_cr_ids']//field[@name='amount_original']" position = "after">
+							<field name = "currency_id"/>
+						</xpath>
+						<xpath expr = "//field[@name='line_dr_ids']//field[@name='amount_original']" position = "after">
+							<field name = "currency_id"/>
+						</xpath>
+				</data>
+			</field>
+		</record>
+		
+		<record model = "ir.ui.view" id = "view_account_voucher_line_mod2">
+			<field name = "name">account.voucher.line.mod2</field>
+			<field name = "model">account.voucher</field>
+			<field name = "type">tree</field>
+			<field name = "inherit_id" ref = "account_voucher.view_vendor_payment_form"/>
+			<field name = "arch" type = "xml">
+				<data>
+						<xpath expr = "//field[@name='line_cr_ids']//field[@name='amount_original']" position = "replace">
+							<field name = "currency_id"/>
+						</xpath>
+						<xpath expr = "//field[@name='line_dr_ids']//field[@name='amount_original']" position = "replace">
+							<field name = "currency_id"/>
+						</xpath>
+						<!--<xpath expr = "//field[@name='line_cr_ids']//field[@name='amount_original']" position = "after">
+							<field name = "currency_id"/>
+						</xpath>
+						<xpath expr = "//field[@name='line_dr_ids']//field[@name='amount_original']" position = "after">
+							<field name = "currency_id"/>
+						</xpath>-->
+				</data>
+			</field>
+		</record>
+		
+		<!-- 
+		
+		ACCOUNT JOURNAL MODIFICATION
+		
+		-->
+		<record model="ir.ui.view" id="view_account_journal_method_ext">
+			<field name="name">account.journal.relation.form</field>
+			<field name="model">account.journal</field>
+			<field name="type">form</field>
+			<field name="inherit_id" ref = "account.view_account_journal_form"/>
+			<field name="arch" type="xml">
+				<data>
+					<field name = "type" position = "after">
+						<group colspan = "2" col = "4">
+							<separator string = "Payment Options"/>
+							<field name = "payment_method"/>
+							<field name = "payment_verification"/>
+						</group>
+					</field>
+				</data>
+			</field>
+		</record>
 	</data>
 </openerp>

=== added file 'account_voucher_payment_method/account_voucher_payment_workflow.xml'
--- account_voucher_payment_method/account_voucher_payment_workflow.xml	1970-01-01 00:00:00 +0000
+++ account_voucher_payment_method/account_voucher_payment_workflow.xml	2012-01-05 00:57:30 +0000
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding = "UTF-8"?>
+<openerp>
+	<data>
+		<record model = "workflow.activity" id = "account_voucher.act_done">
+			<field name="action">proforma_voucher_mirror()</field>
+		</record>
+	</data>
+</openerp>
+
+
+

=== modified file 'base_import_exchange_rates/__terp__.py'
--- base_import_exchange_rates/__terp__.py	2011-02-07 22:36:09 +0000
+++ base_import_exchange_rates/__terp__.py	2012-01-05 00:57:30 +0000
@@ -43,6 +43,16 @@
     'website': 'http://clearcorp.co.cr',
     'category': 'Generic Modules/Base',
     'description': """Import exchange rates from XML web service.
+		Configuration:
+		1) Install the module.
+		2) Go to Administration > Company, open the company you want to syncronize.
+		3) in the page ´Currency auto update configuration´ you can configure wich webservice you wan to use
+	       the company the currency is related to, and the currecy.
+	    4) You have to go to Administration>Configuration>Planification , and configure the interval you want for the method to syncronize.
+		 
+    
+    
+    
     """,
     'depends': ['account'],
     'init_xml': ['security/security.xml'],

=== modified file 'base_import_exchange_rates/company.py'
--- base_import_exchange_rates/company.py	2011-02-09 04:11:20 +0000
+++ base_import_exchange_rates/company.py	2012-01-05 00:57:30 +0000
@@ -97,7 +97,7 @@
         return True
         
         
-    def _on_change_auto_currency_up(self, cr, uid, id, value):
+    def on_change_auto_currency_up(self, cr, uid, id, value):
         """handle the activation of the currecny update on compagnies.
         There are two ways of implementing mutli_company currency, 
         the currency is shared or not. The module take care of the two
@@ -158,7 +158,7 @@
             return {}
                     
             
-    def _on_change_intervall(self, cr, uid, id, interval):
+    def on_change_intervall(self, cr, uid, id, interval):
         ###Function that will update the cron
         ###freqeuence
         self.pool.get('currency.rate.update').save_cron(

=== modified file 'base_import_exchange_rates/company_view.xml'
--- base_import_exchange_rates/company_view.xml	2010-08-16 08:34:38 +0000
+++ base_import_exchange_rates/company_view.xml	2012-01-05 00:57:30 +0000
@@ -8,8 +8,8 @@
             <field name="arch" type="xml">
                 <notebook position="inside">
                     <page string="Currency auto update configuration">
-                       <field name="auto_currency_up" on_change="_on_change_auto_currency_up(auto_currency_up)"/> 
-                        <field name="interval_type" on_change="_on_change_intervall(interval_type)"/>
+                       <field name="auto_currency_up" on_change="on_change_auto_currency_up(auto_currency_up)"/> 
+                        <field name="interval_type" on_change="on_change_intervall(interval_type)"/>
                         <field name="multi_company_currency_enable"/>
                         <separator string="Currency updates services" colspan="4"/>
                         <field name="services_to_use" colspan="4" nolabel="1"/>

=== modified file 'base_import_exchange_rates/currency_rate_update.py'
--- base_import_exchange_rates/currency_rate_update.py	2011-02-08 23:38:59 +0000
+++ base_import_exchange_rates/currency_rate_update.py	2012-01-05 00:57:30 +0000
@@ -95,7 +95,7 @@
             'active'          : False,
             'priority'        : 1,
             'interval_number' : 1,
-            'interval_type'   : 'weeks',
+            'interval_type'   : 'minutes',
             'nextcall'        : time.strftime("%Y-%m-%d %H:%M:%S", (datetime.today() + timedelta(days=1)).timetuple() ), #tomorrow same time
             'numbercall'      : -1,
             'doall'           : True,
@@ -194,7 +194,23 @@
                         %(str(datetime.today()), str(e))
                     self.logger.notifyChannel(self.LOG_NAME, netsvc.LOG_INFO, str(e))
                     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
+		
+		
+		
+		
+			
+           
                 
 Currency_rate_update()
 

=== modified file 'base_import_exchange_rates/currency_rate_update.xml'
--- base_import_exchange_rates/currency_rate_update.xml	2010-08-16 09:41:17 +0000
+++ base_import_exchange_rates/currency_rate_update.xml	2012-01-05 00:57:30 +0000
@@ -31,6 +31,23 @@
             </field>
         </record>
         
+        <record id="cron_import_rates" model="ir.cron">
+			<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="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 name="priority" eval="0"/>
+		</record>
+        
+        
+        
+        
+        
     <!--    <record model="ir.actions.act_window" id="open_currency_rate_update">
             <field name="name">Update Rates</field>
             <field name="res_model">currency.rate.update</field>

=== modified file 'ccorp_account/i18n/es.po'
--- ccorp_account/i18n/es.po	2011-03-11 18:17:28 +0000
+++ ccorp_account/i18n/es.po	2012-01-05 00:57:30 +0000
@@ -1,22 +1,21 @@
-# Translation of OpenERP Server.
-# This file contains the translation of the following modules:
-#	* ccorp_account
+# Spanish translation for openerp-ccorp-addons
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openerp-ccorp-addons package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: OpenERP Server 5.0.12\n"
-"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"Project-Id-Version: openerp-ccorp-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
 "POT-Creation-Date: 2010-08-23 20:49+0000\n"
-"PO-Revision-Date: 2011-02-24 21:52+0000\n"
-"Last-Translator: Carlos Vásquez <Unknown>\n"
-"Language-Team: \n"
+"PO-Revision-Date: 2011-11-16 05:10+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Spanish <es@xxxxxx>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: \n"
-"Plural-Forms: \n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-02-26 05:56+0000\n"
-"X-Generator: Launchpad (build 12351)\n"
+"X-Launchpad-Export-Date: 2011-11-29 06:07+0000\n"
+"X-Generator: Launchpad (build 14399)\n"
 
 #. module: ccorp_account
 #: model:ir.module.module,description:ccorp_account.module_meta_information
@@ -33,156 +32,151 @@
 msgstr ""
 
 #. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
+#: rml:account.invoice.layout_ccorp:0
 msgid "Electronic Invoice"
 msgstr "Factura Electrónica"
 
 #. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
+#: rml:account.invoice.layout_ccorp:0
 msgid "PRO-FORMA"
 msgstr "Proforma"
 
 #. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
+#: rml:account.invoice.layout_ccorp:0
 msgid "Draft Invoice"
 msgstr "Factura BORRADOR"
 
 #. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
+#: rml:account.invoice.layout_ccorp:0
 msgid "Cancelled Invoice"
 msgstr "Factura CANCELADA"
 
 #. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
+#: rml:account.invoice.layout_ccorp:0
 msgid "Supplier Refund"
 msgstr "Nota de crédito PROVEEDOR"
 
 #. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
+#: rml:account.invoice.layout_ccorp:0
 msgid "Supplier Invoice"
 msgstr "Factura PROVEEDOR"
 
 #. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
-msgid "Num.:"
-msgstr "Núm.:"
-
-#. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
-msgid "Date:"
-msgstr "Fecha:"
-
-#. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
-msgid "ID Num.:"
-msgstr "Céd. Jur.:"
-
-#. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
+#: rml:account.invoice.layout_ccorp:0
+msgid "Num.: "
+msgstr ""
+
+#. module: ccorp_account
+#: rml:account.invoice.layout_ccorp:0
+msgid "Date: "
+msgstr ""
+
+#. module: ccorp_account
+#: rml:account.invoice.layout_ccorp:0
+msgid "ID Num.: "
+msgstr ""
+
+#. module: ccorp_account
+#: rml:account.invoice.layout_ccorp:0
 msgid "Tel-fax: "
-msgstr "Tel-fax:"
-
-#. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
-msgid "Email:"
-msgstr "Email:"
-
-#. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
-msgid "Web:"
-msgstr "Web:"
-
-#. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
+msgstr "Tel-fax: "
+
+#. module: ccorp_account
+#: rml:account.invoice.layout_ccorp:0
+msgid "Email: "
+msgstr ""
+
+#. module: ccorp_account
+#: rml:account.invoice.layout_ccorp:0
+msgid "Web: "
+msgstr ""
+
+#. module: ccorp_account
+#: rml:account.invoice.layout_ccorp:0
 msgid "Address:"
 msgstr "Dirección:"
 
 #. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
-msgid "Phone:"
-msgstr "Tel.:"
-
-#. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
-msgid "Fax:"
-msgstr "Fax:"
-
-#. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
-msgid "Salesman:"
-msgstr "Vendedor:"
-
-#. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
-msgid "Payment tems:"
-msgstr "Plazo de pago:"
-
-#. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
-msgid "Due date:"
-msgstr "Vence:"
-
-#. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
-msgid "Exchange rate:"
-msgstr "Tipo de cambio:"
-
-#. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
-msgid "Page:"
-msgstr "Pág.:"
-
-#. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
+#: rml:account.invoice.layout_ccorp:0
+msgid "Phone: "
+msgstr ""
+
+#. module: ccorp_account
+#: rml:account.invoice.layout_ccorp:0
+msgid "Fax: "
+msgstr ""
+
+#. module: ccorp_account
+#: rml:account.invoice.layout_ccorp:0
+msgid "Salesman: "
+msgstr ""
+
+#. module: ccorp_account
+#: rml:account.invoice.layout_ccorp:0
+msgid "Payment tems: "
+msgstr ""
+
+#. module: ccorp_account
+#: rml:account.invoice.layout_ccorp:0
+msgid "Due date: "
+msgstr ""
+
+#. module: ccorp_account
+#: rml:account.invoice.layout_ccorp:0
+msgid "Exchange rate: "
+msgstr ""
+
+#. module: ccorp_account
+#: rml:account.invoice.layout_ccorp:0
+msgid "Page: "
+msgstr ""
+
+#. module: ccorp_account
+#: rml:account.invoice.layout_ccorp:0
 msgid "Thank you for choosing us."
 msgstr "Gracias por escoger nuestros servicios."
 
 #. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
+#: rml:account.invoice.layout_ccorp:0
 msgid "Qty."
 msgstr "Cant."
 
 #. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
-msgid "[Code] Description / (Taxes)"
-msgstr "[Cód.] Descripción / (Imp.)"
+#: rml:account.invoice.layout_ccorp:0
+msgid "Description / (Taxes)"
+msgstr ""
 
 #. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
+#: rml:account.invoice.layout_ccorp:0
 msgid "Disc."
 msgstr "Desc."
 
 #. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
+#: rml:account.invoice.layout_ccorp:0
 msgid "Unit Price"
 msgstr "Precio Unit."
 
 #. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
+#: rml:account.invoice.layout_ccorp:0
 msgid "Total Price"
 msgstr "Precio Total"
 
 #. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
+#: rml:account.invoice.layout_ccorp:0
 msgid "Subtotal"
 msgstr "Subtotal"
 
 #. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
+#: rml:account.invoice.layout_ccorp:0
 msgid "Discount"
 msgstr "Descuento"
 
 #. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
+#: rml:account.invoice.layout_ccorp:0
 msgid "Taxes"
 msgstr "Impuestos"
 
 #. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
+#: rml:account.invoice.layout_ccorp:0
 msgid "TOTAL"
 msgstr "TOTAL"
-
-#. module: ccorp_account
-#: report:account.invoice.layout_ccorp:0
-msgid "Note:"
-msgstr "Nota:"

=== modified file 'ccorp_account/report/invoice.mako'
--- ccorp_account/report/invoice.mako	2011-10-06 14:41:12 +0000
+++ ccorp_account/report/invoice.mako	2012-01-05 00:57:30 +0000
@@ -40,7 +40,7 @@
 				<td>${_("Phone")}:${inv.address_invoice_id.phone or '-'|entity}</td>
 			</tr>
 			<tr>
-				<td>${_("Due date")}: ${formatLang(inv.date_invoice, date=True)|entity}</td>
+				<td>${_("Due date")}: ${formatLang(inv.date_due, date=True)|entity}</td>
 				<td>${_("Fax")}: ${inv.address_invoice_id.fax or '-' | entity}</td>
 			</tr>
 			<tr>
@@ -73,7 +73,7 @@
 				<tr class = "odd">
 			%endif
 				<td valign = "top">${formatLang(line.quantity)} ${format(line.uos_id.name)}</td>
-				<td valign = "top">${line.name} 
+				<td valign = "top" id="desc_col">${line.name} 
 					%if line.invoice_line_tax_id != []:
 						${ ', '.join([ tax.name or '' for tax in line.invoice_line_tax_id ])|entity}
 					%endif

=== modified file 'ccorp_purchase/report/purchase_order.mako'
--- ccorp_purchase/report/purchase_order.mako	2011-10-14 17:58:46 +0000
+++ ccorp_purchase/report/purchase_order.mako	2012-01-05 00:57:30 +0000
@@ -75,7 +75,7 @@
 				<tr class = "odd">
 			%endif
 				<td valign = "top">${formatLang(line.product_qty)} ${format(line.product_uom.name)}</td>
-				<td valign = "top">${line.name} ${', '.join(map(lambda x: x.name, line.taxes_id))|entity}
+				<td valign = "top" id="desc_col_po">${line.name} ${', '.join(map(lambda x: x.name, line.taxes_id))|entity}
 					%if line.notes :
 						<br/><span class = "notes"><b>${_("Note")}:</b> ${format(line.notes)}</span>
 					%endif

=== modified file 'ccorp_purchase/report/purchase_quotation.mako'
--- ccorp_purchase/report/purchase_quotation.mako	2011-10-14 17:58:46 +0000
+++ ccorp_purchase/report/purchase_quotation.mako	2012-01-05 00:57:30 +0000
@@ -75,7 +75,7 @@
 				<tr class = "odd">
 			%endif
 				<td valign = "top">${formatLang(line.product_qty)} ${format(line.product_uom.name)}</td>
-				<td valign = "top">${line.name} ${', '.join(map(lambda x: x.name, line.taxes_id))|entity}
+				<td valign = "top" id="desc_col_po">${line.name} ${', '.join(map(lambda x: x.name, line.taxes_id))|entity}
 					%if line.notes :
 						<br/><span class = "notes"><b>${_("Note")}:</b> ${format(line.notes)}</span>
 					%endif

=== modified file 'ccorp_sale/i18n/es.po'
--- ccorp_sale/i18n/es.po	2011-03-14 18:50:33 +0000
+++ ccorp_sale/i18n/es.po	2012-01-05 00:57:30 +0000
@@ -1,167 +1,118 @@
-# Translation of OpenERP Server.
-# This file contains the translation of the following modules:
-#	* ccorp_sale
+# Spanish translation for openerp-ccorp-addons
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openerp-ccorp-addons package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: OpenERP Server 6.0.1\n"
-"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"Project-Id-Version: openerp-ccorp-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
 "POT-Creation-Date: 2011-03-14 17:23+0000\n"
-"PO-Revision-Date: 2011-03-14 17:23+0000\n"
-"Last-Translator: <>\n"
-"Language-Team: \n"
+"PO-Revision-Date: 2011-11-16 05:10+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Spanish <es@xxxxxx>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: \n"
-"Plural-Forms: \n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-02-26 05:56+0000\n"
-"X-Generator: Launchpad (build 12351)\n"
-
-#. module: ccorp_sale
-#: model:ir.module.module,description:ccorp_sale.module_meta_information
-msgid ""
-"ClearCorp 'sale' modifications:
-"    Reports:
-"      * Sale Order / Quotation
-"    "
-msgstr ""
-"ClearCorp 'sale' modifications:
-"    Reports:
-"      * Sale Order / Quotation
-"    "
-
-#. module: ccorp_sale
-#: model:ir.module.module,shortdesc:ccorp_sale.module_meta_information
-msgid "ClearCorp sale module modifications"
-msgstr "ClearCorp sale module modifications"
-
-#. module: ccorp_sale
-#: report:sale.order.layout_ccorp:0
-msgid "Order N°"
-msgstr "Orden N°"
-
-#. module: ccorp_sale
-#: report:sale.order.layout_ccorp:0
-msgid "Quotation N°"
-msgstr "Cotizatión N°"
-
-#. module: ccorp_sale
-#: report:sale.order.layout_ccorp:0
-msgid "Date:"
-msgstr "Fecha:"
-
-#. module: ccorp_sale
-#: report:sale.order.layout_ccorp:0
-msgid "Ref.:"
-msgstr "Ref.:"
-
-#. module: ccorp_sale
-#: report:sale.order.layout_ccorp:0
-msgid "ID Num.:"
-msgstr "ID:"
-
-#. module: ccorp_sale
-#: report:sale.order.layout_ccorp:0
-msgid "Tel-fax:"
-msgstr "Tel-fax:"
-
-#. module: ccorp_sale
-#: report:sale.order.layout_ccorp:0
-msgid "Email:"
-msgstr "Email:"
-
-#. module: ccorp_sale
-#: report:sale.order.layout_ccorp:0
-msgid "Web:"
-msgstr "Web:"
+"X-Launchpad-Export-Date: 2011-11-29 06:07+0000\n"
+"X-Generator: Launchpad (build 14399)\n"
+
+#. module: ccorp_sale
+#: report:sale_order.layout_ccorp:0
+msgid "Order Nº "
+msgstr ""
+
+#. module: ccorp_sale
+#: report:sale.order.layout_ccorp:0
+msgid "Quotation Nº "
+msgstr ""
+
+#. module: ccorp_sale
+#: report:sale.order.layout_ccorp:0
+msgid "Date: "
+msgstr ""
+
+#. module: ccorp_sale
+#: report:sale.order.layout_ccorp:0
+msgid "ID Num.: "
+msgstr ""
+
+#. module: ccorp_sale
+#: report:sale.order.layout_ccorp:0
+msgid "Tel-fax: "
+msgstr ""
+
+#. module: ccorp_sale
+#: report:sale.order.layout_ccorp:0
+msgid "Email: "
+msgstr ""
+
+#. module: ccorp_sale
+#: report:sale.order.layout_ccorp:0
+msgid "Web: "
+msgstr ""
 
 #. module: ccorp_sale
 #: report:sale.order.layout_ccorp:0
 msgid "Address:"
-msgstr "Dirección:"
-
-#. module: ccorp_sale
-#: report:sale.order.layout_ccorp:0
-msgid "Phone:"
-msgstr "Tel:"
-
-#. module: ccorp_sale
-#: report:sale.order.layout_ccorp:0
-msgid "Invoice address:"
-msgstr "Dirección de factura:"
-
-#. module: ccorp_sale
-#: report:sale.order.layout_ccorp:0
-msgid "Shipping address:"
-msgstr "Dirección de envío:"
-
-#. module: ccorp_sale
-#: report:sale.order.layout_ccorp:0
-msgid "Page:"
-msgstr "Pág.:"
+msgstr ""
+
+#. module: ccorp_sale
+#: report:sale.order.layout_ccorp:0
+msgid "Phone: "
+msgstr ""
+
+#. module: ccorp_sale
+#: report:sale.order.layout_ccorp:0
+msgid "Page: "
+msgstr ""
 
 #. module: ccorp_sale
 #: report:sale.order.layout_ccorp:0
 msgid "Thank you for choosing us."
-msgstr "Gracias por preferir nuestros servicios."
+msgstr ""
 
 #. module: ccorp_sale
 #: report:sale.order.layout_ccorp:0
 msgid "Qty."
-msgstr "Cant."
+msgstr ""
 
 #. module: ccorp_sale
 #: report:sale.order.layout_ccorp:0
 msgid "[Code] Description / (Taxes)"
-msgstr "[Cód.] Descripción / (Imp.)"
+msgstr ""
 
 #. module: ccorp_sale
 #: report:sale.order.layout_ccorp:0
 msgid "Disc."
-msgstr "Desc."
+msgstr ""
 
 #. module: ccorp_sale
 #: report:sale.order.layout_ccorp:0
 msgid "Unit Price"
-msgstr "Precio Unit."
+msgstr ""
 
 #. module: ccorp_sale
 #: report:sale.order.layout_ccorp:0
 msgid "Total Price"
-msgstr "Precio Total"
+msgstr ""
 
 #. module: ccorp_sale
 #: report:sale.order.layout_ccorp:0
 msgid "Subtotal"
-msgstr "Subtotal"
+msgstr ""
 
 #. module: ccorp_sale
 #: report:sale.order.layout_ccorp:0
 msgid "Discount"
-msgstr "Descuento"
+msgstr ""
 
 #. module: ccorp_sale
 #: report:sale.order.layout_ccorp:0
 msgid "Taxes"
-msgstr "Impuestos"
+msgstr ""
 
 #. module: ccorp_sale
 #: report:sale.order.layout_ccorp:0
 msgid "TOTAL"
-msgstr "TOTAL"
-
-#. module: ccorp_sale
-#: report:sale.order.layout_ccorp:0
-msgid "Note:"
-msgstr "Nota:"
-
-#. module: ccorp_sale
-#: report:sale.order.layout_ccorp:0
-msgid "Order notes:"
-msgstr "Notas de orden:"
-
-#. module: ccorp_sale
-#: report:sale.order.layout_ccorp:0
-msgid "Payment notes:"
-msgstr "Notas de pago:"
+msgstr ""

=== modified file 'ccorp_sale/report/sale_order.mako'
--- ccorp_sale/report/sale_order.mako	2011-10-14 21:49:54 +0000
+++ ccorp_sale/report/sale_order.mako	2012-01-05 00:57:30 +0000
@@ -72,7 +72,7 @@
 				<tr class = "odd">
 			%endif
 				<td valign = "top">${formatLang(line.product_uom_qty)} ${format(line.product_uom.name)}</td>
-				<td valign = "top">${line.name} ${line.tax_id != [] and (' / (' + (', '.join([ lt.description for lt in line.tax_id ])) + ')') or ''|entity}
+				<td valign = "top" id="desc_col">${line.name} ${line.tax_id != [] and (' / (' + (', '.join([ lt.description for lt in line.tax_id ])) + ')') or ''|entity}
 					%if line.notes :
 						<br/><span class = "notes"><b>${_("Note")}:</b> ${format(line.notes)}</span>
 					%endif

=== modified file 'company_webkit/company_webkit.py'
--- company_webkit/company_webkit.py	2011-10-18 16:30:31 +0000
+++ company_webkit/company_webkit.py	2012-01-05 00:57:30 +0000
@@ -193,9 +193,9 @@
 				font-size: 8.4;
 				font-style : italic;
 			}
-			.footer{
+			.footer {
 				border-top: 1px solid black; 
-				width: 100%";
+				width: 100%;
 				border:0; margin: 0;
 				padding-bottom: 300px;
 			}
@@ -234,7 +234,7 @@
 			.document_data {
 				font-family: Arial,Verdana, Sans, Serif;
 				font-size: 13;
-				widht : 100%;
+				width : 100%;
 			}
 			
 			#data-table tbody tr.even td {
@@ -249,6 +249,10 @@
 				margin-left: 5px;
 				font-style : italic;
 			}
+			#desc_col{
+				width : 380px;
+			}
+
 		"""
 	def create(self,cr,uid, vals,context=None):
 		company_id = super(company_webkit,self).create(cr,uid,vals,context)

=== added directory 'rent'
=== removed directory 'rent'
=== added file 'rent/.goutputstream-DRFF1V'
--- rent/.goutputstream-DRFF1V	1970-01-01 00:00:00 +0000
+++ rent/.goutputstream-DRFF1V	2012-01-05 00:57:30 +0000
@@ -0,0 +1,590 @@
+from osv import osv, fields
+from tools import debug
+import time
+import pooler
+from dateutil import parser
+from tools.translate import _
+
+class rent_canton(osv.osv):
+	 _name = 'rent.canton'
+	 _description = 'Canton for the State'
+	 _columns = {
+		'state_id'   : fields.many2one('res.country.state','Province',required=True),
+		'name'       : fields.char('Canton Name', size=64, required=True),
+		'code'       : fields.char('Canton Code', size=4,help = 'The canton code in 4 chars', required=True),
+	 }
+rent_canton()
+
+class rent_canton_district(osv.osv):
+	_name = 'rent.canton.district'
+	_description = 'District located in the canton'
+	_columns = {
+		'canton_id'  : fields.many2one('rent.canton','Canton',required=True),
+		'name'       : fields.char('Distric Name', size=64, required=True),
+		'code'       : fields.char('Distric Code', size=4,help = 'The district code in 4 chars', required=True),
+	}
+rent_canton_district()
+
+
+# Class used to specialize the res.partner.address, this one adds the attributes of
+# canton, district and redefines the estate_id to province making it as a selection
+class rent_location(osv.osv):
+	_name = 'res.partner.address'
+	_inherit = 'res.partner.address'
+
+	_columns = {
+		#'province_id '   : fields.selection(_get_province,'Province',size=16),
+		#'canton_id'   : fields.selection(_get_canton, 'Canton'),
+		'canton_id'   : fields.many2one('rent.canton', 'Canton', domain = "[('state_id','=',state_id)]"),
+		'district_id' : fields.many2one('rent.canton.district','District', domain = "[('canton_id','=',canton_id)]"),
+	}
+rent_location()
+
+#Class that inherits from res.partner allowing to record the 
+#necesary data from the clients
+
+class rent_client(osv.osv):
+	_name = 'res.partner'
+	_inherit = 'res.partner'
+	_columns = {
+		'client_birthdate' : fields.date('Birthdate',select=1,required=True),
+		#'client_location'  : fields.one2many('rent.location','location_id','Location'),
+		'client_canton'    : fields.related('address', 'canton_id', type='many2one', relation='rent.canton', string='Canton'),
+		'client_district'  : fields.related('address', 'district_id', type='many2one', relation='rent.canton.district', string='District'),
+	}
+rent_client()
+
+
+#Class that represents the estates owned by the user. 
+#This class also uses the rent.location defined above
+class rent_estate(osv.osv):
+	_name = 'rent.estate'
+	_rec_name = "estate_number"
+	
+	def _get_estate_vrm(self,cr,uid,ids,field_name,args,context=None):
+		res = {}
+		for estate_id in ids:
+			obj_estate = self.pool.get('rent.estate').browse(cr,uid,estate_id)
+			res[estate_id] = obj_estate.estate_value / 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}
+		
+	_columns = {
+		'estate_owner'    : fields.many2one('res.company','Owner',required=True),
+		'estate_number'   : fields.char('# estate', size=10,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': fields.one2many('rent.building','building_estate','Buildings'),
+		'estate_location' : fields.many2one('res.partner.address','Location'),
+		#'estate_province': fields.related('estate_address', 'estate_province', type='selection', string='Province'),
+        #'estate_canton': fields.related('estate_address', 'estate_canton', type='selection', string='Canton'),
+        #'estate_district': fields.related('estate_address', 'estate_district', type='selection', string='District'),
+	}
+rent_estate()
+
+#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):
+	_name = 'rent.building'
+	
+	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)
+			res[building_id] = obj_building.building_value / obj_building.building_area
+		return res
+		
+	_columns = {
+		'building_capacity'          : fields.integer('Capacity',required=True),
+		'building_date_construction' : fields.date('Construction Date', required=True),
+		'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'            : fields.many2one('rent.estate', 'estate'),
+		'building_photo'             : fields.binary('Photo'),
+		'building_gallery_photo'     : fields.char('Gallery of Photos', size=64),
+		'building_floors'            : fields.one2many('rent.floor','floor_building','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'             : fields.many2one('account.invoice','Asset'),
+	}
+rent_building()
+
+#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 
+#the numbre then near to the top of the building is the floor.
+class rent_floor(osv.osv):
+	_name = 'rent.floor'
+	_rec_name = 'floor_number'
+	
+	def _calculate_floor_value(self,cr,uid,ids,field_name,args,context):
+		#This method takes al the valid rents for the floor and calculates the value according to 
+		#the value of the locals,parking, building and estate related to it
+		res = {}
+		valores = {}
+		total = 0
+		debug("CALCULO====================")
+		debug(ids)
+		for floor_id in ids:
+			debug(floor_id)
+			actual_rent = self.pool.get('rent.rent').search(cr,uid,['|',('state','=','valid'),('state','=','draft'),('rent_related_real','=','local')])
+			debug(actual_rent)
+			for obj_rent in self.pool.get('rent.rent').browse(cr,uid,actual_rent):
+				obj_local = obj_rent.rent_rent_local
+				local_floor_ids = self.pool.get('rent.local.floor').search(cr,uid,[('local_local_floor','=',obj_local.id),('local_floor_floor','=',floor_id)])
+				for local in self.pool.get('rent.local.floor').browse(cr,uid,local_floor_ids):
+					valores = local._local_value(local.id,None,None)
+					debug(valores)
+					total += valores[local.id]
+			debug(total)
+			
+			#This part look for the parking on rents associated to the floor
+			rent_ids = self.pool.get('rent.rent').search(cr,uid,['|',('state','=','valid'),('state','=','draft'),('rent_related_real','=','parking')])
+			obj_rent = self.pool.get('rent.rent').browse(cr,uid,rent_ids)
+			for rent in obj_rent:
+				obj_parking = rent.rent_rent_parking
+				if (obj_parking.parking_floor.id == floor_id):
+					total += obj_parking._parking_value(obj_parking.id,None,None)[obj_parking.id]
+			res[floor_id] = total
+			total = 0
+		return res
+	
+	def _get_fullname(self,cr,uid,ids,field_name,args,context):
+		debug("FULLNAME====================")
+		res = {}
+		for obj_floor in self.pool.get('rent.floor').browse(cr,uid,ids):
+			building_code = obj_floor.floor_building.building_code
+			res[obj_floor.id] = building_code + '-' + obj_floor.floor_number
+		debug(res)
+		return res
+	 
+	def name_get(self, cr, uid, ids, context=None):
+		if not len(ids):
+			return []
+		reads = self.read(cr, uid, ids, ['complete_name'], context=context)
+		res = []
+		for record in reads:
+			name = record['complete_name']
+			res.append((record['id'], name))
+		return res
+
+	_columns = {
+		'floor_number'     : fields.char('# Floor',size=4,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_local'      : fields.one2many('rent.floor.local','local_floor','Local'),
+		'floor_parking'    : fields.one2many('rent.floor.parking','parking_floor','Parking'),
+		'floor_building'   : 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'),
+	}
+rent_floor()
+
+#Class representing the local, on every floor. This class has a relation 
+#many2one with the floor 
+#
+class rent_floor_local(osv.osv):
+	_name = 'rent.floor.local'
+	_rec_name = 'local_number'
+		
+	def _get_building_local(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		debug('EDIFICIO+==================================')
+		debug(ids)
+		for local_id in ids:
+			local = self.pool.get('rent.local.floor').search(cr,uid,[('local_local_floor','=',local_id)])
+			debug(local)
+			res[local_id] = False
+			for lids in local:
+				obj_local = self.pool.get('rent.local.floor').browse(cr,uid,lids)
+				debug(obj_local)
+				res[local_id] = obj_local.local_floor_floor.floor_building.id
+			debug(res)
+		return res
+	
+	def _determine_rented(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		debug('Renta+==================================')
+		for local_id in ids:
+			res[local_id] =  False
+			debug(ids)
+			rent_ids = self.pool.get('rent.rent').search(cr,uid,[('state','=','valid'),('rent_related_real','=','local'),('rent_rent_local','=',local_id)])
+			if rent_ids:
+				res[local_id] =  True
+		debug(res)
+		return res
+	def _local_value(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		debug(ids)
+		total = 0
+		for local in self.pool.get('rent.floor.local').browse(cr,uid,ids):
+			for obj_local_floor in local.local_local_by_floor:
+				total += obj_local_floor._local_value(obj_local_floor.id,None,None)[obj_local_floor.id]
+			res[local.id] = total
+			total = 0
+		debug(total)
+		debug(res)
+		return res
+
+	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 = []
+		debug('NOMBREPISOS+==================================')
+		for record in reads:
+			debug(record)
+			debug(record['local_building'][1])
+			name = 'Local #' + str(record['local_number']) + ' , ' +  record['local_building'][1]
+		#	for subrecord in subreads 
+		#		name += ', ' + subrecord['local_floor_building']
+			res.append((record['id'], name))
+		return res
+	_columns = {
+		#'local_area'               : fields.function(_floor_area,type='float',method=True,string='VRN Dynamic'),
+		'local_area'               : fields.float('Area',required=True),
+		#'local_value'              : fields.float('Value',required=True),
+		'local_number'             : fields.integer('# Local',required=True),
+		'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_sqrmeter_price'     : fields.function(_local_sqr_price,type='float',method=True,string='Sqr Meter Price'),
+		#'local_sqrmeter_price'     :  fields.float('Sqr Meter Price',required=True),
+		'local_rented'             : fields.function(_determine_rented,type='boolean',method=True,string='Rented',help='Check if the local is rented'),
+		#'local_floor'              : fields.many2one('rent.floor','# Floor'),
+		'local_local_by_floor'     : fields.one2many('rent.local.floor','local_local_floor','Local floors'),
+		#'local_floor'              : fields.related('rent.local.floor','# Floor'),
+		'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_rent'               : fields.many2one('rent.rent','Alquiler'),
+	}
+rent_floor_local()
+
+#Class representing the parking, on floor. This class has a relation 
+#many2one with the floor 
+#
+class rent_floor_parking(osv.osv):
+	_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.floor_building
+			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.floor_building
+			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'], context=context)
+		res = []
+		debug('NOMBREPARKEO+==================================')
+		for record in reads:
+			debug(record)
+			debug(record['parking_floor'][1])
+			name = 'Parking #' + str(record['parking_number']) + ' , ' +  record['parking_floor'][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 = {}
+		debug('Renta+==================================')
+		for parking_id in ids:
+			res[parking_id] =  False
+			debug(ids)
+			rent_ids = self.pool.get('rent.rent').search(cr,uid,[('state','=','valid'),('rent_related_real','=','parking'),('rent_rent_parking','=',parking_id)])
+			if rent_ids:
+				res[parking_id] =  True
+		debug(res)
+		return res
+	_columns = {
+		'parking_area'            : fields.function(_parking_area,type='float',method=True,string='Area'),
+		#'parking_area'            : fields.float('VRN Dynamic',required=True),
+		#'parking_value'           : fields.float('Value',required=True),
+		'parking_value'           : fields.function(_parking_value,type='float',method=True,string='Value'),
+		'parking_number'          : fields.integer('# Parking',required=True),
+		'parking_huella'          : fields.float('Huella',required=True),
+		'parking_sqrmeter_price'  :  fields.function(_parking_sqr_price,type='float',method=True,string='Sqr Meter Value'),
+		#'parking_sqrmeter_price'  :  fields.float('Sqr Meter Value',required=True),
+		'parking_rented'          : fields.function(_determine_rented,type='boolean',method=True,string='Rented',help='Checked if the parking is rented'),
+		'parking_floor'           : fields.many2one('rent.floor','# Floor'),
+		'parking_large'           : fields.float('Large Meters'),
+		'parking_width'           : fields.float('Width Meters'),
+	}
+rent_floor_parking()
+
+
+#Class to hold all the information that refences the rent
+#value, dates, status and to control de transaction of the bussines
+#
+class rent_rent(osv.osv):
+	_name = 'rent.rent'
+	
+	def _get_currency(self, cr, uid, context=None):
+		user = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, [uid], context=context)[0]
+		if user.company_id:
+			return user.company_id.currency_id.id
+		return pooler.get_pool(cr.dbname).get('res.currency').search(cr, uid, [('rate','=', 1.0)])[0]
+		
+	def _get_total_rent(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		total = 0
+		debug('+==================================')
+		for rent_id in ids:
+			debug(rent_id)
+			obj_rent = self.pool.get('rent.rent').browse(cr,uid,rent_id)
+			debug(obj_rent)
+			if obj_rent.rent_related_real == 'local':
+				debug("LOCALES")
+				debug(obj_rent.rent_rent_local)
+				obj_local = obj_rent.rent_rent_local
+				total = obj_local._local_value(obj_local.id,None,None)[obj_local.id]
+				debug(total)
+			elif obj_rent.rent_related_real == 'parking':
+				debug("PARQUEO")
+				obj_parking = obj_rent.rent_rent_parking
+				debug(obj_parking)
+				total = obj_parking._parking_value(obj_parking.id,None,None)[obj_parking.id]
+			else:
+				debug("LOTES")
+				debug(obj_rent.rent_rent_estate)
+				obj_estado = obj_rent.rent_rent_estate
+				total = obj_estado._get_estate_vrm(obj_estado.id,None,None)[obj_estado.id]
+				debug(total)
+				#for obj_estado in obj_rent.rent_rent_estate:
+					#debug(obj_estado)
+					#total += obj_estado._get_estate_vrm(obj_estado.id,None,None)[obj_estado.id]
+			res[rent_id] = total
+		return res
+	def _calculate_years(self,cr,uid,ids,field_name,args,context):
+		debug('+==================================')
+		res = {}
+		for rent_id in ids:
+			obj_rent = self.pool.get('rent.rent').browse(cr,uid,rent_id)
+			if (obj_rent.rent_end_date and  obj_rent.rent_start_date):
+				fin = parser.parse(obj_rent.rent_end_date)
+				inicio = parser.parse(obj_rent.rent_start_date)
+				debug(inicio)
+				debug(fin)
+				res[rent_id] = (fin.year - inicio.year)
+			debug(res)
+		return res
+	
+	def write(self, cr, uid, ids, vals, context=None):
+		if 'rent_related_real' in vals:
+			obj_rent = self.pool.get('rent.rent').browse(cr,uid,ids)[0]
+			debug('_---------------------------------------------------ACT')
+			debug(obj_rent)
+			debug(obj_rent.rent_rent_local)
+			if (obj_rent.rent_related_real != vals['rent_related_real']):
+				debug(vals)
+				real_type = vals['rent_related_real'] 
+				if real_type == 'local' or real_type == 'parking':
+					vals['rent_rent_estate'] = False
+				if real_type == 'local' or real_type == 'estate':
+					vals['rent_rent_parking'] = False
+				if real_type == 'parking' or real_type == 'estate':
+					#raise osv.except_osv(_('Warning !'), _('You have changed the type of real state that will overwrite the last with this one'))
+					local_list = []
+					for ob_local_floor in obj_rent.rent_rent_local:
+						local_list.append((2,ob_local_floor.id))
+					vals['rent_rent_local'] = local_list
+		debug(vals)
+		return super(rent_rent, self).write(cr, uid, ids, vals, context=context)
+		
+	_columns = {
+		'name'                  : fields.char('Name',size=64),
+		'rent_rent_client'      : fields.many2one('res.partner','Client', states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_end_date'         : fields.date('Ending Date', required=True, states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_ending_motif'     : fields.selection([('Desertion','Desertion'),('No Renovation','No Renovation'),('Eviction','Eviction')],'Ending Motif'),
+		'rent_ending_motif_desc': fields.text('Ending Motif Description'),
+		'rent_rise'             : fields.float('Anual Rise', states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_type'             : fields.selection([('Contract','Contract'),('Adendum','Adendum'),('Renovation','Renovation')],'Type', states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'state'                 : fields.selection([('valid','Valid'),('finished','Finished'),('draft','Draft')],'Status', readonly=True),
+		'rent_start_date'       : fields.date('Starting Date', required=True, states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_total'            : fields.function(_get_total_rent,type='float',method=True,string='Total Paid'),
+		'rent_rent_local'       : fields.many2one('rent.floor.local','Local', states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_rent_parking'     : fields.many2one('rent.floor.parking','Parking', states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_rent_estate'      : fields.many2one('rent.estate','Estate', states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
+		#'rent_is_local'         : fields.boolean('Locals',help='Check if you want to calculate a rent for locals', states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
+		#'rent_is_parking'       : fields.boolean('Parking',help='Check if you want to calculate a rent for locals', states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
+		#'rent_is_estate'        : fields.boolean('Estates',help='Check if you want to calculate a rent for locals', states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_related_real'     : fields.selection([('local','Locals'),('parking','Parking'),('estate','Estates')],'Type of Real Estate', required=True,states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_years'            : fields.function(_calculate_years,type='integer',method=True,string = 'Years' ,help='Check if you want to calculate a rent for locals'),
+		'rent_modif'            : fields.one2many('rent.rent', 'rent_modif_ref','Contract reference', states={'draft':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_modif_ref'        : fields.many2one('rent.rent', 'Modifications'),
+		'currency_id'           : fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
+		'rent_estimates'        : fields.one2many('rent.rent.analitic', 'analitic_rent','Estimates'),         
+	}
+	
+	_defaults = {
+		'state'        : 'draft',
+		'rent_type'    : 'Contract',
+		'currency_id': _get_currency,
+	}
+rent_rent()
+
+class rent_rent_analitic(osv.osv):
+	_name = 'rent.rent.analitic'
+	
+	def _performance_years(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		for obj_analitic in self.pool.get('rent.rent.analitic').browse(cr,uid,ids):
+			res[obj_analitic.id] =  1 / obj.analitic.analitic_performance
+		return res
+	_columns = {
+		'analitic_performance'       : fields.integer('Performance', help='This a percentaje number',store=False),
+		'analitic_years'             : fields.function(_performance_years, type='integer',method = True,string='Years'),
+		'analitic_amountc'           : fields.function(_performance_years, type='integer',method = True,string='Years'),
+		#'analitic_colones'           : fields.function(_performance_years, type='integer',method = True,string='c / m2'),
+		#'analitic_amountd'           : fields.function(_performance_years, type='integer',method = True,string='Years'),
+		#'analitic_dollars'           : fields.function(_performance_years, type='integer',method = True,string='s / m2'),
+		'analitic_cust_colones'      : fields.integer('Amount c', store=False),
+		'analitic_cust_dollars'      : fields.integer('Amount s', store=False),
+		
+		'analitic_dec_min_dollars'       : fields.integer('Amount s', store=False),
+		'analitic_dec_base_dollars'      : fields.integer('Amount s', store=False),
+		'analitic_rent'                  : fields.many2one('rent.rent','Rent'),
+	}
+rent_rent_analitic()
+
+class rent_local_floor(osv.osv):
+	_name = 'rent.local.floor'
+	
+	def _local_sqr_price(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		for local_id in ids:
+			obj = self.pool.get('rent.local.floor').browse(cr,uid,local_id)
+			obj_build = obj.local_floor_floor.floor_building
+			res[local_id] = obj_build._get_building_vrm(obj_build.id,None,None)[obj_build.id]
+		return res
+	
+	def _local_value(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		for local_id in ids:
+			obj = self.pool.get('rent.local.floor').browse(cr,uid,local_id)
+			obj_build = obj.local_floor_floor.floor_building
+			res[local_id] = obj.local_floor_area * obj_build._get_building_vrm(obj_build.id,None,None)[obj_build.id]
+		return res
+		
+	#def _local_floor_area(self,cr,uid,ids,field_name,args,context):
+	#	res = {}
+	#	for local_floor_id in ids:
+	#		obj = self.pool.get('rent.local.floor').browse(cr,uid,local_floor_id)
+	#		res[local_floor_id] = obj.local_floor_width * obj.local_floor_large
+	#	return res
+	
+	def onchange_floor(self,cr,uid,ids,floor_id):
+		res = {}
+		debug("+============================")
+		obj_floor = self.pool.get('rent.floor').browse(cr,uid,floor_id)
+		debug(obj_floor)
+		res['local_floor_building'] = obj_floor.floor_building.id
+		debug(res)
+		return {'value' : res}
+	_columns = {
+		#'name'                 : fields.char('Reference',size=64,help='Indicate a representative reference for the asociation'),
+		'local_floor_front'    : fields.float('Front', required=True),
+		'local_floor_side'    : fields.float('Side', required=True),
+		'local_floor_floor'    : fields.many2one('rent.floor','Level',help='Represents the floor on witch its located the local'),
+		'local_local_floor'    : fields.many2one('rent.floor.local','Local#',help='Represents the floor on witch its located the local'),
+		#'local_rent'           : fields.many2one('rent.rent','Alquiler',ondelete='cascade'),
+		'local_floor_area'     : fields.float('Area M2',required=True),
+		#'local_floor_area'     : fields.function(_local_floor_area,type='float',method=True,string='Area M2'),
+		'local_sqrmeter_price' : fields.function(_local_sqr_price,type='float',method=True,string='Sqr Meter Price'),
+		'local_floor_value'    : fields.function(_local_value,type='float',method=True,string='Total Value'),
+		'local_floor_building' : fields.related('local_floor_floor','floor_building',type='many2one',relation='rent.building',string='Building', readonly=True, store=False),
+	} 
+rent_local_floor()
+
+#
+#
+#
+class rent_contract(osv.osv):
+	_name = 'rent.contract'
+	
+	def create(self,cr,uid, vals,context=None):
+		debug("============================CREANDO EL NUEVO CONTRATO")
+		contract_id = super(rent_contract,self).create(cr,uid,vals,context)
+		debug(contract_id)
+		obj_contract = self.pool.get('rent.contract').browse(cr,uid,contract_id)
+		debug(obj_contract)
+		i = 0
+		for clause_perm in self.pool.get('rent.contract.clause').search(cr,uid,[('clause_is_basic','=','True')]):
+		#for obj_clause_perm in self.pool.get('rent.contract.clause').browse(cr,uid,clause_perm):
+			#clause_rel_id = self.pool.get('rent.contract.clause.rel').create(cr,uid,{'sequence':i,'rent_contract_id':obj_contract.id,'rent_contract_clause_id' : clause_perm},context)
+			#obj_clause_perm = self.pool.get('rent.contract.clause.rel').browse(cr,uid,clause_rel_id)
+			#if obj_clause_perm:
+			obj_contract.write({'contract_clauses' : [(0,0,{'sequence':i,'rent_contract_id':obj_contract.id,'rent_contract_clause_id' : clause_perm})]})
+			i+=1
+		return obj_contract.id
+				
+	_columns = {
+		'name'             : fields.char('Reference', size=64),
+		'contract_rent'    : fields.many2one('rent.rent','Rent Reference'),
+		'contract_clauses' : fields.one2many('rent.contract.clause.rel','rent_contract_id','Clausulas'),
+		#'contract_clauses' : fields.many2many('rent.contract.clause','rent_contract_clause_rel','name','clause_code','Clausulas'),
+		#'contract_design'  : fields.char('Design',size=64),
+	}
+	
+rent_contract()
+
+
+#Class that holds all the clauses for the contracts
+#this class is used to create a custom contract
+#it simulates a sintaxys analizer to subtitute codes with the corresponding clause
+class rent_contract_clause(osv.osv):
+	_name = 'rent.contract.clause'
+	_rec_name = 'clause_code'
+	_columns = {
+		'clause_code'     : fields.char('Reference',size=64,required=True,help='Reference code for the clause, used to create custom contracts'),
+		'clause_subject'  : fields.char('Subject',size=64,required=True),
+		'clause_body'     : fields.text('Body',required=True),
+		'clause_is_basic' : fields.boolean('Priority', help = 'Check if the clause should allways appear on every contract you create'),
+		#'clause_contract' : fields.many2many('rent.contract','rent_contract_clause','id','id','Contracts'),
+	}
+rent_contract_clause()
+
+
+class rent_contract_clause_rel(osv.osv):
+	_name = 'rent.contract.clause.rel'
+	_rec_name = 'rent_contract_id'
+	_columns = {
+		'rent_contract_id' : fields.many2one('rent.contract','Contract Reference'),
+		'rent_contract_clause_id' : fields.many2one('rent.contract.clause','Contract Reference'),
+		'sequence'         : fields.integer('Sequence'),
+	}
+rent_contract_clause_rel()

=== removed file 'rent/.goutputstream-DRFF1V'
--- rent/.goutputstream-DRFF1V	2011-09-07 19:46:37 +0000
+++ rent/.goutputstream-DRFF1V	1970-01-01 00:00:00 +0000
@@ -1,590 +0,0 @@
-from osv import osv, fields
-from tools import debug
-import time
-import pooler
-from dateutil import parser
-from tools.translate import _
-
-class rent_canton(osv.osv):
-	 _name = 'rent.canton'
-	 _description = 'Canton for the State'
-	 _columns = {
-		'state_id'   : fields.many2one('res.country.state','Province',required=True),
-		'name'       : fields.char('Canton Name', size=64, required=True),
-		'code'       : fields.char('Canton Code', size=4,help = 'The canton code in 4 chars', required=True),
-	 }
-rent_canton()
-
-class rent_canton_district(osv.osv):
-	_name = 'rent.canton.district'
-	_description = 'District located in the canton'
-	_columns = {
-		'canton_id'  : fields.many2one('rent.canton','Canton',required=True),
-		'name'       : fields.char('Distric Name', size=64, required=True),
-		'code'       : fields.char('Distric Code', size=4,help = 'The district code in 4 chars', required=True),
-	}
-rent_canton_district()
-
-
-# Class used to specialize the res.partner.address, this one adds the attributes of
-# canton, district and redefines the estate_id to province making it as a selection
-class rent_location(osv.osv):
-	_name = 'res.partner.address'
-	_inherit = 'res.partner.address'
-
-	_columns = {
-		#'province_id '   : fields.selection(_get_province,'Province',size=16),
-		#'canton_id'   : fields.selection(_get_canton, 'Canton'),
-		'canton_id'   : fields.many2one('rent.canton', 'Canton', domain = "[('state_id','=',state_id)]"),
-		'district_id' : fields.many2one('rent.canton.district','District', domain = "[('canton_id','=',canton_id)]"),
-	}
-rent_location()
-
-#Class that inherits from res.partner allowing to record the 
-#necesary data from the clients
-
-class rent_client(osv.osv):
-	_name = 'res.partner'
-	_inherit = 'res.partner'
-	_columns = {
-		'client_birthdate' : fields.date('Birthdate',select=1,required=True),
-		#'client_location'  : fields.one2many('rent.location','location_id','Location'),
-		'client_canton'    : fields.related('address', 'canton_id', type='many2one', relation='rent.canton', string='Canton'),
-		'client_district'  : fields.related('address', 'district_id', type='many2one', relation='rent.canton.district', string='District'),
-	}
-rent_client()
-
-
-#Class that represents the estates owned by the user. 
-#This class also uses the rent.location defined above
-class rent_estate(osv.osv):
-	_name = 'rent.estate'
-	_rec_name = "estate_number"
-	
-	def _get_estate_vrm(self,cr,uid,ids,field_name,args,context=None):
-		res = {}
-		for estate_id in ids:
-			obj_estate = self.pool.get('rent.estate').browse(cr,uid,estate_id)
-			res[estate_id] = obj_estate.estate_value / 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}
-		
-	_columns = {
-		'estate_owner'    : fields.many2one('res.company','Owner',required=True),
-		'estate_number'   : fields.char('# estate', size=10,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': fields.one2many('rent.building','building_estate','Buildings'),
-		'estate_location' : fields.many2one('res.partner.address','Location'),
-		#'estate_province': fields.related('estate_address', 'estate_province', type='selection', string='Province'),
-        #'estate_canton': fields.related('estate_address', 'estate_canton', type='selection', string='Canton'),
-        #'estate_district': fields.related('estate_address', 'estate_district', type='selection', string='District'),
-	}
-rent_estate()
-
-#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):
-	_name = 'rent.building'
-	
-	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)
-			res[building_id] = obj_building.building_value / obj_building.building_area
-		return res
-		
-	_columns = {
-		'building_capacity'          : fields.integer('Capacity',required=True),
-		'building_date_construction' : fields.date('Construction Date', required=True),
-		'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'            : fields.many2one('rent.estate', 'estate'),
-		'building_photo'             : fields.binary('Photo'),
-		'building_gallery_photo'     : fields.char('Gallery of Photos', size=64),
-		'building_floors'            : fields.one2many('rent.floor','floor_building','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'             : fields.many2one('account.invoice','Asset'),
-	}
-rent_building()
-
-#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 
-#the numbre then near to the top of the building is the floor.
-class rent_floor(osv.osv):
-	_name = 'rent.floor'
-	_rec_name = 'floor_number'
-	
-	def _calculate_floor_value(self,cr,uid,ids,field_name,args,context):
-		#This method takes al the valid rents for the floor and calculates the value according to 
-		#the value of the locals,parking, building and estate related to it
-		res = {}
-		valores = {}
-		total = 0
-		debug("CALCULO====================")
-		debug(ids)
-		for floor_id in ids:
-			debug(floor_id)
-			actual_rent = self.pool.get('rent.rent').search(cr,uid,['|',('state','=','valid'),('state','=','draft'),('rent_related_real','=','local')])
-			debug(actual_rent)
-			for obj_rent in self.pool.get('rent.rent').browse(cr,uid,actual_rent):
-				obj_local = obj_rent.rent_rent_local
-				local_floor_ids = self.pool.get('rent.local.floor').search(cr,uid,[('local_local_floor','=',obj_local.id),('local_floor_floor','=',floor_id)])
-				for local in self.pool.get('rent.local.floor').browse(cr,uid,local_floor_ids):
-					valores = local._local_value(local.id,None,None)
-					debug(valores)
-					total += valores[local.id]
-			debug(total)
-			
-			#This part look for the parking on rents associated to the floor
-			rent_ids = self.pool.get('rent.rent').search(cr,uid,['|',('state','=','valid'),('state','=','draft'),('rent_related_real','=','parking')])
-			obj_rent = self.pool.get('rent.rent').browse(cr,uid,rent_ids)
-			for rent in obj_rent:
-				obj_parking = rent.rent_rent_parking
-				if (obj_parking.parking_floor.id == floor_id):
-					total += obj_parking._parking_value(obj_parking.id,None,None)[obj_parking.id]
-			res[floor_id] = total
-			total = 0
-		return res
-	
-	def _get_fullname(self,cr,uid,ids,field_name,args,context):
-		debug("FULLNAME====================")
-		res = {}
-		for obj_floor in self.pool.get('rent.floor').browse(cr,uid,ids):
-			building_code = obj_floor.floor_building.building_code
-			res[obj_floor.id] = building_code + '-' + obj_floor.floor_number
-		debug(res)
-		return res
-	 
-	def name_get(self, cr, uid, ids, context=None):
-		if not len(ids):
-			return []
-		reads = self.read(cr, uid, ids, ['complete_name'], context=context)
-		res = []
-		for record in reads:
-			name = record['complete_name']
-			res.append((record['id'], name))
-		return res
-
-	_columns = {
-		'floor_number'     : fields.char('# Floor',size=4,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_local'      : fields.one2many('rent.floor.local','local_floor','Local'),
-		'floor_parking'    : fields.one2many('rent.floor.parking','parking_floor','Parking'),
-		'floor_building'   : 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'),
-	}
-rent_floor()
-
-#Class representing the local, on every floor. This class has a relation 
-#many2one with the floor 
-#
-class rent_floor_local(osv.osv):
-	_name = 'rent.floor.local'
-	_rec_name = 'local_number'
-		
-	def _get_building_local(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		debug('EDIFICIO+==================================')
-		debug(ids)
-		for local_id in ids:
-			local = self.pool.get('rent.local.floor').search(cr,uid,[('local_local_floor','=',local_id)])
-			debug(local)
-			res[local_id] = False
-			for lids in local:
-				obj_local = self.pool.get('rent.local.floor').browse(cr,uid,lids)
-				debug(obj_local)
-				res[local_id] = obj_local.local_floor_floor.floor_building.id
-			debug(res)
-		return res
-	
-	def _determine_rented(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		debug('Renta+==================================')
-		for local_id in ids:
-			res[local_id] =  False
-			debug(ids)
-			rent_ids = self.pool.get('rent.rent').search(cr,uid,[('state','=','valid'),('rent_related_real','=','local'),('rent_rent_local','=',local_id)])
-			if rent_ids:
-				res[local_id] =  True
-		debug(res)
-		return res
-	def _local_value(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		debug(ids)
-		total = 0
-		for local in self.pool.get('rent.floor.local').browse(cr,uid,ids):
-			for obj_local_floor in local.local_local_by_floor:
-				total += obj_local_floor._local_value(obj_local_floor.id,None,None)[obj_local_floor.id]
-			res[local.id] = total
-			total = 0
-		debug(total)
-		debug(res)
-		return res
-
-	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 = []
-		debug('NOMBREPISOS+==================================')
-		for record in reads:
-			debug(record)
-			debug(record['local_building'][1])
-			name = 'Local #' + str(record['local_number']) + ' , ' +  record['local_building'][1]
-		#	for subrecord in subreads 
-		#		name += ', ' + subrecord['local_floor_building']
-			res.append((record['id'], name))
-		return res
-	_columns = {
-		#'local_area'               : fields.function(_floor_area,type='float',method=True,string='VRN Dynamic'),
-		'local_area'               : fields.float('Area',required=True),
-		#'local_value'              : fields.float('Value',required=True),
-		'local_number'             : fields.integer('# Local',required=True),
-		'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_sqrmeter_price'     : fields.function(_local_sqr_price,type='float',method=True,string='Sqr Meter Price'),
-		#'local_sqrmeter_price'     :  fields.float('Sqr Meter Price',required=True),
-		'local_rented'             : fields.function(_determine_rented,type='boolean',method=True,string='Rented',help='Check if the local is rented'),
-		#'local_floor'              : fields.many2one('rent.floor','# Floor'),
-		'local_local_by_floor'     : fields.one2many('rent.local.floor','local_local_floor','Local floors'),
-		#'local_floor'              : fields.related('rent.local.floor','# Floor'),
-		'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_rent'               : fields.many2one('rent.rent','Alquiler'),
-	}
-rent_floor_local()
-
-#Class representing the parking, on floor. This class has a relation 
-#many2one with the floor 
-#
-class rent_floor_parking(osv.osv):
-	_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.floor_building
-			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.floor_building
-			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'], context=context)
-		res = []
-		debug('NOMBREPARKEO+==================================')
-		for record in reads:
-			debug(record)
-			debug(record['parking_floor'][1])
-			name = 'Parking #' + str(record['parking_number']) + ' , ' +  record['parking_floor'][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 = {}
-		debug('Renta+==================================')
-		for parking_id in ids:
-			res[parking_id] =  False
-			debug(ids)
-			rent_ids = self.pool.get('rent.rent').search(cr,uid,[('state','=','valid'),('rent_related_real','=','parking'),('rent_rent_parking','=',parking_id)])
-			if rent_ids:
-				res[parking_id] =  True
-		debug(res)
-		return res
-	_columns = {
-		'parking_area'            : fields.function(_parking_area,type='float',method=True,string='Area'),
-		#'parking_area'            : fields.float('VRN Dynamic',required=True),
-		#'parking_value'           : fields.float('Value',required=True),
-		'parking_value'           : fields.function(_parking_value,type='float',method=True,string='Value'),
-		'parking_number'          : fields.integer('# Parking',required=True),
-		'parking_huella'          : fields.float('Huella',required=True),
-		'parking_sqrmeter_price'  :  fields.function(_parking_sqr_price,type='float',method=True,string='Sqr Meter Value'),
-		#'parking_sqrmeter_price'  :  fields.float('Sqr Meter Value',required=True),
-		'parking_rented'          : fields.function(_determine_rented,type='boolean',method=True,string='Rented',help='Checked if the parking is rented'),
-		'parking_floor'           : fields.many2one('rent.floor','# Floor'),
-		'parking_large'           : fields.float('Large Meters'),
-		'parking_width'           : fields.float('Width Meters'),
-	}
-rent_floor_parking()
-
-
-#Class to hold all the information that refences the rent
-#value, dates, status and to control de transaction of the bussines
-#
-class rent_rent(osv.osv):
-	_name = 'rent.rent'
-	
-	def _get_currency(self, cr, uid, context=None):
-		user = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, [uid], context=context)[0]
-		if user.company_id:
-			return user.company_id.currency_id.id
-		return pooler.get_pool(cr.dbname).get('res.currency').search(cr, uid, [('rate','=', 1.0)])[0]
-		
-	def _get_total_rent(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		total = 0
-		debug('+==================================')
-		for rent_id in ids:
-			debug(rent_id)
-			obj_rent = self.pool.get('rent.rent').browse(cr,uid,rent_id)
-			debug(obj_rent)
-			if obj_rent.rent_related_real == 'local':
-				debug("LOCALES")
-				debug(obj_rent.rent_rent_local)
-				obj_local = obj_rent.rent_rent_local
-				total = obj_local._local_value(obj_local.id,None,None)[obj_local.id]
-				debug(total)
-			elif obj_rent.rent_related_real == 'parking':
-				debug("PARQUEO")
-				obj_parking = obj_rent.rent_rent_parking
-				debug(obj_parking)
-				total = obj_parking._parking_value(obj_parking.id,None,None)[obj_parking.id]
-			else:
-				debug("LOTES")
-				debug(obj_rent.rent_rent_estate)
-				obj_estado = obj_rent.rent_rent_estate
-				total = obj_estado._get_estate_vrm(obj_estado.id,None,None)[obj_estado.id]
-				debug(total)
-				#for obj_estado in obj_rent.rent_rent_estate:
-					#debug(obj_estado)
-					#total += obj_estado._get_estate_vrm(obj_estado.id,None,None)[obj_estado.id]
-			res[rent_id] = total
-		return res
-	def _calculate_years(self,cr,uid,ids,field_name,args,context):
-		debug('+==================================')
-		res = {}
-		for rent_id in ids:
-			obj_rent = self.pool.get('rent.rent').browse(cr,uid,rent_id)
-			if (obj_rent.rent_end_date and  obj_rent.rent_start_date):
-				fin = parser.parse(obj_rent.rent_end_date)
-				inicio = parser.parse(obj_rent.rent_start_date)
-				debug(inicio)
-				debug(fin)
-				res[rent_id] = (fin.year - inicio.year)
-			debug(res)
-		return res
-	
-	def write(self, cr, uid, ids, vals, context=None):
-		if 'rent_related_real' in vals:
-			obj_rent = self.pool.get('rent.rent').browse(cr,uid,ids)[0]
-			debug('_---------------------------------------------------ACT')
-			debug(obj_rent)
-			debug(obj_rent.rent_rent_local)
-			if (obj_rent.rent_related_real != vals['rent_related_real']):
-				debug(vals)
-				real_type = vals['rent_related_real'] 
-				if real_type == 'local' or real_type == 'parking':
-					vals['rent_rent_estate'] = False
-				if real_type == 'local' or real_type == 'estate':
-					vals['rent_rent_parking'] = False
-				if real_type == 'parking' or real_type == 'estate':
-					#raise osv.except_osv(_('Warning !'), _('You have changed the type of real state that will overwrite the last with this one'))
-					local_list = []
-					for ob_local_floor in obj_rent.rent_rent_local:
-						local_list.append((2,ob_local_floor.id))
-					vals['rent_rent_local'] = local_list
-		debug(vals)
-		return super(rent_rent, self).write(cr, uid, ids, vals, context=context)
-		
-	_columns = {
-		'name'                  : fields.char('Name',size=64),
-		'rent_rent_client'      : fields.many2one('res.partner','Client', states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_end_date'         : fields.date('Ending Date', required=True, states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_ending_motif'     : fields.selection([('Desertion','Desertion'),('No Renovation','No Renovation'),('Eviction','Eviction')],'Ending Motif'),
-		'rent_ending_motif_desc': fields.text('Ending Motif Description'),
-		'rent_rise'             : fields.float('Anual Rise', states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_type'             : fields.selection([('Contract','Contract'),('Adendum','Adendum'),('Renovation','Renovation')],'Type', states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'state'                 : fields.selection([('valid','Valid'),('finished','Finished'),('draft','Draft')],'Status', readonly=True),
-		'rent_start_date'       : fields.date('Starting Date', required=True, states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_total'            : fields.function(_get_total_rent,type='float',method=True,string='Total Paid'),
-		'rent_rent_local'       : fields.many2one('rent.floor.local','Local', states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_rent_parking'     : fields.many2one('rent.floor.parking','Parking', states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_rent_estate'      : fields.many2one('rent.estate','Estate', states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
-		#'rent_is_local'         : fields.boolean('Locals',help='Check if you want to calculate a rent for locals', states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
-		#'rent_is_parking'       : fields.boolean('Parking',help='Check if you want to calculate a rent for locals', states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
-		#'rent_is_estate'        : fields.boolean('Estates',help='Check if you want to calculate a rent for locals', states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_related_real'     : fields.selection([('local','Locals'),('parking','Parking'),('estate','Estates')],'Type of Real Estate', required=True,states={'valid':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_years'            : fields.function(_calculate_years,type='integer',method=True,string = 'Years' ,help='Check if you want to calculate a rent for locals'),
-		'rent_modif'            : fields.one2many('rent.rent', 'rent_modif_ref','Contract reference', states={'draft':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_modif_ref'        : fields.many2one('rent.rent', 'Modifications'),
-		'currency_id'           : fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
-		'rent_estimates'        : fields.one2many('rent.rent.analitic', 'analitic_rent','Estimates'),         
-	}
-	
-	_defaults = {
-		'state'        : 'draft',
-		'rent_type'    : 'Contract',
-		'currency_id': _get_currency,
-	}
-rent_rent()
-
-class rent_rent_analitic(osv.osv):
-	_name = 'rent.rent.analitic'
-	
-	def _performance_years(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		for obj_analitic in self.pool.get('rent.rent.analitic').browse(cr,uid,ids):
-			res[obj_analitic.id] =  1 / obj.analitic.analitic_performance
-		return res
-	_columns = {
-		'analitic_performance'       : fields.integer('Performance', help='This a percentaje number',store=False),
-		'analitic_years'             : fields.function(_performance_years, type='integer',method = True,string='Years'),
-		'analitic_amountc'           : fields.function(_performance_years, type='integer',method = True,string='Years'),
-		#'analitic_colones'           : fields.function(_performance_years, type='integer',method = True,string='c / m2'),
-		#'analitic_amountd'           : fields.function(_performance_years, type='integer',method = True,string='Years'),
-		#'analitic_dollars'           : fields.function(_performance_years, type='integer',method = True,string='s / m2'),
-		'analitic_cust_colones'      : fields.integer('Amount c', store=False),
-		'analitic_cust_dollars'      : fields.integer('Amount s', store=False),
-		
-		'analitic_dec_min_dollars'       : fields.integer('Amount s', store=False),
-		'analitic_dec_base_dollars'      : fields.integer('Amount s', store=False),
-		'analitic_rent'                  : fields.many2one('rent.rent','Rent'),
-	}
-rent_rent_analitic()
-
-class rent_local_floor(osv.osv):
-	_name = 'rent.local.floor'
-	
-	def _local_sqr_price(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		for local_id in ids:
-			obj = self.pool.get('rent.local.floor').browse(cr,uid,local_id)
-			obj_build = obj.local_floor_floor.floor_building
-			res[local_id] = obj_build._get_building_vrm(obj_build.id,None,None)[obj_build.id]
-		return res
-	
-	def _local_value(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		for local_id in ids:
-			obj = self.pool.get('rent.local.floor').browse(cr,uid,local_id)
-			obj_build = obj.local_floor_floor.floor_building
-			res[local_id] = obj.local_floor_area * obj_build._get_building_vrm(obj_build.id,None,None)[obj_build.id]
-		return res
-		
-	#def _local_floor_area(self,cr,uid,ids,field_name,args,context):
-	#	res = {}
-	#	for local_floor_id in ids:
-	#		obj = self.pool.get('rent.local.floor').browse(cr,uid,local_floor_id)
-	#		res[local_floor_id] = obj.local_floor_width * obj.local_floor_large
-	#	return res
-	
-	def onchange_floor(self,cr,uid,ids,floor_id):
-		res = {}
-		debug("+============================")
-		obj_floor = self.pool.get('rent.floor').browse(cr,uid,floor_id)
-		debug(obj_floor)
-		res['local_floor_building'] = obj_floor.floor_building.id
-		debug(res)
-		return {'value' : res}
-	_columns = {
-		#'name'                 : fields.char('Reference',size=64,help='Indicate a representative reference for the asociation'),
-		'local_floor_front'    : fields.float('Front', required=True),
-		'local_floor_side'    : fields.float('Side', required=True),
-		'local_floor_floor'    : fields.many2one('rent.floor','Level',help='Represents the floor on witch its located the local'),
-		'local_local_floor'    : fields.many2one('rent.floor.local','Local#',help='Represents the floor on witch its located the local'),
-		#'local_rent'           : fields.many2one('rent.rent','Alquiler',ondelete='cascade'),
-		'local_floor_area'     : fields.float('Area M2',required=True),
-		#'local_floor_area'     : fields.function(_local_floor_area,type='float',method=True,string='Area M2'),
-		'local_sqrmeter_price' : fields.function(_local_sqr_price,type='float',method=True,string='Sqr Meter Price'),
-		'local_floor_value'    : fields.function(_local_value,type='float',method=True,string='Total Value'),
-		'local_floor_building' : fields.related('local_floor_floor','floor_building',type='many2one',relation='rent.building',string='Building', readonly=True, store=False),
-	} 
-rent_local_floor()
-
-#
-#
-#
-class rent_contract(osv.osv):
-	_name = 'rent.contract'
-	
-	def create(self,cr,uid, vals,context=None):
-		debug("============================CREANDO EL NUEVO CONTRATO")
-		contract_id = super(rent_contract,self).create(cr,uid,vals,context)
-		debug(contract_id)
-		obj_contract = self.pool.get('rent.contract').browse(cr,uid,contract_id)
-		debug(obj_contract)
-		i = 0
-		for clause_perm in self.pool.get('rent.contract.clause').search(cr,uid,[('clause_is_basic','=','True')]):
-		#for obj_clause_perm in self.pool.get('rent.contract.clause').browse(cr,uid,clause_perm):
-			#clause_rel_id = self.pool.get('rent.contract.clause.rel').create(cr,uid,{'sequence':i,'rent_contract_id':obj_contract.id,'rent_contract_clause_id' : clause_perm},context)
-			#obj_clause_perm = self.pool.get('rent.contract.clause.rel').browse(cr,uid,clause_rel_id)
-			#if obj_clause_perm:
-			obj_contract.write({'contract_clauses' : [(0,0,{'sequence':i,'rent_contract_id':obj_contract.id,'rent_contract_clause_id' : clause_perm})]})
-			i+=1
-		return obj_contract.id
-				
-	_columns = {
-		'name'             : fields.char('Reference', size=64),
-		'contract_rent'    : fields.many2one('rent.rent','Rent Reference'),
-		'contract_clauses' : fields.one2many('rent.contract.clause.rel','rent_contract_id','Clausulas'),
-		#'contract_clauses' : fields.many2many('rent.contract.clause','rent_contract_clause_rel','name','clause_code','Clausulas'),
-		#'contract_design'  : fields.char('Design',size=64),
-	}
-	
-rent_contract()
-
-
-#Class that holds all the clauses for the contracts
-#this class is used to create a custom contract
-#it simulates a sintaxys analizer to subtitute codes with the corresponding clause
-class rent_contract_clause(osv.osv):
-	_name = 'rent.contract.clause'
-	_rec_name = 'clause_code'
-	_columns = {
-		'clause_code'     : fields.char('Reference',size=64,required=True,help='Reference code for the clause, used to create custom contracts'),
-		'clause_subject'  : fields.char('Subject',size=64,required=True),
-		'clause_body'     : fields.text('Body',required=True),
-		'clause_is_basic' : fields.boolean('Priority', help = 'Check if the clause should allways appear on every contract you create'),
-		#'clause_contract' : fields.many2many('rent.contract','rent_contract_clause','id','id','Contracts'),
-	}
-rent_contract_clause()
-
-
-class rent_contract_clause_rel(osv.osv):
-	_name = 'rent.contract.clause.rel'
-	_rec_name = 'rent_contract_id'
-	_columns = {
-		'rent_contract_id' : fields.many2one('rent.contract','Contract Reference'),
-		'rent_contract_clause_id' : fields.many2one('rent.contract.clause','Contract Reference'),
-		'sequence'         : fields.integer('Sequence'),
-	}
-rent_contract_clause_rel()

=== added file 'rent/__init__.py'
--- rent/__init__.py	1970-01-01 00:00:00 +0000
+++ rent/__init__.py	2012-01-05 00:57:30 +0000
@@ -0,0 +1,3 @@
+import rent
+import report
+import wizard

=== removed file 'rent/__init__.py'
--- rent/__init__.py	2011-09-01 16:42:08 +0000
+++ rent/__init__.py	1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-import rent
-import report

=== added file 'rent/__openerp__.py'
--- rent/__openerp__.py	1970-01-01 00:00:00 +0000
+++ rent/__openerp__.py	2012-01-05 00:57:30 +0000
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Addons modules by CLEARCORP
+#    Copyright (C) 2009-TODAY (<http://clearcorp.co.cr>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+{
+	'name': 'Rent',
+	'version': '1.1',
+	'url': 'http://launchpad.net/openerp-ccorp-addons',
+	'author': 'ClearCorp S.A.',
+	'website': 'http://clearcorp.co.cr',
+	'category': 'Rent',
+	'description': """ClearCorp 'rent' module for real estate business.
+	""",
+	'depends': [
+		'account',
+		'base_contact',
+		],
+	'init_xml': [],
+	'demo_xml': [],
+	'update_xml': [
+					'wizard/rent_make_group.xml',
+					'rent_sequence.xml',
+					'rent_view.xml', 
+					'rent_data.xml',
+					'rent_workflow.xml', 
+					'rent_contract_report.xml',
+					'security/rent_security.xml',
+					'security/ir.model.access.csv',
+				],
+	'license': 'AGPL-3',
+	'installable': True,
+	'active': False,
+}

=== removed file 'rent/__openerp__.py'
--- rent/__openerp__.py	2011-09-26 22:53:46 +0000
+++ rent/__openerp__.py	1970-01-01 00:00:00 +0000
@@ -1,16 +0,0 @@
-{
-	"name"        : "Rent",
-	"author"      : "Clear Corp S.A.",
-	"version"     : "1.0",
-	"depends"     : ["base","account_asset"],
-	"init_xml"    : [],
-	"update_xml"  : ["rent_view.xml", 
-					"rent_data.xml",
-					"rent_workflow.xml", 
-					'rent_contract_report.xml',
-					'security/rent_security.xml',
-					'security/ir.model.access.csv',],
-	"category"    : "Rent",
-	"active"      : False,
-	"instalable"  : True,
-}

=== added directory 'rent/data'
=== removed directory 'rent/data'
=== added file 'rent/data/rent-hover.png'
Binary files rent/data/rent-hover.png	1970-01-01 00:00:00 +0000 and rent/data/rent-hover.png	2012-01-05 00:57:30 +0000 differ
=== removed file 'rent/data/rent-hover.png'
Binary files rent/data/rent-hover.png	2011-11-01 15:28:02 +0000 and rent/data/rent-hover.png	1970-01-01 00:00:00 +0000 differ
=== added file 'rent/data/rent.png'
Binary files rent/data/rent.png	1970-01-01 00:00:00 +0000 and rent/data/rent.png	2012-01-05 00:57:30 +0000 differ
=== removed file 'rent/data/rent.png'
Binary files rent/data/rent.png	2011-11-01 15:28:02 +0000 and rent/data/rent.png	1970-01-01 00:00:00 +0000 differ
=== added directory 'rent/i18n'
=== removed directory 'rent/i18n'
=== added file 'rent/i18n/es_CR.po'
--- rent/i18n/es_CR.po	1970-01-01 00:00:00 +0000
+++ rent/i18n/es_CR.po	2012-01-05 00:57:30 +0000
@@ -0,0 +1,1728 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* rent
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.0.2\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2011-11-20 22:54+0000\n"
+"PO-Revision-Date: 2011-11-20 22:54+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: rent
+#: help:rent.rent,rent_charge_day:0
+#: help:rent.rent,rent_main_charge_day:0
+msgid "Indica el dia del mes para realizar los cobros del alquiler."
+msgstr "Indica el día del mes para realizar los cobros del alquiler."
+
+#. module: rent
+#: view:rent.building:0
+msgid "Machinery"
+msgstr "Maquinaria"
+
+#. module: rent
+#: field:rent.building,building_stairs_number:0
+msgid "Stairs number"
+msgstr "Número de Escaleras"
+
+#. module: rent
+#: model:ir.model,name:rent.model_rent_rent_main_estimate
+msgid "rent.rent.main.estimate"
+msgstr "rent.rent.main.estimate"
+
+#. module: rent
+#: help:rent.rent.anual.value,anual_value_prev_value:0
+#: help:rent.rent.anual.value,anual_value_value:0
+msgid "This value was taken from the record of rent at the indicated date"
+msgstr "Este valor fue tomado del registro de alquiler en la fecha indicada"
+
+#. module: rent
+#: field:rent.floor.parking,parking_width:0
+msgid "Width Meters"
+msgstr "Metros de frente"
+
+#. module: rent
+#: view:rent.building:0
+#: view:rent.estate:0
+#: view:rent.floor:0
+#: view:rent.rent:0
+msgid "Group By..."
+msgstr "Agrupado por..."
+
+#. module: rent
+#: view:rent.rent.anual.value:0
+msgid "Value History"
+msgstr "Historial de Valor"
+
+#. module: rent
+#: field:rent.building,building_asset_id:0
+msgid "Asset"
+msgstr "Activo"
+
+#. module: rent
+#: selection:rent.rent.estimate,estimate_state:0
+#: selection:rent.rent.main.estimate,estimate_state:0
+msgid "Recommend"
+msgstr "Recomendado"
+
+#. module: rent
+#: field:rent.rent,rent_ending_motif:0
+msgid "Ending Motif"
+msgstr "Motivo de finalización"
+
+#. module: rent
+#: model:ir.model,name:rent.model_rent_contract_clause
+msgid "rent.contract.clause"
+msgstr "rent.contract.clause"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "Negotiation Information"
+msgstr "Información para Negociación"
+
+#. module: rent
+#: model:ir.actions.act_window,name:rent.action_local_floor_form_view
+#: model:ir.actions.act_window,name:rent.action_local_form_view
+msgid "Local Detail"
+msgstr "Detalle del local"
+
+#. module: rent
+#: help:rent.contract.clause,clause_is_basic:0
+msgid "Check if the clause should allways appear on every contract you create"
+msgstr "Seleccione si la Cláusula debería aparecer siempre en cada contrato que cree"
+
+#. module: rent
+#: view:rent.contract.clause:0
+#: field:rent.contract.clause,clause_body:0
+msgid "Body"
+msgstr "Cuerpo"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "Finish"
+msgstr "Finalizado"
+
+#. module: rent
+#: model:ir.actions.act_window,help:rent.action_estate_form_view
+msgid "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 \n"
+"			a building. Here yo can set the main data for the estate and also create the buildings that belongs to it."
+msgstr "Administres los terrenos que la compañía posee, para que se encuentren disponibles en el sistema. Un terreno es una porción de tierra comúnmente utilizada para la construcción, en algunos casos puede poseer una estructura sobre este, por ejemplo\n"
+"			un edificio. Aquí se puede indicar los datos principales del terreno y crear los edificios de este."
+
+#. module: rent
+#: field:rent.rent,rent_main_rise_year3:0
+#: field:rent.rent,rent_main_rise_year3d:0
+#: field:rent.rent,rent_rise_year3d:0
+msgid "Year 3  $"
+msgstr "Año 3"
+
+#. module: rent
+#: report:contract_report:0
+msgid "la"
+msgstr "la"
+
+#. module: rent
+#: code:addons/rent/wizard/rent_make_group.py:44
+#, python-format
+msgid "Warning !"
+msgstr "Alerta !"
+
+#. module: rent
+#: field:rent.building,building_company_id:0
+msgid "Company"
+msgstr "Compañía"
+
+#. module: rent
+#: sql_constraint:rent.floor.parking:0
+#: sql_constraint:rent.local.floor:0
+msgid "The side for the local cannot be 0!"
+msgstr "El ancho del local no puede ser 0"
+
+#. module: rent
+#: field:rent.invoice.rent,invoice_number:0
+msgid "Invoice Number"
+msgstr "Factura #"
+
+#. module: rent
+#: view:rent.contract:0
+#: view:rent.contract.clause:0
+msgid "Starting Date: %(sd)s"
+msgstr "Fecha de Inicio: %(sd)s"
+
+#. module: rent
+#: field:rent.rent.estimate,estimate_dollars:0
+#: field:rent.rent.main.estimate,estimate_dollars:0
+msgid "s / m2"
+msgstr "$ / m2"
+
+#. module: rent
+#: view:rent.building:0
+msgid "Search Building"
+msgstr "Buscar Edificio"
+
+#. module: rent
+#: sql_constraint:rent.floor.parking:0
+msgid "The huella for the parking cannot be 0!"
+msgstr "La Huella para el parqueo no puede ser de 0 metros!"
+
+#. module: rent
+#: selection:rent.rent,rent_type:0
+msgid "Others"
+msgstr "Otras Modificaciones"
+
+#. module: rent
+#: field:rent.local.floor,local_floor_front:0
+msgid "Front"
+msgstr "Frente"
+
+#. module: rent
+#: field:rent.floor.local,local_water_meter_number:0
+msgid "Water Meter"
+msgstr "Medidor de agua"
+
+#. module: rent
+#: field:rent.rent.group,rent_rent_ids:0
+msgid "Rents Members"
+msgstr "Contratos registrados"
+
+#. module: rent
+#: view:rent.contract:0
+#: view:rent.contract.clause:0
+msgid "Legend"
+msgstr "Leyenda"
+
+#. module: rent
+#: help:rent.rent,rent_grace_period:0
+#: help:rent.rent,rent_main_grace_period:0
+msgid "Indicates de how many days after the charge day will allow to paid an invoice without Interest for delay"
+msgstr "Indica cuanto días después de la fecha de cobro se permitirá el pago de la factura sin aplicar intereses por pago tardío"
+
+#. module: rent
+#: model:ir.ui.menu,name:rent.rent_building_submenu
+#: field:rent.floor,floor_building_id:0
+#: field:rent.floor.local,local_building:0
+#: field:rent.floor.parking,parking_floor_building:0
+#: field:rent.local.floor,local_floor_building:0
+msgid "Building"
+msgstr "Edificio"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "USD Currency Equivalence"
+msgstr "Equivalencia en otra moneda"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "  "
+msgstr "  "
+
+#. module: rent
+#: sql_constraint:rent.floor.parking:0
+msgid "The large for the parking cannot be 0!"
+msgstr "El largo del parqueo no puede ser de 0 metros"
+
+#. module: rent
+#: view:rent.building:0
+msgid "Assets"
+msgstr "Activos"
+
+#. module: rent
+#: help:rent.building,building_stairs_number:0
+msgid "If checkbox of stairs is no selected this will be 0"
+msgstr "Si el checkbox no esta seleccionado. Comienza con 0"
+
+#. module: rent
+#: field:rent.local.floor,local_floor_floor_id:0
+msgid "Level"
+msgstr "Piso"
+
+#. module: rent
+#: field:rent.building,building_elevator:0
+msgid "Elevadores"
+msgstr "Elevadores"
+
+#. module: rent
+#: view:rent.floor.local:0
+#: field:rent.floor.local,local_notes:0
+#: view:rent.rent:0
+#: field:rent.rent,rent_notes:0
+msgid "Notes"
+msgstr "Notas"
+
+#. module: rent
+#: model:ir.model,name:rent.model_rent_canton
+msgid "Canton for the State"
+msgstr "Cantón para el estado"
+
+#. module: rent
+#: help:rent.rent.estimate,estimate_performance:0
+#: help:rent.rent.main.estimate,estimate_performance:0
+msgid "This a percentaje number"
+msgstr "Este es un porcentaje"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "Search Rents"
+msgstr "Buscar Alquileres"
+
+#. module: rent
+#: model:ir.actions.act_window,name:rent.action_view_rent_make_group
+msgid "Make Group"
+msgstr "Crear Grupo"
+
+#. module: rent
+#: field:rent.rent.estimate,estimate_amountc:0
+#: field:rent.rent.main.estimate,estimate_amountc:0
+msgid "Amount"
+msgstr "Monto ¢"
+
+#. module: rent
+#: help:rent.floor,complete_name:0
+msgid "This name uses the code of the building and the floor name"
+msgstr "Este nombre usa el código del edificio y nombre del piso"
+
+#. module: rent
+#: help:rent.floor,floor_durability:0
+msgid "Indicate the durability in years"
+msgstr "Indique la durabilidad en años"
+
+#. module: rent
+#: field:rent.floor.local,local_local_by_floor_ids:0
+msgid "Local floors"
+msgstr "Pisos del local"
+
+#. module: rent
+#: model:ir.actions.report.xml,name:rent.rent_contract_report
+msgid "Print Contract"
+msgstr "Imprimir Contrato"
+
+#. module: rent
+#: field:rent.contract,contract_rent_id:0
+msgid "Rent Reference"
+msgstr "Alquiler Ref."
+
+#. module: rent
+#: field:rent.canton.district,code:0
+msgid "Distric Code"
+msgstr "Código del Distrito"
+
+#. module: rent
+#: view:rent.local.floor:0
+msgid "Total"
+msgstr "Total"
+
+#. module: rent
+#: model:ir.model,name:rent.model_rent_contract_clause_rel
+msgid "rent.contract.clause.rel"
+msgstr "rent.contract.clause.rel"
+
+#. module: rent
+#: field:rent.rent,rent_end_date:0
+#: field:rent.rent,rent_main_end_date:0
+msgid "Ending Date"
+msgstr "Fecha de finalización"
+
+#. module: rent
+#: model:ir.ui.menu,name:rent.rent_rent_submenu
+#: view:rent.rent.group:0
+msgid "Rents"
+msgstr "Alquileres"
+
+#. module: rent
+#: field:rent.contract,name:0
+#: field:rent.contract.clause,clause_code:0
+msgid "Reference"
+msgstr "Referencia"
+
+#. module: rent
+#: field:rent.floor.local,local_light_meter_number:0
+msgid "Electric Meter"
+msgstr "Medidor de Luz"
+
+#. module: rent
+#: view:rent.contract.clause:0
+msgid "Clause"
+msgstr "Cláusula"
+
+#. module: rent
+#: field:rent.floor,floor_number:0
+#: field:rent.floor.parking,parking_floor_id:0
+msgid "# Floor"
+msgstr "# Piso"
+
+#. module: rent
+#: field:rent.floor.local,local_gallery_photo:0
+msgid "Photo Gallery"
+msgstr "Galería de fotos"
+
+#. module: rent
+#: model:ir.model,name:rent.model_rent_floor_parking
+msgid "rent.floor.parking"
+msgstr "rent.floor.parking"
+
+#. module: rent
+#: model:ir.model,name:rent.model_rent_rent_anual_value
+msgid "rent.rent.anual.value"
+msgstr "rent.rent.anual.value"
+
+#. module: rent
+#: view:rent.contract:0
+msgid "Contrato"
+msgstr "Contrato"
+
+#. module: rent
+#: field:rent.rent,rent_invoiced_day:0
+#: field:rent.rent,rent_main_invoiced_day:0
+msgid "Invoiced Day"
+msgstr "Días de Anticipación"
+
+#. module: rent
+#: field:rent.rent,rent_main_rise:0
+#: field:rent.rent,rent_rise:0
+#: field:rent.rent.anual.value,anual_value_rate:0
+msgid "Anual Rise"
+msgstr "Aumento Anual(%)"
+
+#. module: rent
+#: help:rent.contract.clause,clause_code:0
+msgid "Reference code for the clause, used to create custom contracts"
+msgstr "Referencia al código de la Cláusula, empleado para crear contratos personalizados"
+
+#. module: rent
+#: model:ir.model,name:rent.model_res_partner
+msgid "Partner"
+msgstr "Empresa"
+
+#. module: rent
+#: field:rent.rent,rent_rent_acc_int_id:0
+#: field:rent.rent,rent_rent_main_acc_int_id:0
+msgid "Interest Account"
+msgstr "Cuenta de Intereses."
+
+#. module: rent
+#: field:rent.rent.anual.value,anual_value_rent_id:0
+msgid "Rent reference"
+msgstr "Aquiler Ref."
+
+#. module: rent
+#: help:rent.local.floor,local_floor_floor_id:0
+#: help:rent.local.floor,local_local_floor_id:0
+msgid "Represents the floor on witch its located the local"
+msgstr "Representa el piso en el cual el local esta ubicado"
+
+#. module: rent
+#: field:rent.invoice.rent,invoice_amount:0
+msgid "Amount Total"
+msgstr "Monto total"
+
+#. module: rent
+#: field:rent.contract.clause,clause_subject:0
+msgid "Subject"
+msgstr "Asunto"
+
+#. module: rent
+#: view:rent.estate:0
+#: field:rent.estate,estate_rented:0
+#: view:rent.floor.local:0
+#: field:rent.floor.local,local_rented:0
+#: field:rent.floor.parking,parking_rented:0
+msgid "Rented"
+msgstr "Alquilado"
+
+#. module: rent
+#: sql_constraint:rent.local.floor:0
+msgid "The front for the local cannot be 0!"
+msgstr "El frente del local no puede ser 0 metros!"
+
+#. module: rent
+#: help:rent.floor,floor_number:0
+msgid "Number of the floor in the building, starts from 0 (Basement)"
+msgstr "Número del piso en el edificio"
+
+#. module: rent
+#: view:rent.local.floor:0
+msgid "Sqr Meter Total"
+msgstr "Total m2"
+
+#. module: rent
+#: help:rent.rent,rent_notes:0
+msgid "Add complementary information about the rent or maintenance"
+msgstr "Agregue informacion complementaria acerca del alquiler o del mantenimiento"
+
+#. module: rent
+#: model:ir.actions.act_window,name:rent.action_canton_district
+#: view:rent.canton.district:0
+#: field:res.partner,client_district:0
+#: field:res.partner.address,district_id:0
+msgid "District"
+msgstr "Distrito"
+
+#. module: rent
+#: selection:rent.rent,rent_type:0
+msgid "Adendum"
+msgstr "Adendum"
+
+#. module: rent
+#: sql_constraint:rent.estate:0
+msgid "You can not have two estates with the same number!"
+msgstr "No puede ingresar dos terrenos con el mismo número!"
+
+#. module: rent
+#: report:contract_report:0
+msgid "........."
+msgstr "........."
+
+#. module: rent
+#: report:contract_report:0
+msgid "Por el"
+msgstr "Por el"
+
+#. module: rent
+#: sql_constraint:rent.local.floor:0
+msgid "You can not repeat the local at the same floor!"
+msgstr "No se puede repetir el mismo local en el mismo piso!"
+
+#. module: rent
+#: view:rent.rent:0
+#: field:rent.rent,state:0
+#: field:rent.rent.estimate,estimate_state:0
+#: field:rent.rent.main.estimate,estimate_state:0
+msgid "Status"
+msgstr "Estado"
+
+#. module: rent
+#: field:rent.contract.clause,clause_is_basic:0
+msgid "Priority"
+msgstr "Prioridad"
+
+#. module: rent
+#: field:rent.invoice.rent,invoice_state:0
+msgid "State"
+msgstr "Estado"
+
+#. module: rent
+#: field:rent.rent.anual.value,anual_value_prev_value:0
+msgid "Prev. Value"
+msgstr "Valor previo"
+
+#. module: rent
+#: view:rent.estate:0
+#: field:rent.estate,estate_location_id:0
+msgid "Location"
+msgstr "Localización"
+
+#. module: rent
+#: field:rent.rent,rent_main_performance:0
+#: field:rent.rent,rent_performance:0
+msgid "Performance"
+msgstr "Rendimiento"
+
+#. module: rent
+#: field:account.invoice.line,invoice_type:0
+#: field:rent.invoice.rent,invoice_type:0
+#: view:rent.rent:0
+#: field:rent.rent,rent_type:0
+#: field:rent.rent.anual.value,anual_value_type:0
+msgid "Type"
+msgstr "Tipo"
+
+#. module: rent
+#: view:rent.building:0
+#: view:rent.floor:0
+msgid "Floor Details"
+msgstr "Detalle del Piso"
+
+#. module: rent
+#: model:ir.model,name:rent.model_rent_estate
+msgid "rent.estate"
+msgstr "rent.estate"
+
+#. module: rent
+#: field:rent.building,name:0
+#: field:rent.floor,complete_name:0
+#: field:rent.make.group,name:0
+#: field:rent.rent,name:0
+#: field:rent.rent.group,name:0
+msgid "Name"
+msgstr "Nombre"
+
+#. module: rent
+#: help:rent.rent,rent_rent_acc_int_id:0
+#: help:rent.rent,rent_rent_main_acc_int_id:0
+msgid "This account will be used for invoices instead of the default one to value expenses for the current rent"
+msgstr "Esta cuenta será usada para facturas en lugar de la defecto para el alquiler"
+
+#. module: rent
+#: view:rent.estate:0
+#: field:rent.estate,estate_buildings_ids:0
+msgid "Buildings"
+msgstr "Edificios"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "Adendum List"
+msgstr "Lista de modificaciones"
+
+#. module: rent
+#: code:addons/rent/rent.py:908
+#, python-format
+msgid "There is no purchase journal defined for this company: \"%s\" (id:%d)"
+msgstr "No existe un diario de compras para esta compañía: \"%s\" (id:%d)"
+
+#. module: rent
+#: field:rent.rent,rent_rent_local_id:0
+msgid "Local"
+msgstr "Local"
+
+#. module: rent
+#: model:ir.actions.act_window,name:rent.action_rent_group_form_view
+#: view:rent.rent.group:0
+msgid "Rent Group"
+msgstr "Grupo de Alquileres"
+
+#. module: rent
+#: field:rent.rent,eqv_currency_id:0
+msgid "Currency Equivalence"
+msgstr "Equivalencia de la moneda"
+
+#. module: rent
+#: model:ir.actions.act_window,help:rent.action_canton
+msgid "If you are working on the Costa Rican market, you can manage the different Canton you are working on from here. Each canton is attached to one province."
+msgstr "Si está trabajando en Costa Rica, puede manejar diferentes cantones en los que se este trabajando. Cada cantón está relacionado con una provincia."
+
+#. module: rent
+#: field:rent.floor.local,local_huella:0
+#: field:rent.floor.parking,parking_huella:0
+msgid "Huella"
+msgstr "Huella"
+
+#. module: rent
+#: selection:rent.rent,state:0
+msgid "Inactive"
+msgstr "Inactivo"
+
+#. module: rent
+#: field:rent.rent.estimate,estimate_amountd:0
+#: field:rent.rent.main.estimate,estimate_amountd:0
+msgid "Amount $"
+msgstr "Monto $"
+
+#. module: rent
+#: model:ir.model,name:rent.model_rent_rent_estimate
+msgid "rent.rent.estimate"
+msgstr "rent.rent.estimate"
+
+#. module: rent
+#: field:rent.building,building_stairs:0
+msgid "Stairs"
+msgstr "Escaleras"
+
+#. module: rent
+#: field:rent.rent,rent_main_start_date:0
+#: field:rent.rent,rent_start_date:0
+msgid "Starting Date"
+msgstr "Fecha de Inicio"
+
+#. module: rent
+#: model:ir.actions.act_window,name:rent.action_clause_by_contract_form_view
+msgid "Clause by Contract"
+msgstr "Cláusulas por contrato"
+
+#. module: rent
+#: selection:rent.rent,rent_ending_motif:0
+msgid "Various problems with tenant"
+msgstr "Problemas varios con el inquilino"
+
+#. module: rent
+#: field:rent.rent,rent_charge_day:0
+#: field:rent.rent,rent_main_charge_day:0
+msgid "Charge Day"
+msgstr "Día de Cobro"
+
+#. module: rent
+#: field:rent.canton,state_id:0
+msgid "Province"
+msgstr "Provincia"
+
+#. module: rent
+#: view:rent.estate:0
+#: view:rent.rent:0
+msgid "Compute Values"
+msgstr "Calcular valores"
+
+#. module: rent
+#: field:rent.building,building_estate_id:0
+msgid "estate"
+msgstr "Terreno"
+
+#. module: rent
+#: field:rent.floor.parking,parking_sqrmeter_price:0
+msgid "Sqr Meter Value"
+msgstr "Valor del m2"
+
+#. module: rent
+#: model:ir.model,name:rent.model_rent_local_floor
+msgid "rent.local.floor"
+msgstr "rent.local.floor"
+
+#. module: rent
+#: sql_constraint:rent.floor:0
+msgid "You can not have two floors with the same number at the same building!"
+msgstr "No se pueden tener dos pisos con el mismo número en el mismo edificio!"
+
+#. module: rent
+#: field:rent.floor,floor_value:0
+#: field:rent.floor.parking,parking_value:0
+#: field:rent.rent.anual.value,anual_value_value:0
+msgid "Value"
+msgstr "Valor"
+
+#. module: rent
+#: field:rent.building,building_vrn_per_sqr:0
+#: field:rent.estate,estate_vrn_per_sqr:0
+msgid "VRN Din/M2"
+msgstr "VRN Din/m2"
+
+#. module: rent
+#: report:contract_report:0
+msgid "ARRENDADORA"
+msgstr "ARRENDADORA"
+
+#. module: rent
+#: field:rent.floor.local,local_photo:0
+msgid "Main photo"
+msgstr "Foto Principal"
+
+#. module: rent
+#: model:ir.actions.act_window,name:rent.action_client_form_view
+msgid "Detalles de Clientes"
+msgstr "Detalles de Clientes"
+
+#. module: rent
+#: help:rent.rent,rent_rent_account_id:0
+#: help:rent.rent,rent_rent_main_account_id:0
+msgid "This account will be used for invoices instead of the default one to value sales for the current rent"
+msgstr "Esta cuenta será usada para facturas en lugar de la defecto para el alquiler"
+
+#. module: rent
+#: field:rent.floor,floor_acabado:0
+msgid "Acabado"
+msgstr "Acabado"
+
+#. module: rent
+#: model:ir.model,name:rent.model_res_partner_address
+msgid "Partner Addresses"
+msgstr "Direcciones de empresa"
+
+#. module: rent
+#: field:rent.rent,rent_amount_per_sqr:0
+msgid "Amount per Sqr"
+msgstr "Precio m2"
+
+#. module: rent
+#: sql_constraint:rent.floor:0
+#: sql_constraint:rent.floor.local:0
+msgid "The area for the floor cannot be 0!"
+msgstr "El área del piso no puede ser 0!"
+
+#. module: rent
+#: model:ir.model,name:rent.model_rent_rent_group
+msgid "rent.rent.group"
+msgstr "rent.rent.group"
+
+#. module: rent
+#: selection:rent.rent.estimate,estimate_state:0
+#: selection:rent.rent.main.estimate,estimate_state:0
+msgid "Not Recomended"
+msgstr "No recomendado"
+
+#. module: rent
+#: field:rent.building,building_value:0
+#: field:rent.estate,estate_value:0
+#: field:rent.floor.local,local_area:0
+msgid "VRN Dynamic"
+msgstr "VRN Dinámico"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "Check for Invoices"
+msgstr "Revisar facturación"
+
+#. module: rent
+#: view:rent.floor.local:0
+msgid "Price historic"
+msgstr "Historial de Aumentos"
+
+#. module: rent
+#: field:rent.rent.anual.value,anual_value_local_ids:0
+msgid "Local reference"
+msgstr "Local reference"
+
+#. module: rent
+#: field:rent.rent,rent_amount_base:0
+#: field:rent.rent,rent_amountd_base:0
+#: field:rent.rent,rent_main_amount_base:0
+#: field:rent.rent,rent_main_amountd_base:0
+msgid "Final Price $"
+msgstr "Precio Final"
+
+#. module: rent
+#: field:rent.floor,floor_durability:0
+msgid "Durability"
+msgstr "Durabilidad"
+
+#. module: rent
+#: view:rent.invoice.rent:0
+msgid "Invoices"
+msgstr "Facturas"
+
+#. module: rent
+#: field:rent.building,building_photo:0
+msgid "Photo"
+msgstr "Foto"
+
+#. module: rent
+#: view:rent.contract.clause:0
+msgid "Reference Data"
+msgstr "Datos de referencia"
+
+#. module: rent
+#: field:rent.rent,rent_group_id:0
+msgid "Contract Group"
+msgstr "Grupo de Alquileres"
+
+#. module: rent
+#: field:rent.rent,rent_years:0
+msgid "Years"
+msgstr "Años"
+
+#. module: rent
+#: field:rent.rent,currency_id:0
+msgid "Currency"
+msgstr "Moneda"
+
+#. module: rent
+#: model:ir.actions.act_window,help:rent.action_floor_form
+msgid "Manage every floor that belongs to a determined Building. This is the main view where you can create a floor record\n"
+"			but you can still do it from the building form"
+msgstr "Administre cada piso que pertenece a un edificio. Esta es la principal vista donde puede crear el registro de un piso,\n"
+"			pero de igual forma puede crearlos desde el formulario de los edificios"
+
+#. module: rent
+#: model:ir.ui.menu,name:rent.rent_estate_menu
+msgid "Real Estate"
+msgstr "Bienes Inmuebles"
+
+#. module: rent
+#: field:rent.estate,estate_owner_id:0
+msgid "Owner"
+msgstr "Dueño"
+
+#. module: rent
+#: help:rent.canton,code:0
+msgid "The canton code in 4 chars"
+msgstr "El código de canton en 4 caracteres"
+
+#. module: rent
+#: help:rent.floor.parking,parking_rented:0
+msgid "Checked if the parking is rented"
+msgstr "Seleccionado si el parqueo está alquilado"
+
+#. module: rent
+#: field:rent.rent.estimate,estimate_colones:0
+#: field:rent.rent.main.estimate,estimate_colones:0
+msgid "c / m2"
+msgstr "¢ / m2"
+
+#. module: rent
+#: field:rent.rent,rent_grace_period:0
+#: field:rent.rent,rent_main_grace_period:0
+msgid "Grace Period"
+msgstr "Plazo de pago"
+
+#. module: rent
+#: field:rent.canton.district,name:0
+msgid "Distric Name"
+msgstr "Nombre del Distrito"
+
+#. module: rent
+#: field:rent.building,building_capacity:0
+msgid "Capacity"
+msgstr "Capacidad"
+
+#. module: rent
+#: view:rent.estate:0
+#: view:rent.floor.local:0
+#: view:rent.floor.parking:0
+msgid "Not Rented"
+msgstr "No alquilado"
+
+#. module: rent
+#: report:contract_report:0
+msgid "INQUILINO"
+msgstr "INQUILINO"
+
+#. module: rent
+#: field:rent.rent.estimate,estimate_date:0
+#: field:rent.rent.main.estimate,estimate_date:0
+msgid "Fecha"
+msgstr "Fecha"
+
+#. module: rent
+#: model:ir.model,name:rent.model_rent_rent
+msgid "rent.rent"
+msgstr "rent.rent"
+
+#. module: rent
+#: field:rent.contract,contract_clauses_ids:0
+msgid "Clausulas"
+msgstr "Clausulas"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "Detail"
+msgstr "Detalle"
+
+#. module: rent
+#: field:rent.estate,estate_account_id:0
+msgid "Cuenta"
+msgstr "Cuenta"
+
+#. module: rent
+#: model:ir.actions.act_window,name:rent.action_canton
+#: view:rent.canton:0
+#: field:rent.canton.district,canton_id:0
+#: field:res.partner,client_canton:0
+#: field:res.partner.address,canton_id:0
+msgid "Canton"
+msgstr "Cantón"
+
+#. module: rent
+#: view:rent.rent:0
+#: selection:rent.rent,state:0
+msgid "Draft"
+msgstr "Borrador"
+
+#. module: rent
+#: selection:rent.invoice.rent,invoice_type:0
+#: view:rent.rent:0
+#: selection:rent.rent.anual.value,anual_value_type:0
+msgid "Maintenance"
+msgstr "Mantenimiento"
+
+#. module: rent
+#: field:rent.local.floor,local_floor_area:0
+msgid "Area M2"
+msgstr "Área en m2"
+
+#. module: rent
+#: selection:rent.rent,rent_ending_motif:0
+msgid "No payment eviction"
+msgstr "Desalojo por no pago"
+
+#. module: rent
+#: model:ir.actions.act_window,name:rent.action_rent_anual_value_form_view
+#: model:ir.actions.act_window,name:rent.action_rent_estimate_form_view
+#: model:ir.actions.act_window,name:rent.action_rent_main_estimate_form_view
+msgid "Calculations Details"
+msgstr "Detalles de Cálculos"
+
+#. module: rent
+#: field:rent.building,building_gallery_photo:0
+msgid "Gallery of Photos"
+msgstr "Galería de fotos"
+
+#. module: rent
+#: view:rent.floor.local:0
+msgid "Floor List"
+msgstr "Lista de Pisos"
+
+#. module: rent
+#: selection:rent.rent,rent_ending_motif:0
+msgid "Early Return"
+msgstr "Devolución Anticipada"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "Financial Information"
+msgstr "Información financiera"
+
+#. module: rent
+#: view:rent.rent.estimate:0
+#: view:rent.rent.main.estimate:0
+msgid "Calculations List"
+msgstr "Lista de cálculos"
+
+#. module: rent
+#: help:rent.canton.district,code:0
+msgid "The district code in 4 chars"
+msgstr "Código del distrito en 4 caracteres"
+
+#. module: rent
+#: model:ir.actions.act_window,name:rent.action_contract_form_view
+msgid "Contracts"
+msgstr "Contratos"
+
+#. module: rent
+#: model:ir.model,name:rent.model_rent_floor_local
+msgid "rent.floor.local"
+msgstr "rent.floor.local"
+
+#. module: rent
+#: field:rent.building,building_area:0
+#: field:rent.estate,estate_area:0
+#: field:rent.floor,floor_area:0
+#: field:rent.floor.parking,parking_area:0
+#: field:rent.rent,rent_rent_real_area:0
+msgid "Area"
+msgstr "Área"
+
+#. module: rent
+#: field:rent.rent,rent_rise_year2:0
+msgid "Year 2 $"
+msgstr "Año 2"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "Rent List"
+msgstr "Lista de Alquileres"
+
+#. module: rent
+#: field:rent.local.floor,local_sqrmeter_price:0
+msgid "Sqr Meter Price"
+msgstr "Precio m2"
+
+#. module: rent
+#: view:rent.floor:0
+msgid "Edificio"
+msgstr "Edificio"
+
+#. module: rent
+#: view:rent.floor.local:0
+msgid "Local List"
+msgstr "Lista de locales"
+
+#. module: rent
+#: view:rent.floor.local:0
+msgid "Miscelanius Information"
+msgstr "Información miscelanea"
+
+#. module: rent
+#: model:ir.model,name:rent.model_rent_make_group
+msgid "rent.make.group"
+msgstr "rent.make.group"
+
+#. module: rent
+#: field:rent.invoice.log,log_date:0
+#: field:rent.invoice.rent,invoice_date:0
+msgid "Date"
+msgstr "Fecha"
+
+#. module: rent
+#: report:contract_report:0
+msgid ":"
+msgstr ":"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "Aumentos"
+msgstr "Aumentos"
+
+#. module: rent
+#: view:rent.building:0
+#: view:rent.floor:0
+msgid "Design Information"
+msgstr "Información de diseño"
+
+#. module: rent
+#: field:rent.rent.estimate,estimate_years:0
+#: field:rent.rent.main.estimate,estimate_years:0
+msgid "Years for reinv."
+msgstr "Años p/rec"
+
+#. module: rent
+#: model:ir.actions.act_window,name:rent.action_building_form
+msgid "building"
+msgstr "Edificio"
+
+#. module: rent
+#: view:rent.rent:0
+#: field:rent.rent,rent_modif_ref:0
+msgid "Modifications"
+msgstr "Modificaciones"
+
+#. module: rent
+#: help:rent.floor.local,local_rented:0
+msgid "Check if the local is rented"
+msgstr "Seleccionado si el local está alquilado."
+
+#. module: rent
+#: view:rent.rent.group:0
+msgid "Rent Group List"
+msgstr "Lista de grupos"
+
+#. module: rent
+#: help:rent.building,building_elevators_number:0
+msgid "If checkbox of elevators is no selected this will be 0"
+msgstr "Si el elevador no está seleccionado, siempre será 0"
+
+#. module: rent
+#: sql_constraint:rent.floor.parking:0
+msgid "The width for the parking cannot be 0!"
+msgstr "El ancho del parqueo no puede ser de 0 metros!"
+
+#. module: rent
+#: field:rent.floor.local,local_number:0
+msgid "# Local"
+msgstr "# Local"
+
+#. module: rent
+#: model:ir.ui.menu,name:rent.rent_client_menu
+msgid "Clients"
+msgstr "Clientes"
+
+#. module: rent
+#: field:rent.invoice.rent,invouce_residual:0
+msgid "Residual"
+msgstr "Saldo Pendiente"
+
+#. module: rent
+#: view:rent.contract:0
+#: selection:rent.rent,rent_type:0
+msgid "Contract"
+msgstr "Contratos"
+
+#. module: rent
+#: view:rent.rent:0
+#: selection:rent.rent,state:0
+msgid "Active"
+msgstr "Activo"
+
+#. module: rent
+#: field:rent.rent,rent_ending_motif_desc:0
+msgid "Ending Motif Description"
+msgstr "Descripción de motivo de fin"
+
+#. module: rent
+#: model:ir.ui.menu,name:rent.rent_client_submenu
+#: field:rent.rent,rent_rent_client_id:0
+msgid "Client"
+msgstr "Cliente"
+
+#. module: rent
+#: help:rent.rent,rent_years:0
+msgid "Check if you want to calculate a rent for locals"
+msgstr "Selecciona si quiere calcular el alquiler"
+
+#. module: rent
+#: field:rent.rent,rent_main_rise_year2:0
+#: field:rent.rent,rent_main_rise_year2d:0
+#: field:rent.rent,rent_rise_year2d:0
+msgid "Year 2  $"
+msgstr "Año 2"
+
+#. module: rent
+#: field:rent.rent,rent_main_show_us_eq:0
+#: field:rent.rent,rent_show_us_eq:0
+msgid "Check USD Currency Equivalent"
+msgstr "Ver equivalencia en otra moneda"
+
+#. module: rent
+#: model:ir.model,name:rent.model_rent_invoice_rent
+msgid "rent.invoice.rent"
+msgstr "rent.invoice.rent"
+
+#. module: rent
+#: view:rent.make.group:0
+msgid "Create Group"
+msgstr "Create Group"
+
+#. module: rent
+#: field:rent.floor,floor_thickness:0
+msgid "Thickness"
+msgstr "Grosor"
+
+#. module: rent
+#: view:rent.contract:0
+msgid "General Data"
+msgstr "Datos Generales"
+
+#. module: rent
+#: model:ir.model,name:rent.model_rent_floor
+msgid "rent.floor"
+msgstr "rent.floor"
+
+#. module: rent
+#: report:contract_report:0
+msgid "____________________________"
+msgstr "____________________________"
+
+#. module: rent
+#: field:rent.building,building_code:0
+msgid "Code"
+msgstr "Código"
+
+#. module: rent
+#: help:account.invoice.line,invoice_type:0
+msgid "Select one of this to determine the type of invoice to create"
+msgstr "Seleccione una de estas para determinar el tipo de factura a crear"
+
+#. module: rent
+#: model:ir.actions.act_window,name:rent.action_estate_form_view
+#: view:rent.estate:0
+msgid "estate Detail"
+msgstr "Detalle de Terreno"
+
+#. module: rent
+#: field:rent.rent,rent_main_total:0
+#: field:rent.rent,rent_total:0
+#: field:rent.rent,rent_total_us:0
+msgid "Total Paid"
+msgstr "Valor del mantenimiento"
+
+#. module: rent
+#: field:rent.rent,rent_rise_year3:0
+msgid "Year 3 $"
+msgstr "Año 3"
+
+#. module: rent
+#: view:rent.local.floor:0
+msgid "Location in floor list"
+msgstr "Localizaciones del local en pisos"
+
+#. module: rent
+#: field:rent.contract.clause.rel,sequence:0
+msgid "Sequence"
+msgstr "Sequencia"
+
+#. module: rent
+#: field:rent.rent,rent_estimates_ids:0
+#: field:rent.rent,rent_main_estimates_ids:0
+#: view:rent.rent.anual.value:0
+#: view:rent.rent.estimate:0
+#: view:rent.rent.main.estimate.:0
+msgid "Estimates"
+msgstr "Estimaciones"
+
+#. module: rent
+#: field:rent.rent.anual.value,anual_value_date:0
+msgid "Period"
+msgstr "Periodo"
+
+#. module: rent
+#: view:rent.contract:0
+#: view:rent.contract.clause:0
+msgid "Ending Date: %(ed)s"
+msgstr "Fecha de Fin: %(ed)s"
+
+#. module: rent
+#: view:rent.building:0
+#: view:rent.estate:0
+#: view:rent.floor:0
+#: view:rent.floor.local:0
+#: view:rent.floor.parking:0
+#: view:rent.local.floor:0
+#: view:rent.rent:0
+msgid "General Information"
+msgstr "Información General"
+
+#. module: rent
+#: field:rent.floor.parking,parking_number:0
+msgid "# Parking"
+msgstr "# Parqueo"
+
+#. module: rent
+#: model:ir.actions.act_window,name:rent.action_floor_form
+#: model:ir.ui.menu,name:rent.rent_floor_submenu
+#: view:rent.building:0
+#: field:rent.building,building_floors_ids:0
+msgid "Floors"
+msgstr "Pisos"
+
+#. module: rent
+#: sql_constraint:rent.local.floor:0
+msgid "The area for the local at this floor cannot be 0!"
+msgstr "El área para el local en este piso no puede ser de 0!"
+
+#. module: rent
+#: field:rent.invoice.rent,invoice_id:0
+msgid "Invoice"
+msgstr "Factura"
+
+#. module: rent
+#: model:ir.actions.act_window,name:rent.action_parking_form
+#: model:ir.ui.menu,name:rent.rent_parking_submenu
+#: view:rent.floor:0
+#: field:rent.floor,floor_parking_ids:0
+#: selection:rent.rent,rent_related_real:0
+#: field:rent.rent,rent_rent_parking_id:0
+msgid "Parking"
+msgstr "Parqueo"
+
+#. module: rent
+#: view:rent.make.group:0
+msgid "Cancel"
+msgstr "Cancelar"
+
+#. module: rent
+#: model:ir.actions.act_window,name:rent.action_contract_clause_form_view
+#: view:rent.contract.clause:0
+msgid "Clauses"
+msgstr "Cláusulas"
+
+#. module: rent
+#: field:rent.estate,estate_number:0
+msgid "# estate"
+msgstr "# Terreno"
+
+#. module: rent
+#: view:rent.rent.group:0
+msgid "Details"
+msgstr "Details"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "Information"
+msgstr "Información"
+
+#. module: rent
+#: view:rent.rent.anual.value:0
+#: view:rent.rent.estimate:0
+#: view:rent.rent.main.estimate.:0
+msgid "Calculos"
+msgstr "Cálculos"
+
+#. module: rent
+#: field:rent.canton,code:0
+msgid "Canton Code"
+msgstr "Código Cantón"
+
+#. module: rent
+#: field:rent.floor.parking,parking_large:0
+msgid "Large Meters"
+msgstr "Metros de profundidad"
+
+#. module: rent
+#: view:rent.contract:0
+#: view:rent.contract.clause:0
+msgid "Client name : %(cli)s"
+msgstr "Nombre de cliente : %(cli)s"
+
+#. module: rent
+#: selection:rent.rent.estimate,estimate_state:0
+#: selection:rent.rent.main.estimate,estimate_state:0
+msgid "Min"
+msgstr "Mínimo"
+
+#. module: rent
+#: view:rent.make.group:0
+msgid "Do you really want to create the group ?"
+msgstr "Do you really want to create the group ?"
+
+#. module: rent
+#: view:rent.building:0
+msgid "Building Details"
+msgstr "Detalle del edificio"
+
+#. module: rent
+#: sql_constraint:rent.building:0
+msgid "The area for the building cannot be 0!"
+msgstr "El área del edificio no puede ser 0!"
+
+#. module: rent
+#: help:rent.estate,estate_rented:0
+msgid "Checked if the local is rented"
+msgstr "Seleccionado si el local está alquilado"
+
+#. module: rent
+#: view:rent.estate:0
+msgid "Owners"
+msgstr "Dueños"
+
+#. module: rent
+#: sql_constraint:rent.estate:0
+msgid "The area for the estate cannot be 0!"
+msgstr "The area for the estate cannot be 0!"
+
+#. module: rent
+#: model:ir.model,name:rent.model_account_invoice_line
+msgid "Invoice Line"
+msgstr "Línea de factura"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "Facturas"
+msgstr "Facturas"
+
+#. module: rent
+#: field:rent.rent,rent_amountd_per_sqr:0
+msgid "Amount m2 $"
+msgstr "Precio m2"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "Calculations"
+msgstr "Cálculos"
+
+#. module: rent
+#: field:rent.rent.estimate,estimate_performance:0
+#: field:rent.rent.main.estimate,estimate_performance:0
+msgid "Performance(%)"
+msgstr "ROI(%)"
+
+#. module: rent
+#: view:rent.floor.parking:0
+msgid "Area Specifications Information"
+msgstr "Especificaciones del área"
+
+#. module: rent
+#: selection:account.invoice.line,invoice_type:0
+msgid "Product"
+msgstr "Producto"
+
+#. module: rent
+#: field:rent.rent,rent_related_real:0
+msgid "Type of Real Estate"
+msgstr "Tipo de Bien Inmueble"
+
+#. module: rent
+#: field:rent.invoice.log,log_desc:0
+msgid "Description"
+msgstr "Descripción"
+
+#. module: rent
+#: help:rent.rent,rent_invoiced_day:0
+#: help:rent.rent,rent_main_invoiced_day:0
+msgid "Indicates de how many days before of the charge day will create the invoice"
+msgstr "Indica cuántos días antes del día de cobro se creará la factura"
+
+#. module: rent
+#: model:ir.model,name:rent.model_rent_contract_template
+msgid "rent.contract.template"
+msgstr "rent.contract.template"
+
+#. module: rent
+#: report:contract_report:0
+msgid "-"
+msgstr "-"
+
+#. module: rent
+#: field:rent.local.floor,local_local_floor_id:0
+msgid "Local#"
+msgstr "Local#"
+
+#. module: rent
+#: sql_constraint:rent.building:0
+msgid "You can not have two buildings with the same code!"
+msgstr "No puede tener dos edificios con el mismo código!"
+
+#. module: rent
+#: view:rent.building:0
+#: view:rent.floor.local:0
+msgid "Photos"
+msgstr "Fotos"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "Finished"
+msgstr "Terminado"
+
+#. module: rent
+#: field:rent.floor.local,local_rise_historic_ids:0
+#: field:rent.rent,rent_historic_ids:0
+#: field:rent.rent,rent_main_historic_ids:0
+msgid "Historic"
+msgstr "Historico"
+
+#. module: rent
+#: field:rent.rent,rent_rent_account_id:0
+#: field:rent.rent,rent_rent_main_account_id:0
+msgid "Income Account"
+msgstr "Cuenta de cobros"
+
+#. module: rent
+#: help:rent.building,building_elevator:0
+#: help:rent.building,building_stairs:0
+msgid "Select if the building has at least one elevator"
+msgstr "Seleccione si el edificio tiene al menos 1 año y algo."
+
+#. module: rent
+#: view:rent.floor.local:0
+msgid "Search Local"
+msgstr "Buscar local"
+
+#. module: rent
+#: field:rent.local.floor,local_floor_value:0
+msgid "Total Value"
+msgstr "Precio Total"
+
+#. module: rent
+#: field:rent.building,building_date_construction:0
+msgid "Construction Date"
+msgstr "Fecha de construcción"
+
+#. module: rent
+#: field:rent.contract.clause.rel,rent_contract_clause_id:0
+#: field:rent.contract.clause.rel,rent_contract_id:0
+msgid "Contract Reference"
+msgstr "Referencia de Contrato"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "Contract Termination"
+msgstr "Terminación de Contrato"
+
+#. module: rent
+#: field:rent.canton,name:0
+msgid "Canton Name"
+msgstr "Nombre Cantón"
+
+#. module: rent
+#: field:rent.building,building_elevators_number:0
+msgid "Elvetators number"
+msgstr "Número de Elevadores"
+
+#. module: rent
+#: selection:rent.rent.estimate,estimate_state:0
+#: selection:rent.rent.main.estimate,estimate_state:0
+msgid "Used"
+msgstr "Utilizado"
+
+#. module: rent
+#: model:ir.ui.menu,name:rent.rent_rent_group_submenu
+msgid "Rent group"
+msgstr "Grupo de Alquieres"
+
+#. module: rent
+#: model:ir.actions.act_window,name:rent.action_rent_form_view
+msgid "Rent Details"
+msgstr "Detalles de Alquiler"
+
+#. module: rent
+#: field:rent.rent,rent_invoice_ids:0
+#: field:rent.rent,rent_main_invoice_ids:0
+msgid "Rent Invoices"
+msgstr "Facturas del Alquiler"
+
+#. module: rent
+#: model:ir.model,name:rent.model_rent_invoice_log
+msgid "rent.invoice.log"
+msgstr "rent.invoice.log"
+
+#. module: rent
+#: field:rent.rent,rent_main_company_id:0
+msgid "Supplier Company"
+msgstr "Compañía Proveedora"
+
+#. module: rent
+#: view:rent.estate:0
+msgid "Search Estate"
+msgstr "Buscar Terreno"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "Rent Detail"
+msgstr "Detalles de Aquileres"
+
+#. module: rent
+#: view:rent.building:0
+#: selection:rent.rent,rent_related_real:0
+msgid "Estates"
+msgstr "Terrenos"
+
+#. module: rent
+#: view:rent.floor.local:0
+#: view:rent.local.floor:0
+msgid "Local Details"
+msgstr "Detalle del Local"
+
+#. module: rent
+#: model:ir.actions.act_window,help:rent.action_building_form
+msgid "Manage every parking that belongs to a determined estate. This is the main view where you can create a building record\n"
+"			but you can still do it from the estate form"
+msgstr "Administre los edificios que pertenecen a un terreno determinado. Esta es la principal vista donde se pueden crear registros de edificios\n"
+"			pero de igual forma se puede hacer desde el formulario del terreno"
+
+#. module: rent
+#: code:addons/rent/rent.py:907
+#, python-format
+msgid "Error !"
+msgstr "Error !"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "Approve"
+msgstr "Aprobado"
+
+#. module: rent
+#: field:rent.local.floor,local_floor_side:0
+msgid "Side"
+msgstr "Largo"
+
+#. module: rent
+#: model:ir.actions.act_window,help:rent.action_parking_form
+msgid "Manage every parking that belongs to a determined floor. This is the main view where you can create a parking record\n"
+"			but you can still do it from the floor form"
+msgstr "Administre cada parqueo que pertenece a un determinado piso. Esta es la principal vista donde puede crearlos pero de igual forma\n"
+"			puede hacerlo desde el formulario del piso"
+
+#. module: rent
+#: sql_constraint:rent.floor.parking:0
+msgid "You can not repeat the parking number at the same floor!"
+msgstr "No puede repetir el número del parqueo en el mismo piso!"
+
+#. module: rent
+#: field:rent.rent,rent_modif_date:0
+msgid "Modification Date"
+msgstr "Modification Date"
+
+#. module: rent
+#: field:rent.rent,rent_modif:0
+msgid "Contract reference"
+msgstr "Referencia de Contrato"
+
+#. module: rent
+#: view:rent.contract:0
+#: view:rent.contract.clause:0
+msgid "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"
+msgstr "Use cualquier código, empleelos para indicar donde debería datos especiales en clientes, fechas, otros"
+
+#. module: rent
+#: view:rent.contract.clause.rel:0
+msgid "Clausula de Contrato"
+msgstr "Cláusula de Contrato"
+
+#. module: rent
+#: model:ir.ui.menu,name:rent.rent_estate_submenu
+#: field:rent.rent,rent_rent_estate_id:0
+msgid "Estate"
+msgstr "Terreno"
+
+#. module: rent
+#: model:ir.actions.act_window,help:rent.action_local_form_view
+msgid "Manage every local that belongs to a determined floor. This is the only view where you can create a floor record"
+msgstr "Administre cada local que pertenece a uno o más pisos de un determinado edificio. Ésta es la única ventana donde usted puede crear un registro de Local"
+
+#. module: rent
+#: model:ir.model,name:rent.model_rent_building
+msgid "rent.building"
+msgstr "rent.building"
+
+#. module: rent
+#: view:rent.floor:0
+msgid "Search Floor"
+msgstr "Buscar Piso"
+
+#. module: rent
+#: help:rent.floor,floor_value:0
+msgid "This value is calculated using the estate and building area and values"
+msgstr "Este valor es calculado usando el área y valor del terreno y edificios"
+
+#. module: rent
+#: report:contract_report:0
+msgid "Por"
+msgstr "Por"
+
+#. module: rent
+#: view:rent.floor.parking:0
+msgid "Parking Details"
+msgstr "Detalles Parqueo"
+
+#. module: rent
+#: selection:rent.rent,rent_ending_motif:0
+msgid "Contract Expiration"
+msgstr "Vencimiento de Contrato"
+
+#. module: rent
+#: view:rent.contract:0
+#: view:rent.contract.clause:0
+msgid "Company name: %(com)s"
+msgstr "Nombre de Compañía: %(com)s"
+
+#. module: rent
+#: field:account.invoice.line,invoice_rent_id:0
+msgid "Rent id"
+msgstr "Contrato"
+
+#. module: rent
+#: view:rent.floor.parking:0
+msgid "Parking List"
+msgstr "Lista de Parqueos"
+
+#. module: rent
+#: selection:account.invoice.line,invoice_type:0
+#: model:ir.module.module,shortdesc:rent.module_meta_information
+#: model:ir.ui.menu,name:rent.rent_manager
+#: model:ir.ui.menu,name:rent.rent_rent_menu
+#: field:rent.invoice.rent,invoice_rent_id:0
+#: selection:rent.invoice.rent,invoice_type:0
+#: view:rent.rent:0
+#: selection:rent.rent.anual.value,anual_value_type:0
+#: field:rent.rent.estimate,estimate_rent_id:0
+#: field:rent.rent.main.estimate,estimate_maintenance_id:0
+msgid "Rent"
+msgstr "Alquiler"
+
+#. module: rent
+#: model:ir.model,name:rent.model_rent_contract
+msgid "rent.contract"
+msgstr "rent.contract"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "Real Estate Information"
+msgstr "Información Bienes Inmuebles"
+
+#. module: rent
+#: view:rent.floor.parking:0
+msgid "Search Parking"
+msgstr "Buscar Parqueo"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "Accounting"
+msgstr "Facturación"
+
+#. module: rent
+#: field:rent.rent,rent_main_inc:0
+msgid "Include Maintenance Rent"
+msgstr "Incluir cobro de mantenimiento"
+
+#. module: rent
+#: field:rent.rent,rent_include_water:0
+msgid "Include water payment"
+msgstr "Incluir pago de agua"
+
+#. module: rent
+#: view:rent.rent:0
+msgid "Create new Group"
+msgstr "Crear Nuevo Grupo"
+
+#. module: rent
+#: view:rent.local.floor:0
+msgid "Floor Specifications"
+msgstr "Especificaciones de Piso"
+
+#. module: rent
+#: view:rent.contract:0
+#: view:rent.contract.clause:0
+msgid "Total paid: %(tot)s"
+msgstr "Total pago: %(tot)s"
+
+#. module: rent
+#: model:ir.ui.menu,name:rent.rent_local_submenu
+#: selection:rent.rent,rent_related_real:0
+msgid "Locals"
+msgstr "Locales"
+
+#. module: rent
+#: model:ir.model,name:rent.model_rent_canton_district
+msgid "District located in the canton"
+msgstr "Distrito localizado en el cantón"
+

=== removed file 'rent/i18n/es_CR.po'
--- rent/i18n/es_CR.po	2011-11-10 02:23:06 +0000
+++ rent/i18n/es_CR.po	1970-01-01 00:00:00 +0000
@@ -1,1635 +0,0 @@
-# Translation of OpenERP Server.
-# This file contains the translation of the following modules:
-#	* rent
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: OpenERP Server 6.0.2\n"
-"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
-"POT-Creation-Date: 2011-11-01 09:52+0000\n"
-"PO-Revision-Date: 2011-11-01 09:52+0000\n"
-"Last-Translator: <>\n"
-"Language-Team: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: \n"
-"Plural-Forms: \n"
-
-#. module: rent
-#: help:rent.rent,rent_charge_day:0
-#: help:rent.rent,rent_main_charge_day:0
-msgid "Indica el dia del mes para realizar los cobros del alquiler."
-msgstr "Indica el día del mes para realizar los cobros del alquiler."
-
-#. module: rent
-#: view:rent.building:0
-msgid "Machinery"
-msgstr "Maquinaria"
-
-#. module: rent
-#: field:rent.building,building_stairs_number:0
-msgid "Stairs number"
-msgstr "Número de Escaleras"
-
-#. module: rent
-#: model:ir.model,name:rent.model_rent_rent_main_estimate
-msgid "rent.rent.main.estimate"
-msgstr "rent.rent.main.estimate"
-
-#. module: rent
-#: field:rent.rent,rent_rise_year3:0
-msgid "Year 3 $"
-msgstr "Año 3"
-
-#. module: rent
-#: help:rent.rent.anual.value,anual_value_prev_value:0
-#: help:rent.rent.anual.value,anual_value_value:0
-msgid "This value was taken from the record of rent at the indicated date"
-msgstr "Este valor fue tomado del registro de alquiler en la fecha indicada"
-
-#. module: rent
-#: field:rent.floor.parking,parking_width:0
-msgid "Width Meters"
-msgstr "Metros de frente"
-
-#. module: rent
-#: view:rent.building:0
-#: view:rent.estate:0
-#: view:rent.floor:0
-#: view:rent.rent:0
-msgid "Group By..."
-msgstr "Agrupado por..."
-
-#. module: rent
-#: view:rent.rent.anual.value:0
-msgid "Value History"
-msgstr "Historial de Valor"
-
-#. module: rent
-#: field:rent.building,building_asset_id:0
-msgid "Asset"
-msgstr "Asset"
-
-#. module: rent
-#: selection:rent.rent.estimate,estimate_state:0
-#: selection:rent.rent.main.estimate,estimate_state:0
-msgid "Recommend"
-msgstr "Recomendado"
-
-#. module: rent
-#: field:rent.rent,rent_ending_motif:0
-msgid "Ending Motif"
-msgstr "Motivo de finalización"
-
-#. module: rent
-#: model:ir.model,name:rent.model_rent_contract_clause
-msgid "rent.contract.clause"
-msgstr "rent.contract.clause"
-
-#. module: rent
-#: view:rent.rent:0
-msgid "Negotiation Information"
-msgstr "Información para Negociación"
-
-#. module: rent
-#: model:ir.actions.act_window,name:rent.action_local_floor_form_view
-#: model:ir.actions.act_window,name:rent.action_local_form_view
-msgid "Local Detail"
-msgstr "Detalle del local"
-
-#. module: rent
-#: help:rent.contract.clause,clause_is_basic:0
-msgid "Check if the clause should allways appear on every contract you create"
-msgstr "Seleccione si la Cláusula debería aparecer siempre en cada contrato que cree"
-
-#. module: rent
-#: view:rent.contract.clause:0
-#: field:rent.contract.clause,clause_body:0
-msgid "Body"
-msgstr "Cuerpo"
-
-#. module: rent
-#: view:rent.rent:0
-msgid "Finish"
-msgstr "Finalizado"
-
-#. module: rent
-#: model:ir.actions.act_window,help:rent.action_estate_form_view
-msgid "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 \n"
-"			a building. Here yo can set the main data for the estate and also create the buildings that belongs to it."
-msgstr "Administres los terrenos que la compañía posee, para que se encuentren disponibles en el sistema. Un terreno es una porción de tierra comúnmente utilizada para la construcción, en algunos casos puede poseer una estructura sobre este, por ejemplo\n"
-"			un edificio. Aquí se puede indicar los datos principales del terreno y crear los edificios de este."
-
-#. module: rent
-#: field:rent.rent,rent_main_rise_year3:0
-#: field:rent.rent,rent_main_rise_year3d:0
-#: field:rent.rent,rent_rise_year3d:0
-msgid "Year 3  $"
-msgstr "Año 3"
-
-#. module: rent
-#: report:contract_report:0
-msgid "la"
-msgstr "la"
-
-#. module: rent
-#: field:rent.building,building_company_id:0
-msgid "Company"
-msgstr "Compañía"
-
-#. module: rent
-#: sql_constraint:rent.floor.parking:0
-#: sql_constraint:rent.local.floor:0
-msgid "The side for the local cannot be 0!"
-msgstr "The side for the local cannot be 0!"
-
-#. module: rent
-#: field:rent.invoice.rent,invoice_number:0
-msgid "Invoice Number"
-msgstr "Factura #"
-
-#. module: rent
-#: view:rent.contract:0
-#: view:rent.contract.clause:0
-msgid "Starting Date: %(sd)s"
-msgstr "Fecha de Inicio: %(sd)s"
-
-#. module: rent
-#: field:rent.rent.estimate,estimate_dollars:0
-#: field:rent.rent.main.estimate,estimate_dollars:0
-msgid "s / m2"
-msgstr "$ / m2"
-
-#. module: rent
-#: view:rent.building:0
-msgid "Search Building"
-msgstr "Buscar Edificio"
-
-#. module: rent
-#: sql_constraint:rent.floor.parking:0
-msgid "The huella for the parking cannot be 0!"
-msgstr "La Huella para el parqueo no puede ser de 0 metros!"
-
-#. module: rent
-#: field:rent.local.floor,local_floor_front:0
-msgid "Front"
-msgstr "Frente"
-
-#. module: rent
-#: field:rent.floor.local,local_water_meter_number:0
-msgid "Water Meter"
-msgstr "Medidor de agua"
-
-#. module: rent
-#: selection:rent.rent.estimate,estimate_state:0
-#: selection:rent.rent.main.estimate,estimate_state:0
-msgid "Used"
-msgstr "Utilizado"
-
-#. module: rent
-#: view:rent.contract:0
-#: view:rent.contract.clause:0
-msgid "Legend"
-msgstr "Leyenda"
-
-#. module: rent
-#: help:rent.rent,rent_grace_period:0
-#: help:rent.rent,rent_main_grace_period:0
-msgid "Indicates de how many days after the charge day will allow to paid an invoice without Interest for delay"
-msgstr "Indica cuanto días después de la fecha de cobro se permitirá el pago de la factura sin aplicar intereses por pago tardío"
-
-#. module: rent
-#: model:ir.ui.menu,name:rent.rent_building_submenu
-#: field:rent.floor,floor_building_id:0
-#: field:rent.floor.local,local_building:0
-#: field:rent.floor.parking,parking_floor_building:0
-#: field:rent.local.floor,local_floor_building:0
-msgid "Building"
-msgstr "Edificio"
-
-#. module: rent
-#: view:rent.rent:0
-msgid "USD Currency Equivalence"
-msgstr "Equivalencia en otra moneda"
-
-#. module: rent
-#: view:rent.rent:0
-msgid "  "
-msgstr "  "
-
-#. module: rent
-#: sql_constraint:rent.floor.parking:0
-msgid "The large for the parking cannot be 0!"
-msgstr "The large for the parking cannot be 0!"
-
-#. module: rent
-#: view:rent.building:0
-msgid "Assets"
-msgstr "Activos"
-
-#. module: rent
-#: help:rent.building,building_stairs_number:0
-msgid "If checkbox of stairs is no selected this will be 0"
-msgstr "Si el checkbox no esta seleccionado. Comienza con 0"
-
-#. module: rent
-#: field:rent.local.floor,local_floor_floor_id:0
-msgid "Level"
-msgstr "Piso"
-
-#. module: rent
-#: field:rent.contract,contract_clauses_ids:0
-msgid "Clausulas"
-msgstr "Clausulas"
-
-#. module: rent
-#: view:rent.floor.local:0
-#: field:rent.floor.local,local_notes:0
-msgid "Notes"
-msgstr "Notes"
-
-#. module: rent
-#: model:ir.model,name:rent.model_rent_canton
-msgid "Canton for the State"
-msgstr "Cantón para el estado"
-
-#. module: rent
-#: help:rent.rent.estimate,estimate_performance:0
-#: help:rent.rent.main.estimate,estimate_performance:0
-msgid "This a percentaje number"
-msgstr "Este es un porcentaje"
-
-#. module: rent
-#: view:rent.rent:0
-msgid "Search Rents"
-msgstr "Buscar Alquileres"
-
-#. module: rent
-#: model:ir.actions.act_window,help:rent.action_local_form_view
-msgid "Manage every local that belongs to a determined floor. This is the only view where you can create a floor record"
-msgstr "Administre cada local que pertenece a uno o más pisos de un determinado edificio. Ésta es la única ventana donde usted puede crear un registro de Local"
-
-#. module: rent
-#: field:rent.rent.estimate,estimate_amountc:0
-#: field:rent.rent.main.estimate,estimate_amountc:0
-msgid "Amount"
-msgstr "Monto ¢"
-
-#. module: rent
-#: help:rent.floor,complete_name:0
-msgid "This name uses the code of the building and the floor name"
-msgstr "Este nombre usa el código del edificio y nombre del piso"
-
-#. module: rent
-#: help:rent.floor,floor_durability:0
-msgid "Indicate the durability in years"
-msgstr "Indique la durabilidad en años"
-
-#. module: rent
-#: field:rent.floor.local,local_local_by_floor_ids:0
-msgid "Local floors"
-msgstr "Pisos del local"
-
-#. module: rent
-#: model:ir.actions.report.xml,name:rent.rent_contract_report
-msgid "Print Contract"
-msgstr "Imprimir Contrato"
-
-#. module: rent
-#: field:rent.contract,contract_rent_id:0
-msgid "Rent Reference"
-msgstr "Alquiler Ref."
-
-#. module: rent
-#: field:rent.canton.district,code:0
-msgid "Distric Code"
-msgstr "Código del Distrito"
-
-#. module: rent
-#: view:rent.local.floor:0
-msgid "Total"
-msgstr "Total"
-
-#. module: rent
-#: model:ir.model,name:rent.model_rent_contract_clause_rel
-msgid "rent.contract.clause.rel"
-msgstr "rent.contract.clause.rel"
-
-#. module: rent
-#: field:rent.rent,rent_end_date:0
-#: field:rent.rent,rent_main_end_date:0
-msgid "Ending Date"
-msgstr "Fecha de finalización"
-
-#. module: rent
-#: model:ir.ui.menu,name:rent.rent_rent_submenu
-msgid "Rents"
-msgstr "Alquileres"
-
-#. module: rent
-#: field:rent.contract,name:0
-#: field:rent.contract.clause,clause_code:0
-msgid "Reference"
-msgstr "Referencia"
-
-#. module: rent
-#: field:rent.floor.local,local_light_meter_number:0
-msgid "Electric Meter"
-msgstr "Medidor de Luz"
-
-#. module: rent
-#: view:rent.contract.clause:0
-msgid "Clause"
-msgstr "Cláusula"
-
-#. module: rent
-#: field:rent.floor,floor_number:0
-#: field:rent.floor.parking,parking_floor_id:0
-msgid "# Floor"
-msgstr "# Piso"
-
-#. module: rent
-#: model:ir.model,name:rent.model_rent_floor_parking
-msgid "rent.floor.parking"
-msgstr "rent.floor.parking"
-
-#. module: rent
-#: model:ir.model,name:rent.model_rent_rent_anual_value
-msgid "rent.rent.anual.value"
-msgstr "rent.rent.anual.value"
-
-#. module: rent
-#: view:rent.contract:0
-msgid "Contrato"
-msgstr "Contrato"
-
-#. module: rent
-#: field:rent.rent,rent_invoiced_day:0
-#: field:rent.rent,rent_main_invoiced_day:0
-msgid "Invoiced Day"
-msgstr "Días de Anticipación"
-
-#. module: rent
-#: field:rent.rent,rent_main_rise:0
-#: field:rent.rent,rent_rise:0
-#: field:rent.rent.anual.value,anual_value_rate:0
-msgid "Anual Rise"
-msgstr "Aumento Anual(%)"
-
-#. module: rent
-#: help:rent.contract.clause,clause_code:0
-msgid "Reference code for the clause, used to create custom contracts"
-msgstr "Referencia al código de la Cláusula, empleado para crear contratos personalizados"
-
-#. module: rent
-#: model:ir.model,name:rent.model_res_partner
-msgid "Partner"
-msgstr "Empresa"
-
-#. module: rent
-#: field:rent.rent,rent_rent_acc_int_id:0
-#: field:rent.rent,rent_rent_main_acc_int_id:0
-msgid "Interest Account"
-msgstr "Cuenta de Intereses."
-
-#. module: rent
-#: field:rent.rent.anual.value,anual_value_rent_id:0
-msgid "Rent reference"
-msgstr "Aquiler Ref."
-
-#. module: rent
-#: help:rent.local.floor,local_floor_floor_id:0
-#: help:rent.local.floor,local_local_floor_id:0
-msgid "Represents the floor on witch its located the local"
-msgstr "Representa el piso en el cual el local esta ubicado"
-
-#. module: rent
-#: field:rent.invoice.rent,invoice_amount:0
-msgid "Amount Total"
-msgstr "Monto total"
-
-#. module: rent
-#: field:rent.contract.clause,clause_subject:0
-msgid "Subject"
-msgstr "Asunto"
-
-#. module: rent
-#: view:rent.estate:0
-#: field:rent.estate,estate_rented:0
-#: view:rent.floor.local:0
-#: field:rent.floor.local,local_rented:0
-#: field:rent.floor.parking,parking_rented:0
-msgid "Rented"
-msgstr "Alquilado"
-
-#. module: rent
-#: sql_constraint:rent.local.floor:0
-msgid "The front for the local cannot be 0!"
-msgstr "El frente del local no puede ser 0 metros!"
-
-#. module: rent
-#: help:rent.floor,floor_number:0
-msgid "Number of the floor in the building, starts from 0 (Basement)"
-msgstr "Número del piso en el edificio"
-
-#. module: rent
-#: view:rent.local.floor:0
-msgid "Sqr Meter Total"
-msgstr "Total m2"
-
-#. module: rent
-#: model:ir.actions.act_window,name:rent.action_canton_district
-#: view:rent.canton.district:0
-#: field:res.partner,client_district:0
-#: field:res.partner.address,district_id:0
-msgid "District"
-msgstr "Distrito"
-
-#. module: rent
-#: selection:rent.rent,rent_type:0
-msgid "Adendum"
-msgstr "Adendum"
-
-#. module: rent
-#: sql_constraint:rent.estate:0
-msgid "You can not have two estates with the same number!"
-msgstr "No puede ingresar dos terrenos con el mismo número!"
-
-#. module: rent
-#: field:rent.local.floor,local_floor_area:0
-msgid "Area M2"
-msgstr "Área en m2"
-
-#. module: rent
-#: report:contract_report:0
-msgid "Por el"
-msgstr "Por el"
-
-#. module: rent
-#: sql_constraint:rent.local.floor:0
-msgid "You can not repeat the local at the same floor!"
-msgstr "No se puede repetir el mismo local en el mismo piso!"
-
-#. module: rent
-#: view:rent.rent:0
-#: field:rent.rent,state:0
-#: field:rent.rent.estimate,estimate_state:0
-#: field:rent.rent.main.estimate,estimate_state:0
-msgid "Status"
-msgstr "Estado"
-
-#. module: rent
-#: view:rent.estate:0
-#: view:rent.floor.local:0
-#: view:rent.floor.parking:0
-msgid "Not Rented"
-msgstr "No alquilado"
-
-#. module: rent
-#: field:rent.invoice.rent,invoice_state:0
-msgid "State"
-msgstr "Estado"
-
-#. module: rent
-#: field:rent.rent.anual.value,anual_value_prev_value:0
-msgid "Prev. Value"
-msgstr "Valor previo"
-
-#. module: rent
-#: view:rent.estate:0
-#: field:rent.estate,estate_location_id:0
-msgid "Location"
-msgstr "Localización"
-
-#. module: rent
-#: field:rent.rent,rent_main_performance:0
-#: field:rent.rent,rent_performance:0
-msgid "Performance"
-msgstr "Rendimiento"
-
-#. module: rent
-#: field:account.invoice.line,invoice_type:0
-#: field:rent.invoice.rent,invoice_type:0
-#: view:rent.rent:0
-#: field:rent.rent,rent_type:0
-#: field:rent.rent.anual.value,anual_value_type:0
-msgid "Type"
-msgstr "Tipo"
-
-#. module: rent
-#: view:rent.building:0
-#: view:rent.floor:0
-msgid "Floor Details"
-msgstr "Detalle del Piso"
-
-#. module: rent
-#: model:ir.model,name:rent.model_rent_estate
-msgid "rent.estate"
-msgstr "rent.estate"
-
-#. module: rent
-#: field:rent.building,name:0
-#: field:rent.floor,complete_name:0
-#: field:rent.rent,name:0
-msgid "Name"
-msgstr "Nombre"
-
-#. module: rent
-#: help:rent.rent,rent_rent_acc_int_id:0
-#: help:rent.rent,rent_rent_main_acc_int_id:0
-msgid "This account will be used for invoices instead of the default one to value expenses for the current rent"
-msgstr "Esta cuenta será usada para facturas en lugar de la defecto para el alquiler"
-
-#. module: rent
-#: view:rent.estate:0
-#: field:rent.estate,estate_buildings_ids:0
-msgid "Buildings"
-msgstr "Edificios"
-
-#. module: rent
-#: code:addons/rent/rent.py:747
-#, python-format
-msgid "Error !"
-msgstr "Error !"
-
-#. module: rent
-#: code:addons/rent/rent.py:748
-#, python-format
-msgid "There is no purchase journal defined for this company: \"%s\" (id:%d)"
-msgstr "No existe un diario de compras para esta compañía: \"%s\" (id:%d)"
-
-#. module: rent
-#: field:rent.rent,rent_rent_local_id:0
-msgid "Local"
-msgstr "Local"
-
-#. module: rent
-#: model:ir.model,name:rent.model_rent_local_floor
-msgid "rent.local.floor"
-msgstr "rent.local.floor"
-
-#. module: rent
-#: model:ir.actions.act_window,help:rent.action_canton
-msgid "If you are working on the Costa Rican market, you can manage the different Canton you are working on from here. Each canton is attached to one province."
-msgstr "Si está trabajando en Costa Rica, puede manejar diferentes cantones en los que se este trabajando. Cada cantón está relacionado con una provincia."
-
-#. module: rent
-#: field:rent.floor.local,local_huella:0
-#: field:rent.floor.parking,parking_huella:0
-msgid "Huella"
-msgstr "Huella"
-
-#. module: rent
-#: selection:rent.rent,state:0
-msgid "Inactive"
-msgstr "Inactivo"
-
-#. module: rent
-#: field:rent.rent.estimate,estimate_amountd:0
-#: field:rent.rent.main.estimate,estimate_amountd:0
-msgid "Amount $"
-msgstr "Monto $"
-
-#. module: rent
-#: model:ir.model,name:rent.model_rent_rent_estimate
-msgid "rent.rent.estimate"
-msgstr "rent.rent.estimate"
-
-#. module: rent
-#: field:rent.building,building_stairs:0
-msgid "Stairs"
-msgstr "Escaleras"
-
-#. module: rent
-#: field:rent.rent,rent_main_start_date:0
-#: field:rent.rent,rent_start_date:0
-msgid "Starting Date"
-msgstr "Fecha de Inicio"
-
-#. module: rent
-#: model:ir.actions.act_window,name:rent.action_clause_by_contract_form_view
-msgid "Clause by Contract"
-msgstr "Cláusulas por contrato"
-
-#. module: rent
-#: field:rent.rent,rent_charge_day:0
-#: field:rent.rent,rent_main_charge_day:0
-msgid "Charge Day"
-msgstr "Día de Cobro"
-
-#. module: rent
-#: field:rent.canton,state_id:0
-msgid "Province"
-msgstr "Provincia"
-
-#. module: rent
-#: view:rent.estate:0
-#: view:rent.rent:0
-msgid "Compute Values"
-msgstr "Calcular valores"
-
-#. module: rent
-#: field:rent.building,building_estate_id:0
-msgid "estate"
-msgstr "Terreno"
-
-#. module: rent
-#: sql_constraint:rent.floor:0
-msgid "You can not have two floors with the same number at the same building!"
-msgstr "No se pueden tener dos pisos con el mismo número en el mismo edificio!"
-
-#. module: rent
-#: field:rent.floor,floor_value:0
-#: field:rent.floor.parking,parking_value:0
-#: field:rent.rent.anual.value,anual_value_value:0
-msgid "Value"
-msgstr "Valor"
-
-#. module: rent
-#: field:rent.building,building_vrn_per_sqr:0
-#: field:rent.estate,estate_vrn_per_sqr:0
-msgid "VRN Din/M2"
-msgstr "VRN Din/m2"
-
-#. module: rent
-#: report:contract_report:0
-msgid "ARRENDADORA"
-msgstr "ARRENDADORA"
-
-#. module: rent
-#: field:rent.floor.local,local_photo:0
-msgid "Main photo"
-msgstr "Foto Principal"
-
-#. module: rent
-#: model:ir.actions.act_window,name:rent.action_client_form_view
-msgid "Detalles de Clientes"
-msgstr "Detalles de Clientes"
-
-#. module: rent
-#: help:rent.rent,rent_rent_account_id:0
-#: help:rent.rent,rent_rent_main_account_id:0
-msgid "This account will be used for invoices instead of the default one to value sales for the current rent"
-msgstr "Esta cuenta será usada para facturas en lugar de la defecto para el alquiler"
-
-#. module: rent
-#: field:rent.floor,floor_acabado:0
-msgid "Acabado"
-msgstr "Acabado"
-
-#. module: rent
-#: model:ir.model,name:rent.model_res_partner_address
-msgid "Partner Addresses"
-msgstr "Direcciones de empresa"
-
-#. module: rent
-#: field:rent.rent,rent_amount_per_sqr:0
-msgid "Amount per Sqr"
-msgstr "Precio m2"
-
-#. module: rent
-#: selection:rent.rent.estimate,estimate_state:0
-#: selection:rent.rent.main.estimate,estimate_state:0
-msgid "Not Recomended"
-msgstr "No recomendado"
-
-#. module: rent
-#: field:rent.building,building_value:0
-#: field:rent.estate,estate_value:0
-#: field:rent.floor.local,local_area:0
-msgid "VRN Dynamic"
-msgstr "VRN Dinámico"
-
-#. module: rent
-#: view:rent.rent:0
-msgid "Check for Invoices"
-msgstr "Revisar facturación"
-
-#. module: rent
-#: view:rent.floor.local:0
-msgid "Price historic"
-msgstr "Historial de Aumentos"
-
-#. module: rent
-#: field:rent.rent.anual.value,anual_value_local_ids:0
-msgid "Local reference"
-msgstr "Local reference"
-
-#. module: rent
-#: field:rent.rent,rent_amount_base:0
-#: field:rent.rent,rent_amountd_base:0
-#: field:rent.rent,rent_main_amount_base:0
-#: field:rent.rent,rent_main_amountd_base:0
-msgid "Final Price $"
-msgstr "Precio Final"
-
-#. module: rent
-#: field:rent.floor,floor_durability:0
-msgid "Durability"
-msgstr "Durabilidad"
-
-#. module: rent
-#: view:rent.invoice.rent:0
-msgid "Invoices"
-msgstr "Facturas"
-
-#. module: rent
-#: field:rent.building,building_photo:0
-msgid "Photo"
-msgstr "Foto"
-
-#. module: rent
-#: view:rent.contract.clause:0
-msgid "Reference Data"
-msgstr "Datos de referencia"
-
-#. module: rent
-#: model:ir.model,name:rent.model_account_invoice_line
-msgid "Invoice Line"
-msgstr "Línea de factura"
-
-#. module: rent
-#: field:rent.rent,rent_years:0
-msgid "Years"
-msgstr "Años"
-
-#. module: rent
-#: field:rent.rent,currency_id:0
-msgid "Currency"
-msgstr "Moneda"
-
-#. module: rent
-#: model:ir.actions.act_window,help:rent.action_floor_form
-msgid "Manage every floor that belongs to a determined Building. This is the main view where you can create a floor record\n"
-"			but you can still do it from the building form"
-msgstr "Administre cada piso que pertenece a un edificio. Esta es la principal vista donde puede crear el registro de un piso,\n"
-"			pero de igual forma puede crearlos desde el formulario de los edificios"
-
-#. module: rent
-#: model:ir.ui.menu,name:rent.rent_estate_menu
-msgid "Real Estate"
-msgstr "Bienes Inmuebles"
-
-#. module: rent
-#: field:rent.estate,estate_owner_id:0
-msgid "Owner"
-msgstr "Dueño"
-
-#. module: rent
-#: help:rent.canton,code:0
-msgid "The canton code in 4 chars"
-msgstr "El código de canton en 4 caracteres"
-
-#. module: rent
-#: help:rent.floor.parking,parking_rented:0
-msgid "Checked if the parking is rented"
-msgstr "Seleccionado si el parqueo está alquilado"
-
-#. module: rent
-#: field:rent.rent.estimate,estimate_colones:0
-#: field:rent.rent.main.estimate,estimate_colones:0
-msgid "c / m2"
-msgstr "¢ / m2"
-
-#. module: rent
-#: field:rent.rent,rent_grace_period:0
-#: field:rent.rent,rent_main_grace_period:0
-msgid "Grace Period"
-msgstr "Plazo de pago"
-
-#. module: rent
-#: field:rent.canton.district,name:0
-msgid "Distric Name"
-msgstr "Nombre del Distrito"
-
-#. module: rent
-#: field:rent.building,building_capacity:0
-msgid "Capacity"
-msgstr "Capacidad"
-
-#. module: rent
-#: model:ir.actions.act_window,name:rent.action_client_contact_form_view
-msgid "Contacts"
-msgstr "Contactos"
-
-#. module: rent
-#: report:contract_report:0
-msgid "INQUILINO"
-msgstr "INQUILINO"
-
-#. module: rent
-#: field:rent.rent.estimate,estimate_date:0
-#: field:rent.rent.main.estimate,estimate_date:0
-msgid "Fecha"
-msgstr "Fecha"
-
-#. module: rent
-#: field:rent.building,building_elevator:0
-msgid "Elevadores"
-msgstr "Elevadores"
-
-#. module: rent
-#: view:rent.rent:0
-msgid "Detail"
-msgstr "Detalle"
-
-#. module: rent
-#: field:rent.estate,estate_account_id:0
-msgid "Cuenta"
-msgstr "Cuenta"
-
-#. module: rent
-#: model:ir.actions.act_window,name:rent.action_canton
-#: view:rent.canton:0
-#: field:rent.canton.district,canton_id:0
-#: field:res.partner,client_canton:0
-#: field:res.partner.address,canton_id:0
-msgid "Canton"
-msgstr "Cantón"
-
-#. module: rent
-#: view:rent.rent:0
-#: selection:rent.rent,state:0
-msgid "Draft"
-msgstr "Borrador"
-
-#. module: rent
-#: selection:rent.invoice.rent,invoice_type:0
-#: view:rent.rent:0
-#: selection:rent.rent.anual.value,anual_value_type:0
-msgid "Maintenance"
-msgstr "Mantenimiento"
-
-#. module: rent
-#: report:contract_report:0
-msgid "........."
-msgstr "........."
-
-#. module: rent
-#: selection:rent.rent,rent_ending_motif:0
-msgid "No payment eviction"
-msgstr "Desalojo por no pago"
-
-#. module: rent
-#: model:ir.actions.act_window,name:rent.action_rent_anual_value_form_view
-#: model:ir.actions.act_window,name:rent.action_rent_estimate_form_view
-#: model:ir.actions.act_window,name:rent.action_rent_main_estimate_form_view
-msgid "Calculations Details"
-msgstr "Detalles de Cálculos"
-
-#. module: rent
-#: field:rent.building,building_gallery_photo:0
-msgid "Gallery of Photos"
-msgstr "Galería de fotos"
-
-#. module: rent
-#: view:rent.floor.local:0
-msgid "Floor List"
-msgstr "Lista de Pisos"
-
-#. module: rent
-#: selection:rent.rent,rent_ending_motif:0
-msgid "Early Return"
-msgstr "Devolución Anticipada"
-
-#. module: rent
-#: view:rent.rent:0
-msgid "Financial Information"
-msgstr "Información financiera"
-
-#. module: rent
-#: view:rent.rent.estimate:0
-#: view:rent.rent.main.estimate:0
-msgid "Calculations List"
-msgstr "Lista de cálculos"
-
-#. module: rent
-#: help:rent.canton.district,code:0
-msgid "The district code in 4 chars"
-msgstr "Código del distrito en 4 caracteres"
-
-#. module: rent
-#: model:ir.actions.act_window,name:rent.action_contract_form_view
-#: model:ir.ui.menu,name:rent.rent_contract_submenu
-msgid "Contracts"
-msgstr "Contratos"
-
-#. module: rent
-#: model:ir.model,name:rent.model_rent_floor_local
-msgid "rent.floor.local"
-msgstr "rent.floor.local"
-
-#. module: rent
-#: field:rent.building,building_area:0
-#: field:rent.estate,estate_area:0
-#: field:rent.floor,floor_area:0
-#: field:rent.floor.parking,parking_area:0
-#: field:rent.rent,rent_rent_real_area:0
-msgid "Area"
-msgstr "Área"
-
-#. module: rent
-#: field:rent.rent,rent_rise_year2:0
-msgid "Year 2 $"
-msgstr "Año 2"
-
-#. module: rent
-#: view:rent.rent:0
-msgid "Rent List"
-msgstr "Lista de Alquileres"
-
-#. module: rent
-#: field:rent.local.floor,local_sqrmeter_price:0
-msgid "Sqr Meter Price"
-msgstr "Precio m2"
-
-#. module: rent
-#: view:rent.floor:0
-msgid "Edificio"
-msgstr "Edificio"
-
-#. module: rent
-#: view:rent.floor.local:0
-msgid "Local List"
-msgstr "Lista de locales"
-
-#. module: rent
-#: view:rent.floor.local:0
-msgid "Miscelanius Information"
-msgstr "Información miscelanea"
-
-#. module: rent
-#: field:rent.invoice.log,log_date:0
-#: field:rent.invoice.rent,invoice_date:0
-msgid "Date"
-msgstr "Fecha"
-
-#. module: rent
-#: report:contract_report:0
-msgid ":"
-msgstr ":"
-
-#. module: rent
-#: view:rent.rent:0
-msgid "Aumentos"
-msgstr "Aumentos"
-
-#. module: rent
-#: selection:rent.rent,rent_type:0
-msgid "Renovation"
-msgstr "Renovación"
-
-#. module: rent
-#: view:rent.building:0
-#: view:rent.floor:0
-msgid "Design Information"
-msgstr "Información de diseño"
-
-#. module: rent
-#: field:rent.rent.estimate,estimate_years:0
-#: field:rent.rent.main.estimate,estimate_years:0
-msgid "Years for reinv."
-msgstr "Años p/rec"
-
-#. module: rent
-#: model:ir.actions.act_window,name:rent.action_building_form
-msgid "building"
-msgstr "Edificio"
-
-#. module: rent
-#: field:rent.rent,rent_modif_ref:0
-msgid "Modifications"
-msgstr "Modificaciones"
-
-#. module: rent
-#: help:rent.floor.local,local_rented:0
-msgid "Check if the local is rented"
-msgstr "Seleccionado si el local está alquilado."
-
-#. module: rent
-#: help:rent.building,building_elevators_number:0
-msgid "If checkbox of elevators is no selected this will be 0"
-msgstr "Si el elevador no está seleccionado, siempre será 0"
-
-#. module: rent
-#: sql_constraint:rent.floor.parking:0
-msgid "The width for the parking cannot be 0!"
-msgstr "El ancho del parqueo no puede ser de 0 metros!"
-
-#. module: rent
-#: field:rent.floor.local,local_number:0
-msgid "# Local"
-msgstr "# Local"
-
-#. module: rent
-#: model:ir.ui.menu,name:rent.rent_client_menu
-msgid "Clients"
-msgstr "Clientes"
-
-#. module: rent
-#: field:rent.invoice.rent,invouce_residual:0
-msgid "Residual"
-msgstr "Saldo Pendiente"
-
-#. module: rent
-#: view:rent.contract:0
-#: selection:rent.rent,rent_type:0
-msgid "Contract"
-msgstr "Contratos"
-
-#. module: rent
-#: view:rent.rent:0
-#: selection:rent.rent,state:0
-msgid "Active"
-msgstr "Activo"
-
-#. module: rent
-#: field:rent.rent,rent_ending_motif_desc:0
-msgid "Ending Motif Description"
-msgstr "Descripción de motivo de fin"
-
-#. module: rent
-#: model:ir.ui.menu,name:rent.rent_client_submenu
-msgid "Client"
-msgstr "Cliente"
-
-#. module: rent
-#: field:rent.rent,rent_rent_client_id:0
-msgid "Client"
-msgstr "Inquilino"
-
-#. module: rent
-#: help:rent.rent,rent_years:0
-msgid "Check if you want to calculate a rent for locals"
-msgstr "Selecciona si quiere calcular el alquiler"
-
-#. module: rent
-#: field:rent.rent,rent_main_rise_year2:0
-#: field:rent.rent,rent_main_rise_year2d:0
-#: field:rent.rent,rent_rise_year2d:0
-msgid "Year 2  $"
-msgstr "Año 2"
-
-#. module: rent
-#: field:rent.rent,rent_main_show_us_eq:0
-#: field:rent.rent,rent_show_us_eq:0
-msgid "Check USD Currency Equivalent"
-msgstr "Ver equivalencia en otra moneda"
-
-#. module: rent
-#: model:ir.model,name:rent.model_rent_invoice_rent
-msgid "rent.invoice.rent"
-msgstr "rent.invoice.rent"
-
-#. module: rent
-#: field:rent.floor,floor_thickness:0
-msgid "Thickness"
-msgstr "Grosor"
-
-#. module: rent
-#: view:rent.contract:0
-msgid "General Data"
-msgstr "Datos Generales"
-
-#. module: rent
-#: model:ir.model,name:rent.model_rent_floor
-msgid "rent.floor"
-msgstr "rent.floor"
-
-#. module: rent
-#: field:rent.contract.clause,clause_is_basic:0
-msgid "Priority"
-msgstr "Prioridad"
-
-#. module: rent
-#: field:rent.building,building_code:0
-msgid "Code"
-msgstr "Código"
-
-#. module: rent
-#: help:account.invoice.line,invoice_type:0
-msgid "Select one of this to determine the type of invoice to create"
-msgstr "Seleccione una de estas para determinar el tipo de factura a crear"
-
-#. module: rent
-#: model:ir.actions.act_window,name:rent.action_estate_form_view
-#: view:rent.estate:0
-msgid "estate Detail"
-msgstr "Detalle de Terreno"
-
-#. module: rent
-#: field:rent.rent,rent_main_total:0
-#: field:rent.rent,rent_total:0
-#: field:rent.rent,rent_total_us:0
-msgid "Total Paid"
-msgstr "Valor del mantenimiento"
-
-#. module: rent
-#: view:rent.local.floor:0
-msgid "Location in floor list"
-msgstr "Localizaciones del local en pisos"
-
-#. module: rent
-#: field:rent.rent,rent_estimates_ids:0
-#: field:rent.rent,rent_main_estimates_ids:0
-#: view:rent.rent.anual.value:0
-#: view:rent.rent.estimate:0
-#: view:rent.rent.main.estimate.:0
-msgid "Estimates"
-msgstr "Estimaciones"
-
-#. module: rent
-#: field:rent.rent.anual.value,anual_value_date:0
-msgid "Period"
-msgstr "Periodo"
-
-#. module: rent
-#: view:rent.contract:0
-#: view:rent.contract.clause:0
-msgid "Ending Date: %(ed)s"
-msgstr "Fecha de Fin: %(ed)s"
-
-#. module: rent
-#: view:rent.building:0
-#: view:rent.estate:0
-#: view:rent.floor:0
-#: view:rent.floor.local:0
-#: view:rent.floor.parking:0
-#: view:rent.local.floor:0
-#: view:rent.rent:0
-msgid "General Information"
-msgstr "Información General"
-
-#. module: rent
-#: field:rent.floor.parking,parking_number:0
-msgid "# Parking"
-msgstr "# Parqueo"
-
-#. module: rent
-#: model:ir.actions.act_window,name:rent.action_floor_form
-#: model:ir.ui.menu,name:rent.rent_floor_submenu
-#: view:rent.building:0
-#: field:rent.building,building_floors_ids:0
-msgid "Floors"
-msgstr "Pisos"
-
-#. module: rent
-#: sql_constraint:rent.local.floor:0
-msgid "The area for the local at this floor cannot be 0!"
-msgstr "El área para el local en este piso no puede ser de 0!"
-
-#. module: rent
-#: field:rent.invoice.rent,invoice_id:0
-msgid "Invoice"
-msgstr "Factura"
-
-#. module: rent
-#: model:ir.actions.act_window,name:rent.action_parking_form
-#: model:ir.ui.menu,name:rent.rent_parking_submenu
-#: view:rent.floor:0
-#: field:rent.floor,floor_parking_ids:0
-#: selection:rent.rent,rent_related_real:0
-#: field:rent.rent,rent_rent_parking_id:0
-msgid "Parking"
-msgstr "Parqueo"
-
-#. module: rent
-#: model:ir.actions.act_window,name:rent.action_contract_clause_form_view
-#: model:ir.ui.menu,name:rent.rent_contract_clause_submenu
-#: view:rent.contract.clause:0
-msgid "Clauses"
-msgstr "Cláusulas"
-
-#. module: rent
-#: report:contract_report:0
-msgid "____________________________"
-msgstr "____________________________"
-
-#. module: rent
-#: field:rent.estate,estate_number:0
-msgid "# estate"
-msgstr "# Terreno"
-
-#. module: rent
-#: field:rent.floor.parking,parking_sqrmeter_price:0
-msgid "Sqr Meter Value"
-msgstr "Valor del m2"
-
-#. module: rent
-#: view:rent.rent:0
-msgid "Information"
-msgstr "Información"
-
-#. module: rent
-#: view:rent.rent.anual.value:0
-#: view:rent.rent.estimate:0
-#: view:rent.rent.main.estimate.:0
-msgid "Calculos"
-msgstr "Cálculos"
-
-#. module: rent
-#: field:rent.canton,code:0
-msgid "Canton Code"
-msgstr "Código Cantón"
-
-#. module: rent
-#: field:rent.floor.parking,parking_large:0
-msgid "Large Meters"
-msgstr "Metros de profundidad"
-
-#. module: rent
-#: view:rent.contract:0
-#: view:rent.contract.clause:0
-msgid "Client name : %(cli)s"
-msgstr "Nombre de cliente : %(cli)s"
-
-#. module: rent
-#: selection:rent.rent.estimate,estimate_state:0
-#: selection:rent.rent.main.estimate,estimate_state:0
-msgid "Min"
-msgstr "Mínimo"
-
-#. module: rent
-#: sql_constraint:rent.floor:0
-#: sql_constraint:rent.floor.local:0
-msgid "The area for the floor cannot be 0!"
-msgstr "El área del piso no puede ser 0!"
-
-#. module: rent
-#: view:rent.building:0
-msgid "Building Details"
-msgstr "Detalle del edificio"
-
-#. module: rent
-#: sql_constraint:rent.building:0
-msgid "The area for the building cannot be 0!"
-msgstr "El área del edificio no puede ser 0!"
-
-#. module: rent
-#: help:rent.estate,estate_rented:0
-msgid "Checked if the local is rented"
-msgstr "Seleccionado si el local está alquilado"
-
-#. module: rent
-#: view:rent.estate:0
-msgid "Owners"
-msgstr "Dueños"
-
-#. module: rent
-#: sql_constraint:rent.estate:0
-msgid "The area for the estate cannot be 0!"
-msgstr "The area for the estate cannot be 0!"
-
-#. module: rent
-#: model:ir.model,name:rent.model_rent_rent
-msgid "rent.rent"
-msgstr "rent.rent"
-
-#. module: rent
-#: view:rent.rent:0
-msgid "Facturas"
-msgstr "Facturas"
-
-#. module: rent
-#: field:rent.rent,rent_amountd_per_sqr:0
-msgid "Amount m2 $"
-msgstr "Precio m2"
-
-#. module: rent
-#: view:rent.rent:0
-msgid "Calculations"
-msgstr "Cálculos"
-
-#. module: rent
-#: field:rent.rent.estimate,estimate_performance:0
-#: field:rent.rent.main.estimate,estimate_performance:0
-msgid "Performance(%)"
-msgstr "ROI(%)"
-
-#. module: rent
-#: view:rent.floor.parking:0
-msgid "Area Specifications Information"
-msgstr "Especificaciones del área"
-
-#. module: rent
-#: selection:account.invoice.line,invoice_type:0
-msgid "Product"
-msgstr "Producto"
-
-#. module: rent
-#: field:rent.rent,rent_related_real:0
-msgid "Type of Real Estate"
-msgstr "Tipo de Bien Inmueble"
-
-#. module: rent
-#: field:rent.invoice.log,log_desc:0
-msgid "Description"
-msgstr "Descripción"
-
-#. module: rent
-#: help:rent.rent,rent_invoiced_day:0
-#: help:rent.rent,rent_main_invoiced_day:0
-msgid "Indicates de how many days before of the charge day will create the invoice"
-msgstr "Indica cuántos días antes del día de cobro se creará la factura"
-
-#. module: rent
-#: model:ir.model,name:rent.model_rent_contract_template
-msgid "rent.contract.template"
-msgstr "rent.contract.template"
-
-#. module: rent
-#: report:contract_report:0
-msgid "-"
-msgstr "-"
-
-#. module: rent
-#: field:rent.local.floor,local_local_floor_id:0
-msgid "Local#"
-msgstr "Local#"
-
-#. module: rent
-#: sql_constraint:rent.building:0
-msgid "You can not have two buildings with the same code!"
-msgstr "No puede tener dos edificios con el mismo código!"
-
-#. module: rent
-#: view:rent.building:0
-#: view:rent.floor.local:0
-msgid "Photos"
-msgstr "Fotos"
-
-#. module: rent
-#: view:rent.rent:0
-msgid "Finished"
-msgstr "Terminado"
-
-#. module: rent
-#: field:rent.floor.local,local_rise_historic_ids:0
-#: field:rent.rent,rent_historic_ids:0
-#: field:rent.rent,rent_main_historic_ids:0
-msgid "Historic"
-msgstr "Historic"
-
-#. module: rent
-#: field:rent.rent,rent_rent_account_id:0
-#: field:rent.rent,rent_rent_main_account_id:0
-msgid "Income Account"
-msgstr "Cuenta de cobros"
-
-#. module: rent
-#: help:rent.building,building_elevator:0
-#: help:rent.building,building_stairs:0
-msgid "Select if the building has at least one elevator"
-msgstr "Seleccione si el edificio tiene al menos 1 año y algo."
-
-#. module: rent
-#: view:rent.floor.local:0
-msgid "Search Local"
-msgstr "Buscar local"
-
-#. module: rent
-#: field:rent.local.floor,local_floor_value:0
-msgid "Total Value"
-msgstr "Precio Total"
-
-#. module: rent
-#: field:rent.building,building_date_construction:0
-msgid "Construction Date"
-msgstr "Fecha de construcción"
-
-#. module: rent
-#: field:rent.contract.clause.rel,rent_contract_clause_id:0
-#: field:rent.contract.clause.rel,rent_contract_id:0
-msgid "Contract Reference"
-msgstr "Referencia de Contrato"
-
-#. module: rent
-#: view:rent.rent:0
-msgid "Contract Termination"
-msgstr "Terminación de Contrato"
-
-#. module: rent
-#: field:rent.canton,name:0
-msgid "Canton Name"
-msgstr "Nombre Cantón"
-
-#. module: rent
-#: field:rent.building,building_elevators_number:0
-msgid "Elvetators number"
-msgstr "Número de Elevadores"
-
-#. module: rent
-#: model:ir.actions.act_window,name:rent.action_rent_form_view
-msgid "Rent Details"
-msgstr "Detalles de Alquiler"
-
-#. module: rent
-#: field:rent.rent,rent_invoice_ids:0
-#: field:rent.rent,rent_main_invoice_ids:0
-msgid "Rent Invoices"
-msgstr "Facturas del Alquiler"
-
-#. module: rent
-#: model:ir.model,name:rent.model_rent_invoice_log
-msgid "rent.invoice.log"
-msgstr "rent.invoice.log"
-
-#. module: rent
-#: field:rent.rent,rent_main_company_id:0
-msgid "Supplier Company"
-msgstr "Compañía Proveedora"
-
-#. module: rent
-#: view:rent.estate:0
-msgid "Search Estate"
-msgstr "Buscar Terreno"
-
-#. module: rent
-#: view:rent.rent:0
-msgid "Rent Detail"
-msgstr "Detalles de Aquileres"
-
-#. module: rent
-#: view:rent.building:0
-#: selection:rent.rent,rent_related_real:0
-msgid "Estates"
-msgstr "Terrenos"
-
-#. module: rent
-#: view:rent.floor.local:0
-#: view:rent.local.floor:0
-msgid "Local Details"
-msgstr "Detalle del Local"
-
-#. module: rent
-#: model:ir.actions.act_window,help:rent.action_building_form
-msgid "Manage every parking that belongs to a determined estate. This is the main view where you can create a building record\n"
-"			but you can still do it from the estate form"
-msgstr "Administre los edificios que pertenecen a un terreno determinado. Esta es la principal vista donde se pueden crear registros de edificios\n"
-"			pero de igual forma se puede hacer desde el formulario del terreno"
-
-#. module: rent
-#: selection:rent.rent,rent_ending_motif:0
-msgid "Various problems with tenant"
-msgstr "Problemas varios con el inquilino"
-
-#. module: rent
-#: view:rent.rent:0
-msgid "Approve"
-msgstr "Aprobado"
-
-#. module: rent
-#: field:rent.local.floor,local_floor_side:0
-msgid "Side"
-msgstr "Largo"
-
-#. module: rent
-#: model:ir.actions.act_window,help:rent.action_parking_form
-msgid "Manage every parking that belongs to a determined floor. This is the main view where you can create a parking record\n"
-"			but you can still do it from the floor form"
-msgstr "Administre cada parqueo que pertenece a un determinado piso. Esta es la principal vista donde puede crearlos pero de igual forma\n"
-"			puede hacerlo desde el formulario del piso"
-
-#. module: rent
-#: sql_constraint:rent.floor.parking:0
-msgid "You can not repeat the parking number at the same floor!"
-msgstr "No puede repetir el número del parqueo en el mismo piso!"
-
-#. module: rent
-#: field:rent.rent,rent_modif:0
-msgid "Contract reference"
-msgstr "Referencia de Contrato"
-
-#. module: rent
-#: view:rent.contract:0
-#: view:rent.contract.clause:0
-msgid "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"
-msgstr "Use cualquier código, empleelos para indicar donde debería datos especiales en clientes, fechas, otros"
-
-#. module: rent
-#: view:rent.contract.clause.rel:0
-msgid "Clausula de Contrato"
-msgstr "Cláusula de Contrato"
-
-#. module: rent
-#: model:ir.ui.menu,name:rent.rent_estate_submenu
-#: field:rent.rent,rent_rent_estate_id:0
-msgid "Estate"
-msgstr "Terreno"
-
-#. module: rent
-#: field:rent.contract.clause.rel,sequence:0
-msgid "Sequence"
-msgstr "Sequencia"
-
-#. module: rent
-#: model:ir.model,name:rent.model_rent_building
-msgid "rent.building"
-msgstr "rent.building"
-
-#. module: rent
-#: view:rent.floor:0
-msgid "Search Floor"
-msgstr "Buscar Piso"
-
-#. module: rent
-#: help:rent.floor,floor_value:0
-msgid "This value is calculated using the estate and building area and values"
-msgstr "Este valor es calculado usando el área y valor del terreno y edificios"
-
-#. module: rent
-#: report:contract_report:0
-msgid "Por"
-msgstr "Por"
-
-#. module: rent
-#: view:rent.floor.parking:0
-msgid "Parking Details"
-msgstr "Detalles Parqueo"
-
-#. module: rent
-#: selection:rent.rent,rent_ending_motif:0
-msgid "Contract Expiration"
-msgstr "Vencimiento de Contrato"
-
-#. module: rent
-#: view:rent.contract:0
-#: view:rent.contract.clause:0
-msgid "Company name: %(com)s"
-msgstr "Nombre de Compañía: %(com)s"
-
-#. module: rent
-#: field:account.invoice.line,invoice_rent_id:0
-msgid "Rent id"
-msgstr "Rent id"
-
-#. module: rent
-#: view:rent.floor.parking:0
-msgid "Parking List"
-msgstr "Lista de Parqueos"
-
-#. module: rent
-#: selection:account.invoice.line,invoice_type:0
-#: model:ir.ui.menu,name:rent.rent_manager
-#: model:ir.ui.menu,name:rent.rent_rent_menu
-#: field:rent.invoice.rent,invoice_rent_id:0
-#: selection:rent.invoice.rent,invoice_type:0
-#: view:rent.rent:0
-#: selection:rent.rent.anual.value,anual_value_type:0
-#: field:rent.rent.estimate,estimate_rent_id:0
-#: field:rent.rent.main.estimate,estimate_maintenance_id:0
-msgid "Rent"
-msgstr "Alquiler"
-
-#. module: rent
-#: model:ir.model,name:rent.model_rent_contract
-msgid "rent.contract"
-msgstr "rent.contract"
-
-#. module: rent
-#: view:rent.rent:0
-msgid "Real Estate Information"
-msgstr "Información Bienes Inmuebles"
-
-#. module: rent
-#: view:rent.floor.parking:0
-msgid "Search Parking"
-msgstr "Buscar Parqueo"
-
-#. module: rent
-#: view:rent.rent:0
-msgid "Accounting"
-msgstr "Facturación"
-
-#. module: rent
-#: field:rent.rent,rent_main_inc:0
-msgid "Include Maintenance Rent"
-msgstr "Incluir cobro de mantenimiento"
-
-#. module: rent
-#: field:rent.floor.local,local_gallery_photo:0
-msgid "Photo Gallery"
-msgstr "Galería de fotos"
-
-#. module: rent
-#: view:rent.local.floor:0
-msgid "Floor Specifications"
-msgstr "Especificaciones de Piso"
-
-#. module: rent
-#: view:rent.contract:0
-#: view:rent.contract.clause:0
-msgid "Total paid: %(tot)s"
-msgstr "Total pago: %(tot)s"
-
-#. module: rent
-#: model:ir.ui.menu,name:rent.rent_local_submenu
-#: selection:rent.rent,rent_related_real:0
-msgid "Locals"
-msgstr "Locales"
-
-#. module: rent
-#: model:ir.model,name:rent.model_rent_canton_district
-msgid "District located in the canton"
-msgstr "Distrito localizado en el cantón"
-

=== added file 'rent/rent.py'
--- rent/rent.py	1970-01-01 00:00:00 +0000
+++ rent/rent.py	2012-01-05 00:57:30 +0000
@@ -0,0 +1,1877 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Addons modules by CLEARCORP
+#    Copyright (C) 2009-TODAY (<http://clearcorp.co.cr>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+from osv import osv, fields
+from tools import debug
+import time
+import pooler
+from dateutil import parser
+from datetime import date
+from datetime import timedelta
+import calendar
+from tools.translate import _
+
+class rent_canton(osv.osv):
+	 _name = 'rent.canton'
+	 _description = 'Canton for the State'
+	 _columns = {
+		'state_id'   : fields.many2one('res.country.state','Province',required=True),
+		'name'       : fields.char('Canton Name', size=64, required=True),
+		'code'       : fields.char('Canton Code', size=4,help = 'The canton code in 4 chars', required=True),
+	 }
+rent_canton()
+
+class rent_canton_district(osv.osv):
+	_name = 'rent.canton.district'
+	_description = 'District located in the canton'
+	_columns = {
+		'canton_id'  : fields.many2one('rent.canton','Canton',required=True),
+		'name'       : fields.char('Distric Name', size=64, required=True),
+		'code'       : fields.char('Distric Code', size=4,help = 'The district code in 4 chars', required=True),
+	}
+rent_canton_district()
+
+
+# Class used to specialize the res.partner.address, this one adds the attributes of
+# canton, district and redefines the estate_id to province making it as a selection
+class rent_location(osv.osv):
+	_name = 'res.partner.address'
+	_inherit = 'res.partner.address'
+
+	_columns = {
+		'canton_id'   : fields.many2one('rent.canton', 'Canton', domain = "[('state_id','=',state_id)]"),
+		'district_id' : fields.many2one('rent.canton.district','District', domain = "[('canton_id','=',canton_id)]"),
+	}
+rent_location()
+
+#Class that inherits from res.partner allowing to record the 
+#necesary data from the clients
+
+class rent_client(osv.osv):
+	_name = 'res.partner'
+	_inherit = 'res.partner'
+	_columns = {
+		#'client_birthdate' : fields.date('Birthdate',select=1,required=True),
+		'client_canton'    : fields.related('address', 'canton_id', type='many2one', relation='rent.canton', string='Canton'),
+		'client_district'  : fields.related('address', 'district_id', type='many2one', relation='rent.canton.district', string='District'),
+	}
+rent_client()
+
+
+#Class that represents the estates owned by the user. 
+#This class also uses the rent.location defined above
+class rent_estate(osv.osv):
+	_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),
+	}
+	_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()
+
+#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):
+	_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),
+	}
+	_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()
+
+#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 
+#the numbre then near to the top of the building is the floor.
+class rent_floor(osv.osv):
+	_name = 'rent.floor'
+	_rec_name = 'floor_number'
+	
+	def write (self, cr, uid,ids,vals,context=None):
+		#Check for the area before saving the changes
+		for obj_floor in self.browse(cr,uid,ids):
+			if obj_floor.floor_area == 0:
+				raise osv.except_osv('Wrong value!', 'The area for the floor has to bee greater than 0')
+			if vals and vals['floor_number']:
+				obj_build = obj_floor.floor_building_id
+				for obj_f in obj_build.building_floors_ids:
+					if obj_f.floor_number.upper() == vals['floor_number'].upper() and obj_f.id  != obj_floor.id:
+						raise osv.except_osv('Wrong value!', 'The number for the floor at the same building cannot be repeated')
+		return super(rent_floor,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['floor_area'] == 0:
+			raise osv.except_osv('Wrong value!', 'The area for the floor has to bee greater than 0')
+		if vals['floor_number']:
+				obj_build = self.pool.get('rent.building').browse(cr,uid,vals['floor_building_id'])
+				for obj_f in obj_build.building_floors_ids:
+					if obj_f.floor_number.upper() == vals['floor_number'].upper():
+						raise osv.except_osv('Wrong value!', 'The number for the floor at the same building cannot be repeated')
+		return super(rent_floor,self).create(cr,uid,vals,context)
+	
+	def _calculate_floor_value(self,cr,uid,ids,field_name,args,context):
+		#This method takes al the active rents for the floor and calculates the value according to 
+		#the value of the locals,parking, building and estate related to it
+		res = {}
+		valores = {}
+		total = 0
+		for floor_id in ids:
+			actual_rent = self.pool.get('rent.rent').search(cr,uid,['|',('state','=','active'),('state','=','draft'),('rent_related_real','=','local')])
+			for obj_rent in self.pool.get('rent.rent').browse(cr,uid,actual_rent):
+				obj_local = obj_rent.rent_rent_local_id
+				local_floor_ids = self.pool.get('rent.local.floor').search(cr,uid,[('local_local_floor_id','=',obj_local.id),('local_floor_floor_id','=',floor_id)])
+				for local in self.pool.get('rent.local.floor').browse(cr,uid,local_floor_ids):
+					valores = local._local_value(local.id,None,None)
+					total += valores[local.id]
+			
+			#This part look for the parking on rents associated to the floor
+			rent_ids = self.pool.get('rent.rent').search(cr,uid,['|',('state','=','active'),('state','=','draft'),('rent_related_real','=','parking')])
+			obj_rent = self.pool.get('rent.rent').browse(cr,uid,rent_ids)
+			for rent in obj_rent:
+				obj_parking = rent.rent_rent_parking_id
+				if (obj_parking.parking_floor_id.id == floor_id):
+					total += obj_parking._parking_value(obj_parking.id,None,None)[obj_parking.id]
+			res[floor_id] = total
+			total = 0
+		return res
+	
+	def _get_fullname(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		for obj_floor in self.pool.get('rent.floor').browse(cr,uid,ids):
+			building_code = obj_floor.floor_building_id.building_code
+			res[obj_floor.id] = building_code + '-' + obj_floor.floor_number
+		return res
+	 
+	def name_get(self, cr, uid, ids, context=None):
+		if not len(ids):
+			return []
+		reads = self.read(cr, uid, ids, ['complete_name'], context=context)
+		res = []
+		for record in reads:
+			name = record['complete_name']
+			res.append((record['id'], name))
+		return res
+
+	_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'),
+	}
+	_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()
+
+#Class representing the local, on every floor. This class has a relation 
+#many2one with the floor 
+class rent_floor_local(osv.osv):
+	_name = 'rent.floor.local'
+	_rec_name = 'local_number'
+	
+	def write (self, cr, uid,ids,vals,context=None):
+		#Check for the area before saving the changes
+		for obj_local in self.browse(cr,uid,ids):
+			if obj_local.local_huella == 0:
+				raise osv.except_osv('Wrong value!', 'The huella for the local has to bee greater than 0')
+		return super(rent_floor_local,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['local_huella'] == 0:
+			raise osv.except_osv('Wrong value!', 'The huella for the local has to bee greater than 0')
+		return super(rent_floor_local,self).create(cr,uid,vals,context)
+	
+	def _get_building_local(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		for local_id in ids:
+			local = self.pool.get('rent.local.floor').search(cr,uid,[('local_local_floor_id','=',local_id)])
+			res[local_id] = False
+			for lids in local:
+				obj_local = self.pool.get('rent.local.floor').browse(cr,uid,lids)
+				res[local_id] = obj_local.local_floor_floor_id.floor_building_id.id
+		return res
+	
+	def _determine_rented(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		for local_id in ids:
+			res[local_id] =  False
+			rent_ids = self.pool.get('rent.rent').search(cr,uid,[('state','=','active'),('rent_related_real','=','local'),('rent_rent_local_id','=',local_id)])
+			if rent_ids:
+				res[local_id] =  True
+		return res
+	def _local_value(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		total = 0
+		for local in self.pool.get('rent.floor.local').browse(cr,uid,ids):
+			for obj_local_floor in local.local_local_by_floor_ids:
+				total += obj_local_floor._local_value(obj_local_floor.id,None,None)[obj_local_floor.id]
+			res[local.id] = total
+			total = 0
+		return res
+
+	#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),
+		'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()
+
+class rent_local_floor(osv.osv):
+	_name = 'rent.local.floor'
+	
+	def write (self, cr, uid,ids,vals,context=None):
+		#Check for the building and the floor so it can't be at diferent places before saving the changes
+		if vals['local_floor_floor_id']:
+			for obj_local_floor in self.browse(cr,uid,ids):
+				for obj_local_floor_check in obj_local_floor.local_local_floor_id.local_local_by_floor_ids:
+					current_floor = self.pool.get('rent.floor').browse(cr,uid,vals['local_floor_floor_id'])
+					if obj_local_floor_check.local_floor_floor_id.floor_building_id.id != current_floor.floor_building_id.id:
+						raise osv.except_osv('Wrong value!', 'The same local can not be on diferent buildings')
+						break
+		return super(rent_local_floor,self).write(cr,uid,ids,vals,context)
+	def create(self, cr, uid,vals, context=None):
+		#Check for the building and the floor so it can't be at diferent places before creating the object
+		locations_ids = self.search(cr,uid,[('local_local_floor_id','=',vals['local_local_floor_id'])])
+		current_floor = self.pool.get('rent.floor').browse(cr,uid,vals['local_floor_floor_id'])
+		for obj_local_floor in self.browse(cr,uid,locations_ids):
+			if obj_local_floor.local_floor_floor_id.floor_building_id.id != current_floor.floor_building_id.id:
+				raise osv.except_osv('Wrong value!', 'The same local can not be on diferent buildings')
+		return super(rent_local_floor,self).create(cr,uid,vals,context)
+	
+	def _local_sqr_price(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		for local_id in ids:
+			obj = self.pool.get('rent.local.floor').browse(cr,uid,local_id)
+			obj_build = obj.local_floor_floor_id.floor_building_id
+			res[local_id] = obj_build._get_building_vrm(obj_build.id,None,None)[obj_build.id]
+		return res
+	
+	def _local_value(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		for local_id in ids:
+			obj = self.pool.get('rent.local.floor').browse(cr,uid,local_id)
+			obj_build = obj.local_floor_floor_id.floor_building_id
+			res[local_id] = obj.local_floor_area * obj_build._get_building_vrm(obj_build.id,None,None)[obj_build.id]
+		return res
+	
+	def onchange_floor(self,cr,uid,ids,floor_id):
+		res = {}
+		if floor_id:
+			obj_floor = self.pool.get('rent.floor').browse(cr,uid,floor_id)
+			if obj_floor:
+				res['local_floor_building'] = obj_floor.floor_building_id.id
+		return {'value' : res}
+	_columns = {
+		'local_floor_front'     : fields.float('Front', required=True),
+		'local_floor_side'      : fields.float('Side', required=True),
+		'local_floor_floor_id'  : fields.many2one('rent.floor','Level',help='Represents the floor on witch its located the local',required=True),
+		'local_local_floor_id'  : fields.many2one('rent.floor.local','Local#',help='Represents the floor on witch its located the local'),
+		'local_floor_area'      : fields.float('Area M2',required=True),
+		'local_sqrmeter_price'  : fields.function(_local_sqr_price,type='float',method=True,string='Sqr Meter Price'),
+		'local_floor_value'     : fields.function(_local_value,type='float',method=True,string='Total Value'),
+		'local_floor_building'  : fields.related('local_floor_floor_id','floor_building_id',type='many2one',relation='rent.building',string='Building', readonly=True, store=False),
+	} 
+	_sql_constraints = [
+		('local_floor_area_gt_zero', 'CHECK (local_floor_area!=0)', 'The area for the local at this floor cannot be 0!'),
+		('local_floor_front_gt_zero', 'CHECK (local_floor_front!=0)', 'The front for the local cannot be 0!'),
+		('local_floor_side_gt_zero', 'CHECK (local_floor_side!=0)', 'The side for the local cannot be 0!'),
+		('local_floor_location_key','UNIQUE (local_floor_floor_id,local_local_floor_id)','You can not repeat the local at the same floor!'),
+	]
+rent_local_floor()
+
+#Class representing the parking, on floor. This class has a relation 
+#many2one with the floor 
+#
+class rent_floor_parking(osv.osv):
+	_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),
+	}
+	_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()
+
+class rent_rent_group(osv.osv):
+	_name = 'rent.rent.group'
+	
+	def create(self,cr,uid,vals,context=None):
+		if vals:
+			next_seq = self.pool.get('ir.sequence').get(cr, uid, 'rent.rent.group')
+			rent = vals.get('obj_rent',False)
+			o = self.pool.get('rent.rent').browse(cr,uid,rent)
+			code = next_seq or (o and ('GRP-' + (o.rent_related_real == 'local' and o.rent_rent_local_id.name_get() or (o.rent_related_real == 'estate' and o.rent_rent_estate_id.name_get() or (o.rent_related_real == 'parking' and o.rent_rent_parking_id.name_get() or '')))))
+			vals['code'] = code
+		return super(rent_rent_group,self).create(cr,uid,vals,context)
+	
+	_columns = {
+		'name'            : fields.char('Name',size=64,required=True),
+		'rent_rent_ids'   : fields.one2many('rent.rent','rent_group_id','Rents Members',readonly=True, domain=[('rent_type','=','Contract')]),
+	}
+rent_rent_group()
+
+#Class to hold all the information that refences the rent
+#value, dates, status and to control de transaction of the bussines
+
+class rent_rent(osv.osv):
+	_name = 'rent.rent'
+	
+	def onchange_estimations(self,cr,uid,ids,field):
+		res = {}
+		obj_sorted = sorted(field,key=lambda estimate: estimate.estimate_performance,reverse=True)
+		priority = 1
+		for obj_record in obj_sorted:
+			vals = {}
+			if obj_record.estimate_state != 'final':
+				if priority == 1:
+					vals['estimate_state'] = 'recommend'
+				elif priority == 2:
+					vals['estimate_state'] = 'min'
+				else:
+					vals['estimate_state'] = 'norec'
+				priority += 1
+			obj_record.write(vals)
+		return True
+		
+	def _get_total_area(self,cr,uid,ids,fields_name,args,context):
+		res = {}
+		for obj_rent in self.pool.get('rent.rent').browse(cr,uid,ids):
+			if obj_rent.rent_related_real == 'local':
+				total = obj_rent.rent_rent_local_id.local_area
+			elif obj_rent.rent_related_real == 'parking':
+				total = obj_rent.rent_rent_parking_id.parking_area
+			else:
+				total = obj_rent.rent_rent_estate_id.estate_area
+			res[obj_rent.id] = total
+		return res
+		
+	def _get_currency(self, cr, uid, context=None):
+		user = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, [uid], context=context)[0]
+		if user.company_id:
+			return user.company_id.currency_id.id
+		return pooler.get_pool(cr.dbname).get('res.currency').search(cr, uid, [('rate','=', 1.0)])[0]
+	
+	def _get_currency_eqv(self, cr, uid, context=None):
+		return pooler.get_pool(cr.dbname).get('res.currency').search(cr, uid, [('rate','=', 1.0)])[0]
+		
+	def _get_total_rent(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		total = 0
+		for obj_rent in self.browse(cr,uid,ids):
+			if obj_rent.rent_related_real == 'local':
+				obj_local = obj_rent.rent_rent_local_id
+				total = obj_local._local_value(obj_local.id,None,None)[obj_local.id]
+			elif obj_rent.rent_related_real == 'parking':
+				obj_parking = obj_rent.rent_rent_parking_id
+				total = obj_parking._parking_value(obj_parking.id,None,None)[obj_parking.id]
+			else:
+				obj_estado = obj_rent.rent_rent_estate_id
+				total = obj_estado._get_estate_vrm(obj_estado.id,None,None)[obj_estado.id]
+			
+			obj_client = obj_rent.rent_rent_client_id
+			company_currency = (obj_client.company_id and obj_client.company_id.currency_id or (obj_rent.currency_id or self.pool.get('res.currency').browse(cr,uid,self._get_currency(cr,uid,context))))
+			#company_currency = self.pool.get('res.currency').browse(cr,uid,company_currency_id)
+			debug(company_currency)
+			to_exchange = {
+				'obj_rent' : obj_rent,
+				'vals'     : [('rent_total',total),
+				],
+				'from_currency' : company_currency,
+				'to_currency'   : obj_rent.currency_id,
+			}
+			exchanged = self._calculate_exchange(cr,uid,ids,to_exchange)
+			
+			total = exchanged['rent_total']
+			to_exchange = {
+				'obj_rent' : obj_rent,
+				'vals'     : [('rent_total_us',total),
+				],
+				'from_currency' : obj_rent.currency_id,
+				'to_currency'   : obj_rent.eqv_currency_id,
+			}
+			exchanged = self._calculate_exchange(cr,uid,ids,to_exchange)
+			total_vals = {}
+			total_vals['rent_total'] = total
+			total_vals['rent_total_us'] = exchanged['rent_total_us']
+			res[ obj_rent.id] = total_vals
+		return res
+		
+	def _calculate_years(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		for rent_id in ids:
+			obj_rent = self.pool.get('rent.rent').browse(cr,uid,rent_id)
+			if (obj_rent.rent_end_date and  obj_rent.rent_start_date):
+				fin = parser.parse(obj_rent.rent_end_date)
+				inicio = parser.parse(obj_rent.rent_start_date)
+				res[rent_id] = (fin.year - inicio.year)
+		return res
+	
+	def copy (self, cr, uid, id, default=None, context=None):
+		obj_rent = self.browse(cr,uid,id, context=context)
+		if not default:
+			default = {}
+		default['name'] = (obj_rent.name or '') + '(copy)'
+		default.update({
+			'rent_modif' : [],
+			'rent_estimates_ids' : [],
+			'rent_historic_ids' : [],
+			'rent_invoice_ids' : [],
+			'rent_main_estimates_ids' : [],
+			'rent_historic_ids' : [],
+			'rent_main_invoice_ids' : [],
+			'state'      : 'draft',
+		})
+		return super(rent_rent, self).copy(cr, uid, id, default=default, context=context)
+		
+	def create(self,cr,uid, vals,context=None):
+		org_rent = vals
+		try:
+			user = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, [uid], context=context)[0]
+			if user.company_id:
+				org_rent.update({
+				#	'company_id'  : user.company_id.id,
+				})
+		#if vals:
+		#	if vals.get('rent_type') == 'Adendum':
+		#		rent_id = vals.get('rent_modif_ref')
+		#		org_rent = self.copy_data(cr,uid,rent_id)
+		#		org_rent.update({
+		#			'rent_type'      : 'Adendum',
+		#			'rent_modif_ref' : rent_id,
+		#		})
+		#		vals.update({
+		#			'rent_modif_ref' : False,
+		#			'rent_type'      : 'Contract',
+		#		})
+		#		debug(org_rent)
+		#		debug(vals)
+		#		self.write(cr,uid,[rent_id],vals)
+		except:
+			print ''
+		return super(rent_rent,self).create(cr,uid,org_rent,context)
+			
+	def default_get(self,cr,uid,fields_list,context=None):
+		res = {}
+		if context:
+			type = context.get('rent_type')
+			if type == 'Adendum':
+				rent_id = context.get('active_id')
+				if rent_id:
+					res = self.copy_data(cr,uid,rent_id)
+					res['rent_rent_account_id'] = context.get('rent_rent_account_id')
+					res['rent_rent_acc_int_id']  = context.get('rent_rent_acc_int_id')
+					if context.get('rent_main_inc'):
+						obj_rent = self.browse(cr,uid,rent_id)
+						res['rent_rent_main_account_id']  = context.get('rent_rent_main_account_id')
+						res['rent_rent_main_acc_int_id']  = context.get('rent_rent_main_acc_int_id')
+					res.update({
+						'rent_type'             : type,
+						'rent_estimates_ids'    : [],
+						'rent_modif'            : [],
+						'rent_historic_ids'     : [],
+						'rent_invoice_ids'      : [],
+						'state'                 : 'draft',
+						'rent_main_estimates_ids'    : [],
+						'rent_main_invoice_ids'      : [],
+						'rent_main_historic_ids'     : [],
+					})
+				#res ={
+				#	'name'                : context.get('name'),
+				#	'rent_rent_client_id' : context.get('rent_rent_client_id'),
+				#	'rent_end_date'       : context.get('rent_end_date'),
+				#	'rent_rise'           : context.get('rent_rise'),
+				#	'rent_amount_base'    : context.get('rent_amount_base'),
+				#	'rent_type'           : 'Adendum',
+				#	'state'               : 'draft',
+				#	'rent_start_date'     : context.get('rent_start_date'),
+				#	'rent_rent_local_id'  : context.get('rent_rent_local_id'),
+				#	'rent_rent_parking_id': context.get('rent_rent_parking_id'),
+				#	'rent_rent_estate_id' : context.get('rent_rent_estate_id'),
+				#	'rent_related_real'   : context.get('rent_related_real'),
+				#	'currency_id'         : context.get('currency_id'),
+				#	'eqv_currency_id'     : context.get('eqv_currency_id'),
+				#	'rent_invoiced_day'   : context.get('rent_invoiced_day'),
+				#	'rent_charge_day'     : context.get('rent_charge_day'),
+				#	'rent_grace_period'   : context.get('rent_grace_period'),
+				#	'rent_rent_account_id': context.get('rent_rent_account_id'),
+				#	'rent_rent_acc_int_id': context.get('rent_rent_acc_int_id'),
+				#	'rent_main_inc'       : context.get('rent_main_inc'),
+				#}
+			else:
+				res = {
+					'state'        : 'draft',
+					'rent_type'    : 'Contract',
+					'currency_id': self._get_currency(cr,uid,context),
+					'eqv_currency_id': self._get_currency_eqv(cr,uid,context),
+					'main_currency_id': self._get_currency(cr,uid,context),
+					'main_eqv_currency_id': self._get_currency_eqv(cr,uid,context),
+					'rent_amount_base' : 0.00,
+					'rent_main_amount_base' : 0.00,
+					#'rent_rise'     : "%.2f%%" % (0.),
+					#'rent_main_rise': "%.2f%%" % (0.),
+					'rent_charge_day' : 01,
+					'rent_main_charge_day' : 01,
+					'rent_main_performance' : "%.2f%%" % (0.),
+					'active': 1,
+				}
+		return res
+		
+	def write(self, cr, uid, ids, vals, context=None):
+		obj_rent = self.pool.get('rent.rent').browse(cr,uid,ids)[0]
+		if 'rent_related_real' in vals:			
+			if (obj_rent.rent_related_real != vals['rent_related_real']):
+				real_type = vals['rent_related_real'] 
+				if real_type == 'local' or real_type == 'parking':
+					vals['rent_rent_estate_id'] = False
+				if real_type == 'local' or real_type == 'estate':
+					vals['rent_rent_parking_id'] = False
+				if real_type == 'parking' or real_type == 'estate':
+					vals['rent_rent_local_id'] = False		
+		super(rent_rent, self).write(cr, uid, ids, vals, context=context)
+		if 'rent_estimates_ids' in vals:
+			obj_rent.onchange_estimations(obj_rent.rent_estimates_ids)
+		#if 'rent_amount_base' in vals: 
+		#	self.register_historic(cr,uid,obj_rent)
+		return True
+		
+	def register_historic(self,cr,uid,obj_rent):
+		#obj_rent = self.browse(cr,uid,ids)[0]
+		if obj_rent:
+			vals = {}
+			is_registrated = False
+			current_date = parser.parse(obj_rent.rent_start_date).date()
+			current_date = current_date.replace(year=date.today().year)
+			for obj_historic in obj_rent.rent_historic_ids:
+				obj_date = parser.parse(obj_historic.anual_value_date).date()
+				if obj_date.year == current_date.year:
+				#if obj_historic.anual_value_date == current_date.isoformat():
+					is_registrated = True
+					match_historic = obj_historic
+					break
+			if not is_registrated:
+				#We need to update the amount_base of the rent, so we can
+				#charge the next part with the rate included
+				percentaje = obj_rent.rent_rise
+				prev_value = obj_rent.rent_amount_base
+				years_val = obj_rent.rent_amount_base * (1 + float(percentaje) / 100)
+				#obj_rent.write({'rent_amount_base' : years_val})
+				vals['rent_amount_base'] = years_val
+				if obj_rent.rent_related_real == 'local':
+					vals['anual_value_local_ids'] = obj_rent.rent_rent_local_id.id
+			
+				vals['rent_historic_ids'] = [(0,0,{'anual_value_rent_id':obj_rent.id,'anual_value_value':years_val,'anual_value_prev_value' : prev_value,'anual_value_rate' : obj_rent.rent_rise, 'anual_value_date' : current_date, 'anual_value_type' : 'rent', 'anual_value_local_ids':vals.get('anual_value_local_ids',False)})]
+			#else:
+			#	vals['rent_historic_ids'] = [(1,match_historic.id,{'anual_value_value':years_val,'anual_value_rate' : obj_rent.rent_rise})]
+			obj_rent.write(vals)
+		return True
+	
+	def register_main_historic(self,cr,uid,obj_rent):
+		#obj_rent = self.browse(cr,uid,ids)[0]
+		if obj_rent:
+			vals = {}
+			is_registrated = False
+			current_date = parser.parse(obj_rent.rent_main_start_date).date()
+			current_date = current_date.replace(year=date.today().year)
+			for obj_historic in obj_rent.rent_main_historic_ids:
+				obj_date = parser.parse(obj_historic.anual_value_date).date()
+				if obj_date.year == current_date.year:
+				#if obj_historic.anual_value_date == current_date.isoformat():
+					is_registrated = True
+					match_historic = obj_historic
+					break
+			if not is_registrated:
+				#We need to update the amount_base of the rent, so we ca
+				#charge the next part with the rate included
+				amount_base = obj_rent.rent_main_amount_base
+				rise = obj_rent.rent_main_rise
+				percentaje = rise
+				prev_value = amount_base
+				years_val = amount_base * (1 + float(percentaje) / 100)
+				#obj_rent.write({'rent_amount_base' : years_val})
+				vals['rent_main_amount_base'] = years_val
+				if obj_rent.rent_related_real == 'local':
+					vals['anual_value_local_ids'] = obj_rent.rent_rent_local_id.id
+				vals['rent_main_historic_ids'] = [(0,0,{'anual_value_rent_id':obj_rent.id,'anual_value_value':years_val,'anual_value_prev_value' : prev_value,'anual_value_rate' : rise, 'anual_value_date' : current_date, 'anual_value_type' : 'main','anual_value_local_ids':vals['anual_value_local_ids']})]
+			#else:
+			#	vals['rent_main_historic_ids'] = [(1,match_historic.id,{'anual_value_value':amount_base,'anual_value_rate' : rise})]
+			obj_rent.write(vals)
+		return True
+	def _performance_per_sqr(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		for obj_rent in self.pool.get('rent.rent').browse(cr,uid,ids):
+			amounts_val = {}
+			valor = obj_rent._get_total_area(obj_rent.id,None,None)[obj_rent.id]
+			amounts_val['rent_amount_per_sqr'] = (obj_rent.rent_amount_base / (valor == 0 and 1.0 or valor)) 
+			
+			to_exchange = {
+				'obj_rent' : obj_rent,
+				'vals'     : [('rent_amountd_per_sqr',amounts_val['rent_amount_per_sqr']),
+				],
+				'from_currency' : obj_rent.currency_id,
+				'to_currency'   : obj_rent.eqv_currency_id,
+			}
+			
+			exchanged = self._calculate_exchange(cr,uid,ids,to_exchange)
+			amounts_val['rent_amountd_per_sqr'] = exchanged['rent_amountd_per_sqr']
+			res[obj_rent.id] = amounts_val
+		return res
+		
+	def _rent_performance(self,cr,uid,ids,field_name,args,context):
+		res = {}
+	#	if args:
+	#		if 'onchange_amount' in args:
+	#			amount = args.get('onchange_amount')
+	#			total = args.get('onchange_total')
+	#			res[0] = "%.2f%%" % ((amount * 12) /  (amount== 0.00 and 1 or total) * 100)
+	#	else:
+		for obj_rent in self.pool.get('rent.rent').browse(cr,uid,ids):
+			res[obj_rent.id] = "%.2f%%" % ((obj_rent.rent_amount_base * 12) /  (obj_rent.rent_total== 0.00 and 1 or obj_rent.rent_total) * 100)
+		return res
+		
+	def _rent_amount_years(self,cr,uid,ids,field_name,args,contexto):
+		res = {}
+		for obj_rent in self.pool.get('rent.rent').browse(cr,uid,ids):
+			years_val = {}
+			
+			percentaje = obj_rent.rent_rise
+			years_val['rent_rise_year2'] = obj_rent.rent_amount_base * (1 + float(percentaje) / 100)
+			years_val['rent_rise_year3'] = years_val['rent_rise_year2']  * (1 + float(percentaje) / 100)
+			
+			to_exchange = {
+				'obj_rent'      : obj_rent,
+				'vals'          : [('rent_rise_year2d',years_val['rent_rise_year2']),
+				('rent_rise_year3d',years_val['rent_rise_year3']),
+				('rent_amountd_base',obj_rent.rent_amount_base),
+				],
+				'from_currency' : obj_rent.currency_id,
+				'to_currency'   : obj_rent.eqv_currency_id,
+			}
+			
+			exchanged = self._calculate_exchange(cr,uid,ids,to_exchange)
+			years_val['rent_rise_year2d'] = exchanged['rent_rise_year2d']
+			years_val['rent_rise_year3d'] = exchanged['rent_rise_year3d']
+			
+			#Just to avoid use a separate function
+			years_val['rent_amountd_base'] = exchanged['rent_amountd_base']
+			res[obj_rent.id] = years_val
+		return res
+		
+	def inv_line_create(self, cr, uid,obj_rent,args,type='rent'):
+		res_data = {}
+		obj_company = obj_rent.rent_rent_client_id.company_id or False
+		
+		if type=='rent':
+			res_data['account_id'] = obj_rent.rent_rent_account_id.id
+		elif type == 'main':
+			res_data['account_id'] = obj_rent.rent_rent_main_account_id.id
+		#if obj_company.currency_id.id != obj_rent.currency_id.id:
+		#	new_price = res_data['price_unit'] * obj_rent.currency_id.rate
+		#	res_data['price_unit'] = new_price
+
+		return (0, False, {
+			'name': args['desc'],
+			'account_id': res_data['account_id'],
+			'price_unit': args['amount'] or 0.0,
+			'quantity': 1 ,
+			'product_id': False,
+			'uos_id': False,
+			'invoice_line_tax_id': [(6, 0, [])],
+			'account_analytic_id': False,
+			'invoice_rent_id': args['rent_id'] or False,
+		})
+	
+	def invoice_rent(self, cr, uid, ids, args,type='rent',current_date=date.today()):
+		#Creates the invoice for every rent given as arg, the args is a list of dictionaries 
+		#usually it only has one element. But it can take up 2 records to create an invoice with 2 lines
+		res = {}
+		journal_obj = self.pool.get('account.journal')
+		il = []
+		#debug('GENERACION DE factura PAGO')
+		#debug(args)
+		
+		for rlist in args:
+			obj_rent = self.browse(cr,uid,rlist['rent_id'])
+			il.append(self.inv_line_create(cr, uid,obj_rent,rlist,type))
+
+		obj_client = obj_rent.rent_rent_client_id
+		a = obj_rent.rent_inv_account_id.id or obj_rent.rent_rent_account_id.id or obj_client.property_account_receivable.id
+		#a = obj_client.property_account_receivable.id
+		journal_ids = journal_obj.search(cr, uid, [('type', '=','sale'),('company_id', '=',obj_rent.company_id.id)],limit=1)
+
+		if not journal_ids:
+			raise osv.except_osv(_('Error !'),
+				_('There is no purchase journal defined for this company: "%s" (id:%d)') % (obj_rent.company_id.name, obj_rent.company_id.id))
+		
+		#Determines if today is the previous month for the invoice creation
+		today = current_date
+		debug(today)
+		if type=='rent':
+			date_due = (obj_rent.rent_invoiced_day < obj_rent.rent_charge_day and date(today.year,today.month,1) or (today.replace(day=1) + timedelta(days=32)).replace(day=1))
+			date_due = date_due.replace(day=obj_rent.rent_charge_day + obj_rent.rent_grace_period)
+		elif type == 'main':
+			date_due = (obj_rent.rent_main_invoiced_day < obj_rent.rent_main_charge_day and date(today.year,today.month,1) or (today.replace(day=1) + timedelta(days=32)).replace(day=1))
+			date_due = date_due.replace(day=obj_rent.rent_main_charge_day + obj_rent.rent_main_grace_period)
+		
+		desc = "Cobro de %s. Mes %s " % ((type=='rent'and 'alquiler' or 'mantenimiento'),date_due.month)
+		
+		inv_date = date_due - timedelta(days= obj_rent.rent_main_grace_period + obj_rent.rent_invoiced_day)
+		
+		period_id = False
+		if not period_id:
+			period_ids = self.pool.get('account.period').search(cr, uid, [('date_start','<=', date_due or time.strftime('%Y-%m-%d')),('date_stop','>=',date_due or time.strftime('%Y-%m-%d')), ('company_id', '=', obj_rent.company_id.id)])
+			if period_ids:
+				period_id = period_ids[0]
+		
+		inv = {
+			'name': desc or obj_rent.name,
+			'reference': obj_rent.name or desc,
+			'account_id': a,
+			'type': 'out_invoice',
+			'partner_id': obj_client.id,
+			'currency_id': (type == 'rent' and obj_rent.currency_id.id or obj_rent.main_currency_id.id),
+			'address_invoice_id': obj_client.address[0].id,
+			'address_contact_id': obj_client.address[0].id,
+			'journal_id': len(journal_ids) and journal_ids[0] or False,
+			'origin': obj_rent.name or desc,
+			'invoice_line': il,
+			'fiscal_position': obj_client.property_account_position.id,
+			'payment_term': obj_client.property_payment_term and o.partner_id.property_payment_term.id or False,
+			'company_id': obj_rent.company_id.id,
+			'date_invoice' : inv_date or today,
+			'date_due' : date_due,
+			'period_id' : period_id or False,
+		}
+		inv_id = self.pool.get('account.invoice').create(cr, uid, inv, {'type':'out_invoice'})
+		self.pool.get('account.invoice').button_compute(cr, uid, [inv_id], {'type':'out_invoice'}, set_total=True)
+		res['invoice_id'] = inv_id
+		res['rent_id'] = obj_rent.id
+		res['invoice_type'] = type
+		self.register_rent_invoice(cr,uid,ids,res)
+		return res
+	
+	def first_rent(self,cr,uid,ids,type='rent',current_date=date.today()):
+		#for the given list of ids it creates a list of the invoice data and later calls 
+		#the invoice_rent to create every invoice
+		debug('GENERACION DE PRIMER PAGO')
+		res = []
+		for obj_rent in ids:
+			today = current_date
+			charge_date = date(today.year,today.month,1)
+			 
+			if type == 'rent':
+				init_date = parser.parse(obj_rent.rent_start_date).date()
+			elif type == 'main':
+				init_date = parser.parse(obj_rent.rent_main_start_date).date()
+			
+			init_date = init_date.replace(year=today.year)
+			
+			if (type == 'main' and obj_rent.rent_main_inc) or type == 'rent':
+				res.append(self._invoice_data(cr,uid,ids,obj_rent,{'init_date': init_date, 'end_date' : charge_date.replace(day=calendar.mdays[charge_date.month])},type))
+			self.invoice_rent(cr,uid,ids,res,type)
+		return True
+	
+	def _invoice_main_required(self,cr,uid,ids,type='rent',current_date=date.today()):
+		#determines if the ids given require a invoice for the month
+		res = {}
+		for obj_rent in self.browse(cr,uid,ids):
+			is_required = False
+			today = current_date
+			if type == 'rent':
+					invoice_day = (obj_rent.rent_invoiced_day < obj_rent.rent_charge_day) and (obj_rent.rent_charge_day - obj_rent.rent_invoiced_day) or (calendar.mdays[today.month] - obj_rent.rent_invoiced_day +  obj_rent.rent_charge_day)
+					inv_rent_list = obj_rent.rent_invoice_ids
+			elif type == 'main':
+					invoice_day = (obj_rent.rent_main_invoiced_day < obj_rent.rent_main_charge_day) and (obj_rent.rent_main_charge_day - obj_rent.rent_main_invoiced_day) or (calendar.mdays[today.month] - obj_rent.rent_main_invoiced_day + obj_rent.rent_main_charge_day)
+					inv_rent_list = obj_rent.rent_main_invoice_ids
+			if today.day == invoice_day:
+				if (type == 'main' and obj_rent.rent_main_inc) or type == 'rent':
+					is_required = True
+					inv_rent_list = sorted(inv_rent_list,key=lambda reg: time.strptime(reg.invoice_due_date,'%Y-%m-%d'),reverse=True)
+					i = 0
+					for obj_inv_reg in inv_rent_list:
+						i += 1						
+						inv_date = parser.parse(obj_inv_reg.invoice_due_date).date()
+						inv_create = parser.parse(obj_inv_reg.invoice_date).date()
+						#inv_date = parser.parse(obj_inv_reg.invoice_date).date()
+						if type == 'rent':
+							start_date = parser.parse(obj_rent.rent_start_date).date()
+							charge_date = today+timedelta(days=obj_rent.rent_invoiced_day+obj_rent.rent_grace_period)
+						elif type == 'main':
+							start_date = parser.parse(obj_rent.rent_main_start_date).date()
+							charge_date = today+timedelta(days=obj_rent.rent_main_invoiced_day+obj_rent.rent_main_grace_period)
+						
+						debug(inv_date)
+						debug(charge_date)
+						debug(today)
+						if inv_date.month == start_date.month and inv_date.year == start_date.year and len(inv_rent_list) <= 1:
+							debug("SOLO TIENE 1 FACTURA")
+							is_required = True
+						elif (inv_date.month == charge_date.month and inv_date.year == charge_date.year):
+						#elif (inv_date.month == today.month and inv_date.year == today.year):
+							is_required = False
+							debug("YA SE ENCONTRO UNA FACTURA QUE COINCIDE SE VA A SALIR")
+							break
+							#if (inv_date.month != charge_date.month and inv_date.year != charge_date.year):
+							#if (inv_date.month != charge_date.month and inv_date.year != charge_date.year) and ():
+							#	debug("NECESITA FACTURA")
+							#	is_required = True
+						else:
+							is_required = True
+							debug("No se ha encontrado una factura en los registros hasta el momento. %d" % (i))
+								
+						#elif (inv_date.month == today.month and inv_date.year == today.year):
+					debug("veces iteradas")
+					debug(i)
+					debug(is_required)
+			res[obj_rent.id] = is_required
+		return res
+	
+	def register_rent_invoice(self,cr,uid,ids,args):
+		obj_rent = self.browse(cr,uid,args['rent_id'])
+		obj_rent.write({'rent_invoice_ids' : [(0,0,{'invoice_id':args['invoice_id'],'invoice_rent_id':obj_rent.id,'invoice_type':args['invoice_type']})]})
+		return True
+	
+	def rent_calc(self,cr,uid,ids,type='rent',current_date=date.today()):
+		#calculates the rent considering the date of change for the anual rate.
+		debug('GENERACION DE Pago Normal')
+		res = {}
+		res_deposit_fix = []
+		for obj_rent in ids:
+			res_dob_inv = []
+			debug(current_date)
+			today = current_date
+			
+			if type=='rent':
+				rise_date = parser.parse(obj_rent.rent_start_date).date()
+				charge_date = (obj_rent.rent_invoiced_day < obj_rent.rent_charge_day and date(today.year,today.month,1) or (today.replace(day=1) + timedelta(days=32)).replace(day=1))
+			elif type == 'main':
+				rise_date = parser.parse(obj_rent.rent_main_start_date).date()
+				charge_date = (obj_rent.rent_main_invoiced_day < obj_rent.rent_main_charge_day and date(today.year,today.month,1) or (today.replace(day=1) + timedelta(days=32)).replace(day=1))
+				
+			rise_date = rise_date.replace(year=today.year)
+			
+			if rise_date.month == charge_date.month:
+				if rise_date.day > 1:
+					#It's necesary to check if the rise is on a day different than the first of every month
+					res_dob_inv.append(self._invoice_data(cr,uid,ids,obj_rent,{'init_date': charge_date, 'end_date' : rise_date - timedelta(days=1)},type))
+					#res_dob_inv.append(self._invoice_data(cr,uid,ids,obj_rent,{'init_date': charge_date, 'end_date' : rise_date.replace(day=rise_date.day-1)},type))
+				
+				#We need to update the amount_base of the rent, so we can
+				#charge the next part with the rate included
+				#NOTE: Even if the rise is on the second day of the month we apply the previous charge on the first day 
+				#and the new one on the remaining
+				if type=='rent':
+					self.register_historic(cr,uid,obj_rent)
+				elif type=='main':
+					self.register_main_historic(cr,uid,obj_rent)
+				obj_rent = self.browse(cr,uid,obj_rent.id)
+				res_dob_inv.append(self._invoice_data(cr,uid,ids,obj_rent,{'init_date': rise_date, 'end_date' : charge_date.replace(day=calendar.mdays[charge_date.month])},type))
+				res_deposit_fix.append({'rent_id':obj_rent.id,'current_amount':obj_rent.rent_amount_base,'deposit':obj_rent.rent_deposit})
+			else:
+				res_dob_inv.append(self._invoice_data(cr,uid,ids,obj_rent,{'init_date': charge_date, 'end_date' : charge_date.replace(day=calendar.mdays[charge_date.month])},type))
+
+			self.invoice_rent(cr,uid,ids,res_dob_inv,type,today)
+			if type == 'rent' and obj_rent.rent_include_water:
+				debug("TIENE COBRO DE AGUA")
+				self.invoice_services(cr,uid,ids,res_dob_inv,type,today)
+			if res_deposit_fix:
+				self._check_deposit(cr,uid,res_deposit_fix,context=None)
+		return True
+	
+	
+	def invoice_services(self,cr,uid,ids,args,type='rent',current_date=date.today()): 
+		#Creates the invoice for every rent given as arg, the args is a list of dictionaries 
+		#usually it only has one element. But it can take up 2 records to create an invoice with 2 lines
+		res = {}
+		journal_obj = self.pool.get('account.journal')
+		il = []
+		debug('INVOICE FOR SERVICES')
+		debug(args)
+		
+		desc = 'Pago de servicios de '
+		
+		for rlist in args:
+			obj_rent = self.pool.get('rent.rent').browse(cr,uid,rlist['rent_id'])
+			if obj_rent.rent_include_water:
+				desc = desc + "agua. " + obj_rent.rent_rent_local_id and obj_rent.rent_rent_local_id.local_water_meter_number
+				rlist.update({
+							'amount' : 0.0,
+							'desc'   : desc,
+				})
+				il.append(self.inv_line_create(cr, uid,obj_rent,rlist,type))
+
+		obj_client = obj_rent.rent_rent_client_id
+		a = obj_rent.rent_inv_water_account_id or obj_rent.rent_inv_account_id.id or obj_rent.rent_rent_account_id.id or obj_client.property_account_receivable.id
+		#a = obj_client.property_account_receivable.id
+		journal_ids = journal_obj.search(cr, uid, [('type', '=','sale'),('company_id', '=',obj_rent.company_id.id)],limit=1)
+
+		if not journal_ids:
+			raise osv.except_osv(_('Error !'),
+				_('There is no purchase journal defined for this company: "%s" (id:%d)') % (obj_rent.company_id.name, obj_rent.company_id.id))
+		
+		
+		currency = (type=='rent' and obj_rent.currency_id.id or obj_rent.main_currency_id.id)
+		
+		#Determines if today is the previous month for the invoice creation
+		today = current_date
+		debug(today)
+		if type=='rent':
+			date_due = (obj_rent.rent_invoiced_day < obj_rent.rent_charge_day and date(today.year,today.month,1) or (today.replace(day=1) + timedelta(days=32)).replace(day=1))
+			date_due = date_due.replace(day=obj_rent.rent_charge_day + obj_rent.rent_grace_period)
+		
+		period_id = False
+		if not period_id:
+			period_ids = self.pool.get('account.period').search(cr, uid, [('date_start','<=', date_due or time.strftime('%Y-%m-%d')),('date_stop','>=',date_due or time.strftime('%Y-%m-%d')), ('company_id', '=', obj_rent.company_id.id)])
+			if period_ids:
+				period_id = period_ids[0]
+		inv = {
+			'name': obj_rent.name or desc,
+			'reference': obj_rent.name or desc,
+			'account_id': a,
+			'type': 'out_invoice',
+			'partner_id': obj_client.id,
+			'currency_id': currency,
+			'address_invoice_id': obj_client.address[0].id,
+			'address_contact_id': obj_client.address[0].id,
+			'journal_id': len(journal_ids) and journal_ids[0] or False,
+			'origin': obj_rent.name or desc,
+			'invoice_line': il,
+			'fiscal_position': obj_client.property_account_position.id,
+			'payment_term': obj_client.property_payment_term and o.partner_id.property_payment_term.id or False,
+			'company_id': obj_rent.company_id.id,
+			'date_invoice' : today,
+			'date_due' : date_due,
+			'period_id' : period_id or False,
+		}
+		inv_id = self.pool.get('account.invoice').create(cr, uid, inv, {'type':'out_invoice'})
+		self.pool.get('account.invoice').button_compute(cr, uid, [inv_id], {'type':'out_invoice'}, set_total=True)
+		res['invoice_id'] = inv_id
+		res['rent_id'] = obj_rent.id
+		res['invoice_type'] = type
+		#self.register_rent_invoice(cr,uid,ids,res)
+		return res
+	
+	def _invoice_data(self,cr,uid,ids,obj_rent,date_range,type='rent'):
+		#creates a dictionary with all the needed data of the rent or maintenance
+		init_date = date_range['init_date']
+		end_date = date_range['end_date']
+		month_days = calendar.mdays[init_date.month]
+		charged_days = month_days
+		if (end_date.day == month_days and init_date.day != 1) or (end_date.day != month_days and init_date.day == 1):
+			charged_days = (end_date.day - init_date.day) + 1
+		if type == 'rent':
+			amount_base = obj_rent.rent_amount_base
+		elif type == 'main':
+			amount_base = obj_rent.rent_main_amount_base
+		
+		amount =  charged_days / float(month_days) * amount_base
+		if init_date != end_date:
+			desc = "Cobro de %s. Desde el %s hasta el %s" % ((type=='rent'and 'alquiler' or 'mantenimiento'),init_date.strftime("%A %d %B %Y"),end_date.strftime("%A %d %B %Y"))
+		else:
+			desc = "Cobro de %s. Del %s " % ((type=='rent'and 'alquiler' or 'mantenimiento'),init_date.strftime("%A %d %B %Y"))
+		
+		res = {
+			'rent_id': obj_rent.id,
+			'amount' : amount,
+			'date'   : end_date,
+			'desc'   : desc,
+		}
+		return res
+	def day_invoice_check(self,cr,uid):
+		#MAIN CRONJOB TO BE RUNNED EVERY DAY AN CREATE INVOICES
+		self.cron_rent_invoice(cr,uid,[])
+		return True
+	def cron_rent_invoice(self,cr,uid,ids,context=None):
+		#gets the list of all active rents
+		rent_ids = self.search(cr,uid,[('state','=','active'),('rent_type','=','Contract')])
+		date_list = []
+		debug('CRONJOB FORCED TEST')
+		#we retrieve the date of today and the last date registered at the log 
+		#this allows to create the list with dates between those two
+		today =date.today()
+		debug(today)
+		log_id = self.pool.get('rent.invoice.log').search(cr,uid,[],order='log_date desc')
+		if log_id:
+			last_log = self.pool.get('rent.invoice.log').browse(cr,uid,log_id[0])
+			last_date = parser.parse(last_log.log_date).date() + timedelta(days=1)
+		else:
+			#if theres no record we set the today as the last_date assuming that 
+			#the cronjob has never been excecuted and add it to the list
+			last_date = today
+		debug(last_date)
+		while last_date <= today:
+			date_list.append(last_date)
+			last_date += timedelta(days=1)
+		#once we have all that dates we run the method for each one 
+		#NOTE: date_list contains at least the today date
+		debug(date_list)
+		for record_date in date_list:
+			is_required = self._invoice_main_required(cr,uid,rent_ids,'rent',record_date)
+			self._method_invoice_caller(cr,uid,rent_ids,is_required,'rent',record_date)
+		
+			#after we invocied all the rents, now we can proceed with the maintenance 
+			debug("CALCULATING INVOICE FOR MAINTENANCE")
+			is_required = self._invoice_main_required(cr,uid,rent_ids,'main',record_date)
+			self._method_invoice_caller(cr,uid,rent_ids,is_required,'main',record_date)
+		if date_list:
+			log_desc = "CronJob ran for dates between %s to %s" % (date_list[0].strftime("%A %d %B %Y"),(len(date_list) > 1 and date_list[-1] or date_list[0]).strftime("%A %d %B %Y"))
+			self.pool.get('rent.invoice.log').create(cr,uid,{'log_date':today,'log_desc' : log_desc })
+		return True
+	
+	def _method_invoice_caller (self,cr,uid,rent_ids,is_required,type='rent',current_date=date.today()):
+		res_norm_inv = []
+		for obj_rent in self.browse(cr,uid,rent_ids):
+			if is_required[obj_rent.id]: 
+				#res_norm_inv.append(obj_rent.id)
+				res_norm_inv.append(obj_rent)
+		self.rent_calc(cr,uid,res_norm_inv,type,current_date)
+		return True
+	
+	def cron_rent_defaulter_interest(self,cr,uid):
+		#under develop
+		rent_ids = self.search(cr,uid,[('state','=','active')])
+		res = []
+		for obj_rent in self.browse(cr,uid,rent_ids):
+			today = date.today()
+			invoices_ids = self.pool.get('rent.rent.invoice').search(cr,uid,[('invoice_date','=',today.strftime('%Y-%m-%d'))])
+			for obj_invoice_rent in self.pool.get('rent.invoice.rent').browse(cr,uid,invoices_ids):
+				#date_due = parser.parse(obj_invoice_rent.date_due).date()
+				today = date.today()
+				limit_day = parser.parse(obj_invoice_rent.date_due).date().day + (obj_rent.rent_grace_period or 0)
+				if  (today.day > 8 and today.day > limit_dayand) and obj_invoice_rent.residual != 0:
+					res.append(obj_invoice_rent)
+		return True
+		
+	def cron_rent_date_due_check(self,cr,uid):
+		active_rent_ids = self.search(cr,uid,[('state','=','active'),('active','=','true')])
+		current_date = date.today()
+		required_action = []
+		for obj_ren in self.browse(cr,uid,active_rent_ids):
+			custom_month = current_date + timedelta(weeks=24)
+			if obj_ren.rent_end_date == custom_month:
+				required_action.append(obj_ren.id)
+		self._send_notification(cr,uid,required_action,context=None)
+		self._create_negotiation_contract(cr,uid,required_action,context=None)
+		return True
+		
+	def _send_notification(self,cr,uid,ids,context=None):
+		#Method that notifies the user about the problems to solve
+		return True
+		
+	def _create_negotiation_contract(self,cr,uid,ids,context=None):
+		copied = []
+		for rent_id in ids:
+			copied.append(self.copy(cr,uid,rent_id))
+		return True
+	
+	def test_negotiation(self,cr,uid,ids,context=None):
+		test_ids = self.search(cr,uid,[('state','=','draft')])
+		res_deposit_fix = []
+		debug("ENTRAAAAAAAAAA")
+		for obj_rent in self.browse(cr,uid,test_ids):
+			res_deposit_fix.append({'rent_id':obj_rent.id,'current_amount':obj_rent.rent_amount_base,'deposit':obj_rent.rent_deposit})
+		debug(res_deposit_fix)
+		self._check_deposit(cr,uid,res_deposit_fix,context=context)
+		return True
+	
+	def _check_deposit(self,cr,uid,args,context=None):
+		required_act = []
+		for record in args:
+			current = float(record['current_amount'])
+			depo = float(record['deposit'])
+			if current > depo:
+				required_act.append(record['rent_id'])
+		#TODO:ESCRIBIR METODO PARA QUE ALERTE
+		return True
+		
+	def action_aprove_adendum(self,cr,uid,ids,context=None):
+		rent_ids = self.search(cr,uid,[('state','=','active'), ('rent_type','in',['Adendum','Others'])])
+		for rent_aden_id in rent_ids:
+			vals = self.copy_data(cr,uid,rent_aden_id)
+			if vals:
+				if vals.get('rent_type') in ['Adendum','Others']:
+					rent_id = vals.get('rent_modif_ref')
+					org_rent = self.copy_data(cr,uid,rent_id)
+					org_rent.update({
+						'rent_type'          : vals.get('rent_type'),
+						'rent_modif_ref'     : rent_id,
+						'rent_estimates_ids' : [],
+						'rent_modif'         : [],
+						'rent_historic_ids'  : [],
+						'rent_invoice_ids'   : [],
+						'state'              : 'active',
+					})
+					vals.update({
+						'rent_modif_ref'     : False,
+						'rent_type'          : 'Contract',
+						'state'              : 'active',
+						'rent_estimates_ids' : False,
+					})
+					self.write(cr,uid,[rent_id],vals)
+					self.write(cr,uid,[rent_aden_id],org_rent)
+		return True
+	def action_first_invoice(self,cr,uid,ids,context=None):
+		#gets the list of all active rents
+		rent_ids = self.search(cr,uid,[('state','=','active')])
+		#is_required = self._invoice_required(cr,uid,rent_ids)
+		res_first_inv = []
+		res_first_main_inv = []
+		for obj_rent in self.browse(cr,uid,rent_ids):
+			#if is_required[obj_rent.id]: 
+			has_first = self.pool.get('rent.invoice.rent').search(cr,uid,[('invoice_rent_id','=',obj_rent.id),('invoice_type','=','rent')])
+			if not has_first and parser.parse(obj_rent.rent_start_date).date().month == date.today().month:
+				#res_first_inv.append(obj_rent.id)
+				if obj_rent.rent_type != "Adendum":
+					#we only create invoice for the contracts NOT for the adendums
+					res_first_inv.append(obj_rent)
+				percentaje = obj_rent.rent_performance.split('%')[0]
+				#we update the estimates list for the obj
+				obj_rent.write({'rent_estimates_ids' : [(0,0,{'estimate_performance': float(percentaje),'estimate_rent_id':obj_rent.id,'estimate_date' : date.today(), 'estimate_state':'final'})]})
+				
+			#We check for maintenance invoice for this we need to heck if the rent hasta a maintenance record
+			if obj_rent.rent_main_inc:
+				has_main_first = self.pool.get('rent.invoice.rent').search(cr,uid,[('invoice_rent_id','=',obj_rent.id),('invoice_type','=','main')])
+				if not has_main_first and parser.parse(obj_rent.rent_main_start_date).date().month == date.today().month:
+					if obj_rent.rent_type != "Adendum":
+						#we only create invoice for the contracts NOT for the adendums
+						res_first_main_inv.append(obj_rent)
+					percentaje = obj_rent.rent_main_performance.split('%')[0]
+					obj_rent.write({'rent_main_estimates_ids' : [(0,0,{'estimate_performance': float(percentaje),'estimate_rent_id':obj_rent.id,'estimate_date' : date.today(), 'estimate_state':'final'})]})
+		
+		self.first_rent(cr,uid,res_first_inv)
+		self.first_rent(cr,uid,res_first_main_inv,'main')
+		return {}
+	
+	def calculate_negotiation(self,cr,uid,ids,context=None):
+		res = {}
+		return { 'value' : res}
+	
+	def onchange_calculate_exchange(self,cr,uid,ids,field):
+		res = {}
+		#debug('ONCHANGE')
+		#debug(ids)
+		#for obj_rent in self.browse(cr,uid,ids):
+		#if field:
+		#	res_total = self._get_total_rent(cr,uid,ids,{'rent_total','rent_total_us'},None,None)
+		#	res['rent_total'] = res_total[0]['rent_total']
+		#	res['rent_total_us'] = res_total[0]['rent_total_us']
+		#	
+		#	res['rent_performance'] = self._rent_performance(cr,uid,ids,'rent_performance',{'onchange_amount':field,'onchange_total' : res['rent_total']},None)[0]
+		#	
+		#	
+		#	res_years = self._rent_amount_years(cr,uid,ids,{'rent_rise_year2','rent_rise_year3','rent_amount_base','rent_rise_year2d','rent_rise_year3d','rent_amountd_base'},None)
+		#	res_sqr = self._performance_per_sqr(cr,uid,ids,{'rent_performance','rent_amountd_per_sqr'},None,None)
+		#	res['rent_rise_year2'] = res_years[0]['rent_rise_year2']
+		#	res['rent_rise_year3'] = res_years[0]['rent_rise_year3']
+		#	res['rent_amount_base'] = res_years[0]['rent_amount_base']
+		#	res['rent_rise_year2d'] = res_years[0]['rent_rise_year2d']
+		#	res['rent_rise_year3d'] = res_years[0]['rent_rise_year3d']
+		#	res['rent_amountd_base'] = res_years[0]['rent_amountd_base']
+		#	
+		#	res['rent_performance'] = res_sqr[0]['rent_performance']
+		#	res['rent_amountd_per_sqr'] = res_sqr[0]['rent_amountd_per_sqr']
+		#	
+		#	
+		#for obj_rent in self.browse(cr,uid,ids):
+		#	current_currency = obj_rent.currency_id
+		#	obj_client = obj_rent.rent_rent_client_id
+		#	company_currency = (obj_client.company_id and obj_client.company_id.currency_id.id or self._get_currency(cr,uid,context))
+		#	if company_currency  == current_currency.id:
+		#		if current_currency.name != "USD":
+		#			res['eqv_currency_id'] = pooler.get_pool(cr.dbname).get('res.currency').search(cr, uid, [('name','=','USD')])[0]
+		#		else:
+		#			res['eqv_currency_id'] = company_currency
+		#	if company_currency  != current_currency.id:
+		#		res['eqv_currency_id'] = company_currency
+		#	
+		#	obj_rent.write({'currency_id': current_currency.id, 'eqv_currency_id': res['eqv_currency_id']})
+		return { 'value' : res}
+	
+	def _calculate_exchange(self,cr,uid,ids,args,context=None):
+		val = {}
+		if args:
+			#we search for all the variables so we can exchange currencies
+			obj_rent = args['obj_rent']
+			obj_client = obj_rent.rent_rent_client_id
+			orig_currency  = args['from_currency']
+			dest_currency  = args['to_currency']
+			#Main currency required, for now we asume its the USD
+			main_currency = pooler.get_pool(cr.dbname).get('res.currency').search(cr, uid, [('name','=','USD')])[0]
+			for record in args['vals']:
+				value = record[1]
+				if (orig_currency.id != dest_currency.id):
+					value = value / orig_currency.rate
+					if dest_currency.id != main_currency:
+						value = value * dest_currency.rate
+				val[record[0]] = value
+		return val
+	def _rent_main_performance(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		for obj_rent in self.pool.get('rent.rent').browse(cr,uid,ids):
+			total = 1
+			res[obj_rent.id] = "%.2f%%" % ((obj_rent.rent_main_amount_base * 12) /  (obj_rent.rent_main_total== 0.00 and 1 or obj_rent.rent_main_total) * 100) 
+		return res
+		
+	def _rent_main_amount_years(self,cr,uid,ids,field_name,args,contexto):
+		res = {}
+		for obj_rent in self.pool.get('rent.rent').browse(cr,uid,ids):
+			years_val = {}
+
+			percentaje = obj_rent.rent_main_rise
+			years_val['rent_main_rise_year2'] = obj_rent.rent_main_amount_base * (1 + float(percentaje) / 100)
+			years_val['rent_main_rise_year3'] = years_val['rent_main_rise_year2']  * (1 + float(percentaje) / 100)
+			
+			to_exchange = {
+				'obj_rent'      : obj_rent,
+				'vals'          : [('rent_main_rise_year2d',years_val['rent_main_rise_year2']),
+				('rent_main_rise_year3d',years_val['rent_main_rise_year3']),
+				('rent_main_amountd_base',obj_rent.rent_main_amount_base),
+				],
+				'from_currency' : obj_rent.main_currency_id or obj_rent.currency_id,
+				'to_currency'   : obj_rent.main_eqv_currency_id or obj_rent.eqv_currency_id,
+			}
+			
+			exchanged = self._calculate_exchange(cr,uid,ids,to_exchange)
+			years_val['rent_main_rise_year2d'] = exchanged['rent_main_rise_year2d']
+			years_val['rent_main_rise_year3d'] = exchanged['rent_main_rise_year3d']
+			
+			#Just to avoid use a separate function
+			years_val['rent_main_amountd_base'] = exchanged['rent_main_amountd_base']
+			
+			res[obj_rent.id] = years_val
+		return res
+	
+	#def _rent_rise_years(self,cr,uid,ids,field_name,args,context=None):
+	def onchange_rise_years(self,cr,uid,ids,field,base,rise):
+		res = {}
+		lines = []
+		#for obj_rent in self.browse(cr,uid,ids):
+		percentaje = rise
+		amount_base = base
+		years = field or 4
+		for x in range(1,years):
+			debug(x)
+			amount_base	= amount_base * (1 + float(percentaje) / 100)
+			lines.append({'year' : x+1, 'amount' : amount_base})
+		debug(lines)
+		res['rent_rise_chart_ids'] = lines
+		debug(res)
+		return {'value' : res}
+	
+	_columns = {
+		'name'                  : fields.char('Name',size=64,required=True,states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'ref'                  : fields.char('Reference',size=64,states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_rent_client_id'   : fields.many2one('res.partner','Client', required=True, states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_end_date'         : fields.date('Ending Date', required=True, states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_ending_motif'     : fields.selection([('early','Early Return'),('expiration','Contract Expiration'),('eviction','No payment eviction'), ('others','Various problems with tenant')],'Ending Motif'),
+		'rent_ending_motif_desc': fields.text('Ending Motif Description'),
+		
+		'rent_rise'             : fields.float('Anual Rise', required=True, states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		#'rent_rise'             : fields.char('Anual Rise',size=64, required=True, states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_amount_base'      : fields.float('Final Price $', required=True, states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_performance'      : fields.function(_rent_performance, type='char',method = True,string='Performance'),
+		'rent_rise_year2'       : fields.function(_rent_amount_years, type='float',method = True,string='Year 2 $', multi='Years'),
+		'rent_rise_year3'       : fields.function(_rent_amount_years, type='float',method = True,string='Year 3 $', multi='Years'),
+		'rent_amount_per_sqr'   : fields.function(_performance_per_sqr, type='float',method = True,string='Amount per Sqr', multi='negot'),
+		
+		'rent_amountd_per_sqr'  : fields.function(_performance_per_sqr, type='float',method = True,string='Amount m2 $', multi='negot'),
+		'rent_amountd_base'     : fields.function(_rent_amount_years, type='float',method = True,string='Final Price $', multi='Years'),
+		'rent_rise_year2d'      : fields.function(_rent_amount_years, type='float',method = True,string='Year 2  $', multi='Years'),
+		'rent_rise_year3d'      : fields.function(_rent_amount_years, type='float',method = True,string='Year 3  $', multi='Years'),
+		'rent_show_us_eq'       : fields.boolean('Check USD Currency Equivalent',store=False),
+		'rent_total_us'         : fields.function(_get_total_rent,type='float',method=True,string='Total Paid',multi='total'),
+		
+		'rent_type'             : fields.selection([('Contract','Contract'),('Adendum','Adendum'),('Others','Others')],'Type',states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'state'                 : fields.selection([('active','Active'),('finished','Inactive'),('draft','Draft')],'Status', readonly=True),
+		'rent_start_date'       : fields.date('Starting Date', required=True, states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_total'            : fields.function(_get_total_rent,type='float',method=True,string='Total Paid',multi='total'),
+		'rent_rent_local_id'    : fields.many2one('rent.floor.local','Local', states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_rent_parking_id'  : fields.many2one('rent.floor.parking','Parking', states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_rent_estate_id'   : fields.many2one('rent.estate','Estate', states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_related_real'     : fields.selection([('local','Locals'),('parking','Parking'),('estate','Estates')],'Type of Real Estate', required=True,states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_years'            : fields.function(_calculate_years,type='integer',method=True,string = 'Years' ,help='Check if you want to calculate a rent for locals'),
+		'rent_modif'            : fields.one2many('rent.rent', 'rent_modif_ref','Contract reference', states={'draft':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_modif_ref'        : fields.many2one('rent.rent', 'Modifications',ondelete='cascade'),
+		'currency_id'           : fields.many2one('res.currency', 'Currency', required=True,states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'eqv_currency_id'       : fields.many2one('res.currency', 'Currency Equivalence', required=True,states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_estimates_ids'    : fields.one2many('rent.rent.estimate', 'estimate_rent_id','Estimates',states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),         
+		'rent_historic_ids'     : fields.one2many('rent.rent.anual.value', 'anual_value_rent_id','Historic',readonly=True, domain=[('anual_value_type', '=', 'rent')]),
+		'rent_charge_day'       : fields.integer('Charge Day', required=True,states={'active':[('readonly',True)], 'finished':[('readonly',True)]},help='Indica el dia del mes para realizar los cobros del alquiler.'),
+		'rent_invoice_ids'      : fields.one2many('rent.invoice.rent','invoice_rent_id','Rent Invoices', domain=[('invoice_type', '=', 'rent')],readonly=True),
+		'rent_invoiced_day'     : fields.integer('Invoiced Day', required=True,states={'active':[('readonly',True)], 'finished':[('readonly',True)]},help='Indicates de how many days before of the charge day will create the invoice'),
+		'rent_grace_period'     : fields.integer('Grace Period', required=True,states={'active':[('readonly',True)], 'finished':[('readonly',True)]},help='Indicates de how many days after the charge day will allow to paid an invoice without Interest for delay'),
+		
+		'rent_group_id'         : fields.many2one('rent.rent.group','Contract Group',ondelete='cascade', readonly=True),
+		'rent_modif_date'       : fields.date('Modification Date',readonly=True),
+		
+		'rent_inv_account_id'   : fields.many2one('account.account','Invoice Account',help="This account will be used for invoices instead of the default one to value sales for the current rent",required=True,states={'finished':[('readonly',True)]}),
+		'rent_rent_account_id'  : fields.many2one('account.account','Income Account',help="This account will be used for invoices instead of the default one to value sales for the current rent",required=True,states={'finished':[('readonly',True)]}),
+		'rent_rent_acc_int_id'  : fields.many2one('account.account','Interest Account',help="This account will be used for invoices instead of the default one to value expenses for the current rent",required=True,states={'finished':[('readonly',True)]}),
+		#'rent_rent_account_id'  : fields.property(
+		#	'account.account',
+		#	type='many2one',
+		#	relation='account.account',
+		#	string="Income Account",
+		#	method=True,
+		#	view_load=True,
+		#	help="This account will be used for invoices instead of the default one to value sales for the current rent",required=True,states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		#'rent_rent_acc_int_id'  : fields.property(
+		#	'account.account',
+		#	type='many2one',
+		#	relation='account.account',
+		#	string="Interest Account",
+		#	method=True,
+		#	view_load=True,
+		#	help="This account will be used for invoices instead of the default one to value expenses for the current rent",required=True,states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_rent_real_area'   : fields.function(_get_total_area,type='float',method=True,string='Area'),
+		
+		'rent_main_inc'              : fields.boolean('Include Maintenance Rent',states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		
+		#'rent_main_rise'             : fields.char('Anual Rise',size=64, states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_main_rise'             : fields.float('Anual Rise', states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_main_amount_base'      : fields.float('Final Price $', states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_main_performance'      : fields.function(_rent_main_performance, type='char',method = True,string='Performance'),
+		'rent_main_amountd_base'     : fields.function(_rent_main_amount_years, type='float',method = True,string='Final Price $', multi='Years_main'),
+		'rent_main_rise_year2'       : fields.function(_rent_main_amount_years, type='float',method = True,string='Year 2  $', multi='Years_main'),
+		'rent_main_rise_year3'       : fields.function(_rent_main_amount_years, type='float',method = True,string='Year 3  $', multi='Years_main'),
+		'rent_main_rise_year2d'      : fields.function(_rent_main_amount_years, type='float',method = True,string='Year 2  $', multi='Years_main'),
+		'rent_main_rise_year3d'      : fields.function(_rent_main_amount_years, type='float',method = True,string='Year 3  $', multi='Years_main'),
+		'rent_main_show_us_eq'       : fields.boolean('Check USD Currency Equivalent',store=False),
+		'rent_main_estimates_ids'    : fields.one2many('rent.rent.main.estimate', 'estimate_maintenance_id','Estimates',states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_main_invoice_ids'      : fields.one2many('rent.invoice.rent','invoice_rent_id','Rent Invoices', domain=[('invoice_type', '=', 'main')],readonly=True),
+		'rent_main_total'            : fields.float('Total Paid'),
+		
+		'main_currency_id'           : fields.many2one('res.currency', 'Currency', required=True,states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'main_eqv_currency_id'       : fields.many2one('res.currency', 'Currency Equivalence', required=True,states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		
+		#'rent_main_total_us'         : fields.float('Total Paid $'),
+		'rent_main_historic_ids'     : fields.one2many('rent.rent.anual.value', 'anual_value_rent_id','Historic',readonly=True, domain=[('anual_value_type', '=', 'main')]),      
+		'rent_main_company_id'       : fields.many2one('res.company', 'Supplier Company',states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),      
+		
+		'rent_main_charge_day'       : fields.integer('Charge Day',states={'active':[('readonly',True)], 'finished':[('readonly',True)]},help='Indica el dia del mes para realizar los cobros del alquiler.'),
+		'rent_main_invoiced_day'     : fields.integer('Invoiced Day',states={'active':[('readonly',True)], 'finished':[('readonly',True)]},help='Indicates de how many days before of the charge day will create the invoice'),
+		'rent_main_grace_period'     : fields.integer('Grace Period',states={'active':[('readonly',True)], 'finished':[('readonly',True)]},help='Indicates de how many days after the charge day will allow to paid an invoice without Interest for delay'),   
+		
+		'rent_rent_main_account_id'  : fields.many2one('account.account','Income Account',help="This account will be used for invoices instead of the default one to value sales for the current rent",states={'finished':[('readonly',True)]}),
+		'rent_rent_main_acc_int_id'  : fields.many2one('account.account','Interest Account',help="This account will be used for invoices instead of the default one to value expenses for the current rent",states={'finished':[('readonly',True)]}),
+		'rent_inv_main_account_id'   : fields.many2one('account.account','Invoice Account',help="This account will be used for invoices instead of the default one to value expenses for the current rent",states={'finished':[('readonly',True)]}),
+		
+		'rent_main_end_date'         : fields.date('Ending Date', states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		'rent_main_start_date'       : fields.date('Starting Date', states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
+		
+		'rent_notes'                 : fields.text('Notes',help='Add complementary information about the rent or maintenance'),
+		'main_notes'                 : fields.text('Notes',help='Add complementary information about the rent or maintenance'),
+		
+		'rent_include_water'         : fields.boolean('Include water payment',readonly=True, states={'draft':[('readonly',False)]},help="Check if you want to generate an invoice for the water payment"),
+		'rent_inv_water_account_id'  : fields.many2one('account.account','Water payment Account',help="This account will be used for invoices of water instead of the default one to value expenses for the current rent",states={'finished':[('readonly',True)]}),
+		
+		'company_id'                 : fields.many2one('res.company', 'Company',readonly=True),
+		'rent_deposit'               : fields.float('Deposit', required=True, states={'finished':[('readonly',True)]}),
+		
+		'active'                     : fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the resource record without removing it."),
+		#'rent_rise_chart_ids'        : fields.one2many('rent.rise.estimate','rent_id', 'Rise Chart'),
+		#'rent_rise_chart_years'      : fields.integer('Rise years',help='Indicate the number of years you want to see at the chart of rise estimates'),
+		
+		#'rent_rise_chart2_ids'       : fields.function(_rent_rise_years, type='one2many', obj= 'rent.rise.estimate', method = True,string='Rise for Years'),
+	}
+	
+	_defaults = {
+		'state'        : 'draft',
+		'rent_type'    : 'Contract',
+		'currency_id': _get_currency,
+		'eqv_currency_id': _get_currency_eqv,
+		'main_currency_id': _get_currency,
+		'main_eqv_currency_id': _get_currency_eqv,
+		'rent_amount_base' : 0.00,
+		'rent_main_amount_base' : 0.00,
+		#'rent_rise'     : "%.2f%%" % (0.),
+		#'rent_main_rise': "%.2f%%" % (0.),
+		'rent_charge_day' : 01,
+		'rent_main_charge_day' : 01,
+		'rent_main_performance' : "%.2f%%" % (0.),
+		'rent_modif_date' : date.today(),
+		'active': 1,
+	}
+rent_rent()
+
+class rent_rise_estimate(osv.osv):
+	_name = 'rent.rise.estimate'
+	_columns = {
+			'year'         : fields.integer('Year',help='Number of the year as a sequence'),
+			'amount'       : fields.float('Amount (local)'),
+			'currency_id'  : fields.related('rent_id', 'currency_id',type='many2one', relation='rent.rent', string='Currency', readonly=True,store=False),
+			
+			'amount_foreing'       : fields.float('Amount (Foreing)'),
+			'currency_foreing_id'  : fields.related('rent_id', 'eqv_currency_id',type='many2one', relation='rent.rent', string='Currency(out)', readonly=True,store=False),
+			'rent_id'              : fields.many2one('rent.rent','Rent_id'),
+	}
+rent_rise_estimate()
+
+class rent_rent_estimate(osv.osv):
+	_name = 'rent.rent.estimate'
+		
+	def _performance_years(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		for obj_estimate in self.pool.get('rent.rent.estimate').browse(cr,uid,ids):
+			if obj_estimate.estimate_performance:
+				res[obj_estimate.id] = 1 / (obj_estimate.estimate_performance / 100.00)
+		return res
+	def _performance_amount(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		amount = 0
+		for obj_estimate in self.pool.get('rent.rent.estimate').browse(cr,uid,ids):
+			obj_rent = obj_estimate.estimate_rent_id
+			amounts_val = {}
+			
+			currency_id = obj_rent.currency_id
+			rate_cr = currency_id.rate
+			rate_us = 1
+			amounts_val['estimate_amountc'] = (obj_estimate.estimate_rent_id.rent_total * (obj_estimate.estimate_performance/100.00)  / 12) / rate_us
+			amounts_val['estimate_amountd'] = (obj_estimate.estimate_rent_id.rent_total * (obj_estimate.estimate_performance/100.00)  / 12) / rate_cr
+			res[obj_estimate.id] = amounts_val
+		return res
+	def _performance_currency(self,cr,uid,ids,field_name,args,contexto):
+		res = {}
+		for obj_estimate in self.pool.get('rent.rent.estimate').browse(cr,uid,ids):
+			obj_rent = obj_estimate.estimate_rent_id
+			
+			currencies_val = {}
+			valor = obj_rent._get_total_area(obj_rent.id,None,None)[obj_rent.id]
+			currencies_val['estimate_colones'] = obj_estimate.estimate_amountc / valor
+			currencies_val['estimate_dollars'] = obj_estimate.estimate_amountd / valor
+			res[obj_estimate.id] = currencies_val
+		return res
+	_columns = {
+		'estimate_performance'       : fields.float('Performance(%)',digits=(12,2), help='This a percentaje number'),
+		'estimate_years'             : fields.function(_performance_years, type='float',method = True,string='Years for reinv.'),
+		'estimate_amountc'           : fields.function(_performance_amount, type='float',method = True,string='Amount', multi=True),
+		'estimate_colones'           : fields.function(_performance_currency, type='float',method = True,string='c / m2',multi='Currency'),
+		'estimate_amountd'           : fields.function(_performance_amount, type='float',method = True,string='Amount $', multi=True),
+		'estimate_dollars'           : fields.function(_performance_currency, type='float',method = True,string='s / m2',multi='Currency'),
+		'estimate_rent_id'            : fields.many2one('rent.rent','Rent'),
+		'estimate_date'              : fields.date('Fecha'),
+		'estimate_state'             : fields.selection([('final','Used'),('recommend','Recommend'),('min','Min'),('norec','Not Recomended')],'Status',readonly=False),
+	}
+	_order = "estimate_date desc"
+	_defaults = {
+		'estimate_date'  : date.today().strftime('%d/%m/%Y'),
+	}
+rent_rent_estimate()
+
+class rent_rent_main_estimate(osv.osv):
+	_name = 'rent.rent.main.estimate'
+		
+	def _performance_years(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		for obj_estimate in self.pool.get('rent.rent.main.estimate').browse(cr,uid,ids):
+			if obj_estimate.estimate_performance:
+				res[obj_estimate.id] = 1 / (obj_estimate.estimate_performance / 100.00)
+		return res
+	def _performance_amount(self,cr,uid,ids,field_name,args,context):
+		res = {}
+		amount = 0
+		for obj_estimate in self.pool.get('rent.rent.main.estimate').browse(cr,uid,ids):
+			obj_rent = obj_estimate.estimate_maintenance_id
+			amounts_val = {}
+			
+			currency_id = obj_rent.main_currency_id or obj_rent.currency_id
+			debug(currency_id)
+			rate_cr = currency_id.rate
+			rate_us = 1
+			total = obj_estimate.estimate_maintenance_id.rent_main_total
+			amounts_val['estimate_amountc'] = (total * (obj_estimate.estimate_performance/100.00)  / 12) / rate_us
+			amounts_val['estimate_amountd'] = (total * (obj_estimate.estimate_performance/100.00)  / 12) / rate_cr
+			res[obj_estimate.id] = amounts_val
+		return res
+	def _performance_currency(self,cr,uid,ids,field_name,args,contexto):
+		res = {}
+		for obj_estimate in self.pool.get('rent.rent.main.estimate').browse(cr,uid,ids):
+			obj_rent = obj_estimate.estimate_maintenance_id
+			
+			currencies_val = {}
+			valor = obj_rent._get_total_area(obj_rent.id,None,None)[obj_rent.id]
+			debug(valor)
+			currencies_val['estimate_colones'] = obj_estimate.estimate_amountc / valor
+			currencies_val['estimate_dollars'] = obj_estimate.estimate_amountd / valor
+			res[obj_estimate.id] = currencies_val
+		return res
+	_columns = {
+		'estimate_performance'       : fields.float('Performance(%)',digits=(12,2), help='This a percentaje number'),
+		'estimate_years'             : fields.function(_performance_years, type='float',method = True,string='Years for reinv.'),
+		'estimate_amountc'           : fields.function(_performance_amount, type='float',method = True,string='Amount', multi=True),
+		'estimate_colones'           : fields.function(_performance_currency, type='float',method = True,string='c / m2',multi='Currency'),
+		
+		'estimate_amountd'           : fields.function(_performance_amount, type='float',method = True,string='Amount $', multi=True),
+		'estimate_dollars'           : fields.function(_performance_currency, type='float',method = True,string='s / m2',multi='Currency'),
+		
+		'estimate_maintenance_id'    : fields.many2one('rent.rent','Rent'),
+		'estimate_date'              : fields.date('Fecha'),
+		'estimate_state'             : fields.selection([('final','Used'),('recommend','Recommend'),('min','Min'),('norec','Not Recomended')],'Status',readonly=False),
+	}
+	_order = "estimate_date desc"
+	_defaults = {
+		'estimate_date'  : date.today().strftime('%d/%m/%Y'),
+	}
+rent_rent_main_estimate()
+
+class rent_rent_anual_value(osv.osv):
+	_name = 'rent.rent.anual.value'
+	_columns = {
+		'anual_value_rent_id'    : fields.many2one('rent.rent','Rent reference'),
+		'anual_value_prev_value' : fields.float('Prev. Value',help='This value was taken from the record of rent at the indicated date'),
+		'anual_value_value'      : fields.float('Value',help='This value was taken from the record of rent at the indicated date'),
+		'anual_value_date'       : fields.date('Period'),
+		'anual_value_rate'       : fields.char('Anual Rise',size=64),
+		'anual_value_local_ids'      : fields.many2one('rent.floor.local','Local reference'),
+		'anual_value_type'       : fields.selection([('main','Maintenance'),('rent','Rent')],'Type'),
+	}
+	
+rent_rent_anual_value()
+
+
+#This class changes the references of the invoice
+#to enable it add a refeerence to the rent
+class rent_invoice_line(osv.osv):
+	_name = 'account.invoice.line'
+	_inherit = 'account.invoice.line'
+	
+	def rent_id_change(self, cr, uid, ids, rent, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None):
+		res = {}
+		#company_id = context.get('company_id',False)
+		debug(rent)
+		if rent:
+			obj_rent = self.pool.get('rent.rent').browse(cr, uid, rent, context=context)
+			res['name'] = obj_rent.name
+			res['price_unit'] = obj_rent.rent_amount_base
+			
+			if obj_rent.rent_related_real == 'estate':
+				res['account_id'] = obj_rent.rent_rent_estate_id.estate_account_id.id
+			else:
+				res['account_id'] = obj_rent.rent_rent_account_id.id
+				#res['account_id'] = obj_rent.rent_rent_local_id.local_building.building_estate_id.estate_account_id
+				
+			#obj_company = self.pool.get('res.company').browse(cr, uid, company_id, context=context)
+			#if obj_company.currency_id.id != obj_rent.currency_id.id:
+			#	new_price = res['price_unit'] * obj_rent.currency_id.rate
+			#	res['price_unit'] = new_price
+		return {'value' : res}
+	
+	def onchange_type(self,cr,uid,ids,field):
+		res = {}
+		res['product_id'] = False
+		res['invoice_rent_id'] = False
+
+		return {'value' : res}
+	
+	_columns = {
+		'invoice_type'    : fields.selection([('rent','Rent'),('product','Product')],'Type',help = 'Select one of this to determine the type of invoice to create'),
+		'invoice_rent_id'    : fields.many2one('rent.rent','Rent id'),
+	}
+	_defaults = {
+		'invoice_type'  : 'rent',
+	}
+rent_invoice_line()
+
+#This class is used to keep reference of all the invoices
+#that have been register to the rent
+class rent_rent_invoice(osv.osv):
+	_name = 'rent.invoice.rent'
+	_columns = {
+		'invoice_id'       : fields.many2one('account.invoice','Invoice', ondelete='cascade'),
+		'invoice_rent_id'  : fields.many2one('rent.rent', 'Rent',ondelete='cascade'),
+		'invoice_date'     : fields.related('invoice_id','date_invoice', type='date',relation='account.invoice',string='Date',readonly=True,store=False),
+		'invoice_due_date' : fields.related('invoice_id','date_due', type='date',relation='account.invoice',string='Due Date',readonly=True,store=False),
+		'invoice_amount'   : fields.related('invoice_id','amount_total', type='float',relation='account.invoice',string='Amount Total',readonly=True,store=False),
+		'invoice_state'    : fields.related('invoice_id','state', type='char',relation='account.invoice',string='State',readonly=True,store=False),
+		'invoice_number'   : fields.related('invoice_id','number', type='char',size=64,relation='account.invoice',string='Invoice Number',readonly=True,store=False),
+		'invouce_residual' : fields.related('invoice_id','residual', type='float',relation='account.invoice',string='Residual',readonly=True,store=False),
+		'invoice_type'     : fields.selection([('main','Maintenance'),('rent','Rent')],'Type'),
+		
+	}
+
+rent_rent_invoice()
+
+class rent_invoice_log(osv.osv):
+	_name = 'rent.invoice.log'
+	_order = 'log_date'
+	_columns = {
+		'log_date' : fields.date('Date'),
+		'log_desc' : fields.char('Description',size=200),
+		#'log_rent' : fields.many2one('rent.rent','Rent Ref'),
+	}
+rent_invoice_log()
+#
+#
+class rent_contract(osv.osv):
+	_name = 'rent.contract'
+	
+	def create(self,cr,uid, vals,context=None):
+		debug("============================CREANDO EL NUEVO CONTRATO")
+		contract_id = super(rent_contract,self).create(cr,uid,vals,context)
+		debug(contract_id)
+		obj_contract = self.pool.get('rent.contract').browse(cr,uid,contract_id)
+		debug(obj_contract)
+		i = 0
+		for clause_perm in self.pool.get('rent.contract.clause').search(cr,uid,[('clause_is_basic','=','True')]):
+		#for obj_clause_perm in self.pool.get('rent.contract.clause').browse(cr,uid,clause_perm):
+			#clause_rel_id = self.pool.get('rent.contract.clause.rel').create(cr,uid,{'sequence':i,'rent_contract_id':obj_contract.id,'rent_contract_clause_id' : clause_perm},context)
+			#obj_clause_perm = self.pool.get('rent.contract.clause.rel').browse(cr,uid,clause_rel_id)
+			#if obj_clause_perm:
+			obj_contract.write({'contract_clauses_ids' : [(0,0,{'sequence':i,'rent_contract_id':obj_contract.id,'rent_contract_clause_id' : clause_perm})]})
+			i+=1
+		return obj_contract.id
+				
+	_columns = {
+		'name'             : fields.char('Reference', size=64),
+		'contract_rent_id'    : fields.many2one('rent.rent','Rent Reference'),
+		'contract_clauses_ids' : fields.one2many('rent.contract.clause.rel','rent_contract_id','Clausulas'),
+		#'contract_clauses' : fields.many2many('rent.contract.clause','rent_contract_clause_rel','name','clause_code','Clausulas'),
+		#'contract_design'  : fields.char('Design',size=64),
+	}
+	
+rent_contract()
+
+#
+#
+#
+class rent_contract_template(osv.osv):
+	_name = 'rent.contract.template'
+rent_contract_template()
+
+#Class that holds all the clauses for the contracts
+#this class is used to create a custom contract
+#it simulates a sintaxys analizer to subtitute codes with the corresponding clause
+class rent_contract_clause(osv.osv):
+	_name = 'rent.contract.clause'
+	_rec_name = 'clause_code'
+	_columns = {
+		'clause_code'     : fields.char('Reference',size=64,required=True,help='Reference code for the clause, used to create custom contracts'),
+		'clause_subject'  : fields.char('Subject',size=64,required=True),
+		'clause_body'     : fields.text('Body',required=True),
+		'clause_is_basic' : fields.boolean('Priority', help = 'Check if the clause should allways appear on every contract you create'),
+		#'clause_contract' : fields.many2many('rent.contract','rent_contract_clause','id','id','Contracts'),
+	}
+rent_contract_clause()
+
+
+class rent_contract_clause_rel(osv.osv):
+	_name = 'rent.contract.clause.rel'
+	_rec_name = 'rent_contract_id'
+	_columns = {
+		'rent_contract_id'        : fields.many2one('rent.contract','Contract Reference'),
+		'rent_contract_clause_id' : fields.many2one('rent.contract.clause','Contract Reference'),
+		'sequence'                : fields.integer('Sequence'),
+	}
+rent_contract_clause_rel()

=== removed file 'rent/rent.py'
--- rent/rent.py	2011-11-10 02:23:06 +0000
+++ rent/rent.py	1970-01-01 00:00:00 +0000
@@ -1,1656 +0,0 @@
-from osv import osv, fields
-from tools import debug
-import time
-import pooler
-from dateutil import parser
-from datetime import date
-from datetime import timedelta
-import calendar
-from tools.translate import _
-
-class rent_canton(osv.osv):
-	 _name = 'rent.canton'
-	 _description = 'Canton for the State'
-	 _columns = {
-		'state_id'   : fields.many2one('res.country.state','Province',required=True),
-		'name'       : fields.char('Canton Name', size=64, required=True),
-		'code'       : fields.char('Canton Code', size=4,help = 'The canton code in 4 chars', required=True),
-	 }
-rent_canton()
-
-class rent_canton_district(osv.osv):
-	_name = 'rent.canton.district'
-	_description = 'District located in the canton'
-	_columns = {
-		'canton_id'  : fields.many2one('rent.canton','Canton',required=True),
-		'name'       : fields.char('Distric Name', size=64, required=True),
-		'code'       : fields.char('Distric Code', size=4,help = 'The district code in 4 chars', required=True),
-	}
-rent_canton_district()
-
-
-# Class used to specialize the res.partner.address, this one adds the attributes of
-# canton, district and redefines the estate_id to province making it as a selection
-class rent_location(osv.osv):
-	_name = 'res.partner.address'
-	_inherit = 'res.partner.address'
-
-	_columns = {
-		'canton_id'   : fields.many2one('rent.canton', 'Canton', domain = "[('state_id','=',state_id)]"),
-		'district_id' : fields.many2one('rent.canton.district','District', domain = "[('canton_id','=',canton_id)]"),
-	}
-rent_location()
-
-#Class that inherits from res.partner allowing to record the 
-#necesary data from the clients
-
-class rent_client(osv.osv):
-	_name = 'res.partner'
-	_inherit = 'res.partner'
-	_columns = {
-		#'client_birthdate' : fields.date('Birthdate',select=1,required=True),
-		'client_canton'    : fields.related('address', 'canton_id', type='many2one', relation='rent.canton', string='Canton'),
-		'client_district'  : fields.related('address', 'district_id', type='many2one', relation='rent.canton.district', string='District'),
-	}
-rent_client()
-
-
-#Class that represents the estates owned by the user. 
-#This class also uses the rent.location defined above
-class rent_estate(osv.osv):
-	_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
-			debug(ids)
-			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
-		debug(res)
-		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),
-	}
-	_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()
-
-#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):
-	_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),
-	}
-	_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()
-
-#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 
-#the numbre then near to the top of the building is the floor.
-class rent_floor(osv.osv):
-	_name = 'rent.floor'
-	_rec_name = 'floor_number'
-	
-	def write (self, cr, uid,ids,vals,context=None):
-		#Check for the area before saving the changes
-		for obj_floor in self.browse(cr,uid,ids):
-			if obj_floor.floor_area == 0:
-				raise osv.except_osv('Wrong value!', 'The area for the floor has to bee greater than 0')
-			if vals and vals['floor_number']:
-				obj_build = obj_floor.floor_building_id
-				for obj_f in obj_build.building_floors_ids:
-					if obj_f.floor_number.upper() == vals['floor_number'].upper() and obj_f.id  != obj_floor.id:
-						raise osv.except_osv('Wrong value!', 'The number for the floor at the same building cannot be repeated')
-		return super(rent_floor,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['floor_area'] == 0:
-			raise osv.except_osv('Wrong value!', 'The area for the floor has to bee greater than 0')
-		if vals['floor_number']:
-				obj_build = self.pool.get('rent.building').browse(cr,uid,vals['floor_building_id'])
-				for obj_f in obj_build.building_floors_ids:
-					if obj_f.floor_number.upper() == vals['floor_number'].upper():
-						raise osv.except_osv('Wrong value!', 'The number for the floor at the same building cannot be repeated')
-		return super(rent_floor,self).create(cr,uid,vals,context)
-	
-	def _calculate_floor_value(self,cr,uid,ids,field_name,args,context):
-		#This method takes al the active rents for the floor and calculates the value according to 
-		#the value of the locals,parking, building and estate related to it
-		res = {}
-		valores = {}
-		total = 0
-		for floor_id in ids:
-			actual_rent = self.pool.get('rent.rent').search(cr,uid,['|',('state','=','active'),('state','=','draft'),('rent_related_real','=','local')])
-			for obj_rent in self.pool.get('rent.rent').browse(cr,uid,actual_rent):
-				obj_local = obj_rent.rent_rent_local_id
-				local_floor_ids = self.pool.get('rent.local.floor').search(cr,uid,[('local_local_floor_id','=',obj_local.id),('local_floor_floor_id','=',floor_id)])
-				for local in self.pool.get('rent.local.floor').browse(cr,uid,local_floor_ids):
-					valores = local._local_value(local.id,None,None)
-					total += valores[local.id]
-			
-			#This part look for the parking on rents associated to the floor
-			rent_ids = self.pool.get('rent.rent').search(cr,uid,['|',('state','=','active'),('state','=','draft'),('rent_related_real','=','parking')])
-			obj_rent = self.pool.get('rent.rent').browse(cr,uid,rent_ids)
-			for rent in obj_rent:
-				obj_parking = rent.rent_rent_parking_id
-				if (obj_parking.parking_floor_id.id == floor_id):
-					total += obj_parking._parking_value(obj_parking.id,None,None)[obj_parking.id]
-			res[floor_id] = total
-			total = 0
-		return res
-	
-	def _get_fullname(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		for obj_floor in self.pool.get('rent.floor').browse(cr,uid,ids):
-			building_code = obj_floor.floor_building_id.building_code
-			res[obj_floor.id] = building_code + '-' + obj_floor.floor_number
-		debug(res)
-		return res
-	 
-	def name_get(self, cr, uid, ids, context=None):
-		if not len(ids):
-			return []
-		reads = self.read(cr, uid, ids, ['complete_name'], context=context)
-		res = []
-		for record in reads:
-			name = record['complete_name']
-			res.append((record['id'], name))
-		return res
-
-	_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'),
-	}
-	_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()
-
-#Class representing the local, on every floor. This class has a relation 
-#many2one with the floor 
-class rent_floor_local(osv.osv):
-	_name = 'rent.floor.local'
-	_rec_name = 'local_number'
-	
-	def write (self, cr, uid,ids,vals,context=None):
-		#Check for the area before saving the changes
-		for obj_local in self.browse(cr,uid,ids):
-			if obj_local.local_huella == 0:
-				raise osv.except_osv('Wrong value!', 'The huella for the local has to bee greater than 0')
-		return super(rent_floor_local,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['local_huella'] == 0:
-			raise osv.except_osv('Wrong value!', 'The huella for the local has to bee greater than 0')
-		return super(rent_floor_local,self).create(cr,uid,vals,context)
-	
-	def _get_building_local(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		for local_id in ids:
-			local = self.pool.get('rent.local.floor').search(cr,uid,[('local_local_floor_id','=',local_id)])
-			res[local_id] = False
-			for lids in local:
-				obj_local = self.pool.get('rent.local.floor').browse(cr,uid,lids)
-				res[local_id] = obj_local.local_floor_floor_id.floor_building_id.id
-		return res
-	
-	def _determine_rented(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		for local_id in ids:
-			res[local_id] =  False
-			rent_ids = self.pool.get('rent.rent').search(cr,uid,[('state','=','active'),('rent_related_real','=','local'),('rent_rent_local_id','=',local_id)])
-			if rent_ids:
-				res[local_id] =  True
-		return res
-	def _local_value(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		total = 0
-		for local in self.pool.get('rent.floor.local').browse(cr,uid,ids):
-			for obj_local_floor in local.local_local_by_floor_ids:
-				total += obj_local_floor._local_value(obj_local_floor.id,None,None)[obj_local_floor.id]
-			res[local.id] = total
-			total = 0
-		return res
-
-	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),
-		'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()
-
-class rent_local_floor(osv.osv):
-	_name = 'rent.local.floor'
-	
-	def write (self, cr, uid,ids,vals,context=None):
-		#Check for the building and the floor so it can't be at diferent places before saving the changes
-		if vals['local_floor_floor_id']:
-			for obj_local_floor in self.browse(cr,uid,ids):
-				for obj_local_floor_check in obj_local_floor.local_local_floor_id.local_local_by_floor_ids:
-					current_floor = self.pool.get('rent.floor').browse(cr,uid,vals['local_floor_floor_id'])
-					if obj_local_floor_check.local_floor_floor_id.floor_building_id.id != current_floor.floor_building_id.id:
-						raise osv.except_osv('Wrong value!', 'The same local can not be on diferent buildings')
-						break
-		return super(rent_local_floor,self).write(cr,uid,ids,vals,context)
-	def create(self, cr, uid,vals, context=None):
-		#Check for the building and the floor so it can't be at diferent places before creating the object
-		locations_ids = self.search(cr,uid,[('local_local_floor_id','=',vals['local_local_floor_id'])])
-		debug(locations_ids)
-		current_floor = self.pool.get('rent.floor').browse(cr,uid,vals['local_floor_floor_id'])
-		debug(current_floor)
-		for obj_local_floor in self.browse(cr,uid,locations_ids):
-			debug(obj_local_floor)
-			debug(obj_local_floor.local_floor_floor_id.floor_building_id.id)
-			debug(current_floor.floor_building_id.id)
-			if obj_local_floor.local_floor_floor_id.floor_building_id.id != current_floor.floor_building_id.id:
-				raise osv.except_osv('Wrong value!', 'The same local can not be on diferent buildings')
-		return super(rent_local_floor,self).create(cr,uid,vals,context)
-	
-	def _local_sqr_price(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		for local_id in ids:
-			obj = self.pool.get('rent.local.floor').browse(cr,uid,local_id)
-			obj_build = obj.local_floor_floor_id.floor_building_id
-			res[local_id] = obj_build._get_building_vrm(obj_build.id,None,None)[obj_build.id]
-		return res
-	
-	def _local_value(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		for local_id in ids:
-			obj = self.pool.get('rent.local.floor').browse(cr,uid,local_id)
-			obj_build = obj.local_floor_floor_id.floor_building_id
-			res[local_id] = obj.local_floor_area * obj_build._get_building_vrm(obj_build.id,None,None)[obj_build.id]
-		return res
-	
-	def onchange_floor(self,cr,uid,ids,floor_id):
-		res = {}
-		if floor_id:
-			obj_floor = self.pool.get('rent.floor').browse(cr,uid,floor_id)
-			if obj_floor:
-				res['local_floor_building'] = obj_floor.floor_building_id.id
-		return {'value' : res}
-	_columns = {
-		'local_floor_front'     : fields.float('Front', required=True),
-		'local_floor_side'      : fields.float('Side', required=True),
-		'local_floor_floor_id'  : fields.many2one('rent.floor','Level',help='Represents the floor on witch its located the local',required=True),
-		'local_local_floor_id'  : fields.many2one('rent.floor.local','Local#',help='Represents the floor on witch its located the local'),
-		'local_floor_area'      : fields.float('Area M2',required=True),
-		'local_sqrmeter_price'  : fields.function(_local_sqr_price,type='float',method=True,string='Sqr Meter Price'),
-		'local_floor_value'     : fields.function(_local_value,type='float',method=True,string='Total Value'),
-		'local_floor_building'  : fields.related('local_floor_floor_id','floor_building_id',type='many2one',relation='rent.building',string='Building', readonly=True, store=False),
-	} 
-	_sql_constraints = [
-		('local_floor_area_gt_zero', 'CHECK (local_floor_area!=0)', 'The area for the local at this floor cannot be 0!'),
-		('local_floor_front_gt_zero', 'CHECK (local_floor_front!=0)', 'The front for the local cannot be 0!'),
-		('local_floor_side_gt_zero', 'CHECK (local_floor_side!=0)', 'The side for the local cannot be 0!'),
-		('local_floor_location_key','UNIQUE (local_floor_floor_id,local_local_floor_id)','You can not repeat the local at the same floor!'),
-	]
-rent_local_floor()
-
-#Class representing the parking, on floor. This class has a relation 
-#many2one with the floor 
-#
-class rent_floor_parking(osv.osv):
-	_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 = {}
-		debug('Renta+==================================')
-		for parking_id in ids:
-			res[parking_id] =  False
-			debug(ids)
-			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
-		debug(res)
-		return res
-	def onchange_floor(self,cr,uid,ids,floor_id):
-		res = {}
-		debug("+============================")
-		obj_floor = self.pool.get('rent.floor').browse(cr,uid,floor_id)
-		debug(obj_floor)
-		res['parking_floor_building'] = obj_floor.floor_building_id.id
-		debug(res)
-		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_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),
-	}
-	_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()
-
-
-#Class to hold all the information that refences the rent
-#value, dates, status and to control de transaction of the bussines
-#
-class rent_rent(osv.osv):
-	_name = 'rent.rent'
-	
-	def onchange_estimations(self,cr,uid,ids,field):
-		res = {}
-		debug("==========ESTIMACIONES====")
-		debug(field)
-		obj_sorted = sorted(field,key=lambda estimate: estimate.estimate_performance,reverse=True)
-		priority = 1
-		for obj_record in obj_sorted:
-			vals = {}
-			if obj_record.estimate_state != 'final':
-				if priority == 1:
-					vals['estimate_state'] = 'recommend'
-				elif priority == 2:
-					vals['estimate_state'] = 'min'
-				else:
-					vals['estimate_state'] = 'norec'
-				priority += 1
-			debug(vals)
-			obj_record.write(vals)
-		return True
-		
-	def _get_total_area(self,cr,uid,ids,fields_name,args,context):
-		res = {}
-		for obj_rent in self.pool.get('rent.rent').browse(cr,uid,ids):
-			if obj_rent.rent_related_real == 'local':
-				total = obj_rent.rent_rent_local_id.local_area
-			elif obj_rent.rent_related_real == 'parking':
-				total = obj_rent.rent_rent_parking_id.parking_area
-			else:
-				total = obj_rent.rent_rent_estate_id.estate_area
-			res[obj_rent.id] = total
-		return res
-		
-	def _get_currency(self, cr, uid, context=None):
-		user = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, [uid], context=context)[0]
-		if user.company_id:
-			return user.company_id.currency_id.id
-		return pooler.get_pool(cr.dbname).get('res.currency').search(cr, uid, [('rate','=', 1.0)])[0]
-	
-	def _get_currency_eqv(self, cr, uid, context=None):
-		return pooler.get_pool(cr.dbname).get('res.currency').search(cr, uid, [('rate','=', 1.0)])[0]
-		
-	def _get_total_rent(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		total = 0
-		for obj_rent in self.browse(cr,uid,ids):
-			if obj_rent.rent_related_real == 'local':
-				obj_local = obj_rent.rent_rent_local_id
-				total = obj_local._local_value(obj_local.id,None,None)[obj_local.id]
-			elif obj_rent.rent_related_real == 'parking':
-				obj_parking = obj_rent.rent_rent_parking_id
-				total = obj_parking._parking_value(obj_parking.id,None,None)[obj_parking.id]
-			else:
-				obj_estado = obj_rent.rent_rent_estate_id
-				total = obj_estado._get_estate_vrm(obj_estado.id,None,None)[obj_estado.id]
-			
-			obj_client = obj_rent.rent_rent_client_id
-			company_currency = (obj_client.company_id and obj_client.company_id.currency_id or self._get_currency(cr,uid,context))
-			
-			to_exchange = {
-				'obj_rent' : obj_rent,
-				'vals'     : [('rent_total',total),
-				],
-				'from_currency' : company_currency,
-				'to_currency'   : obj_rent.currency_id,
-			}
-			
-			exchanged = self._calculate_exchange(cr,uid,ids,to_exchange)
-			
-			total = exchanged['rent_total']
-			to_exchange = {
-				'obj_rent' : obj_rent,
-				'vals'     : [('rent_total_us',total),
-				],
-				'from_currency' : obj_rent.currency_id,
-				'to_currency'   : obj_rent.eqv_currency_id,
-			}
-			exchanged = self._calculate_exchange(cr,uid,ids,to_exchange)
-			total_vals = {}
-			total_vals['rent_total'] = total
-			total_vals['rent_total_us'] = exchanged['rent_total_us']
-			res[ obj_rent.id] = total_vals
-		return res
-		
-	def _calculate_years(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		for rent_id in ids:
-			obj_rent = self.pool.get('rent.rent').browse(cr,uid,rent_id)
-			if (obj_rent.rent_end_date and  obj_rent.rent_start_date):
-				fin = parser.parse(obj_rent.rent_end_date)
-				inicio = parser.parse(obj_rent.rent_start_date)
-				res[rent_id] = (fin.year - inicio.year)
-		return res
-	
-	def copy (cr, uid, id, default=None, context=None):
-		default.update({
-			'rent_modif' : [],
-			'rent_estimates_ids' : [],
-			'rent_historic_ids' : [],
-			'rent_invoice_ids' : [],
-			'rent_main_estimates_ids' : [],
-			'rent_historic_ids' : [],
-			'rent_main_invoice_ids' : [],
-			'state'      : 'draft',
-		})
-		return super(rent_rent, self).copy(cr, uid, id, default=default, context=context)
-		
-	def create(self,cr,uid, vals,context=None):
-		org_rent = vals
-		#if vals:
-		#	if vals.get('rent_type') == 'Adendum':
-		#		rent_id = vals.get('rent_modif_ref')
-		#		org_rent = self.copy_data(cr,uid,rent_id)
-		#		org_rent.update({
-		#			'rent_type'      : 'Adendum',
-		#			'rent_modif_ref' : rent_id,
-		#		})
-		#		vals.update({
-		#			'rent_modif_ref' : False,
-		#			'rent_type'      : 'Contract',
-		#		})
-		#		debug(org_rent)
-		#		debug(vals)
-		#		self.write(cr,uid,[rent_id],vals)
-		return super(rent_rent,self).create(cr,uid,org_rent,context)
-		
-	def default_get(self,cr,uid,fields_list,context=None):
-		res = {}
-		debug(context)
-		if context:
-			type = context.get('rent_type')
-			if type == 'Adendum':
-				rent_id = context.get('active_id')
-				if rent_id:
-					res = self.copy_data(cr,uid,rent_id)
-					res['rent_rent_account_id'] = context.get('rent_rent_account_id')
-					res['rent_rent_acc_int_id']  = context.get('rent_rent_acc_int_id')
-					if context.get('rent_main_inc'):
-						obj_rent = self.browse(cr,uid,rent_id)
-						res['rent_rent_main_account_id']  = context.get('rent_rent_main_account_id')
-						res['rent_rent_main_acc_int_id']  = context.get('rent_rent_main_acc_int_id')
-					res.update({
-						'rent_type'             : type,
-						'rent_estimates_ids'    : [],
-						'rent_modif'            : [],
-						'rent_historic_ids'     : [],
-						'rent_invoice_ids'      : [],
-						'state'                 : 'draft',
-						'rent_main_estimates_ids'    : [],
-						'rent_main_invoice_ids'      : [],
-						'rent_main_historic_ids'     : [],
-					})
-				debug(res)
-				#res ={
-				#	'name'                : context.get('name'),
-				#	'rent_rent_client_id' : context.get('rent_rent_client_id'),
-				#	'rent_end_date'       : context.get('rent_end_date'),
-				#	'rent_rise'           : context.get('rent_rise'),
-				#	'rent_amount_base'    : context.get('rent_amount_base'),
-				#	'rent_type'           : 'Adendum',
-				#	'state'               : 'draft',
-				#	'rent_start_date'     : context.get('rent_start_date'),
-				#	'rent_rent_local_id'  : context.get('rent_rent_local_id'),
-				#	'rent_rent_parking_id': context.get('rent_rent_parking_id'),
-				#	'rent_rent_estate_id' : context.get('rent_rent_estate_id'),
-				#	'rent_related_real'   : context.get('rent_related_real'),
-				#	'currency_id'         : context.get('currency_id'),
-				#	'eqv_currency_id'     : context.get('eqv_currency_id'),
-				#	'rent_invoiced_day'   : context.get('rent_invoiced_day'),
-				#	'rent_charge_day'     : context.get('rent_charge_day'),
-				#	'rent_grace_period'   : context.get('rent_grace_period'),
-				#	'rent_rent_account_id': context.get('rent_rent_account_id'),
-				#	'rent_rent_acc_int_id': context.get('rent_rent_acc_int_id'),
-				#	'rent_main_inc'       : context.get('rent_main_inc'),
-				#}
-			else:
-				res = {
-					'state'        : 'draft',
-					'rent_type'    : 'Contract',
-					'currency_id': self._get_currency(cr,uid,context),
-					'eqv_currency_id': self._get_currency_eqv(cr,uid,context),
-					'rent_amount_base' : 0.00,
-					'rent_main_amount_base' : 0.00,
-					#'rent_rise'     : "%.2f%%" % (0.),
-					#'rent_main_rise': "%.2f%%" % (0.),
-					'rent_charge_day' : 01,
-					'rent_main_charge_day' : 01,
-					'rent_main_performance' : "%.2f%%" % (0.),
-				}
-		return res
-		
-	def write(self, cr, uid, ids, vals, context=None):
-		obj_rent = self.pool.get('rent.rent').browse(cr,uid,ids)[0]
-		if 'rent_related_real' in vals:			
-			if (obj_rent.rent_related_real != vals['rent_related_real']):
-				real_type = vals['rent_related_real'] 
-				if real_type == 'local' or real_type == 'parking':
-					vals['rent_rent_estate_id'] = False
-				if real_type == 'local' or real_type == 'estate':
-					vals['rent_rent_parking_id'] = False
-				if real_type == 'parking' or real_type == 'estate':
-					vals['rent_rent_local_id'] = False		
-		super(rent_rent, self).write(cr, uid, ids, vals, context=context)
-		if 'rent_estimates_ids' in vals:
-			obj_rent.onchange_estimations(obj_rent.rent_estimates_ids)
-		#if 'rent_amount_base' in vals: 
-		#	self.register_historic(cr,uid,obj_rent)
-		return True
-		
-	def register_historic(self,cr,uid,obj_rent):
-		debug('HISTORIC+===================')
-		#obj_rent = self.browse(cr,uid,ids)[0]
-		debug(obj_rent)
-		if obj_rent:
-			vals = {}
-			is_registrated = False
-			current_date = parser.parse(obj_rent.rent_start_date).date()
-			current_date = current_date.replace(year=date.today().year)
-			for obj_historic in obj_rent.rent_historic_ids:
-				debug(current_date.isoformat())
-				debug(obj_historic.anual_value_date)
-				if obj_historic.anual_value_date == current_date.isoformat():
-					is_registrated = True
-					match_historic = obj_historic
-					break
-			#We need to update the amount_base of the rent, so we ca
-			#charge the next part with the rate included
-			percentaje = obj_rent.rent_rise
-			prev_value = obj_rent.rent_amount_base
-			years_val = obj_rent.rent_amount_base * (1 + float(percentaje) / 100)
-			#obj_rent.write({'rent_amount_base' : years_val})
-			vals['rent_amount_base'] = years_val
-			if obj_rent.rent_related_real == 'local':
-				vals['anual_value_local_ids'] = obj_rent.rent_rent_local_id.id
-			if not is_registrated:
-				vals['rent_historic_ids'] = [(0,0,{'anual_value_rent_id':obj_rent.id,'anual_value_value':years_val,'anual_value_prev_value' : prev_value,'anual_value_rate' : obj_rent.rent_rise, 'anual_value_date' : current_date, 'anual_value_type' : 'rent', 'anual_value_local_ids':vals['anual_value_local_ids']})]
-			else:
-				vals['rent_historic_ids'] = [(1,match_historic.id,{'anual_value_value':obj_rent.rent_amount_base,'anual_value_rate' : obj_rent.rent_rise})]
-			debug(vals)
-			obj_rent.write(vals)
-		return True
-	
-	def register_main_historic(self,cr,uid,obj_rent):
-		debug('HISTORIC MAIN+===================')
-		#obj_rent = self.browse(cr,uid,ids)[0]
-		debug(obj_rent)
-		if obj_rent:
-			vals = {}
-			is_registrated = False
-			current_date = parser.parse(obj_rent.rent_main_start_date).date()
-			current_date = current_date.replace(year=date.today().year)
-			for obj_historic in obj_rent.rent_main_historic_ids:
-				debug(current_date.isoformat())
-				debug(obj_historic.anual_value_date)
-				if obj_historic.anual_value_date == current_date.isoformat():
-					is_registrated = True
-					match_historic = obj_historic
-					break
-			#We need to update the amount_base of the rent, so we ca
-			#charge the next part with the rate included
-			amount_base = obj_rent.rent_main_amount_base
-			rise = obj_rent.rent_main_rise
-			percentaje = rise
-			prev_value = amount_base
-			years_val = amount_base * (1 + float(percentaje) / 100)
-			#obj_rent.write({'rent_amount_base' : years_val})
-			vals['rent_main_amount_base'] = years_val
-			if obj_rent.rent_related_real == 'local':
-				vals['anual_value_local_ids'] = obj_rent.rent_rent_local_id.id
-			if not is_registrated:
-				vals['rent_main_historic_ids'] = [(0,0,{'anual_value_rent_id':obj_rent.id,'anual_value_value':years_val,'anual_value_prev_value' : prev_value,'anual_value_rate' : rise, 'anual_value_date' : current_date, 'anual_value_type' : 'main','anual_value_local_ids':vals['anual_value_local_ids']})]
-			else:
-				vals['rent_main_historic_ids'] = [(1,match_historic.id,{'anual_value_value':amount_base,'anual_value_rate' : rise})]
-			debug(vals)
-			obj_rent.write(vals)
-		return True
-	def _performance_per_sqr(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		for obj_rent in self.pool.get('rent.rent').browse(cr,uid,ids):
-			amounts_val = {}
-			valor = obj_rent._get_total_area(obj_rent.id,None,None)[obj_rent.id]
-			amounts_val['rent_amount_per_sqr'] = (obj_rent.rent_amount_base / valor) 
-			
-			to_exchange = {
-				'obj_rent' : obj_rent,
-				'vals'     : [('rent_amountd_per_sqr',amounts_val['rent_amount_per_sqr']),
-				],
-				'from_currency' : obj_rent.currency_id,
-				'to_currency'   : obj_rent.eqv_currency_id,
-			}
-			
-			exchanged = self._calculate_exchange(cr,uid,ids,to_exchange)
-			amounts_val['rent_amountd_per_sqr'] = exchanged['rent_amountd_per_sqr']
-			res[obj_rent.id] = amounts_val
-		return res
-		
-	def _rent_performance(self,cr,uid,ids,field_name,args,context):
-		res = {}
-	#	if args:
-	#		if 'onchange_amount' in args:
-	#			amount = args.get('onchange_amount')
-	#			total = args.get('onchange_total')
-	#			res[0] = "%.2f%%" % ((amount * 12) /  (amount== 0.00 and 1 or total) * 100)
-	#	else:
-		for obj_rent in self.pool.get('rent.rent').browse(cr,uid,ids):
-			res[obj_rent.id] = "%.2f%%" % ((obj_rent.rent_amount_base * 12) /  (obj_rent.rent_total== 0.00 and 1 or obj_rent.rent_total) * 100)
-		return res
-		
-	def _rent_amount_years(self,cr,uid,ids,field_name,args,contexto):
-		res = {}
-		for obj_rent in self.pool.get('rent.rent').browse(cr,uid,ids):
-			years_val = {}
-			
-			percentaje = obj_rent.rent_rise
-			debug(percentaje)
-			years_val['rent_rise_year2'] = obj_rent.rent_amount_base * (1 + float(percentaje) / 100)
-			years_val['rent_rise_year3'] = years_val['rent_rise_year2']  * (1 + float(percentaje) / 100)
-			
-			to_exchange = {
-				'obj_rent'      : obj_rent,
-				'vals'          : [('rent_rise_year2d',years_val['rent_rise_year2']),
-				('rent_rise_year3d',years_val['rent_rise_year3']),
-				('rent_amountd_base',obj_rent.rent_amount_base),
-				],
-				'from_currency' : obj_rent.currency_id,
-				'to_currency'   : obj_rent.eqv_currency_id,
-			}
-			
-			exchanged = self._calculate_exchange(cr,uid,ids,to_exchange)
-			years_val['rent_rise_year2d'] = exchanged['rent_rise_year2d']
-			years_val['rent_rise_year3d'] = exchanged['rent_rise_year3d']
-			
-			#Just to avoid use a separate function
-			years_val['rent_amountd_base'] = exchanged['rent_amountd_base']
-			res[obj_rent.id] = years_val
-		return res
-		
-	def inv_line_create(self, cr, uid,obj_rent,args,type='rent'):
-		res_data = {}
-		obj_company = obj_rent.rent_rent_client_id.company_id or False
-		
-		if type=='rent':
-			res_data['account_id'] = obj_rent.rent_rent_account_id.id
-		elif type == 'main':
-			res_data['account_id'] = obj_rent.rent_rent_main_account_id.id
-		#if obj_company.currency_id.id != obj_rent.currency_id.id:
-		#	new_price = res_data['price_unit'] * obj_rent.currency_id.rate
-		#	res_data['price_unit'] = new_price
-
-		return (0, False, {
-			'name': args['desc'],
-			'account_id': res_data['account_id'],
-			'price_unit': args['amount'] or 0.0,
-			'quantity': 1 ,
-			'product_id': False,
-			'uos_id': False,
-			'invoice_line_tax_id': [(6, 0, [])],
-			'account_analytic_id': False,
-			'invoice_rent_id': args['rent_id'] or False,
-		})
-	
-	def invoice_rent(self, cr, uid, ids, args,type='rent',current_date=date.today()):
-		#Creates the invoice for every rent given as arg, the args is a list of dictionaries 
-		#usually it only has one element. But it can take up 2 records to create an invoice with 2 lines
-		res = {}
-		journal_obj = self.pool.get('account.journal')
-		il = []
-		debug('GENERACION DE factura PAGO')
-		debug(args)
-		
-		for rlist in args:
-			obj_rent = self.browse(cr,uid,rlist['rent_id'])
-			il.append(self.inv_line_create(cr, uid,obj_rent,rlist,type))
-
-		obj_client = obj_rent.rent_rent_client_id
-		a = obj_client.property_account_receivable.id
-		journal_ids = journal_obj.search(cr, uid, [('type', '=','sale'),('company_id', '=',obj_client.company_id.id)],limit=1)
-
-		if not journal_ids:
-			raise osv.except_osv(_('Error !'),
-				_('There is no purchase journal defined for this company: "%s" (id:%d)') % (o.company_id.name, o.company_id.id))
-		desc = 'Factura por concepto de alquiler de  %s' % (obj_rent.rent_related_real)
-		
-		#Determines if today is the previous month for the invoice creation
-		today = current_date
-		debug(today)
-		if type=='rent':
-			date_due = (obj_rent.rent_invoiced_day <= obj_rent.rent_charge_day and date(today.year,today.month,1) or (today.replace(day=1) + timedelta(days=32)).replace(day=1))
-			date_due = date_due.replace(day=obj_rent.rent_charge_day + obj_rent.rent_grace_period)
-		elif type == 'main':
-			date_due = (obj_rent.rent_main_invoiced_day <= obj_rent.rent_main_charge_day and date(today.year,today.month,1) or (today.replace(day=1) + timedelta(days=32)).replace(day=1))
-			date_due = date_due.replace(day=obj_rent.rent_main_charge_day + obj_rent.rent_main_grace_period)
-		
-		inv = {
-			'name': obj_rent.name or desc,
-			'reference': obj_rent.name or desc,
-			'account_id': a,
-			'type': 'out_invoice',
-			'partner_id': obj_client.id,
-			'currency_id': obj_rent.currency_id.id,
-			'address_invoice_id': obj_client.address[0].id,
-			'address_contact_id': obj_client.address[0].id,
-			'journal_id': len(journal_ids) and journal_ids[0] or False,
-			'origin': obj_rent.name or desc,
-			'invoice_line': il,
-			'fiscal_position': obj_client.property_account_position.id,
-			'payment_term': obj_client.property_payment_term and o.partner_id.property_payment_term.id or False,
-			'company_id': obj_client.company_id.id,
-			'date_invoice' : today,
-			'date_due' : date_due,
-		}
-		inv_id = self.pool.get('account.invoice').create(cr, uid, inv, {'type':'out_invoice'})
-		self.pool.get('account.invoice').button_compute(cr, uid, [inv_id], {'type':'out_invoice'}, set_total=True)
-		res['invoice_id'] = inv_id
-		res['rent_id'] = obj_rent.id
-		res['invoice_type'] = type
-		self.register_rent_invoice(cr,uid,ids,res)
-		return res
-	
-	def first_rent(self,cr,uid,ids,type='rent',current_date=date.today()):
-		#for the given list of ids it creates a list of the invoice data and later calls 
-		#the invoice_rent to create every invoice
-		debug('GENERACION DE PRIMER PAGO')
-		res = []
-		debug(ids)
-		for obj_rent in ids:
-			today = current_date
-			charge_date = date(today.year,today.month,1)
-			 
-			if type == 'rent':
-				init_date = parser.parse(obj_rent.rent_start_date).date()
-			elif type == 'main':
-				init_date = parser.parse(obj_rent.rent_main_start_date).date()
-			
-			init_date = init_date.replace(year=today.year)
-			
-			if (type == 'main' and obj_rent.rent_main_inc) or type == 'rent':
-				res.append(self._invoice_data(cr,uid,ids,obj_rent,{'init_date': init_date, 'end_date' : charge_date.replace(day=calendar.mdays[charge_date.month])},type))
-			self.invoice_rent(cr,uid,ids,res,type)
-		return True
-	
-	def _invoice_main_required(self,cr,uid,ids,type='rent',current_date=date.today()):
-		#determines if the ids given require a invoice for the month
-		res = {}
-		for obj_rent in self.browse(cr,uid,ids):
-			is_required = False
-			today = current_date
-			if type == 'rent':
-					invoice_day = (obj_rent.rent_invoiced_day <= obj_rent.rent_charge_day and obj_rent.rent_charge_day - obj_rent.rent_invoiced_day or calendar.mdays[today.month] - obj_rent.rent_invoiced_day +  obj_rent.rent_charge_day + 1)
-					inv_rent_list = obj_rent.rent_invoice_ids
-			elif type == 'main':
-					invoice_day = (obj_rent.rent_main_invoiced_day <= obj_rent.rent_main_charge_day and obj_rent.rent_main_charge_day - obj_rent.rent_main_invoiced_day or calendar.mdays[today.month] - obj_rent.rent_main_invoiced_day + obj_rent.rent_main_charge_day + 1)
-					inv_rent_list = obj_rent.rent_main_invoice_ids
-			if today.day == invoice_day:
-				if (type == 'main' and obj_rent.rent_main_inc) or type == 'rent':
-					is_required = True
-					for obj_inv_reg in inv_rent_list:						
-						inv_date = parser.parse(obj_inv_reg.invoice_date).date()
-						debug(today)
-						debug(inv_date)
-						if type == 'rent':
-							start_date = parser.parse(obj_rent.rent_start_date).date()
-						elif type == 'main':
-							start_date = parser.parse(obj_rent.rent_main_start_date).date()
-						if inv_date.month == start_date.month and inv_date.year == start_date.year and len(inv_rent_list) <= 1:
-							debug("SOLO TIENE 1 FACTURA")
-							is_required = True
-						elif inv_date.month == today.month and inv_date.year == today.year:
-							debug("Tiene TIENE mas de una FACTURA")
-							is_required = False
-							break
-			res[obj_rent.id] = is_required
-		return res
-	
-	def register_rent_invoice(self,cr,uid,ids,args):
-		obj_rent = self.browse(cr,uid,args['rent_id'])
-		obj_rent.write({'rent_invoice_ids' : [(0,0,{'invoice_id':args['invoice_id'],'invoice_rent_id':obj_rent.id,'invoice_type':args['invoice_type']})]})
-		return True
-	
-	def rent_calc(self,cr,uid,ids,type='rent',current_date=date.today()):
-		#calculates the rent considering the date of change for the anual rate.
-		debug('GENERACION DE Pago Normal')
-		res = {}
-		for obj_rent in ids:
-			res_dob_inv = []
-			debug(current_date)
-			today = current_date
-			
-			if type=='rent':
-				rise_date = parser.parse(obj_rent.rent_start_date).date()
-				charge_date = (obj_rent.rent_invoiced_day <= obj_rent.rent_charge_day and date(today.year,today.month,1) or (today.replace(day=1) + timedelta(days=32)).replace(day=1))
-			elif type == 'main':
-				rise_date = parser.parse(obj_rent.rent_main_start_date).date()
-				charge_date = (obj_rent.rent_main_invoiced_day <= obj_rent.rent_main_charge_day and date(today.year,today.month,1) or (today.replace(day=1) + timedelta(days=32)).replace(day=1))
-				
-			rise_date = rise_date.replace(year=today.year)
-			
-			debug(rise_date)
-			debug(charge_date)
-			if rise_date.month == charge_date.month:
-				res_dob_inv.append(self._invoice_data(cr,uid,ids,obj_rent,{'init_date': charge_date, 'end_date' : rise_date.replace(day=rise_date.day-1)},type))
-				
-				#We need to update the amount_base of the rent, so we ca
-				#charge the next part with the rate included
-				if type=='rent':
-					self.register_historic(cr,uid,obj_rent)
-				elif type=='main':
-					self.register_main_historic(cr,uid,obj_rent)
-				obj_rent = self.browse(cr,uid,obj_rent.id)
-				res_dob_inv.append(self._invoice_data(cr,uid,ids,obj_rent,{'init_date': rise_date, 'end_date' : charge_date.replace(day=calendar.mdays[charge_date.month])},type))
-			else:
-				res_dob_inv.append(self._invoice_data(cr,uid,ids,obj_rent,{'init_date': charge_date, 'end_date' : charge_date.replace(day=calendar.mdays[charge_date.month])},type))
-			
-			debug(res_dob_inv)
-			self.invoice_rent(cr,uid,ids,res_dob_inv,type,today)
-		return True
-	
-	def _invoice_data(self,cr,uid,ids,obj_rent,date_range,type='rent'):
-		#creates a dictionary with all the needed data of the rent or maintenance
-		init_date = date_range['init_date']
-		end_date = date_range['end_date']
-		month_days = calendar.mdays[init_date.month]
-		charged_days = month_days
-		if (end_date.day == month_days and init_date.day != 1) or (end_date.day != month_days and init_date.day == 1):
-			charged_days = (end_date.day - init_date.day) + 1
-		if type == 'rent':
-			amount_base = obj_rent.rent_amount_base
-		elif type == 'main':
-			amount_base = obj_rent.rent_main_amount_base
-		
-		amount =  charged_days / float(month_days) * amount_base
-		desc = "Cobro de %s. Desde el %s hasta el %s" % ((type=='rent'and 'alquiler' or 'Mantenimiento'),init_date.strftime("%A %d %B %Y"),end_date.strftime("%A %d %B %Y"))
-		
-		res = {
-			'rent_id': obj_rent.id,
-			'amount' : amount,
-			'date'   : end_date,
-			'desc'   : desc,
-		}
-		return res
-	def day_invoice_check(self,cr,uid):
-		#MAIN CRONJOB TO BE RUNNED EVERY DAY AN CREATE INVOICES
-		self.cron_rent_invoice(cr,uid,[])
-		return True
-	def cron_rent_invoice(self,cr,uid,ids,context):
-		#gets the list of all active rents
-		rent_ids = self.search(cr,uid,[('state','=','active'),('rent_type','=','Contract')])
-		date_list = []
-		debug('CRONJOB FORCED TEST')
-		#we retrieve the date of today and the last date registered at the log 
-		#this allows to create the list with dates between those two
-		today =date.today()
-		debug(today)
-		log_id = self.pool.get('rent.invoice.log').search(cr,uid,[],order='log_date desc')
-		debug(log_id)
-		if log_id:
-			last_log = self.pool.get('rent.invoice.log').browse(cr,uid,log_id[0])
-			debug(last_log.log_date)
-			last_date = parser.parse(last_log.log_date).date() + timedelta(days=1)
-		else:
-			#if theres no record we set the today as the last_date assuming that 
-			#the cronjob has never been excecuted and add it to the list
-			last_date = today
-		
-		debug(last_date)
-		while last_date <= today:
-			date_list.append(last_date)
-			last_date += timedelta(days=1)
-		debug(date_list)
-		#once we have all that dates we run the method for each one 
-		#NOTE: date_list contains at least the today date
-		for record_date in date_list:
-			is_required = self._invoice_main_required(cr,uid,rent_ids,'rent',record_date)
-			self._method_invoice_caller(cr,uid,rent_ids,is_required,'rent',record_date)
-		
-			#after we invocied all the rents, now we can proceed with the maintenance 
-			debug("CALCULATING INVOICE FOR MAINTENANCE")
-			is_required = self._invoice_main_required(cr,uid,rent_ids,'main',record_date)
-			self._method_invoice_caller(cr,uid,rent_ids,is_required,'main',record_date)
-		debug(date_list)
-		if date_list:
-			log_desc = "CronJob ran for dates between %s to %s" % (date_list[0].strftime("%A %d %B %Y"),(len(date_list) > 1 and date_list[-1] or date_list[0]).strftime("%A %d %B %Y"))
-			self.pool.get('rent.invoice.log').create(cr,uid,{'log_date':today,'log_desc' : log_desc })
-		return True
-	
-	def _method_invoice_caller (self,cr,uid,rent_ids,is_required,type='rent',current_date=date.today()):
-		res_norm_inv = []
-		for obj_rent in self.browse(cr,uid,rent_ids):
-			if is_required[obj_rent.id]: 
-				#res_norm_inv.append(obj_rent.id)
-				res_norm_inv.append(obj_rent)
-		self.rent_calc(cr,uid,res_norm_inv,type,current_date)
-		return True
-	
-	def cron_rent_defaulter_interest(self,cr,uid):
-		#under develop
-		rent_ids = self.search(cr,uid,[('state','=','active')])
-		res = []
-		for obj_rent in self.browse(cr,uid,rent_ids):
-			today = date.today()
-			invoices_ids = self.pool.get('rent.rent.invoice').search(cr,uid,[('invoice_date','=',today.strftime('%Y-%m-%d'))])
-			for obj_invoice_rent in self.pool.get('rent.invoice.rent').browse(cr,uid,invoices_ids):
-				#date_due = parser.parse(obj_invoice_rent.date_due).date()
-				today = date.today()
-				limit_day = parser.parse(obj_invoice_rent.date_due).date().day + (obj_rent.rent_grace_period or 0)
-				if  (today.day > 8 and today.day > limit_dayand) and obj_invoice_rent.residual != 0:
-					res.append(obj_invoice_rent)
-		return True
-		
-	def action_aprove_adendum(self,cr,uid,ids,context=None):
-		debug(ids)
-		rent_ids = self.search(cr,uid,[('state','=','active'), ('rent_type','=','Adendum')])
-		debug(rent_ids)
-		for rent_aden_id in rent_ids:
-			vals = self.copy_data(cr,uid,rent_aden_id)
-			if vals:
-				if vals.get('rent_type') == 'Adendum':
-					rent_id = vals.get('rent_modif_ref')
-					org_rent = self.copy_data(cr,uid,rent_id)
-					org_rent.update({
-						'rent_type'          : 'Adendum',
-						'rent_modif_ref'     : rent_id,
-						'rent_estimates_ids' : [],
-						'rent_modif'         : [],
-						'rent_historic_ids'  : [],
-						'rent_invoice_ids'   : [],
-						'state'              : 'active'
-					})
-					vals.update({
-						'rent_modif_ref'     : False,
-						'rent_type'          : 'Contract',
-						'state'              : 'active',
-						'rent_estimates_ids' : False,
-					})
-					debug(org_rent)
-					debug(vals)
-					self.write(cr,uid,[rent_id],vals)
-					self.write(cr,uid,[rent_aden_id],org_rent)
-		return True
-	def action_first_invoice(self,cr,uid,ids,context=None):
-		#gets the list of all active rents
-		rent_ids = self.search(cr,uid,[('state','=','active')])
-		#is_required = self._invoice_required(cr,uid,rent_ids)
-		res_first_inv = []
-		res_first_main_inv = []
-		debug("CAMBIO DE ESTADOSSSSSSSSSSSSSSSSSS")
-		debug(rent_ids)
-		for obj_rent in self.browse(cr,uid,rent_ids):
-			#if is_required[obj_rent.id]: 
-			has_first = self.pool.get('rent.invoice.rent').search(cr,uid,[('invoice_rent_id','=',obj_rent.id),('invoice_type','=','rent')])
-			if not has_first and parser.parse(obj_rent.rent_start_date).date().month == date.today().month:
-				#res_first_inv.append(obj_rent.id)
-				if obj_rent.rent_type != "Adendum":
-					#we only create invoice for the contracts NOT for the adendums
-					res_first_inv.append(obj_rent)
-				percentaje = obj_rent.rent_performance.split('%')[0]
-				#we update the estimates list for the obj
-				obj_rent.write({'rent_estimates_ids' : [(0,0,{'estimate_performance': float(percentaje),'estimate_rent_id':obj_rent.id,'estimate_date' : date.today(), 'estimate_state':'final'})]})
-				
-			#We check for maintenance invoice for this we need to heck if the rent hasta a maintenance record
-			if obj_rent.rent_main_inc:
-				has_main_first = self.pool.get('rent.invoice.rent').search(cr,uid,[('invoice_rent_id','=',obj_rent.id),('invoice_type','=','main')])
-				if not has_main_first and parser.parse(obj_rent.rent_main_start_date).date().month == date.today().month:
-					if obj_rent.rent_type != "Adendum":
-						#we only create invoice for the contracts NOT for the adendums
-						res_first_main_inv.append(obj_rent)
-					percentaje = obj_rent.rent_main_performance.split('%')[0]
-					obj_rent.write({'rent_main_estimates_ids' : [(0,0,{'estimate_performance': float(percentaje),'estimate_rent_id':obj_rent.id,'estimate_date' : date.today(), 'estimate_state':'final'})]})
-		
-		debug(res_first_inv)
-		debug(res_first_main_inv)
-		self.first_rent(cr,uid,res_first_inv)
-		self.first_rent(cr,uid,res_first_main_inv,'main')
-		return {}
-	
-	def calculate_negotiation(self,cr,uid,ids,context=None):
-		res = {}
-		return { 'value' : res}
-	
-	def onchange_calculate_exchange(self,cr,uid,ids,field):
-		res = {}
-		debug('ONCHANGE')
-		debug(ids)
-		for obj_rent in self.browse(cr,uid,ids):
-		#if field:
-			res_total = self._get_total_rent(cr,uid,ids,{'rent_total','rent_total_us'},None,None)
-			res['rent_total'] = res_total[0]['rent_total']
-			res['rent_total_us'] = res_total[0]['rent_total_us']
-			
-			res['rent_performance'] = self._rent_performance(cr,uid,ids,'rent_performance',{'onchange_amount':field,'onchange_total' : res['rent_total']},None)[0]
-			
-			
-			res_years = self._rent_amount_years(cr,uid,ids,{'rent_rise_year2','rent_rise_year3','rent_amount_base','rent_rise_year2d','rent_rise_year3d','rent_amountd_base'},None)
-			res_sqr = self._performance_per_sqr(cr,uid,ids,{'rent_performance','rent_amountd_per_sqr'},None,None)
-			res['rent_rise_year2'] = res_years[0]['rent_rise_year2']
-			res['rent_rise_year3'] = res_years[0]['rent_rise_year3']
-			res['rent_amount_base'] = res_years[0]['rent_amount_base']
-			res['rent_rise_year2d'] = res_years[0]['rent_rise_year2d']
-			res['rent_rise_year3d'] = res_years[0]['rent_rise_year3d']
-			res['rent_amountd_base'] = res_years[0]['rent_amountd_base']
-			
-			res['rent_performance'] = res_sqr[0]['rent_performance']
-			res['rent_amountd_per_sqr'] = res_sqr[0]['rent_amountd_per_sqr']
-			
-			
-		#for obj_rent in self.browse(cr,uid,ids):
-		#	current_currency = obj_rent.currency_id
-		#	obj_client = obj_rent.rent_rent_client_id
-		#	company_currency = (obj_client.company_id and obj_client.company_id.currency_id.id or self._get_currency(cr,uid,context))
-		#	if company_currency  == current_currency.id:
-		#		if current_currency.name != "USD":
-		#			res['eqv_currency_id'] = pooler.get_pool(cr.dbname).get('res.currency').search(cr, uid, [('name','=','USD')])[0]
-		#		else:
-		#			res['eqv_currency_id'] = company_currency
-		#	if company_currency  != current_currency.id:
-		#		res['eqv_currency_id'] = company_currency
-		#	
-		#	obj_rent.write({'currency_id': current_currency.id, 'eqv_currency_id': res['eqv_currency_id']})
-		return { 'value' : res}
-	
-	def _calculate_exchange(self,cr,uid,ids,args,context=None):
-		val = {}
-		if args:
-			#we search for all the variables so we can exchange currencies
-			obj_rent = args['obj_rent']
-			obj_client = obj_rent.rent_rent_client_id
-			orig_currency  = args['from_currency']
-			dest_currency  = args['to_currency']
-			#Main currency required, for now we asume its the USD
-			main_currency = pooler.get_pool(cr.dbname).get('res.currency').search(cr, uid, [('rate','=', 1.0)])[0]
-			for record in args['vals']:
-				value = record[1]
-				if (orig_currency.id != dest_currency.id):
-					value = value / orig_currency.rate
-					if dest_currency.id != main_currency:
-						value = value * dest_currency.rate
-				val[record[0]] = value
-		return val
-	def _rent_main_performance(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		for obj_rent in self.pool.get('rent.rent').browse(cr,uid,ids):
-			total = 1
-			debug(obj_rent.rent_main_total)
-			res[obj_rent.id] = "%.2f%%" % ((obj_rent.rent_main_amount_base * 12) /  (obj_rent.rent_main_total== 0.00 and 1 or obj_rent.rent_main_total) * 100) 
-			debug(res)
-		return res
-		
-	def _rent_main_amount_years(self,cr,uid,ids,field_name,args,contexto):
-		res = {}
-		for obj_rent in self.pool.get('rent.rent').browse(cr,uid,ids):
-			years_val = {}
-
-			percentaje = obj_rent.rent_main_rise
-			years_val['rent_main_rise_year2'] = obj_rent.rent_main_amount_base * (1 + float(percentaje) / 100)
-			years_val['rent_main_rise_year3'] = years_val['rent_main_rise_year2']  * (1 + float(percentaje) / 100)
-			
-			to_exchange = {
-				'obj_rent'      : obj_rent,
-				'vals'          : [('rent_main_rise_year2d',years_val['rent_main_rise_year2']),
-				('rent_main_rise_year3d',years_val['rent_main_rise_year3']),
-				('rent_main_amountd_base',obj_rent.rent_main_amount_base),
-				],
-				'from_currency' : obj_rent.currency_id,
-				'to_currency'   : obj_rent.eqv_currency_id,
-			}
-			
-			exchanged = self._calculate_exchange(cr,uid,ids,to_exchange)
-			years_val['rent_main_rise_year2d'] = exchanged['rent_main_rise_year2d']
-			years_val['rent_main_rise_year3d'] = exchanged['rent_main_rise_year3d']
-			
-			#Just to avoid use a separate function
-			years_val['rent_main_amountd_base'] = exchanged['rent_main_amountd_base']
-			
-			res[obj_rent.id] = years_val
-		return res
-	
-	_columns = {
-		'name'                  : fields.char('Name',size=64,states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_rent_client_id'   : fields.many2one('res.partner','Client', required=True, states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_end_date'         : fields.date('Ending Date', required=True, states={'active':[('readonly',False)], 'finished':[('readonly',True)]}),
-		'rent_ending_motif'     : fields.selection([('early','Early Return'),('expiration','Contract Expiration'),('eviction','No payment eviction'), ('others','Various problems with tenant')],'Ending Motif'),
-		'rent_ending_motif_desc': fields.text('Ending Motif Description'),
-		
-		'rent_rise'             : fields.float('Anual Rise', required=True, states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
-		#'rent_rise'             : fields.char('Anual Rise',size=64, required=True, states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_amount_base'      : fields.float('Final Price $', required=True, states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_performance'      : fields.function(_rent_performance, type='char',method = True,string='Performance'),
-		'rent_rise_year2'       : fields.function(_rent_amount_years, type='float',method = True,string='Year 2 $', multi='Years'),
-		'rent_rise_year3'       : fields.function(_rent_amount_years, type='float',method = True,string='Year 3 $', multi='Years'),
-		'rent_amount_per_sqr'   : fields.function(_performance_per_sqr, type='float',method = True,string='Amount per Sqr', multi='negot'),
-		
-		'rent_amountd_per_sqr'  : fields.function(_performance_per_sqr, type='float',method = True,string='Amount m2 $', multi='negot'),
-		'rent_amountd_base'     : fields.function(_rent_amount_years, type='float',method = True,string='Final Price $', multi='Years'),
-		'rent_rise_year2d'      : fields.function(_rent_amount_years, type='float',method = True,string='Year 2  $', multi='Years'),
-		'rent_rise_year3d'      : fields.function(_rent_amount_years, type='float',method = True,string='Year 3  $', multi='Years'),
-		'rent_show_us_eq'       : fields.boolean('Check USD Currency Equivalent',store=False),
-		'rent_total_us'         : fields.function(_get_total_rent,type='float',method=True,string='Total Paid',multi='total'),
-		
-		'rent_type'             : fields.selection([('Contract','Contract'),('Adendum','Adendum'),('Renovation','Renovation')],'Type', readonly=True),
-		'state'                 : fields.selection([('active','Active'),('finished','Inactive'),('draft','Draft')],'Status', readonly=True),
-		'rent_start_date'       : fields.date('Starting Date', required=True, states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_total'            : fields.function(_get_total_rent,type='float',method=True,string='Total Paid',multi='total'),
-		'rent_rent_local_id'    : fields.many2one('rent.floor.local','Local', states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_rent_parking_id'  : fields.many2one('rent.floor.parking','Parking', states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_rent_estate_id'   : fields.many2one('rent.estate','Estate', states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_related_real'     : fields.selection([('local','Locals'),('parking','Parking'),('estate','Estates')],'Type of Real Estate', required=True,states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_years'            : fields.function(_calculate_years,type='integer',method=True,string = 'Years' ,help='Check if you want to calculate a rent for locals'),
-		'rent_modif'            : fields.one2many('rent.rent', 'rent_modif_ref','Contract reference', states={'draft':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_modif_ref'        : fields.many2one('rent.rent', 'Modifications',ondelete='cascade'),
-		'currency_id'           : fields.many2one('res.currency', 'Currency', required=True,states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'eqv_currency_id'       : fields.many2one('res.currency', 'Currency Equivalence', required=True),
-		'rent_estimates_ids'    : fields.one2many('rent.rent.estimate', 'estimate_rent_id','Estimates',states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),         
-		'rent_historic_ids'     : fields.one2many('rent.rent.anual.value', 'anual_value_rent_id','Historic',readonly=True, domain=[('anual_value_type', '=', 'rent')]),
-		'rent_charge_day'       : fields.integer('Charge Day', required=True,help='Indica el dia del mes para realizar los cobros del alquiler.'),
-		'rent_invoice_ids'      : fields.one2many('rent.invoice.rent','invoice_rent_id','Rent Invoices', domain=[('invoice_type', '=', 'rent')],readonly=True),
-		'rent_invoiced_day'     : fields.integer('Invoiced Day', required=True,help='Indicates de how many days before of the charge day will create the invoice'),
-		'rent_grace_period'     : fields.integer('Grace Period', required=True,help='Indicates de how many days after the charge day will allow to paid an invoice without Interest for delay'),
-		
-		'rent_rent_account_id'  : fields.property(
-			'account.account',
-			type='many2one',
-			relation='account.account',
-			string="Income Account",
-			method=True,
-			view_load=True,
-			help="This account will be used for invoices instead of the default one to value sales for the current rent",required=True),
-		'rent_rent_acc_int_id'  : fields.property(
-			'account.account',
-			type='many2one',
-			relation='account.account',
-			string="Interest Account",
-			method=True,
-			view_load=True,
-			help="This account will be used for invoices instead of the default one to value expenses for the current rent",required=True),
-		'rent_rent_real_area'   : fields.function(_get_total_area,type='float',method=True,string='Area'),
-		
-		'rent_main_inc'              : fields.boolean('Include Maintenance Rent'),
-		
-		#'rent_main_rise'             : fields.char('Anual Rise',size=64, states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_main_rise'             : fields.float('Anual Rise', states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_main_amount_base'      : fields.float('Final Price $', states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_main_performance'      : fields.function(_rent_main_performance, type='char',method = True,string='Performance'),
-		'rent_main_amountd_base'     : fields.function(_rent_main_amount_years, type='float',method = True,string='Final Price $', multi='Years_main'),
-		'rent_main_rise_year2'       : fields.function(_rent_main_amount_years, type='float',method = True,string='Year 2  $', multi='Years_main'),
-		'rent_main_rise_year3'       : fields.function(_rent_main_amount_years, type='float',method = True,string='Year 3  $', multi='Years_main'),
-		'rent_main_rise_year2d'      : fields.function(_rent_main_amount_years, type='float',method = True,string='Year 2  $', multi='Years_main'),
-		'rent_main_rise_year3d'      : fields.function(_rent_main_amount_years, type='float',method = True,string='Year 3  $', multi='Years_main'),
-		'rent_main_show_us_eq'       : fields.boolean('Check USD Currency Equivalent',store=False),
-		'rent_main_estimates_ids'    : fields.one2many('rent.rent.main.estimate', 'estimate_maintenance_id','Estimates',states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_main_invoice_ids'      : fields.one2many('rent.invoice.rent','invoice_rent_id','Rent Invoices', domain=[('invoice_type', '=', 'main')],readonly=True),
-		'rent_main_total'            : fields.float('Total Paid'),
-		#'rent_main_total_us'         : fields.float('Total Paid $'),
-		'rent_main_historic_ids'     : fields.one2many('rent.rent.anual.value', 'anual_value_rent_id','Historic',readonly=True, domain=[('anual_value_type', '=', 'main')]),      
-		'rent_main_company_id'       : fields.many2one('res.company', 'Supplier Company'),      
-		
-		'rent_main_charge_day'       : fields.integer('Charge Day',help='Indica el dia del mes para realizar los cobros del alquiler.'),
-		'rent_main_invoiced_day'     : fields.integer('Invoiced Day',help='Indicates de how many days before of the charge day will create the invoice'),
-		'rent_main_grace_period'     : fields.integer('Grace Period',help='Indicates de how many days after the charge day will allow to paid an invoice without Interest for delay'),   
-		
-		'rent_rent_main_account_id'  : fields.property(
-			'account.account',
-			type='many2one',
-			relation='account.account',
-			string="Income Account",
-			method=True,
-			view_load=True,
-			help="This account will be used for invoices instead of the default one to value sales for the current rent"),
-		'rent_rent_main_acc_int_id'  : fields.property(
-			'account.account',
-			type='many2one',
-			relation='account.account',
-			string="Interest Account",
-			method=True,
-			view_load=True,
-			help="This account will be used for invoices instead of the default one to value expenses for the current rent"),
-			
-		'rent_main_end_date'         : fields.date('Ending Date', states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
-		'rent_main_start_date'       : fields.date('Starting Date', states={'active':[('readonly',True)], 'finished':[('readonly',True)]}),
-	}
-	
-	_defaults = {
-		'state'        : 'draft',
-		'rent_type'    : 'Contract',
-		'currency_id': _get_currency,
-		'eqv_currency_id': _get_currency_eqv,
-		'rent_amount_base' : 0.00,
-		'rent_main_amount_base' : 0.00,
-		#'rent_rise'     : "%.2f%%" % (0.),
-		#'rent_main_rise': "%.2f%%" % (0.),
-		'rent_charge_day' : 01,
-		'rent_main_charge_day' : 01,
-		'rent_main_performance' : "%.2f%%" % (0.),
-	}
-rent_rent()
-
-class rent_rent_estimate(osv.osv):
-	_name = 'rent.rent.estimate'
-		
-	def _performance_years(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		for obj_estimate in self.pool.get('rent.rent.estimate').browse(cr,uid,ids):
-			if obj_estimate.estimate_performance:
-				res[obj_estimate.id] = 1 / (obj_estimate.estimate_performance / 100.00)
-		return res
-	def _performance_amount(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		amount = 0
-		for obj_estimate in self.pool.get('rent.rent.estimate').browse(cr,uid,ids):
-			obj_rent = obj_estimate.estimate_rent_id
-			amounts_val = {}
-			
-			currency_id = obj_rent.currency_id
-			debug(currency_id)
-			rate_cr = currency_id.rate
-			rate_us = 1
-			amounts_val['estimate_amountc'] = (obj_estimate.estimate_rent_id.rent_total * (obj_estimate.estimate_performance/100.00)  / 12) / rate_us
-			amounts_val['estimate_amountd'] = (obj_estimate.estimate_rent_id.rent_total * (obj_estimate.estimate_performance/100.00)  / 12) / rate_cr
-			res[obj_estimate.id] = amounts_val
-		return res
-	def _performance_currency(self,cr,uid,ids,field_name,args,contexto):
-		res = {}
-		for obj_estimate in self.pool.get('rent.rent.estimate').browse(cr,uid,ids):
-			obj_rent = obj_estimate.estimate_rent_id
-			
-			currencies_val = {}
-			valor = obj_rent._get_total_area(obj_rent.id,None,None)[obj_rent.id]
-			debug(valor)
-			currencies_val['estimate_colones'] = obj_estimate.estimate_amountc / valor
-			currencies_val['estimate_dollars'] = obj_estimate.estimate_amountd / valor
-			res[obj_estimate.id] = currencies_val
-		return res
-	_columns = {
-		'estimate_performance'       : fields.float('Performance(%)',digits=(12,2), help='This a percentaje number'),
-		'estimate_years'             : fields.function(_performance_years, type='float',method = True,string='Years for reinv.'),
-		'estimate_amountc'           : fields.function(_performance_amount, type='float',method = True,string='Amount', multi=True),
-		'estimate_colones'           : fields.function(_performance_currency, type='float',method = True,string='c / m2',multi='Currency'),
-		'estimate_amountd'           : fields.function(_performance_amount, type='float',method = True,string='Amount $', multi=True),
-		'estimate_dollars'           : fields.function(_performance_currency, type='float',method = True,string='s / m2',multi='Currency'),
-		'estimate_rent_id'            : fields.many2one('rent.rent','Rent'),
-		'estimate_date'              : fields.date('Fecha'),
-		'estimate_state'             : fields.selection([('final','Used'),('recommend','Recommend'),('min','Min'),('norec','Not Recomended')],'Status',readonly=False),
-	}
-	_order = "estimate_date desc"
-	_defaults = {
-		'estimate_date'  : date.today().strftime('%d/%m/%Y'),
-	}
-rent_rent_estimate()
-
-class rent_rent_main_estimate(osv.osv):
-	_name = 'rent.rent.main.estimate'
-		
-	def _performance_years(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		for obj_estimate in self.pool.get('rent.rent.main.estimate').browse(cr,uid,ids):
-			if obj_estimate.estimate_performance:
-				res[obj_estimate.id] = 1 / (obj_estimate.estimate_performance / 100.00)
-		return res
-	def _performance_amount(self,cr,uid,ids,field_name,args,context):
-		res = {}
-		amount = 0
-		for obj_estimate in self.pool.get('rent.rent.main.estimate').browse(cr,uid,ids):
-			obj_rent = obj_estimate.estimate_maintenance_id
-			amounts_val = {}
-			
-			currency_id = obj_rent.currency_id
-			debug(currency_id)
-			rate_cr = currency_id.rate
-			rate_us = 1
-			total = obj_estimate.estimate_maintenance_id.rent_main_total
-			amounts_val['estimate_amountc'] = (total * (obj_estimate.estimate_performance/100.00)  / 12) / rate_us
-			amounts_val['estimate_amountd'] = (total * (obj_estimate.estimate_performance/100.00)  / 12) / rate_cr
-			res[obj_estimate.id] = amounts_val
-		return res
-	def _performance_currency(self,cr,uid,ids,field_name,args,contexto):
-		res = {}
-		for obj_estimate in self.pool.get('rent.rent.main.estimate').browse(cr,uid,ids):
-			obj_rent = obj_estimate.estimate_maintenance_id
-			
-			currencies_val = {}
-			valor = obj_rent._get_total_area(obj_rent.id,None,None)[obj_rent.id]
-			debug(valor)
-			currencies_val['estimate_colones'] = obj_estimate.estimate_amountc / valor
-			currencies_val['estimate_dollars'] = obj_estimate.estimate_amountd / valor
-			res[obj_estimate.id] = currencies_val
-		return res
-	_columns = {
-		'estimate_performance'       : fields.float('Performance(%)',digits=(12,2), help='This a percentaje number'),
-		'estimate_years'             : fields.function(_performance_years, type='float',method = True,string='Years for reinv.'),
-		'estimate_amountc'           : fields.function(_performance_amount, type='float',method = True,string='Amount', multi=True),
-		'estimate_colones'           : fields.function(_performance_currency, type='float',method = True,string='c / m2',multi='Currency'),
-		
-		'estimate_amountd'           : fields.function(_performance_amount, type='float',method = True,string='Amount $', multi=True),
-		'estimate_dollars'           : fields.function(_performance_currency, type='float',method = True,string='s / m2',multi='Currency'),
-		
-		'estimate_maintenance_id'    : fields.many2one('rent.rent','Rent'),
-		'estimate_date'              : fields.date('Fecha'),
-		'estimate_state'             : fields.selection([('final','Used'),('recommend','Recommend'),('min','Min'),('norec','Not Recomended')],'Status',readonly=False),
-	}
-	_order = "estimate_date desc"
-	_defaults = {
-		'estimate_date'  : date.today().strftime('%d/%m/%Y'),
-	}
-rent_rent_main_estimate()
-
-class rent_rent_anual_value(osv.osv):
-	_name = 'rent.rent.anual.value'
-	_columns = {
-		'anual_value_rent_id'    : fields.many2one('rent.rent','Rent reference'),
-		'anual_value_prev_value' : fields.float('Prev. Value',help='This value was taken from the record of rent at the indicated date'),
-		'anual_value_value'      : fields.float('Value',help='This value was taken from the record of rent at the indicated date'),
-		'anual_value_date'       : fields.date('Period'),
-		'anual_value_rate'       : fields.char('Anual Rise',size=64),
-		'anual_value_local_ids'      : fields.many2one('rent.floor.local','Local reference'),
-		'anual_value_type'       : fields.selection([('main','Maintenance'),('rent','Rent')],'Type'),
-	}
-	
-rent_rent_anual_value()
-
-
-#This class changes the references of the invoice
-#to enable it add a refeerence to the rent
-class rent_invoice_line(osv.osv):
-	_name = 'account.invoice.line'
-	_inherit = 'account.invoice.line'
-	
-	def rent_id_change(self, cr, uid, ids, rent, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None):
-		res = {}
-		company_id = context.get('company_id',False)
-		obj_rent = self.pool.get('rent.rent').browse(cr, uid, rent, context=context)		
-		debug(obj_rent)		
-		res['name'] = obj_rent.name
-		res['price_unit'] = obj_rent.rent_amount_base
-		
-		if obj_rent.rent_related_real == 'estate':
-			res['account_id'] = obj_rent.rent_rent_estate_id.estate_account_id
-		else:
-			res['account_id'] = obj_rent.rent_rent_local_id.local_building.building_estate_id.estate_account_id
-			
-		obj_company = self.pool.get('res.company').browse(cr, uid, company_id, context=context)
-		if obj_company.currency_id.id != obj_rent.currency_id.id:
-			new_price = res['price_unit'] * obj_rent.currency_id.rate
-			res['price_unit'] = new_price
-		debug(res)
-		return {'value' : res}
-	
-	def onchange_type(self,cr,uid,ids,field):
-		res = {}
-		res['product_id'] = False
-		res['invoice_rent_id'] = False
-		debug(res)
-		return {'value' : res}
-	
-	_columns = {
-		'invoice_type'    : fields.selection([('rent','Rent'),('product','Product')],'Type',help = 'Select one of this to determine the type of invoice to create'),
-		'invoice_rent_id'    : fields.many2one('rent.rent','Rent id'),
-	}
-	_defaults = {
-		'invoice_type'  : 'rent',
-	}
-rent_invoice_line()
-
-#This class is used to keep reference of all the invoices
-#that have been register to the rent
-class rent_rent_invoice(osv.osv):
-	_name = 'rent.invoice.rent'
-	_columns = {
-		'invoice_id'       : fields.many2one('account.invoice','Invoice', ondelete='cascade'),
-		'invoice_rent_id'  : fields.many2one('rent.rent', 'Rent',ondelete='cascade'),
-		'invoice_date'     : fields.related('invoice_id','date_invoice', type='date',relation='account.invoice',string='Date',readonly=True,store=False),
-		'invoice_amount'   : fields.related('invoice_id','amount_total', type='float',relation='account.invoice',string='Amount Total',readonly=True,store=False),
-		'invoice_state'    : fields.related('invoice_id','state', type='char',relation='account.invoice',string='State',readonly=True,store=False),
-		'invoice_number'   : fields.related('invoice_id','number', type='char',size=64,relation='account.invoice',string='Invoice Number',readonly=True,store=False),
-		'invouce_residual' : fields.related('invoice_id','residual', type='float',relation='account.invoice',string='Residual',readonly=True,store=False),
-		'invoice_type'     : fields.selection([('main','Maintenance'),('rent','Rent')],'Type'),
-		
-	}
-
-rent_rent_invoice()
-
-class rent_invoice_log(osv.osv):
-	_name = 'rent.invoice.log'
-	_order = 'log_date'
-	_columns = {
-		'log_date' : fields.date('Date'),
-		'log_desc' : fields.char('Description',size=200),
-		#'log_rent' : fields.many2one('rent.rent','Rent Ref'),
-	}
-rent_invoice_log()
-#
-#
-class rent_contract(osv.osv):
-	_name = 'rent.contract'
-	
-	def create(self,cr,uid, vals,context=None):
-		debug("============================CREANDO EL NUEVO CONTRATO")
-		contract_id = super(rent_contract,self).create(cr,uid,vals,context)
-		debug(contract_id)
-		obj_contract = self.pool.get('rent.contract').browse(cr,uid,contract_id)
-		debug(obj_contract)
-		i = 0
-		for clause_perm in self.pool.get('rent.contract.clause').search(cr,uid,[('clause_is_basic','=','True')]):
-		#for obj_clause_perm in self.pool.get('rent.contract.clause').browse(cr,uid,clause_perm):
-			#clause_rel_id = self.pool.get('rent.contract.clause.rel').create(cr,uid,{'sequence':i,'rent_contract_id':obj_contract.id,'rent_contract_clause_id' : clause_perm},context)
-			#obj_clause_perm = self.pool.get('rent.contract.clause.rel').browse(cr,uid,clause_rel_id)
-			#if obj_clause_perm:
-			obj_contract.write({'contract_clauses_ids' : [(0,0,{'sequence':i,'rent_contract_id':obj_contract.id,'rent_contract_clause_id' : clause_perm})]})
-			i+=1
-		return obj_contract.id
-				
-	_columns = {
-		'name'             : fields.char('Reference', size=64),
-		'contract_rent_id'    : fields.many2one('rent.rent','Rent Reference'),
-		'contract_clauses_ids' : fields.one2many('rent.contract.clause.rel','rent_contract_id','Clausulas'),
-		#'contract_clauses' : fields.many2many('rent.contract.clause','rent_contract_clause_rel','name','clause_code','Clausulas'),
-		#'contract_design'  : fields.char('Design',size=64),
-	}
-	
-rent_contract()
-
-#
-#
-#
-class rent_contract_template(osv.osv):
-	_name = 'rent.contract.template'
-rent_contract_template()
-
-#Class that holds all the clauses for the contracts
-#this class is used to create a custom contract
-#it simulates a sintaxys analizer to subtitute codes with the corresponding clause
-class rent_contract_clause(osv.osv):
-	_name = 'rent.contract.clause'
-	_rec_name = 'clause_code'
-	_columns = {
-		'clause_code'     : fields.char('Reference',size=64,required=True,help='Reference code for the clause, used to create custom contracts'),
-		'clause_subject'  : fields.char('Subject',size=64,required=True),
-		'clause_body'     : fields.text('Body',required=True),
-		'clause_is_basic' : fields.boolean('Priority', help = 'Check if the clause should allways appear on every contract you create'),
-		#'clause_contract' : fields.many2many('rent.contract','rent_contract_clause','id','id','Contracts'),
-	}
-rent_contract_clause()
-
-
-class rent_contract_clause_rel(osv.osv):
-	_name = 'rent.contract.clause.rel'
-	_rec_name = 'rent_contract_id'
-	_columns = {
-		'rent_contract_id'        : fields.many2one('rent.contract','Contract Reference'),
-		'rent_contract_clause_id' : fields.many2one('rent.contract.clause','Contract Reference'),
-		'sequence'                : fields.integer('Sequence'),
-	}
-rent_contract_clause_rel()

=== added file 'rent/rent_contract_report.xml'
--- rent/rent_contract_report.xml	1970-01-01 00:00:00 +0000
+++ rent/rent_contract_report.xml	2012-01-05 00:57:30 +0000
@@ -0,0 +1,6 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<openerp>
+	<data>
+		<report id = "rent_contract_report" string = "Print Contract" model = "rent.contract" name = "contract_report" rml = "rent/report/contracts.rml"  auto = "False"/>
+	</data>
+</openerp>

=== removed file 'rent/rent_contract_report.xml'
--- rent/rent_contract_report.xml	2011-11-01 15:28:02 +0000
+++ rent/rent_contract_report.xml	1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<openerp>
-	<data>
-		<report id = "rent_contract_report" string = "Print Contract" model = "rent.contract" name = "contract_report" rml = "rent/report/contracts.rml"  auto = "False"/>
-	</data>
-</openerp>

=== added file 'rent/rent_data.xml'
--- rent/rent_data.xml	1970-01-01 00:00:00 +0000
+++ rent/rent_data.xml	2012-01-05 00:57:30 +0000
@@ -0,0 +1,3331 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+	<data noupdate="0">
+		<!--
+		CANTON AND DISTRICT FROM CR
+		-->
+
+		<!--
+		===============================
+			Canton of San José
+		===============================
+		-->
+		<record id="canton_SJ_SJSJ" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_SJ"/>
+			<field name="name">San José</field>
+			<field name = "code">SJSJ</field>
+		</record>
+
+		<record id="district_SJSJ_CAR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_SJSJ"/>
+			<field name="name">El Carmen</field>
+			<field name = "code">CAR</field>
+		</record>
+		<record id="district_SJSJ_MER" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_SJSJ"/>
+			<field name="name">Merced</field>
+			<field name = "code">MER</field>
+		</record>
+		<record id="district_SJSJ_HOS" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_SJSJ"/>
+			<field name="name">Hospital</field>
+			<field name = "code">HOS</field>
+		</record>
+		<record id="district_SJSJ_CAT" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_SJSJ"/>
+			<field name="name">Catedral</field>
+			<field name = "code">CAT</field>
+		</record>
+		<record id="district_SJSJ_ZAP" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_SJSJ"/>
+			<field name="name">Zapote</field>
+			<field name = "code">ZAP</field>
+		</record>
+		<record id="district_SJSJ_SFDR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_SJSJ"/>
+			<field name="name">San Francisco de Dos Ríos</field>
+			<field name = "code">SFDR</field>
+		</record>
+		<record id="district_SJSJ_URU" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_SJSJ"/>
+			<field name="name">Uruca</field>
+			<field name = "code">URU</field>
+		</record>
+		<record id="district_SJSJ_MR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_SJSJ"/>
+			<field name="name">Mata Redonda</field>
+			<field name = "code">MR</field>
+		</record>
+		<record id="district_SJSJ_PAV" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_SJSJ"/>
+			<field name="name">Pavas</field>
+			<field name = "code">PAV</field>
+		</record>
+		<record id="district_SJSJ_HAT" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_SJSJ"/>
+			<field name="name">Hatillo</field>
+			<field name = "code">HAT</field>
+		</record>
+		<record id="district_SJSJ_SJSS" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_SJSJ"/>
+			<field name="name">San Sebastián</field>
+			<field name = "code">SJSS</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Escazú
+		===============================
+		-->
+		<record id="canton_SJ_ESC" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_SJ"/>
+			<field name="name">Escazú</field>
+			<field name = "code">ESC</field>
+		</record>
+
+		<record id="district_ESC_EESC" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_ESC"/>
+			<field name="name">Escazú</field>
+			<field name = "code">EESC</field>
+		</record>
+		<record id="district_ESC_STAN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_ESC"/>
+			<field name="name">San Antonio</field>
+			<field name = "code">STAN</field>
+		</record>
+		<record id="district_ESC_STRA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_ESC"/>
+			<field name="name">San Rafael</field>
+			<field name = "code">STRA</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Desamparados
+		===============================
+		-->
+		<record id="canton_SJ_DES" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_SJ"/>
+			<field name="name">Desamparados</field>
+			<field name = "code">DES</field>
+		</record>
+
+		<record id="district_DES_DDES" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_DES"/>
+			<field name="name">Desamparados</field>
+			<field name = "code">DDES</field>
+		</record>
+		<record id="district_DES_STMI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_DES"/>
+			<field name="name">San Miguel</field>
+			<field name = "code">STMI</field>
+		</record>
+		<record id="district_DES_SJDD" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_DES"/>
+			<field name="name">San Juan de Dios</field>
+			<field name = "code">SJDD</field>
+		</record>
+		<record id="district_DES_SRA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_DES"/>
+			<field name="name">San Rafael Arriba</field>
+			<field name = "code">SRA</field>
+		</record>
+		<record id="district_DES_DSTA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_DES"/>
+			<field name="name">San Antonio</field>
+			<field name = "code">DSTA</field>
+		</record>
+		<record id="district_DES_FRA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_DES"/>
+			<field name="name">Frailes</field>
+			<field name = "code">FRA</field>
+		</record>
+		<record id="district_DES_PAT" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_DES"/>
+			<field name="name">Patarrá</field>
+			<field name = "code">PAT</field>
+		</record>
+		<record id="district_DES_STCR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_DES"/>
+			<field name="name">San Cristóbal</field>
+			<field name = "code">STCR</field>
+		</record>
+		<record id="district_DES_ROS" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_DES"/>
+			<field name="name">Rosario</field>
+			<field name = "code">ROS</field>
+		</record>
+		<record id="district_DES_DAM" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_DES"/>
+			<field name="name">Damas</field>
+			<field name = "code">DAM</field>
+		</record>
+		<record id="district_DES_SRAB" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_DES"/>
+			<field name="name">San Rafael Abajo</field>
+			<field name = "code">SRAB</field>
+		</record>
+		<record id="district_DES_GRA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_DES"/>
+			<field name="name">Gravilias</field>
+			<field name = "code">GRA</field>
+		</record>
+		<record id="district_DES_LG" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_DES"/>
+			<field name="name">Los Guido</field>
+			<field name = "code">LG</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Puriscal
+		===============================
+		-->
+		<record id="canton_SJ_PUR" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_SJ"/>
+			<field name="name">Puriscal</field>
+			<field name = "code">PUR</field>
+		</record>
+
+		<record id="district_PUR_SAN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_PUR"/>
+			<field name="name">Santiago</field>
+			<field name = "code">SAN</field>
+		</record>
+		<record id="district_PUR_MS" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_PUR"/>
+			<field name="name">Mercedes Sur</field>
+			<field name = "code">MS</field>
+		</record>
+		<record id="district_PUR_BAR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_PUR"/>
+			<field name="name">Barbacoas</field>
+			<field name = "code">BAR</field>
+		</record>
+		<record id="district_PUR_GA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_PUR"/>
+			<field name="name">Grifo Alto</field>
+			<field name = "code">GA</field>
+		</record>
+		<record id="district_PUR_PSTR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_PUR"/>
+			<field name="name">San Rafael</field>
+			<field name = "code">PSTR</field>
+		</record>
+		<record id="district_PUR_CAN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_PUR"/>
+			<field name="name">Candelarita</field>
+			<field name = "code">CAN</field>
+		</record>
+		<record id="district_PUR_DESI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_PUR"/>
+			<field name="name">Desamparaditos</field>
+			<field name = "code">DESI</field>
+		</record>
+		<record id="district_PUR_PSTA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_PUR"/>
+			<field name="name">San Antonio</field>
+			<field name = "code">PSTA</field>
+		</record>
+		<record id="district_PUR_CHI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_PUR"/>
+			<field name="name">Chires</field>
+			<field name = "code">CHI</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Tarrazú
+		===============================
+		-->
+		<record id="canton_SJ_TAR" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_SJ"/>
+			<field name="name">Tarrazú</field>
+			<field name = "code">TAR</field>
+		</record>
+
+		<record id="district_TAR_TSTM" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_TAR"/>
+			<field name="name">San Marcos</field>
+			<field name = "code">TSTM</field>
+		</record>
+		<record id="district_TAR_STLO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_TAR"/>
+			<field name="name">San Lorenzo</field>
+			<field name = "code">STLO</field>
+		</record>
+		<record id="district_TAR_TSTC" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_TAR"/>
+			<field name="name">San Carlos</field>
+			<field name = "code">TSTC</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Aserrí
+		===============================
+		-->
+		<record id="canton_SJ_ASE" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_SJ"/>
+			<field name="name">Aserrí</field>
+			<field name = "code">ASE</field>
+		</record>
+
+		<record id="district_ASE_AASE" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_ASE"/>
+			<field name="name">Aserrí</field>
+			<field name = "code">AASE</field>
+		</record>
+		<record id="district_ASE_TTAR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_ASE"/>
+			<field name="name">Tarbaca</field>
+			<field name = "code">TTAR</field>
+		</record>
+		<record id="district_ASE_VDJ" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_ASE"/>
+			<field name="name">Vuelta de Jorco</field>
+			<field name = "code">VDJ</field>
+		</record>
+		<record id="district_ASE_STGA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_ASE"/>
+			<field name="name">San Gabriel</field>
+			<field name = "code">STGA</field>
+		</record>
+		<record id="district_ASE_LEG" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_ASE"/>
+			<field name="name">Legua</field>
+			<field name = "code">LEG</field>
+		</record>
+		<record id="district_ASE_MON" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_ASE"/>
+			<field name="name">Monterrey</field>
+			<field name = "code">MON</field>
+		</record>
+		<record id="district_ASE_SAL" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_ASE"/>
+			<field name="name">Salitrillos</field>
+			<field name = "code">SAL</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Mora
+		===============================
+		-->
+		<record id="canton_SJ_MOR" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_SJ"/>
+			<field name="name">Mora</field>
+			<field name = "code">MOR</field>
+		</record>
+
+		<record id="district_MOR_COL" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_MOR"/>
+			<field name="name">Colón</field>
+			<field name = "code">COL</field>
+		</record>
+		<record id="district_MOR_GUAY" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_MOR"/>
+			<field name="name">Guayabo</field>
+			<field name = "code">GUAY</field>
+		</record>
+		<record id="district_MOR_TAB" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_MOR"/>
+			<field name="name">Tabarcia</field>
+			<field name = "code">TAB</field>
+		</record>
+		<record id="district_MOR_PN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_MOR"/>
+			<field name="name">Piedras Negras</field>
+			<field name = "code">PN</field>
+		</record>
+		<record id="district_MOR_PIC" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_MOR"/>
+			<field name="name">Picagres</field>
+			<field name = "code">PIC</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Goicoechea
+		===============================
+		-->
+		<record id="canton_SJ_GOI" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_SJ"/>
+			<field name="name">Goicoechea</field>
+			<field name = "code">GOI</field>
+		</record>
+
+		<record id="district_GOI_GUAD" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_GOI"/>
+			<field name="name">Guadalupe</field>
+			<field name = "code">GUAD</field>
+		</record>
+		<record id="district_GOI_STFR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_GOI"/>
+			<field name="name">San Francisco</field>
+			<field name = "code">STFR</field>
+		</record>
+		<record id="district_GOI_GOCB" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_GOI"/>
+			<field name="name">Calle Blancos</field>
+			<field name = "code">GOCB</field>
+		</record>
+		<record id="district_GOI_MDP" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_GOI"/>
+			<field name="name">Mata de Plátano</field>
+			<field name = "code">MDP</field>
+		</record>
+		<record id="district_GOI_IP" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_GOI"/>
+			<field name="name">Ipís</field>
+			<field name = "code">IP</field>
+		</record>
+		<record id="district_GOI_RR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_GOI"/>
+			<field name="name">Rancho Redondo</field>
+			<field name = "code">RR</field>
+		</record>
+		<record id="district_GOI_PURR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_GOI"/>
+			<field name="name">Purral</field>
+			<field name = "code">PURR</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Santa Ana
+		===============================
+		-->
+		<record id="canton_SJ_STA" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_SJ"/>
+			<field name="name">Santa Ana</field>
+			<field name = "code">STA</field>
+		</record>
+
+		<record id="district_STA_SSTA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_STA"/>
+			<field name="name">Santa Ana</field>
+			<field name = "code">SSTA</field>
+		</record>
+		<record id="district_STA_SALI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_STA"/>
+			<field name="name">Salitral</field>
+			<field name = "code">SALI</field>
+		</record>
+		<record id="district_STA_POZ" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_STA"/>
+			<field name="name">Pozos</field>
+			<field name = "code">POZ</field>
+		</record>
+		<record id="district_STA_SURU" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_STA"/>
+			<field name="name">Uruca</field>
+			<field name = "code">SURU</field>
+		</record>
+		<record id="district_STA_PIE" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_STA"/>
+			<field name="name">Piedades</field>
+			<field name = "code">PIE</field>
+		</record>
+		<record id="district_STA_BRA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_STA"/>
+			<field name="name">Brasil</field>
+			<field name = "code">BRA</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Alajuelita
+		===============================
+		-->
+		<record id="canton_SJ_ALA" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_SJ"/>
+			<field name="name">Alajuelita</field>
+			<field name = "code">ALA</field>
+		</record>
+
+		<record id="district_ALA_AALA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_ALA"/>
+			<field name="name">Alajuelita</field>
+			<field name = "code">AALA</field>
+		</record>
+		<record id="district_ALA_ASJO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_ALA"/>
+			<field name="name">San Josecito</field>
+			<field name = "code">ASJO</field>
+		</record>
+		<record id="district_ALA_ASTA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_ALA"/>
+			<field name="name">San Antonio</field>
+			<field name = "code">ASTA</field>
+		</record>
+		<record id="district_ALA_CON" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_ALA"/>
+			<field name="name">Concepción</field>
+			<field name = "code">CON</field>
+		</record>
+		<record id="district_ALA_STFE" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_ALA"/>
+			<field name="name">San Felipe</field>
+			<field name = "code">STFE</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Vázquez de Coronado
+		===============================
+		-->
+		<record id="canton_SJ_VDC" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_SJ"/>
+			<field name="name">Vázquez de Coronado</field>
+			<field name = "code">VDC</field>
+		</record>
+
+		<record id="district_VDC_CSTI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_VDC"/>
+			<field name="name">San Isidro</field>
+			<field name = "code">CSTI</field>
+		</record>
+		<record id="district_VDC_CSTR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_VDC"/>
+			<field name="name">San Rafael</field>
+			<field name = "code">CSTR</field>
+		</record>
+		<record id="district_VDC_DNDJ" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_VDC"/>
+			<field name="name">Dulce Nombre de Jesús</field>
+			<field name = "code">DNDJ</field>
+		</record>
+		<record id="district_VDC_PATA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_VDC"/>
+			<field name="name">Patalillo</field>
+			<field name = "code">PATA</field>
+		</record>
+		<record id="district_VDC_CAS" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_VDC"/>
+			<field name="name">Cascajal</field>
+			<field name = "code">CAS</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Acosta
+		===============================
+		-->
+		<record id="canton_SJ_ACO" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_SJ"/>
+			<field name="name">Acosta</field>
+			<field name = "code">ACO</field>
+		</record>
+
+		<record id="district_ACO_ASTI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_ACO"/>
+			<field name="name">San Ignacio</field>
+			<field name = "code">ASTI</field>
+		</record>
+		<record id="district_ACO_GUAI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_ACO"/>
+			<field name="name">Guaitil</field>
+			<field name = "code">GUAI</field>
+		</record>
+		<record id="district_ACO_APAL" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_ACO"/>
+			<field name="name">Palmichal</field>
+			<field name = "code">APAL</field>
+		</record>
+		<record id="district_ACO_CANG" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_ACO"/>
+			<field name="name">Cangrejal</field>
+			<field name = "code">CANG</field>
+		</record>
+		<record id="district_ACO_SABA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_ACO"/>
+			<field name="name">Sabanillas</field>
+			<field name = "code">SABA</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Tibás
+		===============================
+		-->
+		<record id="canton_SJ_TIB" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_SJ"/>
+			<field name="name">Tibás</field>
+			<field name = "code">TIB</field>
+		</record>
+
+		<record id="district_TIB_STJU" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_TIB"/>
+			<field name="name">San Juan</field>
+			<field name = "code">STJU</field>
+		</record>
+		<record id="district_TIB_CE" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_TIB"/>
+			<field name="name">Cinco Esquinas</field>
+			<field name = "code">CE</field>
+		</record>
+		<record id="district_TIB_AL" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_TIB"/>
+			<field name="name">Anselmo Llorente</field>
+			<field name = "code">AL</field>
+		</record>
+		<record id="district_TIB_LX" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_TIB"/>
+			<field name="name">León XIII</field>
+			<field name = "code">LX</field>
+		</record>
+		<record id="district_TIB_COLI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_TIB"/>
+			<field name="name">Colima</field>
+			<field name = "code">COLI</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Moravia
+		===============================
+		-->
+		<record id="canton_SJ_MORV" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_SJ"/>
+			<field name="name">Moravia</field>
+			<field name = "code">MORV</field>
+		</record>
+
+		<record id="district_MORV_STVI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_MORV"/>
+			<field name="name">San Vicente</field>
+			<field name = "code">STVI</field>
+		</record>
+		<record id="district_MORV_STJE" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_MORV"/>
+			<field name="name">San Jerónimo</field>
+			<field name = "code">STJE</field>
+		</record>
+		<record id="district_MORV_TRI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_MORV"/>
+			<field name="name">Trinidad</field>
+			<field name = "code">TRI</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Montes de Oca
+		===============================
+		-->
+		<record id="canton_SJ_MDO" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_SJ"/>
+			<field name="name">Montes de Oca</field>
+			<field name = "code">MDO</field>
+		</record>
+
+		<record id="district_MDO_STPE" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_MDO"/>
+			<field name="name">San Pedro</field>
+			<field name = "code">STPE</field>
+		</record>
+		<record id="district_MDO_SAB" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_MDO"/>
+			<field name="name">Sabanilla</field>
+			<field name = "code">SAB</field>
+		</record>
+		<record id="district_MDO_MMER" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_MDO"/>
+			<field name="name">Mercedes</field>
+			<field name = "code">MMER</field>
+		</record>
+		<record id="district_MDO_MSTR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_MDO"/>
+			<field name="name">San Rafael</field>
+			<field name = "code">MSTR</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Turrubares
+		===============================
+		-->
+		<record id="canton_SJ_TUR" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_SJ"/>
+			<field name="name">Turrubares</field>
+			<field name = "code">TUR</field>
+		</record>
+
+		<record id="district_TUR_TSTP" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_TUR"/>
+			<field name="name">San Pablo</field>
+			<field name = "code">TSTP</field>
+		</record>
+		<record id="district_TUR_TSP" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_TUR"/>
+			<field name="name">San Pedro</field>
+			<field name = "code">TSP</field>
+		</record>
+		<record id="district_TUR_SJDM" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_TUR"/>
+			<field name="name">San Juan de Mata</field>
+			<field name = "code">SJDM</field>
+		</record>
+		<record id="district_TUR_STLU" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_TUR"/>
+			<field name="name">San Luis</field>
+			<field name = "code">STLU</field>
+		</record>
+		<record id="district_TUR_CARA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_TUR"/>
+			<field name="name">Carara</field>
+			<field name = "code">CARA</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Dota
+		===============================
+		-->
+		<record id="canton_SJ_DOT" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_SJ"/>
+			<field name="name">Dota</field>
+			<field name = "code">DOT</field>
+		</record>
+
+		<record id="district_DOT_DOSM" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_DOT"/>
+			<field name="name">Santa María</field>
+			<field name = "code">DOSM</field>
+		</record>
+		<record id="district_DOT_JAR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_DOT"/>
+			<field name="name">Jardín</field>
+			<field name = "code">JAR</field>
+		</record>
+		<record id="district_DOT_COP" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_DOT"/>
+			<field name="name">Copey</field>
+			<field name = "code">COP</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Curridabat
+		===============================
+		-->
+		<record id="canton_SJ_CUR" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_SJ"/>
+			<field name="name">Curridabat</field>
+			<field name = "code">CUR</field>
+		</record>
+
+		<record id="district_CUR_CCUR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_CUR"/>
+			<field name="name">Curridabat</field>
+			<field name = "code">CCUR</field>
+		</record>
+		<record id="district_CUR_GRAN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_CUR"/>
+			<field name="name">Granadilla</field>
+			<field name = "code">GRAN</field>
+		</record>
+		<record id="district_CUR_SANC" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_CUR"/>
+			<field name="name">Sánchez</field>
+			<field name = "code">SANC</field>
+		</record>
+		<record id="district_CUR_TIR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_CUR"/>
+			<field name="name">Tirrases</field>
+			<field name = "code">TIR</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Pérez Zeledón
+		===============================
+		-->
+		<record id="canton_SJ_PZ" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_SJ"/>
+			<field name="name">Pérez Zeledón</field>
+			<field name = "code">PZ</field>
+		</record>
+
+		<record id="district_PZ_SIDG" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_PZ"/>
+			<field name="name">San Isidro del General</field>
+			<field name = "code">SIDG</field>
+		</record>
+		<record id="district_PZ_GEN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_PZ"/>
+			<field name="name">General</field>
+			<field name = "code">GEN</field>
+		</record>
+		<record id="district_PZ_DF" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_PZ"/>
+			<field name="name">Daniel Flores</field>
+			<field name = "code">DF</field>
+		</record>
+		<record id="district_PZ_RIV" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_PZ"/>
+			<field name="name">Rivas</field>
+			<field name = "code">RIV</field>
+		</record>
+		<record id="district_PZ_PZSP" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_PZ"/>
+			<field name="name">San Pedro</field>
+			<field name = "code">PZSP</field>
+		</record>
+		<record id="district_PZ_PLATA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_PZ"/>
+			<field name="name">Platanares</field>
+			<field name = "code">PLATA</field>
+		</record>
+		<record id="district_PZ_PEJ" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_PZ"/>
+			<field name="name">Pejibaye</field>
+			<field name = "code">PEJ</field>
+		</record>
+		<record id="district_PZ_CAJ" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_PZ"/>
+			<field name="name">Cajón</field>
+			<field name = "code">CAJ</field>
+		</record>
+		<record id="district_PZ_PZBA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_PZ"/>
+			<field name="name">Barú</field>
+			<field name = "code">PZBA</field>
+		</record>
+		<record id="district_PZ_RN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_PZ"/>
+			<field name="name">Río Nuevo</field>
+			<field name = "code">RN</field>
+		</record>
+		<record id="district_PZ_PPAR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_PZ"/>
+			<field name="name">Páramo</field>
+			<field name = "code">PPAR</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of León Cortés
+		===============================
+		-->
+		<record id="canton_SJ_LC" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_SJ"/>
+			<field name="name">León Cortés</field>
+			<field name = "code">LC</field>
+		</record>
+
+		<record id="district_LC_LCSP" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_LC"/>
+			<field name="name">San Pablo</field>
+			<field name = "code">LCSP</field>
+		</record>
+		<record id="district_LC_SA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_LC"/>
+			<field name="name">San Andrés</field>
+			<field name = "code">SA</field>
+		</record>
+		<record id="district_LC_LLB" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_LC"/>
+			<field name="name">Llano Bonito</field>
+			<field name = "code">LLB</field>
+		</record>
+		<record id="district_LC_LCSI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_LC"/>
+			<field name="name">San Isidro</field>
+			<field name = "code">LCSI</field>
+		</record>
+		<record id="district_LC_SC" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_LC"/>
+			<field name="name">Santa Cruz</field>
+			<field name = "code">SC</field>
+		</record>
+		<record id="district_LC_LCSA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_SJ_LC"/>
+			<field name="name">San Antonio</field>
+			<field name = "code">LCSA</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Heredia
+		===============================
+		-->
+		<record id="canton_H_HER" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_H"/>
+			<field name="name">Heredia</field>
+			<field name = "code">HER</field>
+		</record>
+
+		<record id="district_HER_HHER" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_HER"/>
+			<field name="name">Heredia</field>
+			<field name = "code">HHER</field>
+		</record>
+		<record id="district_HER_HMER" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_HER"/>
+			<field name="name">Mercedes</field>
+			<field name = "code">HMER</field>
+		</record>
+		<record id="district_HER_HSF" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_HER"/>
+			<field name="name">San Francisco</field>
+			<field name = "code">HSF</field>
+		</record>
+		<record id="district_HER_ULL" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_HER"/>
+			<field name="name">Ulloa</field>
+			<field name = "code">ULL</field>
+		</record>
+		<record id="district_HER_VAR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_HER"/>
+			<field name="name">Varablanca</field>
+			<field name = "code">VAR</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Barva
+		===============================
+		-->
+		<record id="canton_H_BARV" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_H"/>
+			<field name="name">Barva</field>
+			<field name = "code">BARV</field>
+		</record>
+
+		<record id="district_BARV_BABA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_BARV"/>
+			<field name="name">Barva</field>
+			<field name = "code">BABA</field>
+		</record>
+		<record id="district_BARV_BSP" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_BARV"/>
+			<field name="name">San Pedro</field>
+			<field name = "code">BSP</field>
+		</record>
+		<record id="district_BARV_BSPA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_BARV"/>
+			<field name="name">San Pablo</field>
+			<field name = "code">BSPA</field>
+		</record>
+		<record id="district_BARV_BSRO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_BARV"/>
+			<field name="name">San Roque</field>
+			<field name = "code">BSRO</field>
+		</record>
+		<record id="district_BARV_BSLU" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_BARV"/>
+			<field name="name">Santa Lucía</field>
+			<field name = "code">BSLU</field>
+		</record>
+		<record id="district_BARV_BSJM" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_BARV"/>
+			<field name="name">San José de la Montaña</field>
+			<field name = "code">BSJM</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Santo Domingo
+		===============================
+		-->
+		<record id="canton_H_STDO" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_H"/>
+			<field name="name">Santo Domingo</field>
+			<field name = "code">STDO</field>
+		</record>
+
+		<record id="district_STDO_SDSD" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_STDO"/>
+			<field name="name">Santo Domingo</field>
+			<field name = "code">SDSD</field>
+		</record>
+		<record id="district_STDO_SDSV" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_STDO"/>
+			<field name="name">San Vicente</field>
+			<field name = "code">SDSV</field>
+		</record>
+		<record id="district_STDO_SDSM" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_STDO"/>
+			<field name="name">San Miguel</field>
+			<field name = "code">SDSM</field>
+		</record>
+		<record id="district_STDO_SDPA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_STDO"/>
+			<field name="name">Paracito</field>
+			<field name = "code">SDPA</field>
+		</record>
+		<record id="district_STDO_STTO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_STDO"/>
+			<field name="name">Santo Tomás</field>
+			<field name = "code">STTO</field>
+		</record>
+		<record id="district_STDO_SDRO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_STDO"/>
+			<field name="name">Santa Rosa</field>
+			<field name = "code">SDRO</field>
+		</record>
+		<record id="district_STDO_TURE" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_STDO"/>
+			<field name="name">Tures</field>
+			<field name = "code">TURE</field>
+		</record>
+		<record id="district_STDO_SDP" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_STDO"/>
+			<field name="name">Pará</field>
+			<field name = "code">SDP</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Santa Bárbara
+		===============================
+		-->
+		<record id="canton_H_STBA" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_H"/>
+			<field name="name">Santa Bárbara</field>
+			<field name = "code">STBA</field>
+		</record>
+
+		<record id="district_STBA_SBSB" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_STBA"/>
+			<field name="name">Santa Bárbara</field>
+			<field name = "code">SBSB</field>
+		</record>
+		<record id="district_STBA_SBSP" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_STBA"/>
+			<field name="name">San Pedro</field>
+			<field name = "code">SBSP</field>
+		</record>
+		<record id="district_STBA_SBSJ" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_STBA"/>
+			<field name="name">San Juan</field>
+			<field name = "code">SBSJ</field>
+		</record>
+		<record id="district_STBA_JES" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_STBA"/>
+			<field name="name">Jesús</field>
+			<field name = "code">JES</field>
+		</record>
+		<record id="district_STBA_SBSD" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_STBA"/>
+			<field name="name">Santo Domingo</field>
+			<field name = "code">SBSD</field>
+		</record>
+		<record id="district_STBA_PURA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_STBA"/>
+			<field name="name">Purabá</field>
+			<field name = "code">PURA</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of San Rafael
+		===============================
+		-->
+		<record id="canton_H_SAR" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_H"/>
+			<field name="name">San Rafael</field>
+			<field name = "code">SAR</field>
+		</record>
+
+		<record id="district_SAR_SRSR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_SAR"/>
+			<field name="name">San Rafael</field>
+			<field name = "code">SRSR</field>
+		</record>
+		<record id="district_SAR_SRSJ" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_SAR"/>
+			<field name="name">San Josecito</field>
+			<field name = "code">SRSJ</field>
+		</record>
+		<record id="district_SAR_SRSA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_SAR"/>
+			<field name="name">Santiago</field>
+			<field name = "code">SRSA</field>
+		</record>
+		<record id="district_SAR_ANG" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_SAR"/>
+			<field name="name">Ángeles</field>
+			<field name = "code">ANG</field>
+		</record>
+		<record id="district_SAR_SRCO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_SAR"/>
+			<field name="name">Concepción</field>
+			<field name = "code">SRCO</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of San Isidro
+		===============================
+		-->
+		<record id="canton_H_SAI" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_H"/>
+			<field name="name">San Isidro</field>
+			<field name = "code">SAI</field>
+		</record>
+
+		<record id="district_SAI_SASI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_SAI"/>
+			<field name="name">San Isidro</field>
+			<field name = "code">SASI</field>
+		</record>
+		<record id="district_SAI_SISJ" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_SAI"/>
+			<field name="name">San José</field>
+			<field name = "code">SISJ</field>
+		</record>
+		<record id="district_SAI_SICO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_SAI"/>
+			<field name="name">Concepción</field>
+			<field name = "code">SICO</field>
+		</record>
+		<record id="district_SAI_SISF" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_SAI"/>
+			<field name="name">San Francisco</field>
+			<field name = "code">SISF</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Belén
+		===============================
+		-->
+		<record id="canton_H_BEL" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_H"/>
+			<field name="name">Belén</field>
+			<field name = "code">BEL</field>
+		</record>
+
+		<record id="district_BEL_BSA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_BEL"/>
+			<field name="name">San Antonio</field>
+			<field name = "code">BSA</field>
+		</record>
+		<record id="district_BEL_RIB" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_BEL"/>
+			<field name="name">Ribera</field>
+			<field name = "code">RIB</field>
+		</record>
+		<record id="district_BEL_ASU" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_BEL"/>
+			<field name="name">Asunción</field>
+			<field name = "code">ASU</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Flores
+		===============================
+		-->
+		<record id="canton_H_FLO" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_H"/>
+			<field name="name">Flores</field>
+			<field name = "code">FLO</field>
+		</record>
+
+		<record id="district_FLO_FSJO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_FLO"/>
+			<field name="name">San Joaquín</field>
+			<field name = "code">FSJO</field>
+		</record>
+		<record id="district_FLO_BARRA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_FLO"/>
+			<field name="name">Barrantes</field>
+			<field name = "code">BARRA</field>
+		</record>
+		<record id="district_FLO_LLO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_FLO"/>
+			<field name="name">Llorente</field>
+			<field name = "code">LLO</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of San Pablo
+		===============================
+		-->
+		<record id="canton_H_SAP" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_H"/>
+			<field name="name">San Pablo</field>
+			<field name = "code">SAP</field>
+		</record>
+
+		<record id="district_SAP_SPSP" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_SAP"/>
+			<field name="name">San Pablo</field>
+			<field name = "code">SPSP</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Sarapiquí
+		===============================
+		-->
+		<record id="canton_H_SARA" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_H"/>
+			<field name="name">Sarapiquí</field>
+			<field name = "code">SARA</field>
+		</record>
+
+		<record id="district_SARA_PV" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_SARA"/>
+			<field name="name">Puerto Viejo</field>
+			<field name = "code">PV</field>
+		</record>
+		<record id="district_SARA_LV" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_SARA"/>
+			<field name="name">La Virgen</field>
+			<field name = "code">LV</field>
+		</record>
+		<record id="district_SARA_HOR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_SARA"/>
+			<field name="name">Horquetas</field>
+			<field name = "code">HOR</field>
+		</record>
+		<record id="district_SARA_LDG" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_SARA"/>
+			<field name="name">Llanuras del Gaspar</field>
+			<field name = "code">LDG</field>
+		</record>
+		<record id="district_SARA_CUR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_H_SARA"/>
+			<field name="name">Cureña</field>
+			<field name = "code">CUR</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Alajuela
+		===============================
+		-->
+		<record id="canton_A_ALAJ" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_A"/>
+			<field name="name">Alajuela</field>
+			<field name = "code">ALAJ</field>
+		</record>
+
+		<record id="district_ALAJ_AALJ" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALAJ"/>
+			<field name="name">Alajuela</field>
+			<field name = "code">AALJ</field>
+		</record>
+		<record id="district_ALAJ_ASJ" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALAJ"/>
+			<field name="name">San José</field>
+			<field name = "code">ASJ</field>
+		</record>
+		<record id="district_ALAJ_ACAR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALAJ"/>
+			<field name="name">Carrizal</field>
+			<field name = "code">ACAR</field>
+		</record>
+		<record id="district_ALAJ_ASA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALAJ"/>
+			<field name="name">San Antonio</field>
+			<field name = "code">ASA</field>
+		</record>
+		<record id="district_ALAJ_GUAC" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALAJ"/>
+			<field name="name">Guácima</field>
+			<field name = "code">GUAC</field>
+		</record>
+		<record id="district_ALAJ_ASI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALAJ"/>
+			<field name="name">San Isidro</field>
+			<field name = "code">ASI</field>
+		</record>
+		<record id="district_ALAJ_ASAB" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALAJ"/>
+			<field name="name">Sabanilla</field>
+			<field name = "code">ASAB</field>
+		</record>
+		<record id="district_ALAJ_ASR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALAJ"/>
+			<field name="name">San Rafael</field>
+			<field name = "code">ASR</field>
+		</record>
+		<record id="district_ALAJ_ARS" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALAJ"/>
+			<field name="name">Río Segundo</field>
+			<field name = "code">ARS</field>
+		</record>
+		<record id="district_ALAJ_ADES" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALAJ"/>
+			<field name="name">Desamparados</field>
+			<field name = "code">ADES</field>
+		</record>
+		<record id="district_ALAJ_ATU" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALAJ"/>
+			<field name="name">Turrúcares</field>
+			<field name = "code">ATU</field>
+		</record>
+		<record id="district_ALAJ_ATAM" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALAJ"/>
+			<field name="name">Tambor</field>
+			<field name = "code">ATAM</field>
+		</record>
+		<record id="district_ALAJ_GARI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALAJ"/>
+			<field name="name">Garita</field>
+			<field name = "code">GARI</field>
+		</record>
+		<record id="district_ALAJ_ASAR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALAJ"/>
+			<field name="name">Sarapiquí</field>
+			<field name = "code">ASAR</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of San Ramón
+		===============================
+		-->
+		<record id="canton_A_SANR" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_A"/>
+			<field name="name">San Ramón</field>
+			<field name = "code">SANR</field>
+		</record>
+
+		<record id="district_SANR_SASR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_SANR"/>
+			<field name="name">San Ramón</field>
+			<field name = "code">SASR</field>
+		</record>
+		<record id="district_SANR_SSAN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_SANR"/>
+			<field name="name">Santiago</field>
+			<field name = "code">SSAN</field>
+		</record>
+		<record id="district_SANR_AJU" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_SANR"/>
+			<field name="name">San Juan</field>
+			<field name = "code">AJU</field>
+		</record>
+		<record id="district_SANR_SRPN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_SANR"/>
+			<field name="name">Piedades Norte</field>
+			<field name = "code">SRPN</field>
+		</record>
+		<record id="district_SANR_PS" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_SANR"/>
+			<field name="name">Piedades Sur</field>
+			<field name = "code">PS</field>
+		</record>
+		<record id="district_SANR_SSR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_SANR"/>
+			<field name="name">San Rafael</field>
+			<field name = "code">SSR</field>
+		</record>
+		<record id="district_SANR_SSI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_SANR"/>
+			<field name="name">San Isidro</field>
+			<field name = "code">SSI</field>
+		</record>
+		<record id="district_SANR_SANG" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_SANR"/>
+			<field name="name">Ángeles</field>
+			<field name = "code">SANG</field>
+		</record>
+		<record id="district_SANR_ALF" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_SANR"/>
+			<field name="name">Álfaro</field>
+			<field name = "code">ALF</field>
+		</record>
+		<record id="district_SANR_VOLI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_SANR"/>
+			<field name="name">Volio</field>
+			<field name = "code">VOLI</field>
+		</record>
+		<record id="district_SANR_CONC" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_SANR"/>
+			<field name="name">Concepción</field>
+			<field name = "code">CONC</field>
+		</record>
+		<record id="district_SANR_ZAPO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_SANR"/>
+			<field name="name">Zapotal</field>
+			<field name = "code">ZAPO</field>
+		</record>
+		<record id="district_SANR_PB" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_SANR"/>
+			<field name="name">Peñas Blancas</field>
+			<field name = "code">PB</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Grecia
+		===============================
+		-->
+		<record id="canton_A_GRE" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_A"/>
+			<field name="name">Grecia</field>
+			<field name = "code">GRE</field>
+		</record>
+
+		<record id="district_GRE_GGRE" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_GRE"/>
+			<field name="name">Grecia</field>
+			<field name = "code">GGRE</field>
+		</record>
+		<record id="district_GRE_GSI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_GRE"/>
+			<field name="name">San Isidro</field>
+			<field name = "code">GSI</field>
+		</record>
+		<record id="district_GRE_GSJ" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_GRE"/>
+			<field name="name">San José</field>
+			<field name = "code">GSJ</field>
+		</record>
+		<record id="district_GRE_STRO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_GRE"/>
+			<field name="name">San Roque</field>
+			<field name = "code">STRO</field>
+		</record>
+		<record id="district_GRE_TAC" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_GRE"/>
+			<field name="name">Tacares</field>
+			<field name = "code">TAC</field>
+		</record>
+		<record id="district_GRE_RC" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_GRE"/>
+			<field name="name">Río Cuarto</field>
+			<field name = "code">RC</field>
+		</record>
+		<record id="district_GRE_PDP" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_GRE"/>
+			<field name="name">Puente de Piedra</field>
+			<field name = "code">PDP</field>
+		</record>
+		<record id="district_GRE_BOL" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_GRE"/>
+			<field name="name">Bolívar</field>
+			<field name = "code">BOL</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of San Mateo
+		===============================
+		-->
+		<record id="canton_A_STMA" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_A"/>
+			<field name="name">San Mateo</field>
+			<field name = "code">STMA</field>
+		</record>
+
+		<record id="district_STMA_SMA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_STMA"/>
+			<field name="name">San Mateo</field>
+			<field name = "code">SMA</field>
+		</record>
+		<record id="district_STMA_DESM" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_STMA"/>
+			<field name="name">Desmonte</field>
+			<field name = "code">DESM</field>
+		</record>
+		<record id="district_STMA_JM" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_STMA"/>
+			<field name="name">Jesús María</field>
+			<field name = "code">JM</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Atenas
+		===============================
+		-->
+		<record id="canton_A_ATE" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_A"/>
+			<field name="name">Atenas</field>
+			<field name = "code">ATE</field>
+		</record>
+
+		<record id="district_ATE_AATE" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ATE"/>
+			<field name="name">Atenas</field>
+			<field name = "code">AATE</field>
+		</record>
+		<record id="district_ATE_AJE" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ATE"/>
+			<field name="name">Jesús</field>
+			<field name = "code">AJE</field>
+		</record>
+		<record id="district_ATE_MERC" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ATE"/>
+			<field name="name">Mercedes</field>
+			<field name = "code">MERC</field>
+		</record>
+		<record id="district_ATE_ATSI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ATE"/>
+			<field name="name">San Isidro</field>
+			<field name = "code">ATSI</field>
+		</record>
+		<record id="district_ATE_ACON" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ATE"/>
+			<field name="name">Concepción</field>
+			<field name = "code">ACON</field>
+		</record>
+		<record id="district_ATE_ATSJ" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ATE"/>
+			<field name="name">San José</field>
+			<field name = "code">ATSJ</field>
+		</record>
+		<record id="district_ATE_SE" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ATE"/>
+			<field name="name">Santa Eulalia</field>
+			<field name = "code">SE</field>
+		</record>
+		<record id="district_ATE_ESCO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ATE"/>
+			<field name="name">Escobal</field>
+			<field name = "code">ESCO</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Naranjo
+		===============================
+		-->
+		<record id="canton_A_NAR" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_A"/>
+			<field name="name">Naranjo</field>
+			<field name = "code">NAR</field>
+		</record>
+
+		<record id="district_NAR_NNAR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_NAR"/>
+			<field name="name">Naranjo</field>
+			<field name = "code">NNAR</field>
+		</record>
+		<record id="district_NAR_NSM" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_NAR"/>
+			<field name="name">San Miguel</field>
+			<field name = "code">NSM</field>
+		</record>
+		<record id="district_NAR_NSJO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_NAR"/>
+			<field name="name">San José</field>
+			<field name = "code">NSJO</field>
+		</record>
+		<record id="district_NAR_CS" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_NAR"/>
+			<field name="name">Cirrí Sur</field>
+			<field name = "code">CS</field>
+		</record>
+		<record id="district_NAR_NSJE" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_NAR"/>
+			<field name="name">San Jerónimo</field>
+			<field name = "code">NSJE</field>
+		</record>
+		<record id="district_NAR_NSJU" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_NAR"/>
+			<field name="name">San Juan</field>
+			<field name = "code">NSJU</field>
+		</record>
+		<record id="district_NAR_ROSA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_NAR"/>
+			<field name="name">Rosario</field>
+			<field name = "code">ROSA</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Palmares
+		===============================
+		-->
+		<record id="canton_A_PAL" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_A"/>
+			<field name="name">Palmares</field>
+			<field name = "code">PAL</field>
+		</record>
+
+		<record id="district_PAL_PALM" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_PAL"/>
+			<field name="name">Palmares</field>
+			<field name = "code">PALM</field>
+		</record>
+		<record id="district_PAL_ZARA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_PAL"/>
+			<field name="name">Zaragoza</field>
+			<field name = "code">ZARA</field>
+		</record>
+		<record id="district_PAL_BA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_PAL"/>
+			<field name="name">Buenos Aires</field>
+			<field name = "code">BA</field>
+		</record>
+		<record id="district_PAL_PSA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_PAL"/>
+			<field name="name">Santiago</field>
+			<field name = "code">PSA</field>
+		</record>
+		<record id="district_PAL_PCAN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_PAL"/>
+			<field name="name">Candelaria</field>
+			<field name = "code">PCAN</field>
+		</record>
+		<record id="district_PAL_ESQ" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_PAL"/>
+			<field name="name">Esquipulas</field>
+			<field name = "code">ESQ</field>
+		</record>
+		<record id="district_PAL_LGR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_PAL"/>
+			<field name="name">La Granja</field>
+			<field name = "code">LGR</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Poás
+		===============================
+		-->
+		<record id="canton_A_POA" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_A"/>
+			<field name="name">Poás</field>
+			<field name = "code">POA</field>
+		</record>
+
+		<record id="district_POA_PSP" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_POA"/>
+			<field name="name">San Pedro</field>
+			<field name = "code">PSP</field>
+		</record>
+		<record id="district_POA_PSJU" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_POA"/>
+			<field name="name">San Juan</field>
+			<field name = "code">PSJU</field>
+		</record>
+		<record id="district_POA_PSRA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_POA"/>
+			<field name="name">San Rafael</field>
+			<field name = "code">PSRA</field>
+		</record>
+		<record id="district_POA_PCAR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_POA"/>
+			<field name="name">Carrillos</field>
+			<field name = "code">PCAR</field>
+		</record>
+		<record id="district_POA_SR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_POA"/>
+			<field name="name">Sabana Redonda</field>
+			<field name = "code">SR</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Orotina
+		===============================
+		-->
+		<record id="canton_A_ORO" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_A"/>
+			<field name="name">Orotina</field>
+			<field name = "code">ORO</field>
+		</record>
+
+		<record id="district_ORO_OORO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ORO"/>
+			<field name="name">Orotina</field>
+			<field name = "code">OORO</field>
+		</record>
+		<record id="district_ORO_MAS" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ORO"/>
+			<field name="name">Mastate</field>
+			<field name = "code">MAS</field>
+		</record>
+		<record id="district_ORO_HV" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ORO"/>
+			<field name="name">Hacienda Vieja</field>
+			<field name = "code">HV</field>
+		</record>
+		<record id="district_ORO_COY" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ORO"/>
+			<field name="name">Coyolar</field>
+			<field name = "code">COY</field>
+		</record>
+		<record id="district_ORO_CEI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ORO"/>
+			<field name="name">Ceiba</field>
+			<field name = "code">CEI</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of San Carlos
+		===============================
+		-->
+		<record id="canton_A_STCA" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_A"/>
+			<field name="name">San Carlos</field>
+			<field name = "code">STCA</field>
+		</record>
+
+		<record id="district_STCA_QUE" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_STCA"/>
+			<field name="name">Quesada</field>
+			<field name = "code">QUE</field>
+		</record>
+		<record id="district_STCA_FLO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_STCA"/>
+			<field name="name">Florencia</field>
+			<field name = "code">FLO</field>
+		</record>
+		<record id="district_STCA_BUEN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_STCA"/>
+			<field name="name">Buenavista</field>
+			<field name = "code">BUEN</field>
+		</record>
+		<record id="district_STCA_AZ" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_STCA"/>
+			<field name="name">Aguas Zarcas</field>
+			<field name = "code">AZ</field>
+		</record>
+		<record id="district_STCA_VEN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_STCA"/>
+			<field name="name">Venecia</field>
+			<field name = "code">VEN</field>
+		</record>
+		<record id="district_STCA_SCPI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_STCA"/>
+			<field name="name">Pital</field>
+			<field name = "code">SCPI</field>
+		</record>
+		<record id="district_STCA_FORT" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_STCA"/>
+			<field name="name">Fortuna</field>
+			<field name = "code">FORT</field>
+		</record>
+		<record id="district_STCA_TIG" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_STCA"/>
+			<field name="name">Tigra</field>
+			<field name = "code">TIG</field>
+		</record>
+		<record id="district_STCA_SCPA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_STCA"/>
+			<field name="name">Palmera</field>
+			<field name = "code">SCPA</field>
+		</record>
+		<record id="district_STCA_VENA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_STCA"/>
+			<field name="name">Venado</field>
+			<field name = "code">VENA</field>
+		</record>
+		<record id="district_STCA_CUT" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_STCA"/>
+			<field name="name">Cutris</field>
+			<field name = "code">CUT</field>
+		</record>
+		<record id="district_STCA_MONT" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_STCA"/>
+			<field name="name">Monterrey</field>
+			<field name = "code">MONT</field>
+		</record>
+		<record id="district_STCA_POCO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_STCA"/>
+			<field name="name">Pocosol</field>
+			<field name = "code">POCO</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Alfaro Ruiz
+		===============================
+		-->
+		<record id="canton_A_ALFR" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_A"/>
+			<field name="name">Alfaro Ruiz</field>
+			<field name = "code">ALFR</field>
+		</record>
+
+		<record id="district_ALFR_ZARC" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALFR"/>
+			<field name="name">Zarcero</field>
+			<field name = "code">ZARC</field>
+		</record>
+		<record id="district_ALFR_LAG" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALFR"/>
+			<field name="name">Laguna</field>
+			<field name = "code">LAG</field>
+		</record>
+		<record id="district_ALFR_TAP" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALFR"/>
+			<field name="name">Tapezco</field>
+			<field name = "code">TAP</field>
+		</record>
+		<record id="district_ALFR_ARGU" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALFR"/>
+			<field name="name">Guadalupe</field>
+			<field name = "code">ARGU</field>
+		</record>
+		<record id="district_ALFR_ARPA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALFR"/>
+			<field name="name">Palmira</field>
+			<field name = "code">ARPA</field>
+		</record>
+		<record id="district_ALFR_ARZA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALFR"/>
+			<field name="name">Zapote</field>
+			<field name = "code">ARZA</field>
+		</record>
+		<record id="district_ALFR_BRI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_ALFR"/>
+			<field name="name">Brisas</field>
+			<field name = "code">BRI</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Valverde Vega
+		===============================
+		-->
+		<record id="canton_A_VALV" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_A"/>
+			<field name="name">Valverde Vega</field>
+			<field name = "code">VALV</field>
+		</record>
+
+		<record id="district_VALV_SN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_VALV"/>
+			<field name="name">Sarchí Norte</field>
+			<field name = "code">SN</field>
+		</record>
+		<record id="district_VALV_SS" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_VALV"/>
+			<field name="name">Sarchí Sur</field>
+			<field name = "code">SS</field>
+		</record>
+		<record id="district_VALV_VVTA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_VALV"/>
+			<field name="name">Toro Amarillo</field>
+			<field name = "code">VVTA</field>
+		</record>
+		<record id="district_VALV_VVSP" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_VALV"/>
+			<field name="name">San Pedro</field>
+			<field name = "code">VVSP</field>
+		</record>
+		<record id="district_VALV_ROD" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_VALV"/>
+			<field name="name">Rodríguez</field>
+			<field name = "code">ROD</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Upala
+		===============================
+		-->
+		<record id="canton_A_UPA" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_A"/>
+			<field name="name">Upala</field>
+			<field name = "code">UPA</field>
+		</record>
+
+		<record id="district_UPA_UUPA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_UPA"/>
+			<field name="name">Upala</field>
+			<field name = "code">UUPA</field>
+		</record>
+		<record id="district_UPA_AC" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_UPA"/>
+			<field name="name">Aguas Claras</field>
+			<field name = "code">AC</field>
+		</record>
+		<record id="district_UPA_PIZ" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_UPA"/>
+			<field name="name">San José (Pizote)</field>
+			<field name = "code">PIZ</field>
+		</record>
+		<record id="district_UPA_BIJ" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_UPA"/>
+			<field name="name">Bijagua</field>
+			<field name = "code">BIJ</field>
+		</record>
+		<record id="district_UPA_DEL" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_UPA"/>
+			<field name="name">Delicias</field>
+			<field name = "code">DEL</field>
+		</record>
+		<record id="district_UPA_DR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_UPA"/>
+			<field name="name">Dos Ríos</field>
+			<field name = "code">DR</field>
+		</record>
+		<record id="district_UPA_YOL" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_UPA"/>
+			<field name="name">Yolillal</field>
+			<field name = "code">YOL</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Los Chiles
+		===============================
+		-->
+		<record id="canton_A_CHIL" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_A"/>
+			<field name="name">Los Chiles</field>
+			<field name = "code">CHIL</field>
+		</record>
+
+		<record id="district_CHIL_LCH" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_CHIL"/>
+			<field name="name">Los Chiles</field>
+			<field name = "code">LCH</field>
+		</record>
+		<record id="district_CHIL_CN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_CHIL"/>
+			<field name="name">Caño Negro</field>
+			<field name = "code">CN</field>
+		</record>
+		<record id="district_CHIL_EA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_CHIL"/>
+			<field name="name">El Amparo</field>
+			<field name = "code">EA</field>
+		</record>
+		<record id="district_CHIL_STJO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_CHIL"/>
+			<field name="name">San Jorge</field>
+			<field name = "code">STJO</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Guatuso
+		===============================
+		-->
+		<record id="canton_A_GUA" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_A"/>
+			<field name="name">Guatuso</field>
+			<field name = "code">GUA</field>
+		</record>
+
+		<record id="district_GUA_GSR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_GUA"/>
+			<field name="name">San Rafael</field>
+			<field name = "code">GSR</field>
+		</record>
+		<record id="district_GUA_BUE" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_GUA"/>
+			<field name="name">Buenavista</field>
+			<field name = "code">BUE</field>
+		</record>
+		<record id="district_GUA_COTE" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_A_GUA"/>
+			<field name="name">Cote</field>
+			<field name = "code">COTE</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Cartago
+		===============================
+		-->
+		<record id="canton_C_CART" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_C"/>
+			<field name="name">Cartago</field>
+			<field name = "code">CART</field>
+		</record>
+
+		<record id="district_CART_ORI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_CART"/>
+			<field name="name">Oriental</field>
+			<field name = "code">ORI</field>
+		</record>
+		<record id="district_CART_OCC" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_CART"/>
+			<field name="name">Occidental</field>
+			<field name = "code">OCC</field>
+		</record>
+		<record id="district_CART_CCAR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_CART"/>
+			<field name="name">Carmen</field>
+			<field name = "code">CCAR</field>
+		</record>
+		<record id="district_CART_STNI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_CART"/>
+			<field name="name">San Nicolás</field>
+			<field name = "code">STNI</field>
+		</record>
+		<record id="district_CART_AGUA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_CART"/>
+			<field name="name">Aguacaliente (San Francisco)</field>
+			<field name = "code">AGUA</field>
+		</record>
+		<record id="district_CART_GUA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_CART"/>
+			<field name="name">Guadalupe (Arenilla)</field>
+			<field name = "code">GUA</field>
+		</record>
+		<record id="district_CART_CORR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_CART"/>
+			<field name="name">Corralillo</field>
+			<field name = "code">CORR</field>
+		</record>
+		<record id="district_CART_TB" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_CART"/>
+			<field name="name">Tierra Blanca</field>
+			<field name = "code">TB</field>
+		</record>
+		<record id="district_CART_DN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_CART"/>
+			<field name="name">Dulce Nombre</field>
+			<field name = "code">DN</field>
+		</record>
+		<record id="district_CART_LLG" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_CART"/>
+			<field name="name">Llano Grande</field>
+			<field name = "code">LLG</field>
+		</record>
+		<record id="district_CART_QUEB" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_CART"/>
+			<field name="name">Quebradilla</field>
+			<field name = "code">QUEB</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Paraíso
+		===============================
+		-->
+		<record id="canton_C_PARA" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_C"/>
+			<field name="name">Paraíso</field>
+			<field name = "code">PARA</field>
+		</record>
+
+		<record id="district_PARA_PAPR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_PARA"/>
+			<field name="name">Paraíso</field>
+			<field name = "code">PAPR</field>
+		</record>
+		<record id="district_PARA_PSAN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_PARA"/>
+			<field name="name">Santiago</field>
+			<field name = "code">PSAN</field>
+		</record>
+		<record id="district_PARA_ORO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_PARA"/>
+			<field name="name">Orosi</field>
+			<field name = "code">ORO</field>
+		</record>
+		<record id="district_PARA_CAC" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_PARA"/>
+			<field name="name">Cachí</field>
+			<field name = "code">CAC</field>
+		</record>
+		<record id="district_PARA_LLSL" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_PARA"/>
+			<field name="name">Llanos de Santa Lucía</field>
+			<field name = "code">LLSL</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of La Unión
+		===============================
+		-->
+		<record id="canton_C_UNI" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_C"/>
+			<field name="name">La Unión</field>
+			<field name = "code">UNI</field>
+		</record>
+
+		<record id="district_UNI_TR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_UNI"/>
+			<field name="name">Tres Ríos</field>
+			<field name = "code">TR</field>
+		</record>
+		<record id="district_UNI_STDI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_UNI"/>
+			<field name="name">San Diego</field>
+			<field name = "code">STDI</field>
+		</record>
+		<record id="district_UNI_LUSJ" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_UNI"/>
+			<field name="name">San Juan</field>
+			<field name = "code">LUSJ</field>
+		</record>
+		<record id="district_UNI_LUSR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_UNI"/>
+			<field name="name">San Rafael</field>
+			<field name = "code">LUSR</field>
+		</record>
+		<record id="district_UNI_LUCO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_UNI"/>
+			<field name="name">Concepción</field>
+			<field name = "code">LUCO</field>
+		</record>
+		<record id="district_UNI_LUDN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_UNI"/>
+			<field name="name">Dulce Nombre</field>
+			<field name = "code">LUDN</field>
+		</record>
+		<record id="district_UNI_LURA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_UNI"/>
+			<field name="name">San Ramón</field>
+			<field name = "code">LURA</field>
+		</record>
+		<record id="district_UNI_RA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_UNI"/>
+			<field name="name">Río Azul</field>
+			<field name = "code">RA</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Jiménez
+		===============================
+		-->
+		<record id="canton_C_JIM" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_C"/>
+			<field name="name">Jiménez</field>
+			<field name = "code">JIM</field>
+		</record>
+
+		<record id="district_JIM_JV" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_JIM"/>
+			<field name="name">Juan Viñas</field>
+			<field name = "code">JV</field>
+		</record>
+		<record id="district_JIM_TUC" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_JIM"/>
+			<field name="name">Tucurrique</field>
+			<field name = "code">TUC</field>
+		</record>
+		<record id="district_JIM_PEJI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_JIM"/>
+			<field name="name">Pejibaye</field>
+			<field name = "code">PEJI</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Turrialba
+		===============================
+		-->
+		<record id="canton_C_TURR" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_C"/>
+			<field name="name">Turrialba</field>
+			<field name = "code">TURR</field>
+		</record>
+
+		<record id="district_TURR_TTURR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_TURR"/>
+			<field name="name">Turrialba</field>
+			<field name = "code">TTURR</field>
+		</record>
+		<record id="district_TURR_LS" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_TURR"/>
+			<field name="name">La Suiza</field>
+			<field name = "code">LS</field>
+		</record>
+		<record id="district_TURR_PER" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_TURR"/>
+			<field name="name">Peralta</field>
+			<field name = "code">PER</field>
+		</record>
+		<record id="district_TURR_STCU" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_TURR"/>
+			<field name="name">Santa Cruz</field>
+			<field name = "code">STCU</field>
+		</record>
+		<record id="district_TURR_STTE" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_TURR"/>
+			<field name="name">Santa Teresita</field>
+			<field name = "code">STTE</field>
+		</record>
+		<record id="district_TURR_TPAV" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_TURR"/>
+			<field name="name">Pavones</field>
+			<field name = "code">TPAV</field>
+		</record>
+		<record id="district_TURR_TUIS" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_TURR"/>
+			<field name="name">Tuis</field>
+			<field name = "code">TUIS</field>
+		</record>
+		<record id="district_TURR_TAY" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_TURR"/>
+			<field name="name">Tayutic</field>
+			<field name = "code">TAY</field>
+		</record>
+		<record id="district_TURR_TSTR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_TURR"/>
+			<field name="name">Santa Rosa</field>
+			<field name = "code">TSTR</field>
+		</record>
+		<record id="district_TURR_TE" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_TURR"/>
+			<field name="name">Tres Equis</field>
+			<field name = "code">TE</field>
+		</record>
+		<record id="district_TURR_LI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_TURR"/>
+			<field name="name">La Isabel</field>
+			<field name = "code">LI</field>
+		</record>
+		<record id="district_TURR_CHIR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_TURR"/>
+			<field name="name">Chirripó</field>
+			<field name = "code">CHIR</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Alvarado
+		===============================
+		-->
+		<record id="canton_C_ALV" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_C"/>
+			<field name="name">Alvarado</field>
+			<field name = "code">ALV</field>
+		</record>
+
+		<record id="district_ALV_PAC" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_ALV"/>
+			<field name="name">Pacayas</field>
+			<field name = "code">PAC</field>
+		</record>
+		<record id="district_ALV_CER" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_ALV"/>
+			<field name="name">Cervantes</field>
+			<field name = "code">CER</field>
+		</record>
+		<record id="district_ALV_CAP" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_ALV"/>
+			<field name="name">Capellades</field>
+			<field name = "code">CAP</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Oreamuno
+		===============================
+		-->
+		<record id="canton_C_ORE" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_C"/>
+			<field name="name">Oreamuno</field>
+			<field name = "code">ORE</field>
+		</record>
+
+		<record id="district_ORE_OSR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_ORE"/>
+			<field name="name">San Rafael</field>
+			<field name = "code">OSR</field>
+		</record>
+		<record id="district_ORE_COT" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_ORE"/>
+			<field name="name">Cot</field>
+			<field name = "code">COT</field>
+		</record>
+		<record id="district_ORE_OPC" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_ORE"/>
+			<field name="name">Potrero Cerrado</field>
+			<field name = "code">OPC</field>
+		</record>
+		<record id="district_ORE_CIP" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_ORE"/>
+			<field name="name">Cipreses</field>
+			<field name = "code">CIP</field>
+		</record>
+		<record id="district_ORE_OSRO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_ORE"/>
+			<field name="name">Santa Rosa</field>
+			<field name = "code">OSRO</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of El Guarco
+		===============================
+		-->
+		<record id="canton_C_GUAR" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_C"/>
+			<field name="name">El Guarco</field>
+			<field name = "code">GUAR</field>
+		</record>
+
+		<record id="district_GUAR_TEJ" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_GUAR"/>
+			<field name="name">Tejar</field>
+			<field name = "code">TEJ</field>
+		</record>
+		<record id="district_GUAR_ELSI" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_GUAR"/>
+			<field name="name">San Isidro</field>
+			<field name = "code">ELSI</field>
+		</record>
+		<record id="district_GUAR_TOB" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_GUAR"/>
+			<field name="name">Tobosi</field>
+			<field name = "code">TOB</field>
+		</record>
+		<record id="district_GUAR_PDA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_C_GUAR"/>
+			<field name="name">Patio de Agua</field>
+			<field name = "code">PDA</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Liberia
+		===============================
+		-->
+		<record id="canton_G_LIB" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_G"/>
+			<field name="name">Liberia</field>
+			<field name = "code">LIB</field>
+		</record>
+
+		<record id="district_LIB_LLIB" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_LIB"/>
+			<field name="name">Liberia</field>
+			<field name = "code">LLIB</field>
+		</record>
+		<record id="district_LIB_CD" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_LIB"/>
+			<field name="name">Cañas Dulces</field>
+			<field name = "code">CD</field>
+		</record>
+		<record id="district_LIB_MAY" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_LIB"/>
+			<field name="name">Mayorga</field>
+			<field name = "code">MAY</field>
+		</record>
+		<record id="district_LIB_NAC" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_LIB"/>
+			<field name="name">Nacascolo</field>
+			<field name = "code">NAC</field>
+		</record>
+		<record id="district_LIB_CURU" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_LIB"/>
+			<field name="name">Curubandé</field>
+			<field name = "code">CURU</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Nicoya
+		===============================
+		-->
+		<record id="canton_G_NICO" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_G"/>
+			<field name="name">Nicoya</field>
+			<field name = "code">NICO</field>
+		</record>
+
+		<record id="district_NICO_NNIC" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_NICO"/>
+			<field name="name">Nicoya</field>
+			<field name = "code">NNIC</field>
+		</record>
+		<record id="district_NICO_MAN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_NICO"/>
+			<field name="name">Mansión</field>
+			<field name = "code">MAN</field>
+		</record>
+		<record id="district_NICO_NSA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_NICO"/>
+			<field name="name">San Antonio</field>
+			<field name = "code">NSA</field>
+		</record>
+		<record id="district_NICO_QH" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_NICO"/>
+			<field name="name">Quebrada Honda</field>
+			<field name = "code">QH</field>
+		</record>
+		<record id="district_NICO_SAM" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_NICO"/>
+			<field name="name">Sámara</field>
+			<field name = "code">SAM</field>
+		</record>
+		<record id="district_NICO_NOS" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_NICO"/>
+			<field name="name">Nosara</field>
+			<field name = "code">NOS</field>
+		</record>
+		<record id="district_NICO_BDN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_NICO"/>
+			<field name="name">Belén de Nosarita</field>
+			<field name = "code">BDN</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Santa Cruz
+		===============================
+		-->
+		<record id="canton_G_STCU" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_G"/>
+			<field name="name">Santa Cruz</field>
+			<field name = "code">STCU</field>
+		</record>
+
+		<record id="district_STCU_SCSC" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_STCU"/>
+			<field name="name">Santa Cruz</field>
+			<field name = "code">SCSC</field>
+		</record>
+		<record id="district_STCU_BOLS" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_STCU"/>
+			<field name="name">Bolsón</field>
+			<field name = "code">BOLS</field>
+		</record>
+		<record id="district_STCU_VDA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_STCU"/>
+			<field name="name">Veintisiete de Abril</field>
+			<field name = "code">VDA</field>
+		</record>
+		<record id="district_STCU_TEM" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_STCU"/>
+			<field name="name">Tempate</field>
+			<field name = "code">TEM</field>
+		</record>
+		<record id="district_STCU_CART" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_STCU"/>
+			<field name="name">Cartagena</field>
+			<field name = "code">CART</field>
+		</record>
+		<record id="district_STCU_CUA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_STCU"/>
+			<field name="name">Cuajiniquil</field>
+			<field name = "code">CUA</field>
+		</record>
+		<record id="district_STCU_DIR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_STCU"/>
+			<field name="name">Diriá</field>
+			<field name = "code">DIR</field>
+		</record>
+		<record id="district_STCU_CV" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_STCU"/>
+			<field name="name">Cabo Velas</field>
+			<field name = "code">CV</field>
+		</record>
+		<record id="district_STCU_TAM" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_STCU"/>
+			<field name="name">Tamarindo</field>
+			<field name = "code">TAM</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Bagaces
+		===============================
+		-->
+		<record id="canton_G_BAG" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_G"/>
+			<field name="name">Bagaces</field>
+			<field name = "code">BAG</field>
+		</record>
+
+		<record id="district_BAG_BAG" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_BAG"/>
+			<field name="name">Bagaces</field>
+			<field name = "code">BAG</field>
+		</record>
+		<record id="district_BAG_FOR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_BAG"/>
+			<field name="name">Fortuna</field>
+			<field name = "code">FOR</field>
+		</record>
+		<record id="district_BAG_MOG" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_BAG"/>
+			<field name="name">Mogote</field>
+			<field name = "code">MOG</field>
+		</record>
+		<record id="district_BAG_BRN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_BAG"/>
+			<field name="name">Río Naranjo</field>
+			<field name = "code">BRN</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Carrillo
+		===============================
+		-->
+		<record id="canton_G_CARR" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_G"/>
+			<field name="name">Carrillo</field>
+			<field name = "code">CARR</field>
+		</record>
+
+		<record id="district_CARR_FIL" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_CARR"/>
+			<field name="name">Filadelfia</field>
+			<field name = "code">FIL</field>
+		</record>
+		<record id="district_CARR_CAPA" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_CARR"/>
+			<field name="name">Palmira</field>
+			<field name = "code">CAPA</field>
+		</record>
+		<record id="district_CARR_SAR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_CARR"/>
+			<field name="name">Sardinal</field>
+			<field name = "code">SAR</field>
+		</record>
+		<record id="district_CARR_CBEL" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_CARR"/>
+			<field name="name">Belén</field>
+			<field name = "code">CBEL</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Cañas
+		===============================
+		-->
+		<record id="canton_G_CANA" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_G"/>
+			<field name="name">Cañas</field>
+			<field name = "code">CANA</field>
+		</record>
+
+		<record id="district_CANA_CCAN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_CANA"/>
+			<field name="name">Cañas</field>
+			<field name = "code">CCAN</field>
+		</record>
+		<record id="district_CANA_CPAL" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_CANA"/>
+			<field name="name">Palmira</field>
+			<field name = "code">CPAL</field>
+		</record>
+		<record id="district_CANA_CSM" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_CANA"/>
+			<field name="name">San Miguel</field>
+			<field name = "code">CSM</field>
+		</record>
+		<record id="district_CANA_BEB" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_CANA"/>
+			<field name="name">Bebedero</field>
+			<field name = "code">BEB</field>
+		</record>
+		<record id="district_CANA_POR" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_CANA"/>
+			<field name="name">Porozal</field>
+			<field name = "code">POR</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Abangares
+		===============================
+		-->
+		<record id="canton_G_ABA" model="rent.canton">
+			<field name="state_id" model="res.country.state" ref="l10n_cr_base.state_G"/>
+			<field name="name">Abangares</field>
+			<field name = "code">ABA</field>
+		</record>
+
+		<record id="district_ABA_JUN" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_ABA"/>
+			<field name="name">Juntas</field>
+			<field name = "code">JUN</field>
+		</record>
+		<record id="district_ABA_SIE" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_ABA"/>
+			<field name="name">Sierra</field>
+			<field name = "code">SIE</field>
+		</record>
+		<record id="district_ABA_ABSU" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_ABA"/>
+			<field name="name">San Juan</field>
+			<field name = "code">ABSU</field>
+		</record>
+		<record id="district_ABA_COLO" model="rent.canton.district">
+			<field name="canton_id" model="rent.canton" ref="canton_G_ABA"/>
+			<field name="name">Colorado</field>
+			<field name = "code">COLO</field>
+		</record>
+
+		<!--
+		===============================
+			Canton of Tilarán
+		===============================
+		-