Fix get categories for restaurant
This commit is contained in:
parent
89562ff7ca
commit
2f1b558ede
|
@ -1545,17 +1545,13 @@ class MainWindow(FrontWindow):
|
|||
('template.categories', '=', cat_id),
|
||||
])
|
||||
return [
|
||||
[r['id'], r['code'], r['template.name'], r['template.sale_price_w_tax']]
|
||||
[r['id'], r['code'], r['name'], r['template']['sale_price_w_tax']]
|
||||
for r in records
|
||||
]
|
||||
|
||||
def get_product_by_categories(self):
|
||||
domain = [
|
||||
('parent', '=', None),
|
||||
('accounting', '=', False),
|
||||
('id', 'in', self.product_categories)
|
||||
]
|
||||
self.allow_categories = self.Category.find(domain)
|
||||
self.allow_categories = [pc for pc in self.product_categories if (
|
||||
not pc['parent'] and not pc['accounting'])]
|
||||
|
||||
for cat in self.allow_categories:
|
||||
cat['icon'] = get_icon(cat['name_icon'])
|
||||
|
|
Loading…
Reference in New Issue