Commit Graph
141723 Commits
Author SHA1 Message Date
bat-odoo feca3ad527 [IMP] base: update l10n icons
Purpose of the task is to update all l10n modules icon with new icon that i have
found in task attachment.

So in this commit, Updated all l10n modules icon with new icon.

closes odoo/odoo#65329

Taskid: 2442631
Related: odoo/enterprise#16054
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-25 15:01:43 +00:00
nounoubensebia 417622d655 [IMP] [website_]event[_questions|_sale] datetimes sales start/end
changed the start/end date fields to datetime fields, in order to allow more
flexibility for the user and enable them to set a precise point in time at
which ticket sales should start/end, because otherwise ticket sales/end would
always be set at midnight which is not very flexible.

Task-2431440

closes odoo/odoo#65133

Related: odoo/upgrade#2126
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-25 14:58:20 +00:00
Urvi Soni e109e476e6 [IMP] various: reorganize the general setting
Purpose of the task is, 'general setting' is not easily understandable
by the user. The user often gets lost. This is especially damaging
through onboarding as some new users like to discover the software by
scrolling through the general settings.

So in this commit, the general setting is well organized and easily
understandable by the user.

Related PR: https://github.com/odoo/enterprise/pull/14707

closes odoo/odoo#61645

Taskid: 2374990
Related: odoo/enterprise#14707
Related: odoo/upgrade#1958
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-25 15:48:10 +00:00
Yannick Tivisse 8444643cc6 [FIX] hr_contract: Allow manager to modify current employee contract
closes odoo/odoo#68259

X-original-commit: c60672e123e996a82a706a8aed5456ddd2288578
Related: odoo/enterprise#17259
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-25 10:24:19 +00:00
Kartik Chavda 903453487d [IMP] calendar: change button string from 'EMAIl' to 'EMAIL'
In calendar module there is one typo in action_mass_mailing
button's string.

So replace the 'EMAIl' to 'EMAIL'.

closes odoo/odoo#67535

Taskid: 2478549
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-10 05:46:02 +00:00
Romain Derie bad0926ab1 [FIX] web_editor: don't run code when input is emptied
Before this commit:
  - Edit mode, open image dialog
  - Upload an image to the media dialog
  - Reclick on Upload but don't select an image, close the browser image
    selector
  - This will trigger the input change event, as the input was emptied

This is needed since in later commit, `_addData()` will do some code outside
of the `files` loop, which is useless if there is no files selected.
In thise case, the issue would be that it would open an empty toastr.

task-2345082
Coming from #65828
Closes #68326

closes odoo/odoo#68340

X-original-commit: 94c45412714c1263788b2567ce3c9581453b2cd4
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-25 12:35:11 +00:00
Romain Derie 46ea05ab03 [FIX] web_editor: prevent mismatch between mimetype and content type
Since the image util method `image_base64()` is converting BMP images to PNG
automatically[1], there would be a mismatch between the attachment content type
and the attachment mimetype.

  - Content type: retrieve with `base64_to_image(data).format` -> return PNG as
                  the image data was converted from BMP to PNG
  - Mimetype: set on `write()` and `create()` with `_check_contents()` which
              call `mimetypes.guess_type(file_name)`.
              BMP image `my_file_image.bmp` would have a mimetype set to BMP

The computed field `image_src` would return `False` since the image.mimetype
would be BMP, making the dialog picker not showing the image but loading
`http://localhost:8069/false` instead.

[1] https://github.com/odoo/odoo/blame/097f29d0f6a5b295c81fd074665dbd261eaf12fb/odoo/tools/image.py#L124

task-2345082
Coming from #65828
Closes #68326

X-original-commit: ef5b108b781df73342bb99342a1116fad86d3b58
2021-03-25 12:35:10 +00:00
Samuel DegueldreandArthur Detroux fb05e0f554 [FIX] web_editor: fix race condition in option selection
Previously, when selecting certain options, especially ones which had
slow updateUI methods, the selected value was sometimes reset to its
previous value. This was caused by a race condition in which, when a
snippet option updated its value, it would wait for options on the
parent snippet editors to update all of their options' UI, but it
incorrectly only waited for *one* of the snippet editors to finish
instead of waiting for all of them.

