Commit Graph
139269 Commits
Author SHA1 Message Date
Sébastien Theys 562fdd67f2 [FIX] mail: do not return members of channels in channel_info
This PR has 3 parts:

The members fix itself, which is necessary for performance reasons especially
at init messaging, as per described in the task.

Adding the partner name in the typing payload, because due to not knowing all
members anymore, it is necessary to properly display who is typing.

Restrict restoring scroll position only if the corresponding scroll height is
available, to make the scroll feature and particularly the corresponding tests
more robust.

task-2360020

closes odoo/odoo#60616

X-original-commit: 91ce61ba568d83190e7ed2c168fd56101474683b
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-23 12:27:57 +00:00
Antoine Vandevenne (anv) 1a509642b9 [FIX] doc: fix broken anchor
closes odoo/odoo#60612

X-original-commit: 50b8e83597ec07e091e1a4b62184e148ddcfb6c5
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2020-10-23 11:41:40 +00:00
Aurélien Warnon 0bac777154 [FIX] website_slides: hide "responsible" label if no responsible assigned
This commit makes a small adjustment to the course view to hide the responsible
label in the course description if none is set.

As this field is not required on the slide.channel model, it's not necessary to
show a useless label when it's not set.

Task 2368573

closes odoo/odoo#60611

X-original-commit: 7114e13736d41f2350b14367704bf14c23cf9c0d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2020-10-23 11:41:15 +00:00
Nicolas Galler ac9c9529b5 [FIX] product_email_template: use superuser account to send email in su mode
Behavior prior to the fix:

The email template associated with a product on an invoice placed via
the web portal is sent with no email_from, resulting in a failure.  The
reason is that before 13.0 .sudo() before sending a mail would send it
as superuser user (which was the intention in this case), but since 13.0
for the same intention we need .with_user(SUPERUSER_ID).

Behavior after the fix:

When sending the product email, if we are in SU mode, we'll switch to
the super user account, emulating the pre-13.0 behavior.

Similar fix to b12bcfbb1b

opw-2346415

closes odoo/odoo#60584

X-original-commit: 43718d0694d8d0c7b53e3511cb8523a645ebddb1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Nicolas Galler <nicocrm@users.noreply.github.com>
2020-10-23 07:17:53 +00:00
IEL 1aae1f0205 [FIX] web_editor: disable embedded video for html fields in backend
TLDR: the videos doesn't work anyway, but nobody noticed it for years; at the
same time there is no easy way to fix it

STEPS:

* create a record with html field, e.g. project.task
* add an embedded video (File/Image icon)
* save

BEFORE: video doesn't work

AFTER: there is no option to add embedded video anymore

WHY:

* iframe tags are removed before storing html in database, so after saving a
record, embedded video doesn't work anymore
* possible fixes to activate embedded videos in backend:

  * new field attribute sanitize_iframe=False

  * adding iframe on client side -- the problem is that the backend doesn't
  have mechanism to use animation in html fields like it's done in
  website: https://github.com/odoo/odoo/blob/ced500e9bcbb5c84033463689d135ad4c7dc4f39/addons/website/static/src/js/content/snippets.animation.js#L623-L632

---

opw-2353103

closes odoo/odoo#60477

X-original-commit: 2dcbac08effcedafbcf50610355752030902b16d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-10-22 08:18:59 +00:00
Jorge Pinna Puissant 7b06e6c8b6 [FIX] account_edi: allow attachment and error in same document
Allow having in an attachment as well as an error in the same document.
This will allow to see the document that generates the error, and easy
the process of debugging.

closes odoo/odoo#60599

X-original-commit: 7313e9823fffcac747af633b9b1694aa661dfa1f
Related: odoo/enterprise#14357
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-10-23 09:09:21 +00:00
Jérémy Hennecart 588086235e [FIX] base,calendar: fix calendar reminder
The purpose of this commit is to have reliable calendar event reminder.

Before, the reminders was not send directly and was instead put in mailing
queue, which was leading to some delay. This is due do mail_notify_force_send
context key being force to False when being in cron mode. However here we
do not want to have calendar cron scheduling emails, then mailing cron
sending them as it implies two delays.

