[FIX] website_sale, website_portal_sale: new sale module compatibility
- SO states have changed, reflect this in the controller - digital products are no longer services, but they still do not need a picking
This commit is contained in:
@@ -22,7 +22,7 @@ class website_account(website_account):
|
||||
])
|
||||
orders = res_sale_order.search([
|
||||
('partner_id.id', '=', partner.id),
|
||||
('state', 'in', ['progress', 'manual', 'shipping_except', 'invoice_except', 'done'])
|
||||
('state', 'in', ['sale', 'done'])
|
||||
])
|
||||
invoices = res_invoices.search([
|
||||
('partner_id.id', '=', partner.id),
|
||||
|
||||
@@ -17,7 +17,7 @@ class sale_order(osv.Model):
|
||||
for order in self.browse(cr, uid, ids, context=context):
|
||||
res[order.id] = {
|
||||
'cart_quantity': int(sum(l.product_uom_qty for l in (order.website_order_line or []))),
|
||||
'only_services': all(l.product_id and l.product_id.type == 'service' for l in order.website_order_line)
|
||||
'only_services': all(l.product_id and l.product_id.type in ('service', 'digital') for l in order.website_order_line)
|
||||
}
|
||||
return res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user