~unifield-team/unifield-wm/us-826

« back to all changes in this revision

Viewing changes to msf_doc_import/wizard/wiz_common_import.py

  • Committer: Quentin THEURET
  • Date: 2016-03-04 11:30:53 UTC
  • Revision ID: qt@tempo-consulting.fr-20160304113053-abbygzrfvf0zpuxw
US-826 [FIX] Parent_id is an integer, not a many2one

Show diffs side-by-side

added added

removed removed

Lines of Context:
181
181
        res = {}
182
182
        for wl in self.browse(cr, uid, ids, context=context):
183
183
            if wl.parent_model in ('tender', 'sale.order', 'purchase.order'):
184
 
                categ = self.pool.get(wl.parent_model).read(cr, uid, wl.parent_id.id, ['categ'], context=context)['categ']
 
184
                categ = self.pool.get(wl.parent_model).read(cr, uid, wl.parent_id, ['categ'], context=context)['categ']
185
185
                if categ:
186
186
                    not_ok_product_ids = self.pool.get('product.product').search(cr, uid, [
187
187
                        ('id', 'in', product_ids),