[truck][RC1] Bug in fields_view_get in invoice.py

Bug #672626 reported by Serge
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 3

Bug Description

addons\account\invoice.py
account_invoice.fieds_view_get

def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
        journal_obj = self.pool.get('account.journal')
        if context.get('active_model','') in ['res.partner']:
            partner = self.pool.get(context['active_model']).read(cr,uid,context['active_ids'],['supplier','customer'])[0]

if no active_ids crash

Solution: test is active_ids present and have a value

def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
        journal_obj = self.pool.get('account.journal')
        if context.get('active_model','') in ['res.partner'] and context.get('active_ids','False') and context['active_ids']:
            partner = self.pool.get(context['active_model']).read(cr,uid,context['active_ids'],['supplier','customer'])[0]

Related branches

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Low
status: New → Confirmed
qdp (OpenERP) (qdp)
Changed in openobject-addons:
milestone: none → 6.0-rc2
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

Hello Serge,

We have corrected fields_view_get on invoice.py.

revision-id: mra@mra-laptop-20101116042728-eeglnqomskwd18z3
revno: 4649

Thank you,
mustufa

Changed in openobject-addons:
status: Confirmed → In Progress
status: In Progress → Fix Released
Revision history for this message
Serge (sboivin) wrote :

Thank i will test it soon

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.