Commit Graph
141100 Commits
Author SHA1 Message Date
wan de0c5f4b8c [FIX] l10n_ch: _is_qr_iban without bank
Part of task 2124952

Return False if the recordset is empty.
```python
self.acc_type == 'iban'
```
This already ensures there is at most one record.
We now have the same behavior as for `_is_isr_issuer` (False if empty
recordset)

Was needed after cb8b6db391 because it is
now calling _is_qr_iban on a possible empty recordset.

Revert 1b2aef65f4
2021-02-17 08:39:29 +00:00
wan 00ed98db4d [FIX] l10n_ar: add afip responsability for demo partner
Part of task 2124952

Populate fields that are required and added in dependencies of l10n_ar.

Remove an unused variable too as an act of kindness.
2021-02-17 08:39:29 +00:00
wan 7841777afa [FIX] purchase_stock: test independant from demo data
Part od task 2124952
2021-02-17 08:39:29 +00:00
wan 82c75aeff3 [FIX] point_of_sale,pos_hr,pos_coupon: adapt tests for localization builds
Part of task 2124952

By using AccountTestInvoicingHttpCommon, we have a setup independant
from the demo datas. This also prevents running tests with incompatible
localization: the tests for l10n with another currency than USD failed
because of the demo datas preventing the change of currency.
2021-02-17 08:39:28 +00:00
wan 7da284ea5b [FIX] account: assertTaxGridAmounts independent from demo data
Part of task 2124952

If another company uses the same tags, they showed up in the assert.
2021-02-17 08:39:28 +00:00
wan 3b086e75da [IMP] account: make test class usable for l10n without tax
Part of task 2124952

This is required to run tests defined in l10n_ar for instance
2021-02-17 08:39:28 +00:00
wan d31c5c70e0 [IMP] account: make demo data for all localization
Task 2124952

Extract all the demo data from `l10n_generic_coa` to a new way of
generating the demo data for accounting modules.
Because the data needs to be created multiple times, and right after the
chart template instanciation, it cannot be done the usual way. Instead,
we use python generators to declare the data. It allows us to reference
data that was not created yet at the start of the creation of the demo.
An xml_id is given, prefixed with the id of the company it is created
for (just like the instanciation of the chart template)

To find the correct accounts, a helper method has been added to
`account.account`. It will look for an account with the correct xml_id
(which is the one of the l10n_generic_coa, that we have to put on the
other l10n modules too, in the future). If it didn't find the xml_id, it
will look for an account with the correct type. If it still didn't find
one, just take any account.
2021-02-17 08:39:28 +00:00
Aaron Bohy 7f2a1c487e [FIX] web: list: correctly evaluate groupby modifier with m2o
Let's assume a <groupby> node in a list view containing a button
with an invisible modifier referencing a many2one field, e.g.

```
 <tree>
   <groupby>
     <field name="m2o" invisible="1"/>
     <button string="do it" attrs="{'invisible': [('m2o', '=',
False)]}"/>
   </groupby>
 </tree>
```

Before this commit, the m2o field was correctly read, but it's
value wasn't processed by the model, so the modifier wasn't
correctly evaluated.

Issue reported on PR https://github.com/odoo/odoo/pull/65316/

closes odoo/odoo#66330

X-original-commit: fa7a185663f21c1c4060765c8c137b296df3a350
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-02-17 09:57:44 +00:00
Goffin Simon 59e39db3b9 [FIX] hr: Impossible to create an employee
Steps to reproduce the bug:

- Let's consider a user U with a related partner P
- Log with an internal user IU without Admnistration/Settings and Employee Officer access rights
- Create an employee E with address_home_id = P and save

Bug:

An access right was raised because the mobile of P was written on P and
the error was raised at https://github.com/odoo/odoo/blob/13.0/odoo/addons/base/models/res_partner.py#L531

Due to this bug, only internal user with Admnistration/Settings access rights can create an employee
linked to a contact of an internal user.

opw:2445953

closes odoo/odoo#66014

X-original-commit: 7e50c8ae6aad3325163e8a30c4f2513d24b72b83
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-02-11 17:34:22 +00:00
Dhwani Patel 8c08d7be0b [IMP] website_sale, stock: add email in additional address
improved various things into this commit:

- added OPTIONAL email field on the new ship-to address for the eCommerce
- if the email field is empty on the shipping address,
  it will send the confirmation email only to their parent

