Files
odoo_source/addons/lunch/models/res_users.py
T
RomainLibert c0febb02d8 [IMP] lunch: Improve the product dashboard
The default image for the lunch product should be the one from the
category (added an image on the categories).

In case there is no image either on the product either on the category,
in the kanban view there should be a specific image (fork and knife
image)

Added some data in order to always have something displayed in the
kanban view

Fixed the layout of the dashboard

Bug fix, in `_check_wallet` there was a flush missing

Bug fix, `product_id` should be a many2one, not an integer field and the
orm should be used in order to avoid problems when favoriting products

This is a back2basics task

Task 2048246

closes odoo/odoo#35632

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-11 08:59:12 +00:00

12 lines
382 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class ResUsers(models.Model):
_inherit = 'res.users'
last_lunch_location_id = fields.Many2one('lunch.location')
favorite_lunch_product_ids = fields.Many2many('lunch.product', 'lunch_product_favorite_user_rel', 'user_id', 'product_id')