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

« back to all changes in this revision

Viewing changes to procurement_request/procurement_request.py

  • Committer: jf
  • Date: 2013-09-05 09:32:29 UTC
  • mfrom: (1743.1.6 unifield-wm)
  • Revision ID: jfb@tempo-consulting.fr-20130905093229-7vyntm4uaumxfbz1
UF-1042 [IMP] Product's drop down lists configuration access
UF-1044 [IMP] Product status restrictive rules
lp:~unifield-team/unifield-wm/uf-1044-qt-integration

Show diffs side-by-side

added added

removed removed

Lines of Context:
488
488
            domain = {'product_uom':[], 'supplier': [('partner_type','in', ['internal', 'section', 'intermission'])]}
489
489
        elif product_id:
490
490
            product = product_obj.browse(cr, uid, product_id)
 
491
            # Test the compatibility of the product with a consumption report
 
492
            res, test = product_obj._on_change_restriction_error(cr, uid, product_id, field_name='product_id', values={'value': value}, vals={'constraints': 'consumption'}, context=context)
 
493
            if test:
 
494
                return res
491
495
            value = {'product_uom': product.uom_id.id, 'name': '[%s] %s'%(product.default_code, product.name), 
492
496
                     'type': product.procure_method, 'comment_ok': True, 'cost_price': product.standard_price}
493
497
            if value['type'] != 'make_to_stock':