task-2194014
Closes #47347

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-02-17 09:11:34 +00:00
Arnold Moyaux c8c30b0743 [FIX] mrp, mrp_subcontracting: traceback during unistall
The unlink fail in __init__.py uninstall hook is managed, however
when it fail, the error is catch but the cursor is not rollback and
do not accept additional transaction. That result in a traceback at
uninstall.

opw-2453939

closes odoo/odoo#66309

X-original-commit: 66d9dce9b6e6e65000ba0b62efcb153f2d3eec15
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-02-16 18:33:27 +00:00
Nicolas Lempereur 6cdcd9a3c0 [FIX] web_editor: stop loading button once ace saved
When we edit a view with ace in eg. studio, if it works the saved button
would never be enabled again because of missing callback.

Match the behavior of dom.addButtonLoadingEffect other usage (80592abd).

opw-2457046

closes odoo/odoo#66301

X-original-commit: 5324f7a6aa757ff6a728258ea1877ded4a6f86cd
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-02-16 17:39:04 +00:00
Raphael Collet be100b8b6c [FIX] core: flush domain before searching for records in many2many field
This guarantees the cache consistency of the many2many field values.

closes odoo/odoo#66299

X-original-commit: 421631d7f222f1fcc3381c79320e109562533f22
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-02-16 17:38:11 +00:00
Jeremy Kersten 2a679ac0a8 [IMP] website_sale: extra_field always visible if one
Before we need to add extra_field on website AND enable the view.
Now the view is enable for everybody without option, but we only show the extra
field zone if at least one field is set on website.

task-2381327

closes odoo/odoo#66037

Related: odoo/upgrade#2163
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-02-12 10:23:25 +00:00
Urvi Soni 44d34efb7a [FIX] rating: display smiley and text below the title
Currently, after the customer sends the survey feedback, their ratings and
message (the smileys and text area) is displayed on the right of the title.

By this commit, the smileys and the text area should be displayed below
the title.

TaskID : 2452502

closes odoo/odoo#66308

X-original-commit: 261bf437e806fbf105597b66464c3a697e17e4d1
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-02-16 18:23:38 +00:00
Nasreddin (bon)andLucasLefevre 81946543a7 [FIX] calendar: Add start week day to weekly recurrence rrule generator + unit test
Issue

	- Install 'Calendar' module
	- Create new event from Calendar view
	- Edit event
	- Set True to 'Recurrent' in options tab
	- Repeat every 2 weeks
	- Until : Number of repetitions 2
	- Save and go back to calendar view

	- Events are shifted (+ 1 week)

Cause

	The rrule.rrule (who create the generator with the recurrence ranges dates) use
	by default `calendar.firstweekday()` as first week day ('wkst').

Solution

	If recurrence frequency is 'weekly', get first week day based on user language,
	and add it as param ('wkst') to the rrule.rrule.

https://dateutil.readthedocs.io/en/stable/rrule.html#classes

opw-2448325

closes odoo/odoo#66311

X-original-commit: 5e85ee521edb70d4d2c7cdbf59c29794a8cd98b9
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
Co-authored-by: LucasLefevre (lul) <lul@odoo.com>
2021-02-16 19:11:04 +00:00
bit-odoo cf3cc4bfe0 [FIX] mail: odoo shortcuts doesn't work if chat window is focused
Before this commit:

When chat window is focused odoo shortcuts (with alt) did not work because of
there is stop propagation in _onKeydown method.

After this commit:

Remove stop propagation. Now odoo shortcuts (with alt) work
properly.

Task-2388829

closes odoo/odoo#66280

X-original-commit: 1de3ce47c6ab1a7afaccfda086a6284c0c41dcf3
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-16 15:05:03 +00:00
bit-odoo 0046d186d0 [FIX] mail: missing discard button if next activity flow
Before this commit:

If a next activity is "triggered", the discard button is not visible.

After this commit:

Even if a next activity is "triggered", the discard button will visible.

Task-2459645

closes odoo/odoo#66224

X-original-commit: 24804aaef12fd98bc63fdb0e7905500ac76f877a
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-15 19:18:46 +00:00
Simon Genin (ges) 551b4902f2 [FIX] tools: issue with module detection/special characters in JS transpiler
This commit fixes two unrelated small issues in the JS transpiler regexps:
- handle special chars in file url (so, one can now use a "-" in a file url)
- issue with the @odoo-module detection: it required 2 spaces after the @odoo-module word, because of the way the regexp was constructed. It also required spaces at the start of the line. All those have been fixed.

