~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 10:44:48 UTC
  • Revision ID: qt@tempo-consulting.fr-20160304104448-u1pm8cvpkreodcfg
US-826 [FIX] Remove domain on product selection based on order category

Show diffs side-by-side

added added

removed removed

Lines of Context:
416
416
 
417
417
        tender = self.browse(cr, uid, ids[0], context=context)
418
418
        context.update({
419
 
            'product_ids_domain': [('purchase_type', '=', tender.categ)],
 
419
            'product_ids_domain': [],
420
420
            # UFTP-15: we active 'only not forbidden' filter as default
421
421
            'available_for_restriction': 'tender',
422
422
            'search_default_not_restricted': 1,
498
498
        if order.procurement_request:
499
499
            # UFTP-15: IR context available_for_restriction = 'consumption' (3.1.3.4 case (d))
500
500
            context_update = {
501
 
                'product_ids_domain': [('purchase_type', '=', order.categ)],
 
501
                'product_ids_domain': [],
502
502
                # UFTP-15: we active 'only not forbidden' filter as default
503
503
                'available_for_restriction': 'consumption',
504
504
                'search_default_not_restricted': 1,
507
507
        else:
508
508
            # UFTP-15: FO context available_for_restriction = 'partner type'
509
509
            context_update = {
510
 
                'product_ids_domain': [('purchase_type', '=', order.categ)],
 
510
                'product_ids_domain': [],
511
511
                # UFTP-15: we active 'only not forbidden' filter as default
512
512
                'available_for_restriction': order.partner_type,
513
513
                'search_default_not_restricted': 1,