Commit Graph
144 Commits
Author SHA1 Message Date
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
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
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
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 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
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 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
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
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
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
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
Martin Trigaux e433bc57ff [FIX] *: rephrase, correct typos
Courtesy of Transifex's translators for reporting bad/unclear sentences.

closes odoo/odoo#61804

X-original-commit: f5d0f4a1ebf406583889e9e04912d40c0693343e
Related: odoo/enterprise#14769
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-11-16 16:47:28 +00:00
IEL 3c7694b409 [FIX] *: fix image parsing error on saving res config
WHAT: apply 93a7695f65baf00d1f82481d6a2a97e6c11940a8 for all res.config.settings
menus

WHY: the same reason as in 93a7695f65baf00d1f82481d6a2a97e6c11940a8:

	When saving, a read is called. By default, read has
	bin_size to true to avoid performances issues.
	It will return the image size instead of the content

it may lead to image dissapearing or "Incorrect padding" error

HOW:

    find . -iname "*.xml"|xargs grep "\"context\".*'module'" -l | xargs sed -i "s/\(\"context\".*'module'.*\)\}/\1, 'bin_size': False}/"
    git checkout  -- addons/base_setup/views/res_config_settings_views.xml

---

PR for General Settings: https://github.com/odoo/odoo/pull/47297

opw-2346644

closes odoo/odoo#61215

X-original-commit: 7c55efa88b72bd1f3f0f32f7f738e2fda5aa4abd
Related: odoo/enterprise#14547
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-11-02 18:25:20 +00:00
Victor Feyens 40fb37b943 [FIX] various: enforce currency presence for monetary widgets
When a field is specified as widget="monetary" it makes sense to have the
currency actually shows. It won't happen if currency field is not present
within the view.

An heuristic to detect missing currency field presence when using monetary
fields or monetary widget tag will land soon in master. As this commit targets
a stable version only view fixes are provided.

Task ID-2329114
PR #56946

X-original-commit: 9c1c848ad1e8fef11320e2a162b008de7e304bcb
2020-09-03 08:45:22 +00:00
Barad Mahendra 30adc183f8 [IMP] *: set sample="1" on reporting view archs
The purpose of this commit is to enable sample data on various graph and
pivot views.

Task ID: 2319606

closes odoo/odoo#55917

Related: odoo/enterprise#12415
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
2020-08-18 14:24:10 +00:00
Barad Mahendra 63f239163a [IMP] *: set sample="1" on various graph archs
The purpose of this commit is to enable sample data in various
graph views.

TaskID: 2311486
2020-08-12 09:57:09 +00:00
Lucas Perais (lpe) 559a9cf018 [IMP] *: adapt some list views to the action button in controlPanel
task-2246383

closes odoo/odoo#54593

Related: odoo/enterprise#11992
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-07-29 09:11:52 +00:00
Xavier Morel c8063af7a0 [IMP] core, account, lunch: make <menuitem> recursive
For clarity, some data files are formatted as pseudo-tree
structure. This is somewhat confusing and dangerous when the structure
has no meaning... so add meaning:

* allow nesting menuitems, nested items are set as children to the
  parent they're nested in
* update schema to allow an icon *or* a parent on regular menu items,
  and neither on nested (they have an implicit parent meaning can't
  have an icon)
* remove attributes which don't actually exist from the menuitem
  schema
* also type sequence as an integer while at it

Convert two large-ish menuitem data files to recursive form.

closes odoo/odoo#54564

Related: odoo/enterprise#11887
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-07-28 13:03:13 +00:00
Julien MougenotandMathieu Duckerts-Antoine 3162141e4d [IMP] lunch: Conversion of model to extension
Conversion of the lunch kanban model to a proper search extension.

Now that the view search model supports model extensions, it has become
more convenient to provide additional domain informations by appending
new extensions.

This is why the lunch "location" logic (locationId and userId) has been
shifted to a new model extension ("Lunch Model Extension") which
provides an additional domain part to the other search extensions.

Part of task 2228968

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-07-23 08:21:10 +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
3fea5b2136 [REF] mail, *: refactor messaging with OWL
This commit is a significant rewriting of client-side discuss, chatter,
chat window, and messaging menu using OWL. The behavior should be broadly
the same, with some slight functional changes here and there.

