Commit Graph
141473 Commits
Author SHA1 Message Date
william 3f97f8ee5b [REV] account: change the type of name field in 'account.move.line'
This commit reverts 0c075552f7

Task 2306265

This had the side effect of blocking the group by label in the Journal
Entry list view.
2020-08-25 08:54:11 +00:00
Dhruv Patel 1a72307bd2 [FIX] web: misalignment in o_colorpicker for "Hide in Kanban" label
In o_colorpicker popup, the "Hide in Kanban" checkbox label is not
aligned with the checkbox.
With this commit, we have aligned the label with the checkbox.

Task ID: 2277254

closes odoo/odoo#56447

X-original-commit: 72252ff8a6aaae86fae121a7006039a40ba6efe2
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-08-24 16:42:21 +00:00
Antoine Prieels 451a6dace3 [FIX] hw_drivers: Traceback in scanner type detection
`device_name` and `scanner_name` were defined outside of the scope of
the function where they were used in.
We move them and try to simplify the logic a bit.

closes odoo/odoo#56454

X-original-commit: e59e311578aa0b4539ef27580462a2c2e1dce970
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-08-24 17:41:05 +00:00
Nicolas Martinelli 91a3b9084d [FIX] stock: do not copy 'Printed' status
The printed status should not be kept when duplicating a picking.

opw-2320680

closes odoo/odoo#56449

X-original-commit: 6938e5bf106f95149bce50fac7ed3291bd1da812
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-08-24 16:54:29 +00:00
Anh Thao Pham (pta) dda7e42a57 [FIX] stock: fix traceability in detailed operations at creation
- Go to Inventory > Master Data > Products and create a Product with Tracking "By Lot"
- Go to Inventory > Configuration > Operation Types
- Edit Receipts:
  * Activate "Show Detailed Operations"
  * Activate "Create New Lots/Serial Numbers"
  * Deactivate "Use Existing Lots/Serial Numbers"
- Go to Inventory > Overview and open Receipts
- Create a Receipt operation
In the Detailed Operations tab, if a Product tracked by lot is added,
an existing lot can be selected although it is disabled in Operation configuration.
Once saved, the selected lot disappears.
"Lot/Serial Number" column is replaced by "Lot/Serial Number Name" column.
A lot name can be entered manually. (It will create the lot at the validation)
But after validation, the lot associated to the Product is the existing lot
that has been selected during the operation creation, not the one that should
have been created from the lot name entered manually.

opw-2323093

closes odoo/odoo#56448

X-original-commit: 75add3d1496ee64d5278bc4250ac41dc4349d460
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-08-24 16:44:50 +00:00
Victor Feyens a3505e72c5 [IMP] hr_holidays: improve allocation count performance
PURPOSE

Improve performances of various Odoo code bits.

SPECIFICATIONS

Use a read_group to compute the allocation_count, allowing to speedup
computation by doing it in batch.

LINKS

Task ID-2281297
PR odoo/odoo#53053
PR odoo/enterprise#11299

closes odoo/odoo#56453

X-original-commit: 9853fda702851c50d533e60bd805fdef52acba2a
Related: odoo/enterprise#12629
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-08-24 17:40:04 +00:00
Victor Feyens df3e0a7351 [IMP] account_check_printing: improve journal statistics computation performances
PURPOSE

Improve performances of various Odoo code bits.

SPECIFICATIONS

Use a read_group to compute number of checks to print, using a search_count
instead of a search.

LINKS

Task ID-2281297
PR odoo/odoo#53053
PR odoo/enterprise#11299

X-original-commit: 7035b99b09152f224e74eed7d6b67a8ab04fdce8
2020-08-24 17:40:04 +00:00
Victor Feyens 273af078b1 [IMP] crm, pos_sale: improve crm.team statistics performance
PURPOSE

Improve performances of various Odoo code bits.

SPECIFICATIONS

Use a read_group to compute the opportunities_count & opportunities_amount,
like the other compute methods for statistics fields.

Do the same improvement in pos_sale when computing pos_order_amount_total.

LINKS

Task ID-2281297
PR odoo/odoo#53053
PR odoo/enterprise#11299

X-original-commit: 3e30b1e5c1aa25463848d82492f25002bcbf9154
2020-08-24 17:40:04 +00:00
Benjamin Frantzen (bfr) 9591b4e4d4 [FIX] account_edi: fix crash when sending an invoice with an edi that has an error
- When an edi.document has an error and thus does not have an attachment, trying to send the invoice by mail would cause a crash