This commit fixes that by stopping the event propagation and triggering
a new event that will let the direct parent know when all parent editors
are done updating their options' UI before signalling that the UI update
is done.

task-2487578

closes odoo/odoo#68341

X-original-commit: 7623a0c771495cd41bf40af37c0d2b6e4beb7cdc
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Arthur Detroux <ard@odoo.com>
2021-03-25 12:37:35 +00:00
Samuel Degueldre fd16106199 [FIX] web: fix missing placeholder in translated string
closes odoo/odoo#68335

X-original-commit: 233bbb0550354e4d48cdd83c221fc10ccab12842
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-25 11:58:03 +00:00
Aaron Bohy 2c69b323b1 [FIX] web: do not display falsy url field widgets
Before this fix, unset char fields with the url widget in form view
displayed "false", whereas they should simply be empty. This is a
side-effect of commit [1], which aims at reducing the shift between
readonly and edit modes in form views.

[1] https://github.com/odoo/odoo/commit/288b24cbdf54ac0dbee7e012f074fac9a0c68238

closes odoo/odoo#68330

X-original-commit: de1f7ab77d37adbbc68e640ea9877721bfc869d2
Signed-off-by: Michaël Mattiello <mcm-odoo@users.noreply.github.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-03-25 11:03:54 +00:00
Mohammed Shekha 2f6dd3d172 [IMP] web: x2many list: update all modifiers after an onchange
Let's assume an x2many list with an onchange. When a sub-record is
modified, an onchange is performed, and it may update other records
in the relation (e.g. the debit/credit case in accounting). This
commit ensures that modifiers are correctly re-evaluated in that
situation, so that they are up-to-date with the new x2many values.

task-2373929

closes odoo/odoo#61911

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-03-25 10:33:47 +00:00
Samuel Degueldre 73f4fad9ee [REF] website_blog, *: adapt blog-post option to use new m2m for tags
*: web_editor

This commit refactors the website blog option to use the newly
introduced Many2manyUserValueWidget

Part of https://github.com/odoo/odoo/pull/67832
task-2274732

closes odoo/odoo#67832

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-25 09:27:18 +00:00
Samuel Degueldre be05ac7e2b [IMP] web_editor, website_form: introduce m2m UserValueWidget
This commit introduces a many2many as a standalone, reusable
UserValueWidget. This widget is built on top of the ListUserValueWidget
which was until now only used in website form that had to be updated to
allow more generic use of the widget.

Part of https://github.com/odoo/odoo/pull/67832
task-2274732
2021-03-25 09:26:53 +00:00
Thibault Francois 30f4be4889 [FIX] (google|microsoft)_calendar: make sync more resilient
Issue
-----
- Currently the cron can take too much time and timeout.
  In case of timeout process data are rollback.
  The sync per user also crash and stop the process for all user and make
  the transaction rollback

  In both case we cannot ensure that all user will end up synchronized

- The real time sync can end up in deadlock:
  If you create a holiday, it trigger a write on the user and the
  creation of an event that will be synchronize with google

  The synchronization may ask for a new token if this request fail
  a new cursor is create to empty on the user the refresh token.
  2 cursor that are trying to write on the same record => Deadlock

- Bad refresh token management
  When the refresh token is not anymore valid it's erased but
  the calendar_token and validity are kept. Is odoo consider
  the token valid it will try to sync an event with google|microsoft
  despite the refresh token is not valid anymore. Of course this lead to
  an error and the impossibility to create an event anymore without
  manually wiping the calendar_token and calendar_token_validity

- Error 401 are handled in context manager
(google|microsoft)_calendar_token, but get_*_calendar_token never raise
http error only user error.

Solution
---------