From a technical standpoint, the code of messaging is mainly organized in 2
main groups of modules:

- models, which are logical entities that depict the client-side state of
  messaging as a whole.
- components, which are in charge of displaying information from models.

This refactoring also introduces new JS guidelines regarding folder structure
(/static) and naming rules for JS modules.

Community PR: https://github.com/odoo/odoo/pull/39023
Enterprise PR: https://github.com/odoo/enterprise/pull/6249

Task-1914207

This PR is a collaborative work by Alexandre, Julien, Sébastien and Xavier,
with the precious help of Lucas to speed it up towards the end.

closes odoo/odoo#39023

Related: odoo/enterprise#6249
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Alexandre Kühn <aku@odoo.com>
Co-authored-by: Julien Giannone <jgi@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
Co-authored-by: Xavier Dubuc <xdu@odoo.com>
2020-06-15 18:12:21 +00:00
Julien Mougenot f5f0ca843d [IMP] *: enable_counters with false as default
In the search panel, the attribute disable_counters with default False
has been changed to enable_counters with default False.
2020-06-12 13:34:04 +00:00
Vishnu Thuletiya 9a830432db [IMP] various: Use the new avatar widget in kanban view
The purpose of task is to update the 'user/employee avatar' to the new
widget in all the kanban view across all modules.
The below new widget are introduced for avatar:
 - many2one_avatar_user (for user_id fields)
 - many2one_avatar_employee (for employee_id fields)
which displays the avatar (i.e. picture) of a user/employee in front
of his name and clicking on the avatar will open a chatbox to message
that specific user/employee.

So in this commit, For each kanban view with a user or employee avatar,
replaced it by the field with the new 'many2one_avatar' widget.

TaskID: 2244928
Related Enterprise PR: https://github.com/odoo/enterprise/pull/10420

closes odoo/odoo#50789

Closes: #50789
Related: odoo/enterprise#10420
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-13 12:37:48 +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
Aaron Bohy 900d162809 [IMP] *: update list views
This commit adapts several views to make them use newly defined
widgets, the new decoration-xxx mechanism on fields, and to adapt
them to the new design of buttons.

Part of task 2195254
2020-05-05 10:05:12 +00:00
Anh Thao Pham (pta) 8b6b09fc26 [IMP] lunch: add list view for lunch.product.report
- Move code from kanban view that is common with list view in common files
- Add action to add selected products to cart
- Add/update tests

closes odoo/odoo#47556

Taskid: 2160048
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-30 11:40:39 +00:00
Julien Mougenot 48ee7272b6 [IMP] *: adapt qunit suite bundle inheritance
Since the test assets bundle name has been changed and its structure is different,
the inheriting assets need to be updated.

Task 2002399
2020-04-07 14:40:53 +00:00
Nicolas Lempereur b53cf339e4 [FIX] web,*: phone number ltr even in rtl language
Currently there is two ways in view to have a phone number displayed in
LTR in a RTL language:

- have `widget="phone"` on a field
- have a class o_force_ltr on the field

But this is currently done very rarely and fail in list view because the
direction of data cells is used, eg.:

```
<div style="direction:rtl">
  <table><tr><td style="direction:ltr">
      <span>+1 2 3</span>
  </td></tr><tr><td>
      <span style="direction:ltr">+4 5 6</span>
  </td>/tr></table>
</div>
```

will be displayed as:

+1 2 3
6 5 4+

In this commit, we use unicode-bidi* to optionally add an additional
level of embedding so direction is taken into account by the
bidirectional algorithm.

This commit also adds o_force_ltr class or phone widget on phone fields
where it is not already defined.

*: https://drafts.csswg.org/css-writing-modes-3/#propdef-unicode-bidi

opw-2224828
closes #48425

closes odoo/odoo#48588

X-original-commit: ab067218e069f0a92610c3f0d4137e563e47755c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-03-30 13:50:04 +00:00
Hardik Prajapati 0ebbd1848f [IMP] lunch: Add kanban view for alert, location and product category
Purpose of the task is to add Kanban views on the Configuration menu
of the Lunch Application for a better interface on smaller devices.