closes odoo/odoo#56450

X-original-commit: 7f9e34a5b11772af958293cd75d30cae69151497
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2020-08-24 16:59:19 +00:00
qsm-odoo 0058ee62f8 [FIX] website: show cookie bar whatever footer template the user chose
closes odoo/odoo#56435

Note: this fix may need to be backported as soon as possible
X-original-commit: 8e437a79e9f6948351a8c7f2f51daba4ffbed8e4
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-24 14:59:56 +00:00
Odoo's Mergebot d49207a2a7 [MERGE] website_slides: ease mailing of members having finished courses
PURPOSE

Before this commit, it was possible to send an email to all attendees only.
After this commit, it will be possible to send an email to attendees that
completed the course.

SPECIFICATION

Adds a searchable o2m field in the res.partner model to find all the completed
courses linked to that partner.

Adds a new 'Completion Email' template field in the slide.channel model
that will be sent automatically after an attendee completes a course.

LINKS

Task ID-2216352
PR #49592
Upgrade PR #1084

Related: odoo/upgrade#1084
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-24 17:22:37 +02:00
Nicolas Lempereur a9900c0702 [FIX] website: show mega menu in + (extra) menu
The mega-menu inside "+" menu (that contains items that do not fit on
one line) could not be used at all.

This is because we only managed normal dropdown-menu (ul) and not
mega menu (div.o_mega_menu).

But once the menu is shown, there is an issue because the two main
widgets are column on "lg" breakpoint, and inside the menu there is no
width but we might still be on lg breakpoint.

So this commit also try to reset col values (max-width and flex) as is
the case in mobile view (because "col-lg" are not applied).

opw-2313019
closes #56367

closes odoo/odoo#56426

X-original-commit: 19de393288dec96c7151a58e8fafd70978d305e9
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-08-24 14:04:48 +00:00
Sébastien Theys efb66e8e7f [FIX] mail, im_livechat: make livechat work properly
- fix traceback on receiving first livechat message due to bad computation of
  correspondent
- fix missing [0] in return of country name_get in channel_info
- fix visitor/correspondent computation to work when chatting with oneself
- reintroduce livechat ordered by last message in discuss sidebar
- improve mock server to make these fixes possible to test
- introduce corresponding tests

PR: #56243
task-2323670

closes odoo/odoo#56423

X-original-commit: f623bfd2c8819604c709bc723153c071dca6e3cc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-08-24 13:47:01 +00:00
Sébastien Theys 7bec33f578 [FIX] mail: ignore broadcast notifications targeting another user
This is typically not the case in production code, but it doesn't hurt to be
safe. The main reason for the change however is that it causes issues in tests
due to the easiest way to simulate notifications being to send them directly on
the bus which is "listened to" no matter the target user.

PR: #56243
Part of task-2323670

X-original-commit: 62e1e7fe39a7bed6ce70466a0aec645c7a0f299d
2020-08-24 13:47:00 +00:00
Sébastien Theys 4ab5c2a48b [FIX] mail, im_livechat: ignore notifications for unknown channels
Inserting channels and handling notifications for channels that have not been
properly initialized through the `channel_info` leads to issues due to
incomplete data that is not properly handled, such as bad correspondent, missing
uuid, inconsistent name, etc.

Moreover it doesn't make sense functionally to handle notifications such as
typing status if the channel isn't going to be displayed.

PR: #56243
Part of task-2323670

X-original-commit: 75070665060d64fe7b532aac4fc8e8410381b083
2020-08-24 13:47:00 +00:00
Sébastien Theys ef873e0c29 [FIX] mail: introduce findFromIdentifyingData
This is necessary to check the existence of a record based on identifying data
without having to use `insert` (or the inefficient `find`).

PR: #56243
Part of task-2323670

X-original-commit: c4bbfc5e2a8d236e5fc79a63c13575de146afbd7
2020-08-24 13:46:59 +00:00
Patrick Hoste 375e38fcd8 [IMP] website_slides: send an email when an attendee finishes a course
PURPOSE

After this commit, an email will be sent to congratulate the attendee
for the completion of a course.

SPECIFICATION

Adds a new 'Completion Email' template field in the slide.channel model
that will be sent automatically after an attendee completes a course.

LINKS

Task ID : 2216352
PR : #49592
2020-08-24 13:42:54 +00:00
Patrick Hoste 0b43747a4b [IMP] website_slides: add partner completed course filter
PURPOSE

