Merge lp:~vauxoo/addons-vauxoo/6.1-onchange_lines_account_rent-dev_luis into lp:addons-vauxoo/6.1

Proposed by Luis Torres - http://www.vauxoo.com
Status: Merged
Merged at revision: 629
Proposed branch: lp:~vauxoo/addons-vauxoo/6.1-onchange_lines_account_rent-dev_luis
Merge into: lp:addons-vauxoo/6.1
Diff against target: 12 lines (+1/-1)
1 file modified
account_analytic_analysis_rent/account_analytic_account_rent.py (+1/-1)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/6.1-onchange_lines_account_rent-dev_luis
Reviewer Review Type Date Requested Status
Julio Serna-http://www.vauxoo.com Pending
Review via email: mp+211838@code.launchpad.net

Description of the change

Se corrigio error que macaba al entrar al onchange de las lineas de los productos del contrato, por las validaciones del if

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_analytic_analysis_rent/account_analytic_account_rent.py'
2--- account_analytic_analysis_rent/account_analytic_account_rent.py 2014-02-18 20:50:10 +0000
3+++ account_analytic_analysis_rent/account_analytic_account_rent.py 2014-03-19 22:50:49 +0000
4@@ -123,7 +123,7 @@
5 if product_ids:
6 product_obj = self.pool.get('product.product')
7 for prod in product_ids:
8- if prod[2] and prod[2]['product_id']:
9+ if len(prod) > 2 and isinstance(prod[2], dict) and prod[2].get('product_id', False):
10 for feature in product_obj.browse(cr, uid, prod[2]['product_id'], context=context).feature_ids:
11 list_feature.append({'name': feature.name and feature.name.id or False, 'product_line_id':prod[2]['product_id'],'counter':feature.counter or False, 'prodlot_feature_id' : prod[2]['prodlot_id']})
12 return {'value':{'feature_ids': [(0, 6, data) for data in list_feature]}}