Commit Graph
116 Commits
Author SHA1 Message Date
Gorash 75a105f46a [REF] base/all: Update modifier syntax: remove 'states' from fields
These changes are made as a result of simplifying attrs and 'states' in
views. However, they should have remained in a separate commit. When
applying the script making the xml changes (used later for the migration
script), the script checked the definition of the python fields in order
to convert the information into a python expression. Therefore, this
commit is not applied when the script is applied to xml changes.

During this attribute deletion pre-existing errors were found. Part of
the code was using the boolean values of 'states' and another part of
the code was not. The behavior could therefore be different (in cases
where readonly on the field had the same value as the ballan in
'states').

Following the deletion of 'states' and without the application of the
view migration, the js tests (tower) were no longer functional. Tests
using the Form view suffered the same effect. There are few tests that
had to be adapted, including two tests in business accounting (updated
by the accounting team). A test for column_invisible did not work. Test
checking if the test system triggers an error if we try to write on an
invisible field. It turns out that Form was testing on the value of
invisible but not taking into account if the column was invisible. The
test system fix is applied separately because there were a lot of tests
that were incorrect.

Part-of: odoo/odoo#104741
2023-08-18 09:49:11 +02:00
althaf shaik 00ab68201e [FIX] lunch: handle error of invalid time in lunch suppliers
This traceback raises when user gives invalid time (hours) at the time of
updating a record in lunch suppliers.

To produce this issue:

- Install 'Lunch'
- Open Lunch/Configuration/Vendors
- Open an existing record and in 'Orders' click 'Send Order By' as 'Email'
- Give invalid time in 'Order Time' like -ve value or greater-than 12
- Save the record

Error: 'A traceback appears': 'hour must be in 0..23'

When user update a record 'write' method calls first than
'_sql_constraints' and in that method '_sync_cron' method is used.
Because of user giving invalid time it lead to above
traceback.

See:
https://github.com/odoo/odoo/blob/88c1541a1646c419d37a9ca94a27f069844614db/addons/lunch/models/lunch_supplier.py#L186-L199

Sentry-4297889570

closes odoo/odoo#132143

X-original-commit: 99fb33167fb6bd332548f21c83d69fd9fe6b6c69
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Altaf Shaik (alsh) <alsh@odoo.com>
2023-08-17 09:21:16 +02:00
Rémy Voet (ryv) c5cb357d90 [IMP] *: add dependencies to display_name field
The previous commit introduced an optimization to reduce the number of
queries and fields fetched when we call `name_search`. But it works much
better when the dependencies of `display_name` contain field names used
in the calculation (on the same record/model).

Then, to improve the performance and the cache coherency, add `depends`
and `depends_context` depending on the custom `_compute_display_name`.
Add only the first level of dependencies (never traverse relational
field) because only these have a positive impact on the previous
optimization and the cost is very low (see `modified`).
About `depends_context`, we don't include `lang` because (when `_` is
used by example) it is unlikely to get the same display_name in the same
request with two different lang.

closes odoo/odoo#122085

Related: odoo/documentation#4639
Related: odoo/enterprise#42599
Related: odoo/upgrade#4780
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-06-28 17:41:19 +02:00
Rémy Voet (ryv) 3c62ca1eb9 [REM] core: remove name_get API
Rationale
=========

