Commit Graph
1287 Commits
Author SHA1 Message Date
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
Kevin Baptiste fbc7b78036 [FIX] lunch: show only company locations
All lunch locations were showing regardless of the company the user is
logged in.

Now only the lunch locations of the current company are showing.

closes odoo/odoo#81603

Taskid: 2710417
X-original-commit: 3e87770bb8faf2a58ba0b429148f64256537a4da
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-12-17 16:07:37 +00:00
Aktiv Software ba179f3595 [FIX] lunch: hide create button on the list view of lunch app
**Description of the issue/feature this PR addresses:**
Lunch App: not able to place lunch orders from the list view of Lunch App -> My Lunch -> New Order list

**Current behaviour before PR:**
Create button visible on the Lunch App -> My Lunch -> New Order list view. when we click on it nothing happens.

**Desired behaviour after PR is merged:**
Like v14 Create button will be invisible and able to add an order from Lunch App -> My Lunch -> New Order by clicking on any records from the list view

Fixes #78272
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#81514

X-original-commit: 7026dc8357c29451dbcff132dc19c60614e38b82
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-12-16 13:13:56 +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
Julien Castiaux 42b522bd83 [FIX] *: cleanup manifest files
*: base_address_city, base_address_extended, bus, crm, im_livechat,
   l10n_ae_pos, lunch, pos_restaurant_adyen, test_assetsbundle,
   test_converter, test_lint.

It is spelled `auto_install`, the `complexity` key is long gone, `qweb`
has been moved to `assets: {'web.assets_qweb': []}`. `js` and `css` are
long gone too, `maintainer` is redundant with `author` which is
"Odoo S.A." by default already, the `certificate` key is long gone.

closes odoo/odoo#80988

Related: odoo/enterprise#22766
Signed-off-by: Julien Castiaux <juc@odoo.com>
2021-12-08 11:17:22 +00:00
Martin Trigaux d99cfd9416 [I18N] *: export saas-15.1 source terms
closes odoo/odoo#80964

X-original-commit: 0663892a34896980008eb0de69aeb58019a67e89
Related: odoo/enterprise#22759
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-07 13:48:53 +00:00
Kevin Baptiste 24d0bc9a4e [FIX] lunch: make list view working again
The list view on the ordering page was no longer working since #73475.

closes odoo/odoo#79852

Taskid: 2688284
X-original-commit: dcecd627fd0ab4b52ce399897a881838416d9702
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-11-16 13:46:56 +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
Martin Trigaux e132c36ee6 [I18N] *: export 15.0 source terms
closes odoo/odoo#77898

X-original-commit: ad5afb1d18661784bfcf51bca66e576de1f6c49b
Related: odoo/enterprise#21478
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-10-05 16:54:21 +00:00
Yannick Tivisse b5e3fd73ed [FIX] lunch: Don't erase lunch location when set
closes odoo/odoo#77621

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-10-01 15:26:55 +00:00
Nicolas Bayet 4813f42997 [IMP] mail,*: replace jinja with qweb
Jinja as a templating engine was problematic in differents respect:
- introduce external dependency to Odoo (less controll)
- add another templating mechanism in the stack
- specific feature in qweb cannot be reused
- difficulty in rendering easily editable templates
- more knowledge required with no betterment

By replacing jinja with qweb we can now build tools to edit a qweb
that will work with the previously jinja encoded document
(essentially `mail.template` records).

There is a catch however. Some email fields (eg. email_to) used jinja
syntax for rendering dynamic variables (ie. ${object.something} and
${object.something_that_should_not_be_escaped | safe}).

We still want user to use dynamic variables for some char fields (eg.
subject, from, to, ...). We made a new rendering engine called
"inline_template" that will render an expression enclosed by `{{` and
`}}`.

To be able to edit the templates from the backend interface, a
plugin to the Odoo editor has been made for seamlessly edit the
document.

This qweb plugin includes:
- make dynamic variables (eg. `<t t-out="variable"/>`) not editable
  (for preventing the user to shoot himself in the foot)
- group and hide related logical branching (ie. t-if, t-elif, and t-else)
  in order to see only one at once