- Improve cron resilience
	- Commit between each user and rollback in case of issue for a user
	- Solve the issue when stop < start
        - Solve issue with rrule not being the first element in the list
          of recurrence
	- Improve perf when searching for organizer
	- In order to limit the volume during the first synchronization, we only
	synchronized event from x days in the past to x days in the future with
	x = 365 by default
	- Limit the number of event to synchronize to google each time to 200,
	since this operation is time consuming (1 request is sent per event)

- Avoid deadlock
  A new cursor is not needed, we only need to ensure that write on the
  user is done with a clean cursor and will be commited despite the error
  raise. So rollabck before the write and commit explicitly afterwards

- Erase properly all the token and the token validity if the refresh token is not valid anymore
	- For google calendar, erase also the token in case of 401
          error: Wrong client id, this mean the database parameter have been
          change and all the user should reconfigure the synchronization

- Directly handle error 401 with error 400 in refresh_token method

closes odoo/odoo#66250

X-original-commit: 486f69abad6226e5ce016ad89a0eeb103d709a3f
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-25 09:55:10 +00:00
Oussama MESSAOUDIandqsm-odoo 35d27a6c1d [IMP] website, *: control hue and saturation of grays
*: web_editor

The purpose of this commit is to control the hue and the saturation of
the gray palette.

task-2362091

closes odoo/odoo#66428

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-03-24 17:36:14 +00:00
svs-odoo 37906f7506 [IMP] uom: add surface UoM
Adds a new UoM category (surface) and two UoM: m² and ft²
Could be useful for some kind of products like paper or fabric.

task-2443585

closes odoo/odoo#66174

Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-03-23 17:06:37 +00:00
Odoo's Mergebot 5d99568fd3 [MERGE] calendar: improve wording of calendar mail templates
Purpose of this merge is to make templates easier to preview and edit as
weel as to improve their content.

This is achieved notably by lessening use of custom rendering context and
trying to fix as much error-prone jinja statements.

In this commit we also make ``calendar_template_meeting_reminder`` template
looking more like other templates. There were some rendering differences that
do not seem really wanted.

``calendar_template_meeting_reminder`` was also using an old ``force_event_id``
key not replaced by recurrent_id field on attendee.

This merge improves few strings of the invitation mail being sent while
booking an online appointment. Online appointment is computed based on
``appointment_type_id`` field being defined. Some tweaks in wording made it
necessary to know if recipient is the responsible, customer or an added
attendee on the event, leading to some tooling code added on event model.

The main changes includes

 * for customer, remove the CTAs to accept / decline event as attendee are
   automatically set as accepted;
 * depending on recipient, improve wording of the mail accordingly and mention
   appointment type in the mail;

Some code reodering and cleaning is also performed in this merge to ease
reading and understanding of calendar event and attendee models.

LINKS

Task ID-2199620
COM PR #64925
ENT PR odoo/enterprise#15914
UPG PR odoo/upgrade#

Related: odoo/upgrade#2282
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-25 08:55:53 +01:00
Krupal OzaandThibault Delavallee bc9bc2686c [IMP] calendar: improve main data templates
Purpose of this commit is to make templates easier to preview and edit as
weel as to improve their content.

This is achieved notably by lessening use of custom rendering context and
trying to fix as much error-prone jinja statements.

In this commit we also make ``calendar_template_meeting_reminder`` template
looking more like other templates. There were some rendering differences that
do not seem really wanted.

``calendar_template_meeting_reminder`` was also using an old ``force_event_id``
key not replaced by recurrent_id field on attendee.

This commit improves few strings of the invitation mail being sent while
booking an online appointment. Online appointment is computed based on
``appointment_type_id`` field being defined. Some tweaks in wording made it
necessary to know if recipient is the responsible, customer or an added
attendee on the event, leading to some tooling code added on event model.

The main changes includes

 * for customer, remove the CTAs to accept / decline event as attendee are
   automatically set as accepted;
 * depending on recipient, improve wording of the mail accordingly and mention
   appointment type in the mail;

Task ID-2199620
COM PR odoo/odoo#64925
ENT PR odoo/enterprise#15914
UPG PR odoo/upgrade#2282

