diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py index f468ef36f91..0ba92cb0289 100644 --- a/addons/analytic/analytic.py +++ b/addons/analytic/analytic.py @@ -184,13 +184,12 @@ class account_analytic_account(osv.osv): }, string='Currency', type='many2one', relation='res.currency'), } - def on_change_partner_id(self, cr, uid, id, partner_id, context={}): + def on_change_partner_id(self, cr, uid, ids,partner_id, context={}): res={} if partner_id: part = self.pool.get('res.partner').browse(cr, uid, partner_id,context=context) res['name'] = part.name - if part.user_id: - res['user_id'] = part.user_id.id + if part.user_id:res['user_id'] = part.user_id.id return {'value': res} def _default_company(self, cr, uid, context=None): diff --git a/addons/analytic/analytic_view.xml b/addons/analytic/analytic_view.xml index cc9f351074d..b005d364364 100644 --- a/addons/analytic/analytic_view.xml +++ b/addons/analytic/analytic_view.xml @@ -28,6 +28,8 @@ + + diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py index 8d678f19554..2aaeed98269 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py @@ -77,12 +77,11 @@ class account_analytic_account(osv.osv): _defaults = { 'pricelist_id': lambda self, cr, uid, ctx: ctx.get('pricelist_id', False), } - def on_change_partner_id(self, cr, uid, id, partner_id, context={}): - res=super(account_analytic_account,self).on_change_partner_id(cr, uid, id, partner_id, context=context) - part = self.pool.get('res.partner').browse(cr, uid, partner_id) + def on_change_partner_id(self, cr, uid, ids,partner_id, context={}): + res = super(account_analytic_account,self).on_change_partner_id(cr, uid, ids,partner_id, context=context) + part = self.pool.get('res.partner').browse(cr, uid, partner_id,context=context) pricelist = part.property_product_pricelist and part.property_product_pricelist.id or False - if pricelist: - res['value']['pricelist_id'] = pricelist + if pricelist:res['value']['pricelist_id'] = pricelist return res def set_close(self, cr, uid, ids, context=None): diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml index 5691ae438e6..b204f3f07c9 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml @@ -7,9 +7,6 @@ form - - -