In order to try to send reminder mails as soon as possible compared to their
schedule let us send mails directly during the calendar cron.

Task ID-2331999

closes odoo/odoo#60598

X-original-commit: 232a3c4c65dd60215a5def010da8559a9ffb2378
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-23 09:08:54 +00:00
Thibault Delavallée 6c280e1fd8 [FIX] base: remove duplicate call to cron.run
Oversight of conflict solving in forward port 9d1909f228aef664669152c16091a188377ee8bd

X-original-commit: 2656b855a817e5fd9270392bbf62b3117376fa34
2020-10-23 09:08:54 +00:00
Robin Heinz bc67e6bf55 [IMP] point_of_sale: Add serial number on pos invoice
When we make an invoice with the point of sale, we now include the serial numbers on the invoice template if the option is ticked.

closes odoo/odoo#59516

Task-id: 2349339
Related: odoo/upgrade#1830
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-10-23 09:28:34 +00:00
Victor Feyens 1b67affe7d [FIX] *: avoid direct references to countries
Ensure the code works fine even if countries are deleted.

Also consider "re"-created countries after deletion, by only considering
the country code, not the data reference.

This should reduce support requests related to deleted countries, and
ease the resolution of such problems by the users themselves.

TASK ID - 2368842

closes odoo/odoo#60558

X-original-commit: 037012bc4e2935eb00a7f353529bb7ec55066733
Related: odoo/enterprise#14347
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-10-22 16:17:26 +00:00
Florian Pose 0dd3b70690 [CLA] signature for IgH
closes odoo/odoo#60420

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-23 08:13:06 +00:00
Jorge Pinna Puissant 71e25dac16 [FIX] account_edi: add list of edi documents
This commit will add a new tab in the account move view with the list of
the edi documents for this move. The tab will only be visible in debug
mod. This is done to help the debugging and the error finding when there
is a problem with an edi document.

closes odoo/odoo#60246

X-original-commit: 2e01da4713f9ee68813b248a8b88f367785fc937
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-10-19 09:59:12 +00:00
Christophe Monniez c7130babb3 [IMP] packaging, l10n_dz, l10n_ro, survey: integrate Debian fix
With this commit, the executions bits are fixed on some xml, csv and ttf
files. The fix was initialy made at the Debian packaging level.

As xlwt is now in Debian buster, the overide is removed.

The linked fonts in Debian package are now removed in one line to
simplify the code.

closes odoo/odoo#60583

X-original-commit: f31bdc0ae16698306a776332f3aa4aaa1cade764
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-10-23 07:17:29 +00:00
Andrea Grazioso (agr-odoo) 0e6272819a [FIX] point_of_sale: use payment date for cash statement lines
Open POS
Make some cash transaction
Close POS
Repeat for some days and close the session

Cash statement lines will be saved with the closing date, even
if the payment entries are saved with their payment date

opw-2347645

closes odoo/odoo#60385

Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-10-21 13:24:01 +00:00
Denis Ledoux 839c1857fe [FIX] l10n_latam_invoice_document: skip document_type computation on install
Skip the computation of the field `l10n_latam_document_type_id` at the module installation.

The case has been detected during an upgrade from Odoo 12.0 to Odoo 13.0,
but the case could really well happen outside the context of an upgrade,
for instance when you create a new subsidiary in Chile or Argentina
while you already have a lot of accounting entries in your other subsidiaries
(e.g. Odoo S.A. opens a new office in Chile and has to install `l10n_cl`)

Without this, at the module installation,
it would call `_compute_l10n_latam_document_type` on all existing records
which can take quite a while if you already have a lot of moves. It can even fail with a MemoryError.

In addition, it sets `_compute_l10n_latam_document_type = False` on all records
because this field depends on the many2many `l10n_latam_available_document_type_ids`,
which relies on having records for the model `l10n_latam.document.type`
which only happens once the according localization module is loaded.
(e.g. `l10n_cl/data/l10n_latam.document.type.csv`)