closes odoo/odoo#66255

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-02-16 16:24:18 +00:00
Nicolas Lempereur 376a77ed65 [FIX] web: show more text of short calendar event
In a4d170ad9 there were some improvment to not show event totally empty
on the day calendar view because of different style (font + padding).

The lower part of the text was still a little cut, this commit try to
improve this for week and day view mode by removing 5 additional pixels.

opw-2422700

note:

Also fix the fc-short for fullcalendar Odoo, we had this 2019 change:

fullcalendar/fullcalendar@e879c43

that made it not working without title (odoo use case), in 2020 it was
reverted when refactoring for 5.0:

fullcalendar/fullcalendar@7c7ce1e

closes odoo/odoo#66109

X-original-commit: b856d312be19b0fdf636600a76c4d9b427eedb7c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-02-16 12:24:41 +00:00
Adrien Horgnies 1705a40a9d [FIX] product: generate variant combinations faster
The function `_get_possible_combinations` generates possibles combinations
 for the product template attribute values (ptav) of each product template
 attribute line (ptal) of a given product template. It used to iterate over
 them using a cartesian product. A combination can be invalid if it
 contains two incompatibles ptav. The problem is that it used to filter out
 invalid combinations after generating them. It's a problem because there
 can be a lot of invalid combinations to filter out before finding a valid
 combination. Even before the first valid combination if the first ptav of
 the two first ptal are incompatible.

The solution brought by this commit is to reject the invalid combinations
 while building them rather than after. It does so by using a cartesian
 product implementation with early rejection. The algorithm tests each
 ptav when incorporating it in a partial combination and if it's
 incompatible, it goes to the next partial combination and thus skips all
 combinations starting with the invalid partial combination.