- a floating select input to switch visibility of a particular logical
  branching

Task-27033

X-original-commit: odoo/odoo@68182baff4
Part-of: odoo/odoo#77377
2021-09-28 23:42:54 +00:00
Martin Trigaux ef8ad324b0 [I18N] *: export 15.0 source terms
closes odoo/odoo#76542

X-original-commit: 63e6807437295519a0f4705fb88644d6d557ca3a
Related: odoo/enterprise#20882
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-09-16 07:17:40 +00:00
Mathieu Duckerts-Antoine 7545913020 [REF] *: graph archs cleaning
We clean various graph archs taking into consideration that:
 - the default type of a graph is "bar".
 - a bar chart is by default stacked.
 - the field attributes type="row" and type="col" does not make sense for
   a graph view (since its implementation was separated from the pivot
   implementation a long time ago))
 - the boolean attributes should now take 1 or 0 as value (but the other
   values are accepted for retrocompatibility).

Part-of: odoo/odoo#76065
2021-09-07 15:50:14 +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
alt-odoo 1aaef7614d [FIX] lunch: use correct timezone when retrieving today's lines order
On the kanban view to order your lunch, we are retrieving today's order lines for
the current user. In _get_current_lines, we are using today's date without taking
into account the timezone of this user, which can prevent him to see/modify his
order of today in case it was ordered very early.
2021-08-25 06:03:39 +00:00
Martin Trigaux 293d3765fa [IMP] lunch: avoid a call to ir.model.data
Not needed to do it via a specific call, can be included in the
controller data
2021-08-10 13:49:04 +02:00
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
Kevin Baptiste 86aa7b78aa [IMP] *: introduce data-hotkey on form and modal views
Define `data-hotkey` on most used action buttons.

For the modals, the following keys are dedicated for "special"
actions:
 - Alt+G: add
 - Alt+V: save
 - Alt+Z: cancel

closes odoo/odoo#73275

Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-07-15 08:39:49 +00:00
Xavier Morel b451441e58 [IMP] lunch: de-traw-ify
Remove t-raw of alert messages:

* Add alert testing to one of the existing tests.
* Transform widget data straight in `_fetchWidgetData` so the widget
  itself only ever sees the "proper" shape of things (to come), this
  includes the existing parsing and reformatting of `wallet`, as well as
  the new wrapping of all alerts' `message` in a `Markup`.

Note: conditional updating of `alerts` because while the endpoint
actual always sets it, test data doesn't necessarily do so (?).
2021-07-20 05:41:35 +00:00
Xavier Morel 27b02d2ec9 [FIX] web, *: de-t-raw kanban views
Add HTML fields support to kanban view (currently bespoke but maybe it
should be done via `format`), and remove t-raw for HTML fields there.

Also just strip some t-raws which were completely unnecessary to start with
2021-07-20 05:40:55 +00:00
Xavier Morel ce50728aa0 [REM] lunch: outdated / unused file
lunch.xml apparently stoped being used in
855c6dac25, but was never deleted.

Finally drop it, and its t-raw.
2021-07-20 05:37:41 +00:00
Yannick Tivisse d7ddd5de53 [IMP] lunch: Store the lunch location on lunch orders 2021-07-16 12:02:56 +02:00
Yannick Tivisse fcc22bbabf [IMP] lunch: Add filters to allow composing a menu 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
Martin Trigaux 6758868731 [I18N] *: export saas-14.4 source terms
Without demo data

closes odoo/odoo#73560

X-original-commit: 802e46541117573e028b711ea33dad9df9075a39
Related: odoo/enterprise#19602
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-12 10:57:37 +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
Leonardo Pavan Rocha c53724ebc3 [IMP] *: adds generic user avatar
Description of the issue/feature this PR addresses:
It is currently quite difficult to differentiate users. Most of the time, people
don't take the time to upload an actual avatar so everybody looks the same. This
PR generates a custom avatar with the users initials and random color to
differentiate them. For res.users, res.partner and hr.employee, image fields now
hold the binary image and avatar are used to show the image or svg.

