From f653a7e7da4cee748458d6472b459681400ad28c Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 6 Dec 2013 12:27:38 +0100 Subject: [PATCH] [REVERT] revision 9031, dle@openerp.com-20131205170917-7cdzghsa5690xvux Because the xml parser needs to be fixed before this fix can be commited bzr revid: dle@openerp.com-20131206112738-wu35g157v6myipbx --- addons/sale/sale.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 06a227f1cf9..7dfffabbcd3 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -318,9 +318,6 @@ class sale_order(osv.osv): context = {} if vals.get('name', '/') == '/': vals['name'] = self.pool.get('ir.sequence').get(cr, uid, 'sale.order') or '/' - if vals.get('partner_id') and any(f not in vals for f in ['partner_invoice_id', 'partner_shipping_id', 'pricelist_id']): - defaults = self.onchange_partner_id(cr, uid, [], vals['partner_id'], context)['value'] - vals = dict(defaults, **vals) context.update({'mail_create_nolog': True}) new_id = super(sale_order, self).create(cr, uid, vals, context=context) self.message_post(cr, uid, [new_id], body=_("Quotation created"), context=context) @@ -834,24 +831,6 @@ class sale_order_line(osv.osv): pass return {'value': value} - def create(self, cr, uid, values, context=None): - if values.get('order_id') and values.get('product_id') and any(f not in values for f in ['name', 'price_unit', 'type', 'product_uom_qty', 'product_uom']): - order = self.pool['sale.order'].read(cr, uid, values['order_id'], ['pricelist_id', 'partner_id', 'date_order', 'fiscal_position'], context=context) - defaults = self.product_id_change(cr, uid, [], order['pricelist_id'][0], values['product_id'], - qty=values.get('product_uom_qty', False), - uom=values.get('product_uom', False), - qty_uos=values.get('product_uos_qty', False), - uos=values.get('product_uos', False), - name=values.get('name', False), - partner_id=order['partner_id'][0], - date_order=order['date_order'], - fiscal_position=order['fiscal_position'][0] if order['fiscal_position'] else False, - flag=False, # Force name update - context=context - )['value'] - values = dict(defaults, **values) - return super(sale_order_line, self).create(cr, uid, values, context=context) - def copy_data(self, cr, uid, id, default=None, context=None): if not default: default = {}