Commit Graph
23 Commits
Author SHA1 Message Date
Goffin Simon 65ae1848d7 [FIX] lunch: The lunch mail template is not using the correct language
Steps to reproduce the bug:

- Creante a vendor V with a lang in French
- Set lang English on your user U
- Log with U
- Create a lunch.order.line for V
- Click on Lunch: Order meals

Bug:

The email was sent in the lang of U instead of V.

opw:2155628

closes odoo/odoo#42543

X-original-commit: 8708ef16608dd8b6cdcad066e31f70f6262af205
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-12-31 14:35:59 +00:00
Christophe Simonis 4ea8f780ff [FIX] lunch: don't update or recreate initial data
closes odoo/odoo#38317

X-original-commit: b50bccb28973bf939ac34c6aabe69bc3d3da8734
Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-10-10 06:27:29 +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
Raphael Collet 9920f20e4c [IMP] models: ORM speedup
This branch is the combination of several optimizations in the ORM:

* store field values once in the cache: the cache reflects more
faithfully the database, only fields that explicitly depend on the
context have an extra indirection in the cache;

* delay recomputations by default: use method `recompute` to explicitly
flush out pending recomputations;

* delay updates in method `write`: updates are stored in a data
structure that can be flushed efficiently to the database with method
`flush` (which also flush out recomputations);

* make method `modified` take advantage of inverse fields to inverse
dependencies;

* filter records by evaluating a domain on records in Python;

* a computed field with `readonly=False` behaves like a normal field
with an onchange method;

* computed fields are computed in superuser mode by default.

Work done by Toufik Ben Jaa, Raphael Collet, Denis Ledoux and Fabien
Pinckaers.

closes odoo/odoo#35659

Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
2019-08-20 12:43:59 +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
Kevin Baptiste 50163143a9 [IMP] lunch: Improve the general UX (back2basics)
- Reorganize configure your order screen
- Alert users through chat: Alerts can now be configured to
send a chat message to the employees.
- Replace toppings by extras

closes odoo/odoo#34470

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-16 11:44:35 +00:00
Hiral Bhavsar 6eef0ea0b7 [IMP] lunch: clean the controlpanel actions
- For the model 'lunch.order', rename the actions menu
  'Lunch: Receive meals' by 'Mark as received' and 'Lunch: Cancel meals'
  by 'Cancel'.
- For the model 'lunch.product', remove the action menu
  'Lunch: Archive/Restore products'

Linked to task 1984526
Related to PR #33720
2019-07-10 15:07:57 +00:00
Prakash Prajapati cecb3db386 [FIX] generic: fix typo in email templates.
Replace the email template content form if you have any question to if you have any questions.

task-1962924

Closes #33520

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-06-10 07:06:29 +00:00
RomainLibert 855c6dac25 [IMP] lunch: automatize lunch orders
We would like to automatize lunch as currently all orders are manually ordered and validated,
and a cash move has to be manually created each time you want to credit the wallet of some user.

1/ In this commit we add a new widget that comes with the kanban view
   and will allow to take orders in a friendly manner.
2/ We also add a lunch.supplier model this also allows you to configure an
   automatic ordering via email.
3/ Introduces new lunch.location model to replace res.partner on suppliers
4/ New mail template for automatic ordering
5/ Add the concept of new products (mark a product as new until some date)
6/ The toppings are now defined by product category
7/ Lunch.order removed, lunch.order.line renamed into lunch.order
8/ New SQL report to get the wallet content (aggregate of lunch.cashmove and lunch.order)
9/ New setting to allow negative wallet (aka overdraft)
10/ Application now remembers what notes and toppings you last ordered with your product
11/ You can change your location using the widget on the kanban view
12/ Edition of the order can be done until the order is arrived

TaskID: 1856876
TaskID: 1916105

closes odoo/odoo#30028
2019-01-18 15:33:04 +00:00
Yannick Tivisse d1c3948a05 Revert "[IMP] lunch: automatize lunch orders"
This reverts commit f727b8f0b5.
2019-01-08 13:12:33 +01:00
Yannick Tivisse 3729ebf34d Revert "[IMP] lunch: reintroduce lunch_alerts, change display of wizard"
This reverts commit 6f5dc5733f.
2019-01-08 13:10:55 +01:00
RomainLibert 6f5dc5733f [IMP] lunch: reintroduce lunch_alerts, change display of wizard
We want to be able to use alerts in order to display a message to the
users.
We want to have a minimal display in the wizard.
We want to link the toppings to the categories instead of the suppliers.

closes odoo/odoo#29301
2018-12-06 09:33:30 +00:00
RomainLibert f727b8f0b5 [IMP] lunch: automatize lunch orders
We would like to automatize lunch as currently all orders are manually ordered and validated,
and a cash move has to be manually created each time you want to credit the wallet of some user.

In this commit we add a new widget that comes with the kanban view and will allow to take orders
in a friendly manner.

We also add a lunch.supplier model and an integration with the hr module in order to filter what
products you can order depending on your working location, this also allows you to configure an
automatic ordering via email.

TaskID: 1856876
2018-12-04 11:56:21 +01:00
lul-odoo 6cf81abad8 [IMP] lunch: Improve demo data 2018-12-03 16:12:27 +01:00
Martin Trigaux a2f69cad13 [ADD] lunch: order generates an email for the supplier
Confirming orders must now be done per supplier and will open an email
composition wizard with the different orders
2018-08-10 15:32:04 +02:00
Raphael Collet 55549f1e61 [ADD] base: direct support for binding an action to a model 2017-08-28 09:53:23 +02:00
Thibault Delavallée 99959e0f07 [IMP] various: add module name in server action name
Purpose is to ease their ordering and understanding.
2017-01-03 19:11:08 +01:00
Jeremy Kersten a55ee3858c [FIX] *: convert action server to new syntax
Use record / records instead of deprecated locals
2016-11-18 10:03:48 +01:00
Thibault Delavallée b975d62c33 [MIG] lunch: migrate server actions in new API 2016-08-10 15:48:08 +02:00
Nicolas Martinelli 6e1d011421 [FIX] lunch: change demo data to avoid errors due to constrain
DateTime insert data in UTC, constrain is in the timezone of the server.
2015-05-22 15:00:17 +02:00
Nicolas Martinelli 3d63c15a56 [MIGR] lunch: migration to the new API, cleaning and new
widget for displaying previous orders.

Detailed changes :
- previous order is not a computed field, with its own custom widget that has been designed
according the new spec for widgets;
- useless wizards have been removed, and replaced by some server actions that perform the
same action with less code and views;
- removed deprecated or incomplete reporting;
- some renaming to follow the new specifications of module coding
2015-04-23 10:27:08 +02:00
Thibault Delavallée 058d403309 [MOV] lunch: moved files according to new specifications in order
to prepare the migration to the new API. Some files have not been renamed
because they will disappear soon.
2015-04-23 10:27:08 +02:00