Since v8, the `display_name` field is present on all models. By default,
`display_name` uses `name_get` which has pretty much the same purpose
(return record name used by the web client). Gradually, many (backend)
developers (and the ORM: https://github.com/odoo/odoo/commit/6da1c3ac4c036eac289597602976538e243cb939)
started using `display_name` (more convenient than
`record.name_get()[0][1]`) but it still had the `name_get` override.
It becomes more complex than necessary and poeple start to misunderstand
the two (and sometimes override both, leading to inconstiencies between
`display_name`/`name_get`).

To simplify the ORM and the API, we decided to keep only one of them,
the `display_name` field:
- It is much more convenient from a backend point of view
(`record.name_get()[0][1]` vs `record.display_name`)
- It is cached during the same transaction (and invalidated if
its dependencies change)
- It can be overridden like any other compute field (override
`_compute_display_name` with any extra dependencies)
- `name_get` is replaced by `read(['display_name'])`
(API perceptive), which can actually be more efficient
(if `display_name`'s depends are correct, the ORM will only fetch the
fields it needs instead of every prefetchable field)

Changes
=======

- Deprecates `name_get` for the v17 and based the method on
`display_name` (the opposite of before)
- Converts all usage of `name_get`
- Overrides of `name_get` are now overrides of `_compute_display_name`
- For `res.partner`, rename the field store `display_name` into
`complete_name` because `display_name` context-dependent and it makes
no sense to have a compute store that is context-dependent.
- Previously, it was possible to return multiple names for the same
record with `name_get`, but it was tricky and most of the usage of
this `name_get` didn't take this into account. The only example of
this is the `name_get` of `product.product`
(now use `", ".join(<names>)`).

Part-of: odoo/odoo#122085
2023-06-28 17:41:19 +02:00
Victor Feyens f4ea6d3226 [FIX] *: strict api for main orm methods
Enforce strict types for returned values for
* create
* write
* unlink
* default_get

to make those methods more consistent and reliable.
Also make sure they can be called with empty self/values,
i.e. that they follow the same behavior as the base methods
defined in the main orm Model.

closes odoo/odoo#116809

Related: odoo/enterprise#38880
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-04-25 15:20:43 +02:00
Rémy Voet (ryv) 234db70d86 [IMP] *: Use the new API of _read_group for backend use
Part-of: odoo/odoo#110737
2023-04-19 21:58:27 +02:00
Thibault Delavallée ea3e4d2dc0 [REF] various: cleanup usage of 'message_notify'
Notification method 'message_notify' is sometimes used as a standalone method
to send notifications. In that case it is called directly on MailThread
abstract model, notably when there is no context record or when it does not
inherit from 'mail.thread' directly. This is done mostly in technical models.

However in that case some model-specific code is not called, notably methods
computing default subject. In this commit we improve some calls to be sure
notifications have content enough to be understandable.

When possible, we also redirect the notification method on real records
inheriting from mail.thread, enabling a more complete process.

See community PR for more details.

Task-2710804 (Mail: Clean MailThread Posting API)

Part-of: odoo/odoo#99482
2023-01-17 20:58:35 +01:00
Chong Wang (cwg) b95b549d24 [IMP] core: raise warnings for related translated stored fields
The _compute_related function can only update one translation but not all. We
decide not to update all translations to avoid increasing the time complexity.
As a result, the value for related translated fields should always be generated
in the runtime, and storing it is illegal.

A related translated stored field may work as expected in a single language
environment. But in mult languages environment, if you have a name field

    name = fields.Char(related="parent_id.name", store=True)

changing parent_id in French, will only change the French translation of the
name field

This PR tries to remove these fields. And a warning is added to prevent
developers creating a related translated stored field in the future.

closes odoo/odoo#102553

Related: odoo/upgrade#4004
Signed-off-by: Wang Chong (cwg) <cwg@odoo.com>
2022-11-10 14:13:41 +01:00
Fabien Pinckaers 3363e55cac [IMP] cleanup of help messages in all modules
This commit aims at removing unuseful help message to:
1/ reduce translators work, to focus on more useful translations
2/ not sending unuseful information in load_views
3/ reduce help message to useful messages, so that we can mark
   fields having a tooltip in the future UI.
4/ some cleanup of existing messages too

The main use cases:
- REMOVED: help redundant with the field name, providing no extra info
- MOVED TO COMMENT: technical help messages, that should not be in UX

closes odoo/odoo#97279

Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-08-02 00:26:53 +02:00
Fabio Barbero dc66b7aec3 [IMP] mail, various: use overridden method in message_notify
Purpose
=======

In message_notify, when called on a recordset, call model methods instead of
base one defined on MailThread. This allows to use internal methods overrides.

Also perform some linting on calls to ``message_notify`` in order to better
spot calls, parameters, ...

Task-2852908

closes odoo/odoo#92868

Related: odoo/enterprise#28038
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-18 10:23:03 +02:00
Raphael Collet 6cf8db906f [REF] *: adapt code to new flush API
closes odoo/odoo#87527

Related: odoo/upgrade#3497
Related: odoo/enterprise#26939
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-05-25 18:00:47 +02:00
Kevin Baptiste 58c7e17a68 [IMP] lunch: add 'Sent' status
Added a new 'Sent' status, meaning the orders have been made to the
supplier. Once an order is 'Sent' it cannot be modified anymore.

It's no longer possible to order a product after the automatic email has
been sent.

closes odoo/odoo#80584

Taskid: 2678064
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-03-14 17:27:54 +00:00
Florian Damhaut 469ab9445e [FIX] lunch: allow order from different location
Step to reproduce:
- Have the same menu items in the different locations
- Order one item for Office 1 click " Order now"
- Choose different office
- Select the same item

Current Behaviour:
- There is no 'Order now' and you can see that both orders were made
from Office 1.
- If you select two different items, you can click 'Order now' twice,
but there is no button if items are the same

Behaviour:
- If you change location before adding an item already present
 you create a new line link to the new location and the 'Order now'
 button is present

opw-2769168

closes odoo/odoo#86351

X-original-commit: f7075de6479487b6d4b4648ace3d62bf50df396c
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-03-14 14:29:50 +00:00
Vincent Schippefilt 05fc9a6733 [IMP] *: use _read_group instead of read_group
This commit modifies most of the usages of read_group and uses
_read_group instead. _read_group doesn't join automatically on the
many2one fields when no order_by is specified, making it more performant
when the "name" of the many2one is not relevant, which is the case for
most back-end cases

closes odoo/odoo#84908

Task-id: 2479334
Related: odoo/enterprise#24877
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-03-02 17:10:48 +00:00
Thibault Francois d1d631871a [FIX] lunch: do not generate custom code counted by cloc
Issue
-----

The module lunch generate ir.cron and thus server action when
lunch.supplier and lunch.alert are created.
Those server action are counted as customization by cloc and thus
customer should pays maintenance fee just for the installation of
data_merge module

Cron are deleted when supplier and alert are deleted but the server
action remains.

Solution
--------
Avoid to count server action generated by lunch by adding
a xml_id from lunch module to those SA

Delete server actions as well

closes odoo/odoo#82576

X-original-commit: cafd96dde8df79e7158b156b961657941b0265cb
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Thibault Francois <tfr@odoo.com>
2022-01-11 16:18:54 +00:00
alt-odoo 6fab93bf64 [FIX] lunch: prevent order of unavailable vendor
There is a default Available Today filter on products view but it is not
enough to prevent a very hungry employee to order a product from a vendor
not available today if he removes the filter.

closes odoo/odoo#81866

X-original-commit: 7ec9ab0e9efd87c9e49f72f5f9fc5e43108ed591
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Alex Thuyls (alt) <alt@odoo.com>
2021-12-23 15:07:12 +00:00
Kevin Baptiste c28a826471 [FIX] lunch: bring back the favorites lunch products
It was no longer possible to favorite a product and the already
favorited products were not showing.

closes odoo/odoo#81692

Taskid: 2704569
X-original-commit: 328e0384cc2cff34fc5c4131014d94efb5747cb5
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-12-21 08:07:07 +00:00
Yannick TivisseandVictor Feyens 18952cdc76 [IMP] *: Convert single create method into multi
Taskid: 2703085
Part-of: odoo/odoo#80824
Co-authored-by: Victor Feyens <vfe@odoo.com>
2021-12-14 19:13:18 +00:00
William Braeckman e8dc76ee0b [IMP] lunch: add possibility to notify users on lunch arrival
There was no way for the lunch manager to notify users that their meal
had arrived prior to this commit besides manually sending a message to
the concerned users.
There now is a dedicated button after the order has been confirmed by
the lunch manager to send notifications.

TaskId-2587476

closes odoo/odoo#78649

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-10-26 14:11:00 +00:00
Audric Onockx (auon) c8a4e51b3d [FIX] lunch: Fixed e-mail sent at wrong time
Steps:
- Set a supplier's 'Timezone' at a different timezone from utc.
- Set 'Send Order By: Email' and set any 'Order Time'.

Result:
  E-mail will be sent at wrong time.

Explanation:
  According to pytz, using tzinfo arg in the standard datetime constructor "does not work" in combination with pytz. Yet lunch_supplier.float_to_time() calls time.replace() which calls this constructor.

Solution:
  Don't allow lunch_supplier.float_to_time() to modify tzinfo and use pytz.localize() in _auto_email_send() to specify the right tzinfo.

opw-2541132

closes odoo/odoo#78091

X-original-commit: 6b92fd80c4fc3471a4419369f0c6843fe18bad51
Signed-off-by: Audric Onockx <auon-odoo@users.noreply.github.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-10-11 06:40:42 +00:00
alt-odoo b096f2a676 [IMP] lunch: add and order lunch orders by site in confirmation email
In case a vendor needs to deliver to more than one location site, we should
add the location name and address in the email sent to him.

closes odoo/odoo#75423

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-25 06:03:39 +00:00
Yannick Tivisse d7ddd5de53 [IMP] lunch: Store the lunch location on lunch orders 2021-07-16 12:02:56 +02:00
Yannick Tivisse 0abdb3cf94 [IMP] lunch: Allow to reorder a previous order from "My Orders" 2021-07-16 12:02:56 +02:00
Yannick Tivisse 95ae10e8ef [IMP] lunch: Move extras from product category to lunch supplier 2021-07-16 12:02:56 +02:00
Yannick Tivisse 01ae6a69f2 [IMP] lunch: Improve general UX (back2basics)
TaskID: 2586326
2021-07-16 12:02:56 +02:00
Yannick Tivisse 6fd6034631 [IMP] lunch: Syncronize suppliers/products active value 2021-07-16 12:02:56 +02:00
Yannick Tivisse e7ef2dabbd [IMP] lunch: Improve error message 2021-07-16 12:02:56 +02:00
Yannick Tivisse cecd7a3448 [MOV] lunch: Split model files according to guidelines 2021-07-16 12:02:56 +02:00
Yannick Tivisse 7778031977 [IMP] lunch: Remove lunch.product.report model
The cross join with res.users caused dramatic performances issues.

TaskID: 2586326
2021-07-16 12:02:56 +02:00
alt-odoo 0c8816cc2b [FIX] lunch: access rights error on ir.cron for lunch manager
Small fixup of recent commit https://github.com/odoo/odoo/commit/5b8eff9d771a9071327473d2185624f69e1057c1.

closes odoo/odoo#73587

X-original-commit: d98a005c88b932a459b634cf811fb320cbea1357
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2021-07-12 15:09:18 +00:00
alt-odoo 25d4311199 [FIX] lunch: Toggle archive products when archiving a vendor
When a vendor is (un)archived, we should (un)archive all related products
as well to avoid displaying archived vendors and products in the search
panel of the Order lunch and Products list views.

closes odoo/odoo#73007

X-original-commit: 259d2f36cc73892ef295a6cfdc7e72340bfd9afd
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2021-06-30 15:36:30 +00:00
alt-odooandJulien Castiaux 603e13fa00 [FIX] lunch: access rights error on ir.cron for lunch manager
When a lunch manager tries to archive a vendor, we automatically update its
related cron. This is triggering an access rights error if the user does not
have access to ir.cron model. We should allow him to archive the vendor
without error.

closes odoo/odoo#72750

X-original-commit: 5b8eff9d771a9071327473d2185624f69e1057c1
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
Co-authored-by: Julien Castiaux <juc@odoo.com>
2021-06-24 18:07:25 +00:00
dht-odoo 5ce7ad709c [IMP] hr: improves field type from text to html
Replace text fields to html fields as we have our own 'OdooEditor'.
Indeed, it gives more options to users in the way they format their
content without weighting too much on the UI
(tools appear on demand and not by default).

Models -> Fields

1) fleet.vehicle -> description
2) fleet.vehicle.log.contract -> notes
3) hr.job -> description
4) hr.contract -> note
5) hr.leave.allocation -> notes
6) hr.applicant -> description
7) lunch.product -> description
8) lunch.order -> product_description
9) lunch.product.report -> description