Current behavior before PR:
Avatar had only random colors and was being saved in database, being inefficient

Desired behavior after PR is merged:
A new mixin defines image fields and in case no image is set, it generates an
SVG image with the user's initials and random color.

closes odoo/odoo#69819

Task: 2404630
Related: odoo/enterprise#18199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-06-01 14:36:23 +00:00
Martin Trigaux 41d8b8cf68 [I18N] *: export saas-14.3 source terms
closes odoo/odoo#70673

X-original-commit: bcb9ff784e44462384b0a43a0a23eed7a1111bc5
Related: odoo/enterprise#18269
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-05-11 12:28:28 +00:00
dht-odoo 12469ef4d3 [IMP] various: improve the sequence of menu items
- Currently all menus are out of order in app switcher.
- For example, Sales app is 16 menu away from Accounting,
  Social Marketing app is 25 menu away from Email Marketing, etc.
  So, all menus should be reordered.

- This commit will reorder the menus of the app switcher in order to reduce
  the distance between correlated applications,
  and bring the most common apps upward.
- And in this commit we have left gap of 5 subsequent sequence for further new menus.

PR: #69984
TASK ID: 2513082

Related: odoo/enterprise#17989
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-07 05:54:18 +00:00
Raphael Collet 93d2321b6b [REF] core: simplify definition of concurrency field 2021-04-21 13:36:52 +00:00
Julien MougenotandSimon Genin 03641610c2 [REF] *: convert all modules to new asset system
Conversion of all modules to the new manifest assets declaration.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:18 +02:00
YOGRAJ TANDELandMohammed Shekha 7da9c296eb [ADD] calendar,lunch,web: weekly recurrent widget
with this commit we adding weekly recurrent widget, currently proeject and
calendar shows boolean for each day vertically but with this widget we displays
week days and its boolean horizontally.

Here widget will display first day as per language's week_start field, also we
adds FieldDependencies on custom widget and consider those FieldDependencies
while processing view node in basic_view.js

We add support of registry to contain owl custom widgets and add support
of rendering owl custom widgets.

Also with this commit we removes fields like sun, mon, tue etc. from view and
instead use "web_weekly_recurrence" custom widget to display boolean for each
week day.

Co-authored-by: Mohammed Shekha <msh@odoo.com>
2021-03-26 12:25:44 +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
Martin Trigaux 9741ef5ee6 [I18N] *: export saas-14.2 source terms
For odoo-master Transifex project, no demo data

closes odoo/odoo#66500

X-original-commit: 813931ac850e5ba4181259a5957ec72226fb670c
Related: odoo/enterprise#16510
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-02-19 08:02:58 +00:00
Francois (fge)andSimon Genin d29666c04c [IMP] web, *: adapt some JS files to new module system
The previous work on adding support for native JS modules needs to adapt
some existing files, which have an incompatible name (with a '/').

Also, we convert a few JS file in /web to the native JS module system,
to show that it can work.

Part of PR 63177

Co-authored-by: Simon Genin (ges) <ges@odoo.com>
2021-02-15 10:18:11 +01:00
Michael Mattiello (mcm) 785b304876 [IMP] *: reduce shift in form views (xml)
* account, analytic, calendar, coupon, crm, crm_iap_lead_website,
  delivery, digest, event, event_crm, fleet, gamification, hr,
  hr_expense, hr_skills, im_livechat, lunch, mail, maintenance,
  mass_mailing, membership, mrp, point_of_sale, pos_mercury, product,
  purchase, purchase_requisition, sale_management, sales_team, sms,
  stock, stock_landed_costs, survey, website_crm_partner_assign,
  website_event_exhibitor, website_event_track, website_forum,
  website_slides, base

This commit removes oe_edit_only labels and adds placeholder
on fields in form views from a lot of apps to minimize the
shift when switching mode.

task 2330101
2021-02-02 12:40:22 +00:00
william 5e8b7659be [IMP] base: add tooling for generating datetime
Add a new function to generate random datetime within a range
around a base date.
This allows the base date to change in the future or to be set to
today's date easily.
2021-01-22 08:50:34 +00:00