Before this commit, it was possible to send an email to all attendees only.
After this commit, it will be possible to send an email to attendees that
completed the course.

SPECIFICATION

Adds a searchable o2m field in the res.partner model to find all the completed
courses linked to that partner.

LINKS

Task ID : 2216352
PR : #49592
2020-08-24 13:42:54 +00:00
Thibault Delavallée a91972a910 [FIX] website_slides: set groups on slide-related fields of partner model 2020-08-24 13:40:00 +00:00
asa-odooandD J c66d10a971 [FIX] calendar: allow creation of 'All day' events
Previously, creation of the 'All day' event was not possible in some
scenarios due to constraint error, even with proper configuration.

Scenario 1: (main spec of the task)
------------------------------------
- go to form view of calendar event
- create a new event
- enter future datetime in 'Starting at' field
- tick the 'All day' checkbox
- enter the end date which is greater than start date
- try to save the record

Scenario 2:
------------------------------------
- go to form view of calendar event
- create a new event
- enter future datetime in 'Starting at' field
- try to save the record

Scenario 3:
------------------------------------
- go to form view of calendar event
- create a new event
- enter any datetime in 'Starting at' field
- enter duration -1.00 hour
- tick the 'All day' checkbox
- enter the end date which is greater than start date
- try to save the record

In all above scenarios, user is not able to save the record even if
the there is no obvioius wrong configuration.

All of the above bugs are result of a recent refactoring[1]
where some redundant fields were removed.

The first two scenarios are result of 'stop' date not being computed
proerly based on 'start' in case the duration is set to '00:00'
(which is default duration) while the third one is due to lack of
proper check in the constraint after the fields used to validate
starting and ending dates were removed.

This commit fixes the issue by improving the compute method and by
ensuring proper validation in the constraint.

[1] - https://github.com/odoo/odoo/pull/42031/commits/6bafd7c677d016e82473f01bd0a3381ac3b24bbd

Task Id: 2299212
PR #54673

closes odoo/odoo#56411

X-original-commit: cc5d090c267bac892d2e8200f8e55de88c5a0af2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: D J <dja@odoo.com>
2020-08-24 13:07:50 +00:00
Andrea Grazioso (agr-odoo) 4fd328b3e3 [FIX] account: avoid traceback when reversing archived values
Create an invoice I with a tax T on an invoice line. Validate
Archive T
Create the credit note from I

Traceback will occur because the archived value is not copied on the
reversal, causing issue when matching data

opw-2320472

closes odoo/odoo#56407

X-original-commit: d949cb88abbf8f64b383bceba07105df578a4a14
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-08-24 12:56:03 +00:00
Guewen Baconnier 62adaa783c [FIX] Ignore sale order lines without product_id
In some conditions, such as the use case shown on:
https://github.com/guewen/odoo-reproduce-issues/blob/compute-qty-at-date/compute_qty_at_date/models/sale_order_line.py

The order of the computations can make that we have a line without
product_id (we come from an onchange because we removed the product form
the line), but 'display_qty_widget' is not yet recomputed.

Not checking if we have a product_id means we can end up with
'grouped_lines' that contains an entry for the line, but then
'product_qties' does not contain the product the dict comprehension
that builds the dictionary 'qties_per_product' fails with a KeyError.

opw-2273768

closes odoo/odoo#56406

X-original-commit: 9060b347949d11880c554468f551d25e874590d1
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-08-24 12:54:27 +00:00
Damien Bouvy be9ea60d07 [IMP] web: support custom create_name_field in calendar view
Until now, the quick creation dialog of the calendar view assumed that
the underlying model used a 'name' field for quick creation, with a
graceful degradation if it was not the case (redirect to the form view).

This prevented quick creation of models created through customizations
(for example).

This commit adds a `create_name_field` attribute on the view declaration
(similarly to many2one field) that allows to specify the field to use
during quick creation.

Task-2185423

closes odoo/odoo#48122

Related: odoo/enterprise#11242
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-08-24 11:50:15 +00:00
qsm-odoo 6bc2364974 [FIX] website: restore default font properties per font family system
Commit [1] made a mistake when creating the new font family system. The
values defined in the palettes took precedence over the overridding
values defined in the fonts configuration map. Obviously only user
values should take precedence over those.

[1]: https://github.com/odoo/odoo/commit/7be1429656af3c96ac30caed28a27f5b9590009f

closes odoo/odoo#56382

