Test commit
This commit is contained in:
parent
860fe554d9
commit
2df2f77818
|
@ -473,7 +473,7 @@ class Ecommerce(http.Controller):
|
|||
|
||||
# must have a draft sale order with lines at this point, otherwise redirect to shop
|
||||
order = self.get_order()
|
||||
if not order or order.state not in ['draft', 'shopping_cart'] or not order.order_line:
|
||||
if not order or order.state != 'draft' or not order.order_line:
|
||||
request.registry['website'].ecommerce_reset(cr, uid, context=context)
|
||||
return request.redirect('/shop')
|
||||
# if transaction pending / done: redirect to confirmation
|
||||
|
|
|
@ -147,7 +147,7 @@ class Website(orm.Model):
|
|||
quotation_values = self._ecommerce_get_quotation_values(cr, uid, context=context)
|
||||
quotation_values['user_id'] = False
|
||||
quotation_values['section_id'] = self.pool.get('crm.case.section').search(cr, SUPERUSER_ID, [('code', '=', 'SPC')], context=context)[0]
|
||||
quotation_values['state'] = 'shopping_cart'
|
||||
# quotation_values['state'] = 'shopping_cart'
|
||||
return SaleOrder.create(cr, SUPERUSER_ID, quotation_values, context=context)
|
||||
|
||||
def ecommerce_get_new_order(self, cr, uid, context=None):
|
||||
|
|
Loading…
Reference in New Issue