So in this commit added for kanban for alert, location and product
category but keep the current list view by default for all this menu.

closes odoo/odoo#47905

Taskid: 2210929
Closes: #47905
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-19 09:52:39 +00:00
Nisha patel e428d473c3 [IMP] various: Allow to select only internal users on m2x field with res.users
Purpose of this task is to prevent users from setting portal users on
internal documents by mistake, and preventing noise and performance
issues resulting from loading all the portal users in those fields.

This commit fixes internal many2x fields to res.users which are now
restricted to internal users by setting domain (share=false) on form view.

closes odoo/odoo#47553

Taskid: 2172779
Related: https://github.com/odoo/enterprise/pull/9204
Related: odoo/enterprise#9204
Closes: #47553
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-16 10:28:35 +00:00
Nisha patel 159699b09c [IMP] various: set boolean_toggle on 'active' fields in form view
Currently, to activate/deactivate records with the 'active' checkbox
user has to switch to edit mode of the form.
So the purpose of the task is to allow the user to activate/deactivate
records from the readonly mode of the form view.

In this commit, we  set widget='boolean_toggle' on the 'active' field in form
view.

closes odoo/odoo#46567

Taskid: 2206794
Related: https://github.com/odoo/enterprise/pull/8918
Related: odoo/enterprise#8918
Closes: #46567
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-02 06:26:02 +00:00
Nicolas Martinelli b0605b4adc [FIX] *: make ribbon text translatable
closes odoo/odoo#41749

X-original-commit: 64c259fc74a8181aa381b6647a9816b6f5530dfd
Related: odoo/enterprise#7216
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-12-04 12:01:16 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Yenthe666 78ae3da902 [IMP] *: set name element on main containers in configuration views
This will improve the extendibility of view inheritance

closes odoo/odoo#41398

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-09 10:38:59 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
Lucas Lefèvre b51be7fa02 [FIX] lunch: Disable vendor creation from grouped products
fixes #38014

closes odoo/odoo#40926

X-original-commit: dbd532894783fc8aeb0b5c72b2dd88d8afdb1ccb
Signed-off-by: lul-odoo <LucasLefevre@users.noreply.github.com>
2019-11-26 08:27:49 +00:00
Kevin Baptiste 53febfa218 [IMP] lunch: add help message for empty alerts
closes odoo/odoo#39042

Taskid: 2081660
X-original-commit: 5f3f58a41f92f6b90f48beb11d89fb253945564d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-10-18 13:51:45 +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
Christophe Simonis 1662d0cfe6 [FIX] lunch: force empty context in action
X-original-commit: 46a3ac1985346ad8f9b23ace73d825d1120830d1
2019-10-10 06:27:28 +00:00
RomainLibert 1abd0f6a63 [FIX] lunch: rename order kanban actions
X-original-commit: fcf03eaf01bbc76cfc4ea21e573e31187ba9e2b6
2019-10-09 12:20:08 +00:00
Sébastien Theys b6288e5446 [IMP] *: remove image_64 and clean views
There are too many image sizes. Since they are stored resized this takes time to
generate when saving a new image, it's more rows on the attachment table, more
files on the disk, ...

64px is close enough to 128px that it can be removed without a big impact on
download size.

It will even reduce download and number of requests when both images are
displayed because now only one has to be downloaded and then benefit from cache.

The difference between the two is typically around 1.5kB which is negligible
these days, especially when the request overhead is around 0.5kB already, not
even taking into account other factors such as latency.

If a 64px image must absolutely be returned, it is still possible to pass the
size parameters to the image route. But the current guideline is to handle
resizing in the views when necessary.

Views
=====

- remove width and height attributes when existing CSS rules are overriding them
  (eg. `.oe_kanban_avatar` in the right context)
- add CSS rules instead of width and height attributes when possible
- use `object-fit: cover;` where width and height are forced to avoid distortion
  of non-square images
- for products, use `object-fit: contain;` instead, keep ratio but without crop
- add new CSS rules where the expected size was max 64px*64px before due to the
  image size itself
- remove `img-fluid` where using size classes to avoid conflicting rules

task-2060865

closes odoo/odoo#36147

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2019-09-19 10:23:39 +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