[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:
Damien Bouvy
2015-10-05 17:31:13 +02:00
parent c3a5f0fb7b
commit 0b5df29c8f
2 changed files with 2 additions and 2 deletions
@@ -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),
+1 -1
View File
@@ -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