Task Id: 2499504

X-original-commit: afe52b050a7667f3f20696cd48cd922f635a941c
2021-06-07 05:24:08 +00:00
YOGRAJ TANDELandMohammed Shekha 7fb9c81296 [IMP] calendar,lunch: change field names
with this commit we changes field names for week days like su, mo, tu etc. to
sun, mon, tue and so on in calendar module, this is going to be used in
task 2317795 where we developed recurrency module for recurrency mixin.

Also with this commit we change field names of weekdays in lunch module to have
same name as we have in calendar and project module so that we can easily use
custom widget "web_weekly_recurrence" instead of defining boolean field in xml
for each day.

task-2335399

Co-authored-by: Mohammed Shekha <msh@odoo.com>
2021-03-26 12:25:44 +00:00
Julien Castiaux e5cf8cc8b7 [REF] Lunch: Use dynamic daily crons for auto emails
The Lunch module can automatically send an email to a supplier with the
daily orders at a configured time. It can also remind the users via chat
so they don't forget to order their sanddwish.

Before, two high frequency cron jobs were responsible to check every 20
and 5 minutes if we reached the moment when to send the email to the
suppliers or the notification to the users. Together the two crons were
executed 360 times a day.

The new model uses a dedicated daily cron per supplier record and per
alert record, the dedicated cron is created on the fly and its moment of
execution automatically updated to reflect the supplier/alert record.