The client that reported the issue has a product template with about 25
 ptal with an average of 9 ptav. The ptav of the first ptal was
 incompatible with the first ptav of second ptal. It had to build and
 filter out 5.76*10^15 ptav before finding the first valid ptav. If we
 generate 10^6 ptav by second (it's much less) user would get first ptav
 after 182 years. Now it's instantaneous.

opw-2335936

closes odoo/odoo#65809

X-original-commit: 98616c4676aa6ef5507110c0e407a640082abbaf
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-16 13:18:34 +00:00
Odoo's Mergebot 5eada0c442 [IMP] website: display sample data for dynamic snippets
Before this commit when a dynamic snippet was fully configured but
returned no data, the rendered section remained empty in edit mode.

After this commit when a dynamic snippet is fully configured but has no
data to display, some sample data is generated in edit mode to give a
feel of how the page will look like when data will be available.

This commit of merge refactor also the way to get the data to render.
We split function to handle data and convert / escape it. The default
structure is now simplified and an helper to_generic exists to allow
generic template to be used with indexed list.

An other PR is coming to change the data getter, and have more generic
function to merge 'Recently Viewed' in the "Dynamic products' snippet.

task-2446024

closes odoo/odoo#65176

Pr: https://github.com/odoo/odoo/pull/65176
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-02-16 16:37:07 +01:00
Jeremy Kersten be49f9fb1f [IMP] website: remove meta_data from params of filter, and design card
Call _get_filter_meta_data when needed instead to compute it only once and
give it from function to function, it is really trivial to compute and the
api of functions are simple from this way.

Avoid to use h4/h5 taf for styling bug use bootstrap feature for it.
The semantic of <div class='h4'/> vs <h4/> is not the same for SEO

Don't make call_to_action_url required

+ small typo

task-2446024
https://github.com/odoo/odoo/pull/65176
2021-02-16 14:20:24 +00:00
Barad Mahendra f379e2e373 [IMP] product: prevent the hierarchical category name in search panel
Purpose of the commit is to prevent the hierarchical name of
category in search panel.

So in this commit, Override the the name_get to prevent the category
hierarchy on search panel as we already displaying parent categroy
in search panel.

closes odoo/odoo#65442

Taskid: 2417252
Closes: #65442
Related: odoo/enterprise#15550
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-02-16 13:35:26 +00:00
Benjamin Vray fed5854e32 [FIX] web_editor: fix drag and drop when drop zones are too close
Before this commit, the preview of the dragged snippet didn't work
when moving a dragged snippet from a drop zone to an other drop zone
when there was no space between those drop zones.

It is because, in this case, the over event of the second drop zone is
triggered before the out event of the first drop zone.

task-2312878

closes odoo/odoo#66267

X-original-commit: 66b468626e046a13a463cff3a2285801016f3ed7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-16 13:30:12 +00:00
yhu-odoo 0e83fb5493 [FIX]stock_account: don't show consumable in valuation report
In "Inventory Valuation", when click "Inventory at Date" then "confirm".
Record for consumable products will be shown in the report.

Previously fix in #62622 which disabled svl for consumable products,
then rolled back in #63386 due to mrp need to create svl for consumables
to analyse cost.

In this commit, we add a domian filter to not show consumables in
"Inventory Valuation"

Task 2449211
PR #65726

closes odoo/odoo#66260

X-original-commit: 415a65f6b6da4a8aca394e189d72b93244af745b
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Yuchen Huang <yhu-odoo@users.noreply.github.com>
2021-02-16 12:19:12 +00:00
Benjamin Vray 6c4ceed356 [FIX] website, website_mass_mailing: disable anchor option for popup
task-2172312

closes odoo/odoo#66259

X-original-commit: 73d82d411ca62c284b3364b9a76c1001fe9e44e9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-16 12:13:18 +00:00
Benoit Socias 1d2dd3f76f [IMP] website, website_sale: remove most escaping from Dynamic Products
Before this commit the filtering code for the Dynamic Products snippet
was rendering all its values.

After this commit the filtering code for the Dynamic Products snippet
mostly returns the values to be rendered.
Because the list_price still needs to be rendered with the correct
currency, the general rendering mechanism is being informed through the
field meta-data that the escaping was already done.

task-2446024
https://github.com/odoo/odoo/pull/65176
2021-02-16 10:18:15 +00:00
Benoit Socias df7c77fd7a [REF] website: make the rendering code common to real data and sample
Before this commit the rendering data structure had to be handled both
when rendering a data sample and when rendering actual records.

After this commit the rendering data structure is generated in the same
way in both situations.

task-2446024
https://github.com/odoo/odoo/pull/65176
2021-02-16 10:18:07 +00:00
Benoit Socias 0cede3fa14 [IMP] website: display sample data for dynamic snippets
Before this commit when a dynamic snippet was fully configured but
returned no data, the rendered section remained empty in edit mode.

After this commit when a dynamic snippet is fully configured but has no
data to display, some sample data is generated in edit mode to give a
feel of how the page will look like when data will be available.

task-2446024
https://github.com/odoo/odoo/pull/65176
2021-02-16 10:17:58 +00:00
oco-odoo a967eb3fa7 [FIX] account: tax_tag_invert computation on aml: add missing dependencies
closes odoo/odoo#66203

X-original-commit: e1b23c3ebc43a48fdd5dc70a5250c8f63b66d20d
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-02-15 17:05:13 +00:00
wan ce2115966c [FIX] account: don't return recordset on action_post
Fixes #65706

closes odoo/odoo#66258

X-original-commit: 398751954ef1735bfb2757328189cf57f8beeb1c
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-02-16 12:06:18 +00:00
Andrea Grazioso (agr-odoo) e2cc2c3ce2 [FIX] point_of_sale: fix variant price in pricelist
Create a product with variants attributes that NEVER create variants.
Configure Variants to add some extra-prices (1$) to some variants.
In POS settings activate "Product Configurator" and
"Advanced Pricelists", add the public pricelist and one that applies 50%
to
the product.

Open a session and select the product created (say price = 1$)
Select the attributes, the extra-price is added to the product (say the
total price now is 2$).
Change pricelist from public to 50% and the order line will show our
product = 1@50% + 1 = 1.50, not applying the pricelist to the extra-price

opw-2439445

closes odoo/odoo#66251

X-original-commit: ee451c61550fc7577efa42e05f8d0094cb1513e1
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-02-16 11:17:01 +00:00
Nicolas Lempereur ec0fc57462 [FIX] sale_coupon: prevent program w/o company
The company is used to compute currency of:

- discount_fixed_amount
- discount_max_amount
- rule_minimum_amount

If currently we don't set a company, we have an error when using the
company.

opw-2458950

note: forward-port in master set the company field as required setting
it as required in the view.

closes odoo/odoo#66231

X-original-commit: d260dddcdeddecd2bc0649d948f5e0cc30607e09
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-02-16 11:22:56 +00:00
Nicolas Lempereur 67bfa1dfb4 [FIX] website_sale: wrap unbreakable product name
In some location, a long unbreakable word would cause following columns
to be hidden (depending on size of unbreakable word, font, font size,
...). For example, this happened in the cart summary on payment page.

With this changeset, if not possible otherwise, line break happen inside
the word.

opw-2451496

note: from 13.0 the shop product lists are inside .card so the h5
override (that is now h6) is not necessary.

note: also adds similar CSS propery for case where word-wrap doesn't
word (added in `#66194` for 12.0 up to 13.0).

closes odoo/odoo#66208

X-original-commit: 9193776417f9da3083ad5c2e1760d0dacfb6bd59
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-02-16 12:02:01 +00:00
Romain Derie 5e8ca1996e [FIX] website: add tests for #64446
As `standalone` tests were introduced in 14.0 (see 0453566a76), this commit
adds tests to ensure the `inherit_id` of COW views are correctly updated on
module updates.
This test could not be rewritten in a regular test and merged in 12.0 as module
operation in tests try to be avoided (see 5e7e7b00b7d).

See #64446 for more information about the original fix.

closes odoo/odoo#66096

X-original-commit: 9d2787b1dc1485ed132ca51d2b2a4c85b8c77d0c
Signed-off-by: Christophe Simonis <chs@odoo.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-02-16 10:27:16 +00:00
Romain Derie 6a9b5bba9b [FIX] base, website: replicate inherit_id update on cow view
Before this commit, only whitelisted fields would be updated on cow views
during a module update.
A field would be whitelisted if he had the same value than the original view,
see it as a heuristic to not write on modified fields.

But `inherit_id` is not that simple, even if the cow view has a different value
than its original view, it doesn't mean it was modified by the user, it is just
because of the cow mechanism that assigned a copied view as inherit_id, which
is just a copy ofthe original one.

We can thus consider `inherit_id` as unchanged and whitelist it if the `key` is
the same.

In practice, it means that cow'd views did not receive the `inherit_id` updates
as in commit https://github.com/odoo/odoo/commit/c8577568a1e39f6692889b3e21652fa3b8df06b2#diff-823e5db841dca1798ff1300e243059a4e1c93343598d2be5a1d1dcd1d2d0c273R537
where `portal.my_account_link` had its `inherit_id` changed from
`portal.frontend_layout` to `portal.user_dropdow`, see https://github.com/odoo/upgrade/pull/2059:

Considering a module update changing `inherit_id` of D from A to B, the
following use cases are expected. Without this fix, D' never move:

CASE 1
  A    A'   B                      A    A'   B
  |    |                 =>                 / \
  D    D'                                  D   D'

CASE 2
  A    A'   B    B'               A    A'   B   B'
  |    |                 =>                 |   |
  D    D'                                   D   D'

CASE 3
    A    B                        A    B
   / \                   =>           / \
  D   D'                             D   D'

CASE 4
    A    B    B'                  A    B   B'
   / \                   =>            |   |
  D   D'                               D   D'

Opw: 2422773
Opw: 2422727
Opw: 2422770
Opw: 2423406
Opw: 2423859
X-original-commit: ff69f11e9c97d63d9319a8094a87af93984aba38
2021-02-12 15:52:37 +00:00
Odoo's Mergebot 38e8895249 [IMP] web: form: checkbox with optional field on mobile
This PR adds a class to be able to show/hide
other fields depending on a checkbox status.

This class is needed to have this behavior on desktop but also
on mobile.

We can now fix some alignment issues encountered on mobile.

Related task-ID: 1929043

closes odoo/odoo#66153

Related: odoo/enterprise#16345
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2021-02-16 12:01:03 +01:00
sofiagvaladze 21e2676b7a [IMP] hr_holidays: Allow to delete future time off
Allow to delete a non validated time off in the future to a simple user
Add some tests

Task - 2428789

closes odoo/odoo#65361

Related: odoo/upgrade#2127
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-02-16 09:44:15 +00:00
Adrien Dieudonne 0aa8a2be7f [FIX] survey: align Survey Time Limit checkboxes on mobile
Steps to reproduce:
- Go to Survey
- Click on Create
- Go to the "Options" tab and see
1) "Survey Time Limit" Field in "Questions"
2) "Attempts Limit" after clicking on "Login Required"