X-original-commit: eea7bb3ef0ff7e2304c686bb91e947a754dce03f
Related: odoo/design-themes#345
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-24 11:00:02 +00:00
Antoine Prieels 5519a7d04d [FIX] point_of_sale: Fix http.py.iotpatch
`http.py` had been modified so the file could be patched correctly with
the previous version of the `http.py.iotpatch` file

closes odoo/odoo#56383

X-original-commit: 4cc5f5e10125c784a6b930294e5186ae94cb4975
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-08-24 11:00:44 +00:00
Odoo's Mergebot 217f964a08 [FW][MERGE] event_*: fix demo and various frontend glitches
PURPOSE

Provide fixes after internal deployment of event online modules.

SPECIFICATIONS

Fix glitches in exhibitor menu filters.

Use Favorite name for reminder / wishlist / favorite widget of tracks.

Fix track / agenda menu management.

Fix demo data to have coherent tracks.

See sub commits for more details.

UPDATE

  * website_event_track_exhibitor.exhibitors_topbar_sponsorship
  * website_event_track_online.track_widget_reminder
  * website_event_track_session.session_topbar

LINKS

Task ID-2312007 (demo fix)
Task ID-2314778 (event online fixes)
PR odoo/odoo#56254
PR odoo/enterprise#12558

closes odoo/odoo#56300

Forward-port-of: odoo/odoo#56254
Related: odoo/enterprise#12566
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-24 13:03:14 +02:00
Thibault Delavallée 147cf5f328 [FIX] website_event(_exhibitor/track_quiz): display community menu only when used
Community menu field is added in website_event module. It is used in two
inheriting modules, website_event_meet and website_event_track_quiz. There
is no other common ancestor for those two modules.

In website_event, community menu field should be False and not displayed
as it has no real use. Only in those sub-applications it should be
computed like other menu fields, and displayed in event views (both
event and event type for configuration).

PR #56340
2020-08-24 10:20:12 +00:00
Thibault Delavallée 4dcc532282 [IMP] website_event_track_online: rename Reminder to Favorite
SPECIFICATIONS

Button to add a track in wishlist is either mentionned as wishlist, reminder
or event favorite. This is due to its naming evolving during various iterations
of dev and spec.

We set it to Favorite once for all.

UPDATE

  * website_event_track_online.track_widget_reminder
  * website_event_track_session.session_topbar

LINKS

Task ID-2314778 (event online fixes)
PR #56340

X-Original-PR #56254
X-Original-Commit odoo/odoo@73619ab9f6
2020-08-24 10:20:12 +00:00
Thibault Delavallée d544587195 [FIX] website_event_track(_online): fix track menu computation
This commit fixes glitches when switching menus. Indeed agenda is not correctly
taken into account, meaning it could get duplicated. Moreover track was
constantly coming back as True event when not wanted.

Behavior is: when setting website menu, force it to True, otherwise let users
defined its value. Agenda is part of track menu so fix its declaration in
_track and _track_online methods.

Task ID-2314778 (event online fixes)
PR #56340
PR odoo/enterprise#12589

X-Original-PR #56254
X-Original-Commit odoo/odoo@5821758c4d
2020-08-24 10:20:12 +00:00
Thibault Delavallée 9fea714542 [FIX] website_event_track_exhibitor: fix frontend menu glitches
SPECIFICATIONS

Fix ordering of countries: to be displayed by name

Fix 'all sponsorships' top menu entry in sponsorship filter. It is
called 'all countries', probably a copy-and-paste from country menu.

Fix display of modal when exhibitor is not online: if no country flag has
been found, avoid displaying a broken image.

UPDATE

  * website_event_track_exhibitor.exhibitors_topbar_sponsorship

LINKS

Task ID-2314778 (event online fixes)
PR #56340

X-Original-PR #56254
X-Original-Commit odoo/odoo@b2d203e85c
2020-08-24 10:20:12 +00:00
Thibault Delavallée f5aaf47ca8 [IMP] website_event_track_*: slightly improve tracks demo data
Purpose is to improve a bit tracks in Online Reveal demo event. Notably improve
synchronization of demo in website_event_track_live with their content in base
track module. Tweak some hours to make agenda look nicer.

Task ID-2312007 (demo fix)
Task ID-2314778 (event online fixes)
PR #56340

X-Original-PR #56254
X-Original-Commit odoo/odoo@8b46e9ee3b
2020-08-24 10:20:12 +00:00
Lucas Perais (lpe) 59c8c523de [FIX] web: crash_manager uses BrowserDetection
Before this commit, the crash manager used a copy of the browser detection isBrowserChrome method
because it was not possible to to register the proper dependency in stable version