The localization module is loaded afterwards, because the localization module depends on this module,
(e.g. `l10n_cl` depends on `l10n_latam_invoice_document`, and therefore `l10n_cl` is loaded after)
and therefore there are no records for the model `l10n_latam.document.type` at the time this fields
gets computed on installation. Hence, all records' `_compute_l10n_latam_document_type` are set to `False`.

In addition, multiple localization module depends on this module (e.g. `l10n_cl`, `l10n_ar`)
So, imagine `l10n_cl` gets installed first, and then `l10n_ar` is installed next,
if `l10n_latam_document_type_id` needed to be computed on install,
the install of `l10n_cl` would call the compute method,
because `l10n_latam_invoice_document` would be installed at the same time,
but then `l10n_ar` would miss it, because `l10n_latam_invoice_document` would already be installed.

Besides, this field is computed only for drafts invoices, as stated in the compute method:
`for rec in self.filtered(lambda x: x.state == 'draft'):`
So, if we want this field to be computed on install, it must be done only on draft invoices, and only once
the localization modules are loaded.

It should be done in a dedicated post init hook,
filtering correctly the invoices for which it must be computed.

Though I don't think this is needed.
In practical, it's very rare to already have invoices (draft, in addition)
for a Chilian or Argentian company (`res.company`) before installing `l10n_cl` or `l10n_ar`.

```
Traceback (most recent call last):
  File "/src/odoo/13.0/odoo/service/server.py", line 1190, in preload_registries
    registry = Registry.new(dbname, update_module=update_module)
  File "/src/odoo/13.0/odoo/modules/registry.py", line 86, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/src/odoo/13.0/odoo/modules/loading.py", line 423, in load_modules
    loaded_modules, update_module, models_to_check)
  File "/src/odoo/13.0/odoo/modules/loading.py", line 315, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "/src/odoo/13.0/odoo/modules/loading.py", line 202, in load_module_graph
    registry.init_models(cr, model_names, {'module': package.name}, new_install)
  File "/src/odoo/13.0/odoo/modules/registry.py", line 364, in init_models
    env['base'].flush()
  File "/src/odoo/13.0/odoo/models.py", line 5458, in flush
    self.recompute()
  File "/src/odoo/13.0/odoo/models.py", line 5875, in recompute
    process(field)
  File "/src/odoo/13.0/odoo/models.py", line 5859, in process
    recs.mapped(field.name)
  File "/src/odoo/13.0/odoo/models.py", line 5266, in mapped
    recs = recs._mapped_func(operator.itemgetter(name))
  File "/src/odoo/13.0/odoo/models.py", line 5225, in _mapped_func
    vals = [func(rec) for rec in self]
  File "/src/odoo/13.0/odoo/models.py", line 5225, in <listcomp>
    vals = [func(rec) for rec in self]
  File "/src/odoo/13.0/odoo/models.py", line 5690, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/src/odoo/13.0/odoo/fields.py", line 2329, in __get__
    return super().__get__(records, owner)
  File "/src/odoo/13.0/odoo/fields.py", line 995, in __get__
    self.compute_value(recs)
  File "/src/odoo/13.0/odoo/fields.py", line 1109, in compute_value
    records._compute_field_value(self)
  File "/src/odoo/13.0/odoo/models.py", line 3968, in _compute_field_value
    field.compute(self)
  File "/src/odoo/13.0/odoo/fields.py", line 579, in _compute_related
    record[self.name] = self._process_related(value[self.related_field.name])
  File "/src/odoo/13.0/odoo/models.py", line 5699, in __setitem__
    return self._fields[key].__set__(self, value)
  File "/src/odoo/13.0/odoo/fields.py", line 1070, in __set__
    self.write(protected_records, value)
  File "/src/odoo/13.0/odoo/fields.py", line 2564, in write
    cache.update(records, self, [cache_value] * len(records))
  File "/src/odoo/13.0/odoo/api.py", line 768, in update
    field_cache.setdefault(record_id, {})[key] = value
MemoryError
```

Upgrade request 49495