Related task-ID: 1929043
2021-02-16 09:41:12 +00:00
Adrien Dieudonne 99de358c87 [FIX] event: align Limit Registrations checkbox on mobile
Steps to reproduce:
- Go to Event
- Click on create and see "Limit Registrations" field

Related task-ID: 1929043
2021-02-16 09:41:12 +00:00
Adrien Dieudonne 249d975ce7 [FIX] purchase: align Receipt Reminder checkbox on mobile
Steps to reproduce:
- Go to "Purchase / Orders / Vendors"
- Click on "Create" to enter in form view
- Go to "Sales & Purchase" tab
- See "Receipt Reminder" in "Purchase"

Related task-ID: 1929043
2021-02-16 09:41:12 +00:00
Adrien Dieudonne df1d279cbc [IMP] web: form: checkbox with optional field on mobile
This commit adds a class to be able to show/hide
other fields depending on a checkbox status.

This class is needed to have this behavior on desktop but also
on mobile.

Related task-ID: 1929043
2021-02-16 09:41:12 +00:00
Benoit Socias 875aca63f7 [IMP] web_editor: reuse palette from previous shapes when enabling one
Before this commit when toggling shapes on a snippet background, the
shape color palette was always set to the default one.

After this commit when toggling shapes on a snippet background, the
shape color palette is computed by combining the default palette with
the palette of the previous shapes in the page.

