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

Requested reviews:
  CLEARCORP development team (clearcorp)

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

[FIX] Create of rent refund invoice
-- 
https://code.launchpad.net/~juan-munoz-clearcorp/openerp-ccorp-addons/rent_refund_invoice_feature/+merge/104148
Your team CLEARCORP development team is requested to review the proposed merge 
of lp:~juan-munoz-clearcorp/openerp-ccorp-addons/rent_refund_invoice_feature 
into lp:openerp-ccorp-addons/6.1.
=== modified file 'rent/rent.py'
--- rent/rent.py	2012-03-30 21:15:02 +0000
+++ rent/rent.py	2012-04-30 17:18:23 +0000
@@ -1728,6 +1728,19 @@
         res['invoice_rent_id'] = False
 
         return {'value' : res}
+        
+    def create(self, cr, uid,vals, context=None):
+        #Check for the area before creating the object
+        vals2 = vals
+        #invoice_line = vals['invoice_line']
+        if vals2['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)
+                    
+            
+            #raise osv.except_osv('Wrong value!', 'The area for the estate has to bee greater than 0')
+        return super(rent_invoice_line,self).create(cr,uid,vals,context)
     
     _columns = {
         'invoice_type'    : fields.selection([('rent','Rent'),('product','Product')],'Type',help = 'Select one of this to determine the type of invoice to create'),

_______________________________________________
Mailing list: https://launchpad.net/~clearcorp
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~clearcorp
More help   : https://help.launchpad.net/ListHelp

Reply via email to