closes odoo/odoo#60573

X-original-commit: f2a08faa1e65cb381315cbd5d1a359901e8b7deb
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-10-22 20:49:20 +00:00
Thanh Dodeur e77e205252 [FIX] bus, mail: fix im_status for archived partners
Before this commit, archived and deleted partners had not their
im_status being updated automatically. There were some issues
with this, notably:

- odoobot 'bot' status was not displayed in chatter
- im_status of partners becoming archived were not updated.

This commit fixes both issues.

task-2329591

closes odoo/odoo#60567

X-original-commit: 63b081c49da089c839479b807de8c0cea45221da
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-22 17:23:13 +00:00
Jeremy Hennecart 00b77514c3 [FIX] base: update lastcall with manual cron execution as with automated execution
Cron holds a lastcall field and context key allowing to compute an accessible
range of processable records based on last execution. This lastcall value is
updated when cron runs automatically. Manual call currently does not update.
It makes sense to do the same update in manual call than with automated calls.

Moreover lastcall context key is also updated. It is used notably in calendar.
Otherwise only mails linked to "today" are taken into account, leading to
reminder issues.

Task ID-2331999

closes odoo/odoo#60559

X-original-commit: 9d1909f228aef664669152c16091a188377ee8bd
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-22 15:52:43 +00:00
Alexandre Kühn 46d4bdc041 [FIX] im_livechat: visitor sees typing notification of operator
task-2359991

closes odoo/odoo#60553

X-original-commit: 4ff9ff09193390d9b39b15046855f94a98ad8409
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-22 15:08:46 +00:00
Sébastien Geelen (sge) 2d2f8e6562 [FIX] web_editor: adapt iframe Qunit test to new editor
- iframe editor Qunit test

closes odoo/odoo#60551

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-10-22 15:16:15 +00:00
David Monjoie 7e03e8ea14 [IMP] web_editor: update Jabberwock library to commit a7ba7c34
Changelog:
[FIX] Template: ensure an overflow on the template container
[FIX] OdooWebsiteEditor: On mobile, shows the boudary box inside
[FIX] Odoo: double clicking on a link allows you to edit it in full
2020-10-22 15:16:14 +00:00
Antoine Prieels 798621ae5f [FIX] pos_restaurant: Order change receipts alignment
The alignment of quantity and product name was off when the product
name was split into multiple lines.

opw-2360424

closes odoo/odoo#60547

X-original-commit: 58404f299f7fa9128758b4b7830a6393c64ad085
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-10-22 14:21:22 +00:00
Benjamin Vray 8ca7aa5d3c [FIX] website, portal: fix language selector inline
This commit align vertically the copyright text and the inline
language switcher items. This commit also add a padding on
list-inline-item in the language selector. Because before this commit,
there was no space between lines if the list was to be displayed on
multiple lines.

Part of #59581

task-2312878

closes odoo/odoo#60527

X-original-commit: a8c4ca8a942d94557db5b95f42344fee71faf6e2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-22 13:06:15 +00:00
Benjamin Vrayandqsm-odoo 97f33eca52 [FIX] website: hide the add language separator if it is the last item
Before this commit, the add language separator was visible at the end
of the inline language switcher even if the add language link was not
displayed.

Part of #59581

task-2312878

X-original-commit: cf34f10a54390d2ecd86d47de90c221d79ed5873

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-10-22 13:05:52 +00:00
Bruno Zanotti (ADHOC) 597f379284 [I18N] l10n_ar: add missing translations
closes odoo/odoo#60526

X-original-commit: a4871a7dbbc96399696dc9cd8424a4bcb7814262
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-22 11:52:09 +00:00
Michael Mattiello (mcm) 3f826e4eaf [FIX] web: keep new widget el in ComponentAdapter
Before this commit, when sub widget replaced its el, the ComponentAdapter
parent kept the previous el.
This caused some issues as in the ActivityRecordAdapter which lost its
event listeners when re-rendered.

This commit forces the ComponentAdapter to keep the new sub widget el
after being patched.

task id: 2360021

closes odoo/odoo#60521