This commit makes the crash manager use the module BrowserDetection for that purpose, with the proper
registered dependency before hand

closes odoo/odoo#56364

X-original-commit: 59e0dbab98466a23792af4a10003142614bda676
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-08-24 07:30:42 +00:00
Lucas Perais (lpe) 86c4f79212 [FIX] web, website: move keyboard navigation and browser detection in common
Before this commit, the files keyboard_navigation_mixin.js and browser_detection.js
were defined both in assets_backend and in assets_frontend

Obviously then, they should be defined in assets_common, as this commit intends.

X-original-commit: 42e7c01024dcc8f5d0d0ee13c120bd31374837cd
2020-08-24 07:30:42 +00:00
Dharmraj Jhala f49dbf595c [IMP] account, purchase, sale: allow sending email to self
Currently, if users try to send invoices / quotations / purchase orders to
themselves in order to look at final result, they can't do so because our
default chatter protection prevents sending mails to authors themselves.

This commit uses 'mail_notify_author' context key and allows users to send
mails from the header buttons available on SO / PO / invoices to themselves
if they are in recipients.

This commit targets only those buttons as this is the main case where we
want to allow people to send emails to themselves. In order to avoid
side effects no other use case is supported.

Task ID-2294130

closes odoo/odoo#56370

X-original-commit: 08c0dc929da38595e29a9d1db93065547cd98ad1
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-24 08:14:44 +00:00
Thibault Delavallée 8ff7973e79 [FIX] base, mail: allow to use templates with reports
Since de4213b771 it is not possible to anyone except admin to use templates
with a report defined on it. This could be annoying.

X-original-commit: 47f5e14eca4e13010cc11f688ea92f65a2695d38
2020-08-24 08:14:43 +00:00
David Beguin 78300be000 [FIX] website_event_track_online: set overflow-x to auto in event agenda
In order to see the overflow-x scrollbar only when needed, overflow-x have been
set to auto instead of scroll for agenda table.

Task ID: 2314778

closes odoo/odoo#56368

X-original-commit: ec189b25230177946bca8fb2b020fb168b425c5f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-24 08:06:01 +00:00
Martin Trigaux 6c002f8997 [FIX] l10n_ch,l10n_mn: correct author name
Use the correct spelling of "Odoo S.A."
No need to specify it for modules only developped by Odoo S.A.

Closes odoo/odoo#54372

closes odoo/odoo#56349

X-original-commit: a443c294ac4413444d05f5c0297f8234d9ead850
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-08-22 12:55:12 +00:00
Benjamin Vray e72b153fe0 [FIX] web_editor: fix snippet top options
Before this commit some top option buttons were badly positioned
(see Carousel options).

task-2312878

closes odoo/odoo#56353

X-original-commit: 196c2e72ba5b212eccd2bba7ad33c870e0a40c70
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-22 20:10:08 +00:00
qsm-odoo bbe117e107 [IMP] web_editor, website: introduce foldable zones in the editor UI
Now any set of widgets and rows can be placed in a we-collapse element
so that those elements can be foldable. The first element inside (or
the mentioned "string" on the we-collapse element itself) is used as the
always shown element (with a toggler on its left to toggle the
visibility of the other items).

we-collapse inside other we-collapse is supported as well.

Limitations / Other infos:

- The use of '⌙' and &emsp; characters is not automatic (yet?).
  Sometimes it actually make sense to use them without a we-collapse or
  to not use them in a we-collapse.

- The use of we-collapse is limited to widgets inside the same option.
  So unfortunately, there is no current way to add all bg image options
  in a folable section as those contain many different options. Maybe
  in the future.

Part of https://github.com/odoo/odoo/pull/56350

closes odoo/odoo#56352

X-original-commit: d9c450ac97de40c71aebd487cff725bfda6a577b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-22 17:51:32 +00:00
qsm-odoo 9ab62a9bc6 [FIX] web_editor: allow we-title alone in an option
It was already working but not perfectly aligned.

Part of https://github.com/odoo/odoo/pull/56350

X-original-commit: 95239e523b194777b58e8dd9a409a93404b44c6d
2020-08-22 17:51:32 +00:00
Xavier-Do 5c33f1df58 [FIX] crm: get correct country for phone validation
Phone validation of crm_leads was using crm.lead country instead of partner
country code. This was leading to phone number of crm_case_16 coming from
an us partner validated as a uk phone number. (same problem applies for crm_case_14)