task-2431445
https://github.com/odoo/odoo/pull/64515

closes odoo/odoo#64515

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-03 12:08:51 +00:00
Benoit Socias fe44184b48 [IMP] web_editor: open shape selection when enabling shapes
Before this commit when toggling shapes on a snippet background, the
shape selection dropdown was shown as closed.

After this commit when toggling shapes on a snippet background, the
shape selection dropdown is automatically opened.
We have to use a click() on the toggler instead of an open() on the
dropdown to make the page containing the selected shape appear when
opening.

task-2431445
https://github.com/odoo/odoo/pull/64515
2021-02-03 12:08:51 +00:00
Benoit Sociasandqsm-odoo b67084e729 [IMP] web_editor: instantiate color palette only when necessary
Color palette are only visible once they are opened. However, we
instantiate them a lot to build the "options" editor panel which caused
the editor to appear buggy for some users... even if they would never
open a colorpalette. This fixes that issue. The fix is not entirely
stable but was made as stable as possible... better implementation will
be done in master.

task-2439295
https://github.com/odoo/odoo/pull/65223

closes odoo/odoo#66217

X-original-commit: 9aeba7dec95b397ef894f5a181920dff269d6ad4
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-02-15 18:30:10 +00:00
Benoit SociasandSamuel Degueldre caaaaa0785 [FIX] web, web_editor: avoid rendering color palettes more than once
Before this commit the palette was rendered each time it was opened.

After this commit if the palette has already been rendered only the
selected color is being updated in the palette (and its colorpicker).

task-2439295
https://github.com/odoo/odoo/pull/65223

X-original-commit: 7f19f63b18bc7d17a393b3535492c7f90595ca39
Co-authored-by: Samuel Degueldre <sad@odoo.com>
2021-02-15 18:30:09 +00:00
Benoit SociasandSamuel Degueldre 62b4e968c9 [FIX] website, web_editor: ensure the loader appears on click options
Before this commit the loader did not always get displayed when
switching to the options tab.

After this commit the loader always gets displayed ASAP when switching
to the options tab until the tab is ready and displayed.

task-2439295
https://github.com/odoo/odoo/pull/65223

X-original-commit: f2fa17540e130b5cf3f70570a3a97495cfbb7499
Co-authored-by: Samuel Degueldre <sad@odoo.com>
2021-02-15 18:30:08 +00:00
Joseph Caburnay 51a08bbfa3 [IMP] point_of_sale: show wizard when closing pos.session failed
When closing pos.session and it turned out that during the creation
of journal entry the move lines are not balanced, pos automatically
balances the lines by crediting the amount to balance and recording
it to the default pos receivable account.

In this commit, we are changing the behavior by allowing the user
to choose which account the imbalance amount be recorded. So the
workflow becomes:

1. Close pos session fails.
2. Wizard shows the amount to balance and asks which account to
record it.
3. Confirm the wizard to successfully close the session.

closes odoo/odoo#62425

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-02-15 12:06:31 +00:00
Mohammed Shekha 2d2019d4d2 [FIX] web: keep focus on searchbar when Tab pressed
before this commit: when searchbar has autocomplete and user press Tab key then
focus goes out of searchbar input while it should keep focus on searchbar so that
user can do search on other term.

after this commit: when searching on searchbar and pressing Tab key will keep focus
on searchbar input so that user can search again.

task-2393772

closes odoo/odoo#66239

X-original-commit: ae90842be8a87999e0cdbbf00b86b1bbf92992ce
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-02-16 07:53:44 +00:00