X-original-commit: 393b5fd4cfba254ad054a526996e82922f9057e2
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Michaël Mattiello <mcm-odoo@users.noreply.github.com>
2020-10-22 11:06:16 +00:00
qsm-odoo b2afa61ec7 [FIX] web_editor: restore overlay top options on top of the page
When the overlay covers a snippet, if that snippet is at the top of
the page, the options at the top of the overlay are hidden. A system
was made to make them change position in that case but this was broken
by [1], leaving the toggling of a class for that case but without its
related scss.

This commit restores that scss and also improves the detection of that
problematic case.

[1]: https://github.com/odoo/odoo/commit/4f27e52cabb77b8b1a9637a11185ddf882adc9af

closes odoo/odoo#60467

X-original-commit: 97f11571f9e3deacc9b9e1dc0d2cc8fc6b93f15c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-22 08:12:59 +00:00
Aurélien Warnon f4bcfe6a32 [FIX] website_slides: correctly close subscription modal when saving
This commit fixes a small issue with the modal displayed when the user wants to
manage his subscription to a course.

When pressing the "Save" button, if no modification was made, the modal would
not close and nothing would happen (which seems strange on a user POV).
Now the modal correctly destroys itself and closes.

Task 2363028

closes odoo/odoo#60507

X-original-commit: 32d0b1086b5db6c58c1e2891d8d77fafb9482de9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-22 09:09:17 +00:00
wan 00b61c752e [FIX] l10n_cn: incorrect account type
The fix c710c3a35a3f466ebadc5748c70784bc063a7eb2 has been forgotten
while applying https://github.com/odoo/odoo/pull/43768

closes odoo/odoo#60494

X-original-commit: c5d355444a3dde2635025e5452360e853afca099
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-10-22 07:27:52 +00:00
Odoo's Mergebot 44e79a1438 [MERGE] web: enable action menu on mobile
This merge sets up the requirements to enable the action menu on mobile device.

In a nutshell :
* allow to simulate touch-screen device in the QUnit tests
* fix the DropdownMenu OWL component to not open out of the viewport
* add the required hooks to be used on enterprise
* improve the UX of the export modal on mobile

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

Task ID: 1879566

closes odoo/odoo#54745