See also #41858 for prior work.

closes odoo/odoo#63749

Task: 2416741
Related: odoo/upgrade#2044
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2021-03-17 02:10:41 +00:00
Achraf (abz) 182e513825 [FIX] lunch: Use extra toppings without problem
1) Extra Items

    Issue: Adding an extra to one menu item, automatically adds it to the other food items in the same order.

    Expected Behavior: When adding an extra, it should only be associated to
    the food item for which it was selected, and NOT applied to the other ordered items.
    For example, if I select a "Ranch" dressing for the "Chef Salad",
    the ranch should not appear as an extra for the "Cheeseburger" or "Cookie of the Day".

2) Unable to Submit Certain Orders

    Issue: Odoo prevents the user from submitting an order in the following case
    (better illustrated through an example). If you select a "Chef Salad", you will be prompted to select a "Dressing Choice",
    because the configuration is set to select one and only one extra.
    You cannot add the salad to the cart without selecting a dressing,
    nor can you proceed if you have more than one dressing selected;
    this is functioning as expected. The problem, however, comes when you
    select a dressing and add the salad to the cart, and now you try to add a
    dressing as its own order item (separate from any salad). Even though the
    salad has its own dressing selected, and the separate dressing is its own item,
    the error message: "You have to order one and only one Dressing choice" appears and
    prevents the order from being submitted. This issue may be a consequence of the behavior observed in the first issue.

    Expected Behavior: The user should be able to submit the order in
    this case because the salad had only one dressing associated with it,
    and the extra dressing is supposed to be its own item.
    This should not create a conflict with the "only one" extra logic.