Co-Authored-By: Krupal Oza <koz@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>
2021-03-24 15:16:42 +00:00
Thibault Delavallée f742d0f72c [FIX] calendar: fix timezone localize
Seems like the wrong utc was used.

Task ID-2199620
COM PR odoo/odoo#64925
2021-03-24 15:09:27 +00:00
Thibault Delavallée 0c7765c4cf [FIX] calendar: try to import vobject only once
Clean code and avoid import within methods.

Task ID-2199620
COM PR odoo/odoo#64925
2021-03-24 15:09:27 +00:00
Thibault Delavallée 8952ce3bf4 [MOV] calendar: reorganize calendar event and attendee methods
Purpose is to ease understanding of code. Notably we apply guidelines that
should have been applied at refactoring time, notably

  * set all compute fields together right below fields as it eases model
    discovering;
  * set CRUD methods as a whole after compute fields;
  * group other methods by main use and put tools at the file's end;

This commit causes some diff but we feel this is necessary to ease future
modifications in those models, as they are quite big and important.

Task ID-2199620
COM PR odoo/odoo#64925
2021-03-24 15:09:27 +00:00
Thibault Delavallée 1e9b1da0eb [MOV] calendar: reorganize calendar event and attendee fields
Purpose is to ease model understanding. This commit causes some diff but
those models gain readability after being ordered by main field section.
It would have been better to do it at refactoring time but time was short
to do it at that time.

Task ID-2199620
COM PR odoo/odoo#64925
2021-03-24 15:09:27 +00:00
Nicolas Lempereur 5ef48dbdff [FIX] translate.py: CSV export correct module name
Correct small typo that the module when exporting translations as CSV
file might have been the wrong module because we used variable from
previous loop.

This did not seem to cause any issue since in this given case in import
we got the module from the part before . in XML ID ({module}.{name})
that was right.

found when working on opw-2439029

closes odoo/odoo#68297

X-original-commit: 62e7b161d39e5f5f6751cf87826fa6f7b729f83d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-03-24 11:54:02 +00:00
Krzysztof MagusiakandAaron Bohy b08afa3475 [FIX] web: can update one2many with custom field widget
One might design a custom field widget to display/interact with a
one2many field. Before this commit, if this field widget triggered
a field_changed event to update a related record, it crashed,
because the code assumed that there was a view associated with the
field.

Closes #68276
opw~2468238

closes odoo/odoo#68309

X-original-commit: 3826a2645b94e0f62c719814c4dbe4cc6502e1f2
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2021-03-24 14:38:11 +00:00
Aaron Bohy d613f97320 [CLA] add kmagusiak
X-original-commit: 3fb99e44164b4bfe79ba7ba61efff39c45006cac
2021-03-24 14:38:11 +00:00
JF Aubert 687c206010 [IMP] product: Favorite Products
Set products as favorites
Filter your favorite products
Sort results on
  . favorites
  . alphabeticals

closes odoo/odoo#61852

Task: 2373850
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-03-24 12:48:32 +00:00
Oussama MESSAOUDI bb2b791e3b [FIX] website_blog: avoid overlap around blog's paragraph
Fixing anchor selector to pick only section and div elements.

task-2449620

closes odoo/odoo#68298

X-original-commit: a384dc0905190e9e469ed5c6e65fc0e9abd93b8d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-24 11:55:13 +00:00
Odoo's Mergebot 81965d3e92 [MERGE] event: improve state, display and performance of event mail schedulers
PURPOSE

Improve event mail scheduled communications: add a state and a contacted
count. Improve performances and code readability.

SPECIFICATIONS: STATE

Instead of the checkbox "sent", an event mail can have 3 values

  1. Sent, if all the mails has been sent;
  2. Scheduled, if scheduled but no attendee have been contacted;
  3. Running, if not all attendees have been contacted;

Note that communication targeting "after registration" are always considered
as being "running" as any new registration triggers a new communication.
A new widget is added that displays an icon depending on the state.
A new field holding contact count is added. When scheduler send emails it is
updated to keep a count of sent communications.