The problem was discovered in pre/post upgrade crawler test.

closes odoo/odoo#56348

X-original-commit: a58f9fc154c038d72031b281e2bec2c0fc2915ba
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-08-22 11:40:19 +00:00
Xavier-Do 4da3f9cf1c [FIX] base: avoid warning when computing desc of to_buy modules
post upgrade tests will trigger 'module not found' warning when testing modules views
because of 'fake' modules without real file path.

closes odoo/odoo#56335

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-08-21 16:07:00 +00:00
Xavier-Do 1495065041 [FIX] stock, hr_holidays: fix server actions groups_id
f0d37c384b added a check on write access
for server action. Since the fixed server action are readonly with strict
access right, corresponding groups are added to avoid a warning.
2020-08-21 14:18:59 +00:00
Christophe Monniez ffb0f2b7a1 [IMP] core: bump master release version to 14.1 alpha
closes odoo/odoo#56337

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-08-22 09:54:52 +00:00
Samuel Degueldre 809fefbe81 [FIX] web_editor: fix small gaps between shapes and their environments
Because of the way browsers render SVGs as background images, background
SVGs will sometimes not perfectly hug the top or bottom of their
containers because of rounding in the calculation of the width from the
height, or height from the width.

This commit fixes a number of the shapes displaying this behaviour, by
making their viewbox a perfect square, this means that whenever the
width or height of the SVG is determined by the brower, it will use the
same number for the height or width respectively because the aspect
ratio is exactly one, rather than using the closest integer
approximation of the aspect ratio, which causes those artifacts.

task-2319484

closes odoo/odoo#56200

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-22 07:59:59 +00:00
Juan Jose Scarafia 6d52f3646c [FIX] account: update account and payment term
- Create 2 customers A & B
- On A, set a Payment Term for Sales and Purchases
- Create a customer invoice
- Add a line
- Set Partner A
  => the payment term is selected
- Set Partner B
  => the payment term is kept

Moreover, the term account is set only if the customer has a payment
term set, which is not logical.

Since the partner is not mandatory, we keep an intermediate behavior: we
set the info of the partner only if there is a partner defined.

opw-2304436

closes odoo/odoo#55632

X-original-commit: 68d470ee832ea7999ebcb58109d249d7d463c83d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-08-07 13:36:06 +00:00
1ca3a590f7 [FIX] web: crash manager correctly formats error message in Firefox
Have a piece of code that throws an Error

In browsers not powered by V8, the stack trace won't be formatted and the Error
type won't appear in the crash manager modal report.

This happens because Error.prototype.stack is non-standard, although most
browsers have an implementation of it. Chrome for example automatically formats
the Error.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
https://v8.dev/docs/stack-trace-api\#compatibility

After this commit, the Error is formatted in the crash manager report, the same
way as Chrome does it.

task-2191727

closes odoo/odoo#56318

X-original-commit: dbf670f2e0ec797aeaf998aa28b32afbdd2c3b4c
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Hardik Prajapati <hap@odoo.com>
2020-08-21 14:33:45 +00:00
David Beguin 6a5ee406d8 [IMP] website_event_*: clean sitemap
From now, you need to explicitely add sitemap=True if you want your controller
into the sitemap.  It's the default value, but if you forgot it, it will raise
a Warning on runbot. It will avoid wrong controller in sitemap and duplicate
(empty) content.  From now, if your model contains a field website_id, the
modelConverter for sitemap will automatically add the domain:
"[('website_id', 'in', (False, current_website_id))]"

It avoid redundant declaration and ugly url in redirect/rewrite view.

Task ID: 2318597

closes odoo/odoo#56114

X-original-commit: aabd31d1523fb6ca68336cc66a6e2f074173f396
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-08-19 10:00:10 +00:00
Goffin Simon 716e226656 [FIX] product: wrong precision display for standard_price
Steps to reproduce:

- Install MRP and Inventory
- In Settings > Decimal accuracy, change the number of digits of Product Price to 6
- Go to a product template PT

Bug:

The field standard_price was displayed with two digits instead of 6

opw:2241369

closes odoo/odoo#56235

X-original-commit: cddd79b3dce31108315a7a4c6157c49fc5e97639
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-08-20 14:25:10 +00:00
Jeremy Kersten cbf8d3b304 [IMP] website: perf - cache public page
closes odoo/odoo#56331

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-08-21 17:50:00 +00:00