Step to reproduce (edv)
Reproducible on runbot.
1) Extra Items
https://drive.google.com/file/d/1yos9coFqd55pq8qNbNs1OqGNMNSdgxDX/view

2) Unable to Submit Certain Orders
https://drive.google.com/file/d/1M0ZEElu-hYwU9bmCwEx_tqEZRAPG_UEt/view

opw-2391070

closes odoo/odoo#63435

X-original-commit: a8467765b97e429712b79d41f88492993f8620ea
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2020-12-16 11:27:18 +00:00
Victor Feyens e64f03c185 [IMP] *: restrict the deletion of used currencies 2020-11-27 16:10:01 +00:00
Barad Mahendra 231eaa0fd8 [IMP] lunch: Improve the views and multi-company behaviour
Purpose
=======

Improve the lunch categories and mutli-company environment.

Specifications
============

- Able to archive a product category and this should archive/unarchive
all the products in that category also added the filter for same.
when unrchive the product if category is archived then raise the
Validation to change the category OR unarchive the category.
- add a default image for lunch categories
- Adapt the size of the default image, currently it's too big,
- On lunch order form view if product images is not set then display
the category image same as kanban image.

- Add a company field on the Product categories (it's already there
but it should be visible on the view form). Added the multi company
rule for the product category and if company is not set on category
then it will be sharable by all the company. so default company on
product category null.
also on lunch product and report check the multi company and display
the product accroding to company.

