~sebastien.beau/e-commerce-addons/oerp6.1-stable-refactor-onchange

« back to all changes in this revision

Viewing changes to base_sale_multichannels/sale.py

  • Committer: Sébastien Beau
  • Date: 2013-03-06 09:52:41 UTC
  • Revision ID: sebastien.beau@akretion.com-20130306095241-30z9w6z2e8hnzc1p
[FIX] base_sale_multichannels, fix name computation. I think check if exist should be refactored, calling transform ressource is to complexe

Show diffs side-by-side

added added

removed removed

Lines of Context:
588
588
                                        defaults=defaults,
589
589
                                        context=context)
590
590
            if vals.get('name'):
 
591
                if shop.order_prefix:
 
592
                    vals['name'] = '%s%s' %(shop.order_prefix, vals['name'])
591
593
                exist_id = self.search(cr, uid, [['name', '=', vals['name']]], context=context)
592
594
                if exist_id:
593
595
                    external_session.logger.info("Sale Order %s already exist in OpenERP,"
594
596
                                                    "no need to import it again"%vals['name'])
595
597
                    return True
596
 
 
597
598
        return False
598
599
 
599
600
    @catch_error_in_report