Commit Graph
14 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 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
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
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
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 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