closes odoo/odoo#45797

Taskid: 2200002
Closes: #45797
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-16 13:18:06 +00:00
Victor Feyens ba898ddbb7 [IMP] lunch: lunch order model cleanup
closes odoo/odoo#50854

Related: odoo/upgrade#1163
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-07 12:42:05 +00:00
Raphael Collet 6a69f107df [FIX] *: useless parameter 'ondelete' on One2many fields
Note: some of them were moved to the corresponding M2O.
2020-04-07 09:25:08 +00:00
Kevin Baptiste b40f43d52f [IMP] lunch: store company_id of lunch.supplier
For performance reasons, the company_id of a lunch supplier is now
stored.

In a multi-company environment, the multi-company ir.rule was loading
*all* the suppliers in order to check their related company_id.

closes odoo/odoo#42631

Taskid: 2152319
X-original-commit: 0a73eeb0d3163c2c47fb2d25da024ed4a16824ff
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-02 16:54:25 +00:00
nje-odoo 92472fbf9c [IMP] lunch : make field translatable.
Now we can translate name and description field in lunch.product object
and we want that translation in kanban view of 'lunch.product.report'.

So we set related field in 'lunch.product.report' and remove those fields
from init().

Due to related field it will affect on performace of lunch.product.report
kanban view loading.

Task-2068989
closes odoo/odoo#41206

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-31 12:17:26 +00:00
RomainLibert 69319bba3e [IMP] lunch: get rid of the lunch_order_temp wizard
Replace lunch.order.temp wizard by lunch.order (fp request)

closes odoo/odoo#35585

Taskid: 2048667
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-10-18 12:37:52 +00:00
RomainLibert d4fb89cd25 [IMP] lunch: back2basics
closes odoo/odoo#38899

X-original-commit: f4dbee9b844015e95afd5edf892489582cf1f397
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-10-16 16:39:16 +00:00
RomainLibert 9ef2157d17 [IMP] lunch: location multi company
closes odoo/odoo#36331

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-04 07:26:43 +00:00
RomainLibert ba8bdcfaf2 [IMP] lunch: improve lunch again 2019-09-04 07:26:43 +00:00
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
Sébastien Theys 1e9772889b [IMP] *: use image.mixin when appropriate
The following models are already using big images, or they might need big images
in the future:

- partner
- hr employee
- shop category
- lunch product
- gamification badge and karma rank

PR: #34925
2019-08-02 16:47:58 +00:00
Sébastien Theys 58a2ffa26f [IMP] *: rename image fields
image_original => image_1920 (now resized to 1920)
image_big => image_1024
image_large => image_256
image_medium => image_128
image_small  => image_64
image replaced by image_1920 (when writing) or by image_1024 (when displaying
	what was previously the big size)

+ add new intermediate format:
image_512

PR: #34925
2019-08-02 16:47:58 +00:00
Martin Trigaux 5a6a414e2c [MERGE] Forward port of saas-12.4 to master up to aadc4a9f0b 2019-07-22 14:47:52 +02:00