SPECIFICATIONS: MAIL COMPUTATION IMPROVEMENT

Purpose of this merge is to remove the "done" field computation. Indeed
it is based on either

  * mail_sent field if scheduler is global to the event (before or after
    event). This computation is light as this field changes only once
    when emails are scheduled and sent;
  * status of event registrations compared to all sent communication on
    those registrations. This is costly as adding a new registration changes

In this merge we therefore

  * rename ``done`` to ``mail_done`` to ease grep and understanding;
  * remove ``mail_sent`` as it is integrated within ``done``;
  * manually update ``mail_done`` when updating schedulers instead of doing
    it through a compute method;

Some code cleaning is performed to make it clearer and easier to understand.

LINKS

Task ID-2414658
COM PR odoo/odoo#63093
UPG PR odoo/upgrade#2014

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-24 13:50:02 +01:00
Thibault Delavallée 2520bfe625 [REF] event: manually update completion of mail schedulers
Purpose of this commit is to remove the "done" field computation. Indeed
it is based on either

  * mail_sent field if scheduler is global to the event (before or after
    event). This computation is light as this field changes only once
    when emails are scheduled and sent;
  * status of event registrations compared to all sent communication on
    those registrations. This is costly as adding a new registration changes

In this commit we therefore

  * rename ``done`` to ``mail_done`` to ease grep and understanding;
  * remove ``mail_sent`` as it is integrated within ``done``;
  * manually update ``mail_done`` when updating schedulers instead of doing
    it through a compute method;

Some code cleaning is performed to make it clearer and easier to understand.

LINKS

Task ID-2414658
COM PR odoo/odoo#63093
UPG PR odoo/upgrade#2014
2021-03-24 11:18:47 +00:00
Debauche Stéphane 69df7d3d8a [IMP] event: improve event mail state display
Purpose
=======

Show an icon representing the state of the event mail and number of contacted
registrations instead of the simple checkbox "sent".

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

Instead of the checkbox "sent", an event mail can have 3 values

  1. Sent, if all the mails has been sent;
  2. Scheduled, if scheduled but no attendee have been contacted;
  3. Running, if not all attendees have been contacted;

Note that communication targeting "after registration" are always considered
as being "running" as any new registration triggers a new communication.

A new widget is added that displays an icon depending on the state.

A new field holding contact count is added. When scheduler send emails it is
updated to keep a count of sent communications.

LINKS

Task ID-2414658
COM PR odoo/odoo#63093
UPG PR odoo/upgrade#2014
2021-03-24 11:18:42 +00:00
Thibault Delavallée e47725abd8 [FIX] event: fix missing trigger for scheduled mails based on event end date
Scheduled date is not correctly triggered if event date_end changes. It should
update its scheduled communications.

Task ID-2414658
COM PR odoo/odoo#63093
2021-03-24 11:18:14 +00:00
Stéphane Debauche 214d8fe589 [FIX] event: fix done field definition
Add missing trigger for done

Do not copy done field on event.mail model.

Task ID-2414658
COM PR odoo/odoo#63093
2021-03-24 11:18:11 +00:00
Thibault Delavallée db8f68f683 [MOV] event: cleanup registration code location
Purpose is to ease understanding of code. Ranging chaussettes in the correct
tiroir is important.

Task ID-2414658
COM PR odoo/odoo#63093
2021-03-24 11:18:09 +00:00
Thibault Delavallée df52fedee6 [IMP] base: add missing views for ir.cron.trigger model
Purpose of this commit is to help debugging processes involving cron triggers
by adding views and a menu in Odoo. It allows to see triggers having been
created. Menu has been added under Scheduled Actions (aka Crons), in Technical
menu.

Task ID-2414658
COM PR odoo/odoo#63093
2021-03-24 11:18:06 +00:00
Nicolas Galler dfd0dbb303 [REV] purchase_stock: don't hide replenishment origin
This reverts commit 170729ee58b199041d7545e7789ac9474e86f998, per
discussion with @thomasdeleval on linked ticket.