Related: odoo/enterprise#11960
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-10-22 10:28:01 +02:00
Swapnesh Shah 0995755126 [FIX] website: default focus of searchpanel
Before this commit, Going to Website --> Configurations --> Apps was displaying Modules related to Website only but the default focus on searchpanel was on "All". (https://tinyurl.com/y5tw5uob)

Now, The default focus of searchpanel is on Website Category. (https://tinyurl.com/y6984hl7)

closes odoo/odoo#60485

X-original-commit: 0e2c55eec07600585121acf560ec8ffebde442e3
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-21 22:06:35 +00:00
Swapnesh Shah bfecc0f3c0 [FIX] website_blog: readonly visits
Before this commit, Field "No of Views (visits)" was editable on multi_edit mode.

Field "No of Views (visits)" should be readonly for Obvious reason.

closes odoo/odoo#60484

X-original-commit: 6c3bf61df4fb2a705db27b6b51fea8ddfaa24e87
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-21 20:01:20 +00:00
Laurent Smet bc76a2b9af [FIX] account: Fix reversal of journal entry with tax_ids on tax line
A tax line could have something in the `tax_ids` field.
Then, these condition needs to be inversed in order to not handle them as base lines.

closes odoo/odoo#60473

X-original-commit: eada9f91f3361f8335c23b3a27161803cfda6608
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-10-21 15:46:17 +00:00
Nicolas Martinelli d0053c7b45 [FIX] stock: routes in multi-company
- Create companies A & B
- Create a Dropship route for B
- Create a product P with route 'Dropship'
- Set the website under company A
- As a portal user, buy the product P on the website
- Do the payment

The SO is confirmed but the Dropship route for B is used despite the
fact that the website is under company A.

This happens because `_search_rule` is called as superuser: therefore,
routes from all companies are retrieved.

To prevent this, we add the company in the domain.

opw-2349094

closes odoo/odoo#60482

X-original-commit: 31a54b5e859ead7972cdccc956518e14038476ba
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-21 18:07:13 +00:00
Romain Estievenart b04c670ba0 [IMP] web: improve Export Data UI on mobile
This commit improves the UI of the Export Data action's modal on mobile
screens:
* open it full-screen
* 2 main panels are one after the other (side-by-side on desktop)

Task ID: 1879566
2020-10-21 14:45:40 +00:00
Romain Estievenart f9193fa417 [IMP] web: enable action menu on mobile
This commit creates the required hooks to implement this feature.

Task ID: 1879566
2020-10-21 14:45:40 +00:00
Romain Estievenart e1f605bef8 [FIX] web: avoid to display dropdown outside of the screen on mobile
When opening a DropdownMenu OWL component (like the favorite menu, filter
menu) positioned to the right of the screen (left on RTL languages) on a
small screen, the content of the dropdown could easily overflow out of
the viewport, making hard to use or even unreachable.

This commit fixes it by using the middle of the screen as a threshold to
align the dropdown menu to the right (or left in RTL) of the triggering
button.

Note: this fix specifically targets mobile-like/small screens as bigger
one like on desktop would require much precise calculations (and are
not an issue at the time of this commit).

Task ID: 1879566
2020-10-21 14:45:40 +00:00
Romain Estievenart a35dab5653 [IMP] web: allow to simulate a touch-screen when creating a test's view
When running the webclient in a regular environment, a 'o_touch_device'
class is set when ran on a touch-screen enabled device.

This commit adds the ability to simulate touch-screen when creating a
view inside a test (independently of the device), allowing tests to
match the reality.

Task ID: 1879566
2020-10-21 14:45:40 +00:00
Jeremy Kersten 02f989671a [FIX] website_blog: don't index blogs index with tags
Courtesy of sts

closes odoo/odoo#60458

X-original-commit: bc2dc85c76f00b7328c0a931afa8b6c60f865e7f
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-21 13:59:07 +00:00
Nasreddin (bon) c73b42244c [FIX] web_editor: Autocomplete options can break layout
Issue

	- Install "Website" app
	- Go to "Contact us" page on website
	- Edit Page, then click on submit button to
	edit form style
	- Alter 'Recipient Email' by selecting a value
	from 'autocomplete' values

	Other input text options are also altered.

Cause

	Due to chrome autocompletition, others text input fields are
	also altered (like it will do with a form address).
	In this case, the error was obvious since it alter also the
	'Labels Width' who break the layout.

Solution

	Disable autocompletition on `<input type='text'/>` options
	elements.

opw-2361169

closes odoo/odoo#60481

X-original-commit: 48d4c8185482545b049e2fecf315dd66ab9472f8
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-10-21 18:06:50 +00:00
Achraf (abz) e37b0707e6 [FIX] base: Invalid parent_id field in crm.lead for Mexico
Issue

    - Change country to Mexico
    - Install 'CRM'
    - Install 'l10n_mx_edi'
    - Try to open any lead in 'CRM'

    The same error is present in l10n_pe

Cause

    'l10n_mx_edi' and 'l10n_pe' use 'res.partner' in 'ir.ui.view'

Solution

    Adding a condition to prevent '_fields_view_get_address' in 'format.address.mixin'
    from rewritting the model and let ir.ui.view determine it

opw-2361875

closes odoo/odoo#60463

X-original-commit: 3229239c2a738cc99820dba0fce1bd1c2a3536ea
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2020-10-21 14:40:12 +00:00
Victor Feyens 7e26237ffe [FIX] sale_coupon: underterministic recordset order
Recenlty, this method was changed to use set instead of recordsets
to improve the performance of the code.

But set have a non deterministic order, which means the order of the
returned programs returned is not the same, modifying the resulting behavior
as some programs cannot be applied together.

To fix this problem, this commit replaces the set by lists
to ensure the returned recordset keeps the same ordering.

Also rename a potentially conflicting variable caused by the same commit.

Finetuning of commit cc1bb9224b3d50897e8f16404ed10bcc04225c60.

closes odoo/odoo#60472

X-original-commit: 6d4da47fff9a809f65912d4132a5fd3ccaa37b90
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-10-21 15:43:32 +00:00
Nasreddin (bon) 9a42f49b70 [FIX] website_form: Required hidden field is not saved
Issue

	- Install "Website" app
	- Go to "Contact us" page on website
	- Edit Page, then click on submit button to
	  edit form style
	- Alter 'Recipient Email' then save
	- Edit Page and click on submit button

	'Recipient Email' have default value.

Cause

	If a field is required, the default value is set without
	checking if a value is already set.

Solution

	Set current value if available, else default value.

opw-2361169

closes odoo/odoo#60457

X-original-commit: e29d2818abf0e7902feb26c9e0b4809c9a3351c6
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-10-21 13:50:28 +00:00
Antoine Prieels 8e01d8e969 [FIX] point_of_sale: Receipts cut in browser
The bottom of long receipts was missing when printing through the
browser printing dialog.

opw-2362522

closes odoo/odoo#60456

X-original-commit: f48fa3e33e0174f6f2eb59210532859997046856
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-10-21 13:48:11 +00:00
Christophe Monniez defd6ac925 [FIX] packaging: stop moving addons for deb package
The package.py script is moving the addons in odoo/addons which is not
more necessary for the Debian package as it's made at the Debian
packaging level. So package.py will not do that anymore.

closes odoo/odoo#60442

X-original-commit: 27b755a3dfe1e2a580fd436038a60df19e9d83ab
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-10-21 11:59:55 +00:00
Benjamin Vray dc9505b019 [FIX] gamification: fix badge creation
Before this commit, we executed the request even when creating a new
badge. And it thrown a traceback.

After this commit, we return default values before executing the
request if this is a new badge.

task-2312878

closes odoo/odoo#60441

X-original-commit: 85995b7a4f0544779f3de537f0e6024820abbd5d
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-21 11:59:26 +00:00
Thanh Dodeur 0b8146c94f [FIX] mail: sets the z-index of dialog to the z-index of modals
This commit gives to o_Dialog the same z-index as modals, before
this commit, the dialog could be hidden or partially obstructed
by other elements.

part of task-2171884

closes odoo/odoo#60440

X-original-commit: b4de3c4e34500c9d4e3e2eef68c880643953f2ff
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-21 11:58:59 +00:00
Benjamin Vray 49aad4ede1 [FIX] website: fix carousel blockquote width on mobile
Before this commit, the width of carousel blockquotes was too small to
display correctly on mobile device.

Part of #55857

task-2318526

closes odoo/odoo#60439

X-original-commit: 12a68cc0f057f6febc70fdc6785a1bcec9f282f3
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-21 11:58:34 +00:00
Benjamin Vray 8107fe0c68 [FIX] web_editor: fix option background position
Keep the original position of the background as a percentage. In this
way, we avoid converting in pixel a direction that we have not changed.

Part of #55857

Related to task-2318526

X-original-commit: b8ac4f6b0c0aaa17ccae43ad8756c5b807e29823
2020-10-21 11:58:33 +00:00
Benjamin Vray 677f9c235f [FIX] website: fix small layout issues in carousel on mobile
-Remove arrows on mobile because it's too big and hide the content.
 User will use the touch screen to make the carousel move.
-Bordered style: Reduce the borders on mobile.

Part of #55857

task-2318526

X-original-commit: 86cd5e898b482192e50a20d0b6ef2a9b02b8301f
2020-10-21 11:58:33 +00:00
Raphael Collet 8de95a3fb4 [FIX] core: validation of field parameters
The feature was actually not working as expected.  It has been fixed,
and a test now ensures it does work as expected.  This commit also fixes
some invalid parameters, hopefully nothing critical.

closes odoo/odoo#60429

X-original-commit: 231bdca3f26d96f578503694e5aec062de2317ed
Related: odoo/enterprise#14285
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-10-21 10:18:36 +00:00