← Back to team overview

clearcorp team mailing list archive

[Merge] lp:~dr.clearcorp/openerp-ccorp-addons/6.1-rent into lp:openerp-ccorp-addons/6.1

 

Diana Rodríguez Martínez has proposed merging lp:~dr.clearcorp/openerp-ccorp-addons/6.1-rent into lp:openerp-ccorp-addons/6.1.

Requested reviews:
  CLEARCORP drivers (clearcorp-drivers)

For more details, see:
https://code.launchpad.net/~dr.clearcorp/openerp-ccorp-addons/6.1-rent/+merge/182773

[FIX] Fix create, account_invoice. rent.py
-- 
https://code.launchpad.net/~dr.clearcorp/openerp-ccorp-addons/6.1-rent/+merge/182773
Your team CLEARCORP development team is subscribed to branch lp:openerp-ccorp-addons/6.1.
=== modified file 'rent/rent.py'
--- rent/rent.py	2013-04-02 20:59:11 +0000
+++ rent/rent.py	2013-08-28 22:40:24 +0000
@@ -1738,12 +1738,13 @@
         
     def create(self, cr, uid,vals, context=None):
         #Check for the area before creating the object
-        vals2 = vals
         #invoice_line = vals['invoice_line']
-        if 'invoice_type' in vals2 and vals2['invoice_type'] == 'rent':
+        if 'invoice_rent_id' in vals:
+            vals['invoice_rent_id'] = vals['invoice_rent_id'][0]
+        elif 'invoice_type' in vals and vals['invoice_type'] == 'rent':
             p_invoice_rent_id = vals['invoice_rent_id'][0]
-            vals2['invoice_rent_id'] = p_invoice_rent_id
-            return super(rent_invoice_line,self).create(cr,uid,vals2,context)
+            vals['invoice_rent_id'] = p_invoice_rent_id
+            return super(rent_invoice_line,self).create(cr,uid,vals,context)
                     
             
             #raise osv.except_osv('Wrong value!', 'The area for the estate has to bee greater than 0')


Follow ups