opw-2422438

closes odoo/odoo#68293

X-original-commit: 5c2db20a14701f165adfecb391073c3d957081e9
Signed-off-by: Steve Van Essche <svs-odoo@users.noreply.github.com>
Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com>
2021-03-24 11:04:29 +00:00
Josse Colpaert b3743556ab [FIX] account: avoid rounding error by not doing anything with empty fiscal positions
opw-2447155

closes odoo/odoo#68281

X-original-commit: fc0a2c515022cc6c200dd916462e44b1b79f8ea8
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-03-24 09:32:11 +00:00
svs-odoo 86318e7ff7 [FIX] stock: don't display assign SN for returns
Before this commit, when delivered qty. for a product tracked by serial
numbers and then create a returns for this product, as the move is
linked to its original returned move, when the detailed operations will
be displayed, it will hide `lot_name` field and display the `lot_id`.
The issue is it will still show the "Assign Serial Numbers" feature.
As this feature is for the creation of new SN only (not for assign
existing ones), it should be hidden in this case because it will lead to
attempt to create already existing.

How to reproduce:
  - Create a product tracked by serial numbers;
  - Add at least two qty. on hand for this product and create as many
    serial numbers, following by numbers (ex.: sn01, sn02, sn03, ...);
  - Make a delivery for at least two of this product and proceed it;
  - When it's done, make a return for this delivery;
  - Open the delivery's return and display the detailed operations, then
    use the "Assign Serial Numbers" to try to reassign the delivery SN.
  --> First, we will not see the SN on the move line (as `lot_id` is
      visible but `lot_name` is invisible).
  --> Second, you can't mark as done the return as it will try to create
      the SN but they already exist.

To fix the issue, we can simply hide this feature when we hide the
`lot_name` field.

task-2474919
opw-2455971

closes odoo/odoo#68249

X-original-commit: fab1f31f70376d5477e67d153e2fa3c0f6477397
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Steve Van Essche <svs-odoo@users.noreply.github.com>
2021-03-23 15:01:01 +00:00
Fanny He 0728db061b [FIX] stock: disable auto-trigger scheduler with ir.config_parameter
Currently we automatically check reordering rules when a product cannot be
completely reserved, which allows to have a replenishment document for the
product without needing to run scheduler. This is unwanted for some users.
In this commit, we allow to disable this by adding a parameter to
ir.config_parameter. To disable it, set a parameter with name
"stock.no_auto_scheduler".

opw 2458507

closes odoo/odoo#68283

X-original-commit: 7ec5bae11ad89514a33db35810f4763e7631125f
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-03-24 09:37:06 +00:00
Julien CastiauxandRaphaël Collet 9a8cf18ddb [IMP] core: New 'capture_trigger' test helper
When testing cron triggers, it is common to get the newly created
triggers in order to validate they exist and are scheduled are the right
moment.

This new helper is a context manager that capture all triggers or
triggers created for a specific cron. The created triggers are
accessible via the context's object `records` attribute.

The various tests have been updated so they use that new helper.

closes odoo/odoo#68163

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Co-authored-by: Raphaël Collet <rco@odoo.com>
2021-03-24 09:29:38 +00:00
svs-odoo 02bd058800 [IMP] mrp: workcenters views
Some changes on the MRP workcenter model (`mrp.workcenter`):

  - Adds a stat button in the form view to display operations used by
    the workcenter;

  - Enables the multi-edit on the list view;

  - Adds multiple fields in the list view, often as optional;

task-2382256

closes odoo/odoo#62126

Related: odoo/enterprise#17250
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-03-24 08:21:34 +00:00
svs-odoo 38ac9ccbc1 [IMP] mrp: operations listview
On the MRP operation model (`mrp.routing.workcenter`):

  - Changes the order (ordered by workcenter and BOM in priority);

  - Adds computed field, `time_computed_on`, which is only used in list
    view (display on how many numbers of work orders the duration is
    computed);

  - Adds multiple fields in list view (often optional display);

  - Adds two groupby (by BOM and by workcenter).

task-2382256
2021-03-24 08:09:17 +00:00
Patrick Hoste 2bb1f33155 [IMP] survey: display no question message for live session
PURPOSE

Before this commit, the survey host had no indication that his survey
has no questions. After this commit, he will be displayed with that
indication.
Before this commit, someone who took the survey had a message implying
him to modify the survey to add questions. After this commit the message
will say 'No question yet, come back later'.

LINKS

Task ID : 2456372
PR : odoo/odoo#68231

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-24 08:32:27 +00:00
Michael Mattiello (mcm) 2089fd8619 [FIX] hr_skills, web: fix css rules leak
Before this commit, hr_skills module defined a few css rules
but weren't enclosed in a custom class to make them only
for hr skills so these rules leaked everywhere in odoo.

This commit encloses these css rules to not leak them and move
a rule which changes the color of list's remove button into web
module to keep the color.

closes odoo/odoo#67921

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-03-17 14:42:29 +00:00
Nicolas Lempereur 5be7af0494 [FIX] translate.py: import model from CSV correctly
When importing transtlation from CSV, we:

- cut at `:` character to get the model
- used a model for types other than model and model_terms

This caused error that do not happen in PO import because:

- the model is before the `,` character
- the imd_model column is constrained to 64 characters, and a name that
  is not a model could be over that size.

With this changeset, the CSV import match better current PO import.

opw-2439029

closes odoo/odoo#68266

X-original-commit: cff91c6acbb7ef6a884d4dc4170574b83ff6e4cb
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-03-23 18:18:21 +00:00
Petar Najman f73c7b72be [IMP] payment: allow overriding the redirect form HTTP method
closes odoo/odoo#68256

X-original-commit: 923eaae31b0993d8a7e653b334471f7b6289450f
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2021-03-23 16:07:11 +00:00
Christophe Simonis 995d5dfe82 [FIX] tools.file_path: correctly handle the addons/ prefix
The tests passed because the path with the prefix is valid at root_path.

closes odoo/odoo#68257

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2021-03-23 16:32:10 +00:00
Oussama MESSAOUDI 0edb5e2985 [IMP] web_editor: trigger event oninput for input range type
Add an event listener triggered on current value change of input range.

task-2362091

closes odoo/odoo#66812

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-23 16:18:19 +00:00
Fabien PinckaersandRaphael Collet 085e972e4a [IMP] core: clean up and speed up XML/HTML translation
The former algorithm was recreating a full etree from scratch, while
parsing the content to translate.  Instead, we parse the etree and
update only the content that to be translated.

Before:
| In [2]: %timeit views.invalidate_cache(); views.mapped('arch_db')
| 578 ms ± 7.83 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

After:
| In [2]: %timeit views.invalidate_cache(); views.mapped('arch_db')
| 208 ms ± 2.79 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

Reading a view is 2.63x faster: from 504 ms, to 191 ms (sum of all the
1345 views, when installing website_sale).  Large views, like web pages
goes up to 3x-4x faster; small views are ~2x faster.

As views are cached, it only impact the loading to put in cache, but all
XML/HTML fields get the same performance gain.

closes odoo/odoo#68182

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
2021-03-23 15:35:47 +00:00
Ipsita Borisagar 7e5ee53035 [FIX] crm: avoid to display false in case of void subject
Before this commit:

If there is no subject for message, it effectively displays "False" in case of
void subject.

After this commit:

If there is no subject for message, it will not display "False" in case of void
subject.

Tasks-2156170

closes odoo/odoo#68243

X-original-commit: 4b2f0ddcbe859ec8453e537aec9d5b0685876eca
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-23 13:52:19 +00:00
Jeremy Kersten 86e3c1a5e0 [FIX] website: improve logo svg
Without this 'XML declaration', if you have magic installed, the mime type
is image/svg instead of image/svg+xml and browser don't render it.

This commit is related to #68211 meanwhile a more generic solution (if needed).

closes odoo/odoo#68239

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-23 13:13:23 +00:00