Commit Graph
137024 Commits
Author SHA1 Message Date
Laurent Smet 61351ec276 [FIX] account: Use CoA's currency by default on testing company
If a test is supposed to be run with the Belgium CoA, we expect the company is created by default with the EUR currency.
Before this commit, the currency of the company was replaced by the current company's one: USD (most of the time).
2020-07-15 07:12:25 +00:00
Martin Trigaux 14940225f2 [FIX] *: do not import tests folder
The tests must be only imported in a test context, not in a running
context.
Since 92a7f8c a new test requirement was added but it should
not be necessary to run a module, only to execute the tests.

closes odoo/odoo#53628

Related: odoo/enterprise#11882
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-07-16 10:20:43 +00:00
Martin Trigaux e61a3bc15a [IMP] stock: keep coherant action name
At bee938e (following task-id 2042303), the label of the action was
changed globaly.
The action is however shared with multiple menus like Inventory Report.
The Update Quantity label only makes sense when coming from the
product where the quantity will be updated.

Closes odoo/odoo#50523
2020-07-16 10:20:43 +00:00
Adrian Torres 9fefa08745 [FIX] core: mapped() does not prefetch as expected
Before this commit, calling `mapped()` on a relational field of a single
record inside a for loop does not correctly propagate the prefetch ids
from the bigger recordset down to the record inside the loop:

    [rec.line_ids.mapped('name') for rec in recs]

To be more precise, `recs` correctly propagates prefetching information
down to `rec.line_ids`, but method `mapped()` does not pass it along to
the record that triggers the prefetching.

This resulted in one query per record in `recs`, so if `recs` were a
1000 records recordset, at least 1000 queries would be necessary.

With this commit, the `mapped()` function correctly propagates the
`_prefetch_ids` of the larger recordset (`rec.line_ids`) so that the
prefetching works properly and the 1000 queries are brought down to 1.

This commit is a followup on #42611.

closes odoo/odoo#54565

X-original-commit: 0e97053fee36c0c76b70cb94be5340c3144b178b
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2020-07-16 11:09:05 +00:00
Xavier Morel 65b8751e32 [FIX] core: mis-updated SQL queries
odoo/odoo#53938 improved the SQL linter and used psycopg2.sql to
silence the linter where that still made sense. However I forgot to
mark table names (pretty much exclusively) as `sql.Identifier` in a
few somewhat rare callsites, which consequently break when invoked as
a simple string is not a Composable and psycopg2 therefore rejects it
when composing the query.

closes odoo/odoo#54556

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-07-16 09:10:03 +00:00
Jorge Pinna Puissant 11784de327 [REF] mail: extract the compute of date deadline to be used in hr
opw-2265631

closes odoo/odoo#54548

X-original-commit: c029bfeb3e04b5b314663db34db0a56b6165a6b7
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-07-16 08:55:11 +00:00
Jorge Pinna Puissant 793edf3293 [FIX] hr: activity type configuration on hr plans
revert of 0f4ec36 and bf8a9af

- Employees > Configuration > Planning Types and ensure the activity
    type "To Do" is set to scheduled date several days after previous
    activity (default should be 5 days);
- Check that onboarding Plan has at least 2 activities with activity
    type "To Do";
- Click launch plan.

The activity type configuration is ignored and all activities are due
tomorrow. The previous commit uses the function
_onchange_activity_type_id to fix this issue.

The problem with this commit, is that the _onchange_activity_type_id
function will also change the responsible, the notes and the summary to
set them to their default value.

Now, the activities are due taking into account the activity type
configuration without modifying the already set responsible, notes and
summary.

opw-2265631

X-original-commit: 81e4745a31567af7b58064bd8b4e9bae0756354f
2020-07-16 08:55:09 +00:00
Jorge Pinna Puissant e0baa3be18 [FIX] hr_timesheet: timesheet button in employees view
Before this commit, only the users with timesheet 'Administrator' rights
can see the Timesheet button in the employees view.

Now, the users with timesheet 'See all Timesheet' rights can see the
Timesheet button in the employees view.

This is the behaviour in version 12.

opw-2285695

closes odoo/odoo#54543

X-original-commit: c839ecda6c696ac54ceaf24b2ee1816cb358052a
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-07-16 07:40:35 +00:00
Xavier Dubuc 978f8ca4ef [FIX] mail: fix moderation accept multiple messages button
Once global "Accept" button is clicked, the accepted messages were not
unchecked causing the button to stay hidden until next page reload.

task-2285430

closes odoo/odoo#54549

X-original-commit: 5594de16f463507498e852c2d49d1cbe74ed7381
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-07-16 08:56:31 +00:00
Raphael Collet a21e8afda4 [FIX] core: update of one2many field on new record with origin
An onchange method can remove an existing line from a one2many field of
a new record with command 2, such as:

    move.line_ids = [(2, <NewId origin=42>), ...]

The processing of the command 2 above incorrectly tries to remove the
new line from the origin record, instead of the new record.

closes odoo/odoo#54545

X-original-commit: 7d138a445acbd9f2e122d9c30ca81877bae6a245
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-07-16 08:16:16 +00:00
Joseph Caburnay 800fa0812a [FIX] pos_restaurant: split bill screen responsive
The layout of the split bill screen is broken after the responsive pos ui.
This fixes the split bill screen and make it also responsive.

New classes are introduced because reusing proved to be very difficult.
One benefit of declaring a new classes (then styling them) is that we can
target the particular elements that we wanted to change without the concerns
that another elements are changed.

closes odoo/odoo#54529

X-original-commit: 51f0c6a1be912192d910d47b79ac2cb3c5b42784
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-07-15 15:29:11 +00:00
Jinal Patel 8d721f6728 [IMP] base: change unique model name sql constraint message
-Purpose of this task is to make the unique model name constraint
 clearer by specifing name of the model needs to be unique.

-In this commit, change the constraint message from
 'Each model must be unique!' to
 'Each model must have a unique name.' to let the user know name
 of the model causes the issue.

task-2254964
Closes-#51513

closes odoo/odoo#51513

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-05-19 09:08:36 +00:00
Thibault Francois 585a28b89a [FIX] im_livechat: performance issue with _compute_nbr_channel
filtered(lambda c: c.channel_message_ids)
take more than 2 minutes to get executed with a regular user
due to access_right check for every single message.

Solution:
use the previous read_group with the domain channel_message_ids != False
which is equivalent

closes odoo/odoo#54318

X-original-commit: b4dcfc3e273c40c53cbf778152cf38fabb39a096
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-07-10 10:34:00 +00:00
Xavier Dubuc c767df5e97 [FIX] mail: set full composer subject and recipients
task-2291887
task-2291893
task-2291898

closes odoo/odoo#54531

X-original-commit: 26170ad9ab09d75de2e0af98fb7daedc2ed57e50
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-07-15 16:18:53 +00:00
Toufik Ben Jaa 04a757d596 [FIX] project: allow non manger to duplicate tasks
- The field `allowed_user_ids` is only accessible to Project Manager.
  When trying to duplicate a task, an access right issue is raised
  if you are not project manager.
  This is due to the fact that when trying to duplicate this field is
  read.

  To avoid this issue, we specify that this field should be copied thus
  not be read.

closes odoo/odoo#54509

X-original-commit: 95dedd23cc7a7d66d7a7dc17b9f9ac4f5473e226
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2020-07-15 12:42:59 +00:00
Jeremy Kersten b3681bc85f [FIX] website_event: restore the online magic country
Removed with commit aebe199d80, but independant of is_online

Restore partially the feature, order by physical event is no more easy to restore
since is_online field doesn't exists anymore to sort.

Can be done as a custo if really required.

closes odoo/odoo#54516

X-original-commit: a6be8cfa40525c5d835cdb40e2e8936aeb36864c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-07-15 13:16:39 +00:00
Aymane (ayt) 59a156f80c [IMP] crm: Add colors to activity buttons
Issue: All action buttons were the same color.

Solution: Make the snooze button more visible by giving-it
 a warning color

Closes Task#2295872

closes odoo/odoo#54508

X-original-commit: d4b7f8b44c8d0d5b07a85cd52ee1648f9068f7b2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-07-15 12:31:30 +00:00
Nicolas Martinelli 5718764ed9 [FIX] base: currency of Slovakia
The currency of Slovakia is EUR (since 2009).

opw-2293328

closes odoo/odoo#54507

X-original-commit: 7a414dd666ae57285762f059e1c3e3cdb4801a1f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-15 12:28:01 +00:00
Paul Morelle 2cd9f763a5 [FIX] event: fix invalid domain in view_registration_search
Commit 30af656e1a removed a third operand
in the domain but forgot to remove its operator, making the domain
filtering on the Participant invalid.
This commit fixes it by removing the ~~first~~ second pipe.

closes odoo/odoo#54504

X-original-commit: 44feadabab601b0df34d504b585abb9339a4a478
Signed-off-by: Christophe Simonis <chs@odoo.com>
2020-07-15 12:11:04 +00:00
Joseph Caburnay d51b56e20d [FIX] pos_restaurant: idle timer not resetting properly
1. Idle timer is now reset also for touch events.
2. Using onWillUnmount and onMounted hooks to add event listener to
window for detecting activities is not possible in this situation
because setting the listener depends on a pos.config field
(iface_floorplan) which is only available after 'start' is finished.
(Remember that hooks are required to be set in the constructor.)
So instead of using those hooks, we replicate them by using a global
variable IDLE_TIMER_SETTER. This variable holds the bound method
_setIdleTimer and set it as callback to each event listener.
Then, before closing pos, we remove the listeners.
3. Close present temporary screen when going back to floor screen
after idle timer.

closes odoo/odoo#54498

X-original-commit: de1430d71890da24547fe24ba04dd28f59f77ee0
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-07-15 11:39:43 +00:00
Joseph Caburnay 4ed4ac5474 [FIX] point_of_sale: actionpad layout in safari
Tested in safari, chrome and firefox, removing display: flex property
in the .pads element solves the issue. There is actually no need to
declare .pads to flex-flow in column direction as div are block
elements, and they laid out in column by default.

X-original-commit: 6389f00598fa6acd991b21f9875d27005b689ec6
2020-07-15 11:39:42 +00:00
DramixDw da32bdb88a [IMP] website, *: make cover options always available
*: website_blog, website_event

It would make sense to be able to change the height of a cover or to
change the text alignment even if there's no backgroung-image.
Therefore, we're removing the background-image restriction for the
options of the cover snippet.

Part of https://github.com/odoo/odoo/pull/47933
task-2210733

closes odoo/odoo#47933

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-15 11:36:56 +00:00
DramixDwandqsm-odoo 188c338ab2 [IMP] website, *: make editor closer to WYSIWYG
*: event, website_blog, website_event, website_forum, website_sale,
   website_sale_comparison

We're changing most of the "DRAG BUILDING BLOCK HERE" placeholders so
that they only appear on drag. Making the preview as close as possible
to the page once saved. However, we're still keeping them on empty pages
because it make sense there to let know that the area is editable.

Part of https://github.com/odoo/odoo/pull/47933
task-2210733

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-07-15 11:36:56 +00:00
Xavier Dubuc 67a515ded9 [FIX] mail: introduce "assets_tests" assets bundle
Needed to merge introducing new assets in 13.4

odoo/odoo#54235
task-2291898
task-2291893
task-2291887

closes odoo/odoo#54485

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-07-15 09:27:20 +00:00
Antoine Prieels 09e24786ff [IMP] point_of_sale: Improve load demo data text
Improve the text in the load demo data wizard that shows when a
pos_session with no product is started.

closes odoo/odoo#54482

Taskid: 2296281
Related: odoo/enterprise#11848
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-07-15 08:52:21 +00:00
Simon Genin (ges) e88fc62222 [IMP] fleet: Improve ux of list views
Small UX improvements on list view and edit text of an empty kanban
screen.

Task ID 2291554

closes odoo/odoo#54234

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-07-15 08:37:56 +00:00
qsm-odoo 1384354356 [IMP] website, *: review options' order/label + add "⌙" markers
*: web_editor

Some of those "⌙" markers will become foldable options in the future.

Part of https://github.com/odoo/odoo/pull/53930
task-2157252

closes odoo/odoo#53930

Related: odoo/upgrade#1478
Related: odoo/design-themes#332
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-14 14:43:16 +00:00
qsm-odoo 20249d316e [IMP] website: remove animate scrolling option for table of content
Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:16 +00:00
qsm-odoo b4ce6fbc01 [IMP] website, *: add prettier preview of border styles
*: web_editor

Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:16 +00:00
qsm-odoo 43c158295b [FIX] website: remove duplicated filter option for blockquote
The blockquote in its "cover" layout allows to add a background with
a dedicated colored filter on top of it. That option was a bit buggy
since the filter option only appeared if the page was saved first. As
we now have a generic option to apply a colored filter on image
themselves, that option became useless anyway.

Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:16 +00:00
qsm-odoo bb0cd4d5c8 [IMP] web_editor, *: review background color/image options UI
*: website, mass_mailing, website_blog, doc

Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:16 +00:00
qsm-odoo d23a9c1954 [IMP] web_editor, *: introduce new "button group" editor widget
*: website, website_form

Basically work just as a we-select but with a different design.

Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:16 +00:00
qsm-odooandBenjamin Vray b96c0eaf38 [IMP] web_editor: allow to use images in the left panel
Part of https://github.com/odoo/odoo/pull/53930
task-2157252

Co-authored-by: Benjamin Vray <bvr@odoo.com>
2020-07-14 14:43:16 +00:00
qsm-odoo f16113a06e [IMP] web_editor, *: review the editor design CSS
*: web, mass_mailing, website, website_form, website_sale

New CSS design of the editor (step 1/x).

This work is unfortunately far from perfect but is a first step towards
what we want. In particular, much CSS linked to elements that are meant
to be removed/moved in the upcoming weeks was done in a huge rush but
will thus hopefully be removed/reviewed before the 14.0 release.

As the design is now far more complex including gradients and other
"complex" elements, it was also very difficult to keep a design based on
css-variable so this system was removed, which means that the editor now
appears the same everywhere (backend, frontend, ...). The original goal
of this system was to have an adapted style for backend, frontend and
website visitors. Unfortunately, the current result was a very good
frontend editor design, a not-so-good backend editor design (for mass
mailing at least) and a totally unadapted design for the website
visitors. Making this perfect will be achievable by loading different
assets for those 3 areas and hopefully those assets will only differ by
the values of editor scss variables.

Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:16 +00:00
qsm-odoo 6c31104fa9 [IMP] web_editor, *: remove snippet panel block icons
*: website, mass_mailing

Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:16 +00:00
qsm-odoo 2616c8950f [FIX] web_editor: make sure user events bubble before updating UI
Example where this was a problem: when clicking on a field type for
website form, the whole option is rerendered and we never go through the
"close" method of the clicked we-select element (which will be important
in the future).

Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:15 +00:00
qsm-odoo 8d57f21d7d [IMP] web_editor: hide we-row with no visible widgets
Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:15 +00:00
qsm-odoo 4b826abcfb [IMP] web_editor, portal: review img/fa display rules mixup
Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:15 +00:00
Joseph Caburnay 473cab3a91 [FIX] point_of_sale: invoicing error at first invoiced order
To reproduce, open a pos session. Finalize an order with invoicing.
Error message is shown.

Invoicing in pos calls doAction of the action manager. The first time
doAction is called, it triggers a chain of events and a side effect
of that chain is to instantiate two mail owl components which isn't
possible because not all mail assets are loaded. A very quick fix is
to bypass that mentioned chain of events by setting isStarted flag to be
true. Aside from bypassing the instantiation of mail components, there
are procedures that were skipped as well which includes:

1. setting the bus to listen to scroll events
2. setting odoo.isReady to true
3. adding a class to the action manager element

All of the above is not important in pos and can be skipped so this
quick fix is valid. However, this fix doesn't actually solve the real
problem which is the fact the pos is loading unnecessary assets.

This commit implements the quick fix. Cleaning up pos assets will be
done in the future.

closes odoo/odoo#54478

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-07-15 08:34:45 +00:00
Xavier Morel 470fb905a9 [FIX] base, mail: properly annotate Partner.find_or_create
In 6e25a510b3 `find_or_create` was
modified to return a recordset rather than just an id. This made it
incompatible with the RPC protocol and it was not annotated to
downgrade the return value back to an id.

Fixes odoo/odoo#54466

closes odoo/odoo#54476

X-original-commit: a7e3894e20207b714cebefa908be090967866791
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-07-15 07:36:23 +00:00
Andrea Grazioso (agr-odoo) 5a9cf0f357 [FIX] l10n_in: fix reports using invoice currency total
In the GSTR1 report, Under 6A Export Invoices, the invoice value which
is shown in the report is expressed in invoice currency without any
currency symbol.

This is misleading for users because the GST form report website
asks amounts in company currency (Indian currency)

opw-2292449

closes odoo/odoo#54462

X-original-commit: bb617b70eab3e033c828c2899c139e66ddc8fc28
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-14 16:35:12 +00:00
Raphael Collet 6c9da4a206 [FIX] core: search on boolean field with operator in
closes odoo/odoo#54457

X-original-commit: 363533b7d50448c06cef2baa68d6f4f634346252
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-07-14 15:15:11 +00:00
Xavier Morel 36b72077a5 [FIX] account: override not renamed when base method was renamed
odoo/odoo#34023 added this override to `postprocess_pdf_report`, which
was apparently missed when odoo/odoo#33770 made a few
methods (including this one) RPC-private.

Fix the override so it's properly called again (probably).

Task 2285894

closes odoo/odoo#54448

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-07-14 13:55:11 +00:00
Jeremy Kersten 76b2de42f4 [FIX] *: handle null value for boolean in sql queries
It has always been a best effort until the v13 to have false as default value
for boolean field.
Until v13: https://github.com/odoo/odoo/blob/12.0/odoo/models.py#L3645

During ORM refactoring in v13 it has been replaced by a default value in sql
From v13: https://github.com/odoo/odoo/blob/13.0/odoo/tools/sql.py#L79

But with a typo since columntype for boolean is bool and not boolean.
What's mean that in v13 we have a lot of null value for boolean (~=False)

In all cases, we try to be aware and check Falsy boolean with 'null or False'
(https://github.com/odoo/odoo/blob/13.0/odoo/osv/expression.py#L1230)

So we should do the same when we write pure sql in method bypassing the ORM.

closes odoo/odoo#53391

closes odoo/odoo#54458

Related: odoo/enterprise#11319
Related: odoo/enterprise#11838
X-original-commit: 118c9f6aafd423f415b2bbfcf8a9cfcd676d9b92
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-07-14 15:52:59 +00:00
qdp-odoo 92a7f8c13f [IMP] base, tests: use freezegun lib to mock dates and datetimes
closes odoo/odoo#54227

Related: odoo/enterprise#11742
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2020-07-10 08:20:13 +00:00
Yannick Vaucher da6c9027f4 [IMP] l10n_ch: clearer validations for bank fields and vendor bills (ISR ref)
On res.partner.bank, we check that:
- l10n_ch_postal contains a valid postal number
- l10n_ch_isr_subscription_chf contains a valid ISR subscription number
- l10n_ch_isr_subscription_eur contains a valid ISR subscription number

ISR subscriptions numbers are postal numbers but starting with 01 or 03.
Those codes are reserved to ISR issuance.

When the bank account on a Vendor Bill is detected as
an ISR Issuer, check the reference is actually an ISR.

The 27 digits ISR Reference is error prone when typed by hand
and an error at this stage would break the payment process later.

This is required to avoid batch payment error with SEPA.

We prefer using the pretty form xx-yyyyy-z of a postal account.
The Swiss users will identify it more easily.

We always want to auto fill the field l10n_ch_postal when possible from
acc_number, which includes only 2 cases of filling acc_number:

1. a 9 position postal account number
2. an IBAN from PostFinance which includes clearing 09000

Original prs: Closes #51645, #51544, #51560

closes odoo/odoo#54455

X-original-commit: f8a3ec438e3b5fa56305db729a78304aec7a6716
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-07-14 14:49:15 +00:00
Nicolas Martinelli e53218964a [FIX] stock: merge quants when unpacking
1. Create a new location of type internal in WH/Test
2. Create a new product P with availability of 100.0 in WH/Stock
3. Create a new transfer from WH/Stock to WH/Test with 50.0 units of P,
   Put in Pack and Validate
4. Create a new transfer from WH/Test to WH/Stock/Shelf 1 using the
   previous package, Validate and Unpack
5. Repeat steps from 3 and 4
6. Create a new transfer from WH/Stock/Shelf 1 to Customer with 100.0 units of P
7. Review stock quant from the location WH/Stock/Shelf 1

2 quants of the same product in the location WH/Stock/Shelf 1: one
negative with -50.0 and another positive with 50.0

The step 4 creates 2 quants of 50.0 units, which are reserved at step 6.
However, when validating the transfer 100.0 units are taken from one of
the quants.

To prevent this situation, we run the quant vacuum process after
unpacking. This will merge the 2 quants of 50.0 and prevent any future
negative quant creation. We also clean zero quants, although this is not
mandatory to fix our use case.

Closes #53535
opw-2283707

closes odoo/odoo#54431

X-original-commit: f7168311f4333f7fc684e00e1c1c284981718335
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-14 10:27:35 +00:00
Nasreddin (bon) 05dc6679b9 [FIX] base: Handle custom field under country in contact kanban view
Issue

	- Install "Studio" and "Contact" apps
	- Edit with Studio the Contact Kanban View
	- Add field under city/country

	Field appears only if no city is set.

Cause

	The new field has as anchor the 5th <li> with the field country
	who will appear only if not city is set. However, in case there a city
	AND a country, the 6th <li> will appear instead of 5th (the target one).

Solution

	Let only one <li>, one country and one city field but with the right conditions.

opw-2288545

closes odoo/odoo#54423

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-14 09:12:03 +00:00
Julien Mougenot 55408fd01b [FIX] web: Properly handle default favorite filters
Before this commit, the default active favorite filter was determined by
its ID given by the control panel. These IDs start at index 0, meaning
that if a condition checks for the value of such an ID, it could be
false even though the ID and its filter exists.

Now the indexation starts at 1 to avoid such problems.

closes odoo/odoo#54435

X-original-commit: cfb7bbea1b428a062ee08ca045509d189b1fd1d4
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-07-14 10:55:59 +00:00
Damien Bouvy c547f12efb [FIX] sale: set and propagate payment type in payment flow
The payment.transaction type field allows filtering some potential
payment methods down the line of a transaction being created; e.g. if a
subscription product is present in a quote, the payment's type should be
`form_save` to save the payment token for future use on the subscription
that will be created at confirmation.

The transaction that got created by sale flows did not set the type of
the transaction correctly, and this value was not propagated to the
rendering values of the acquirer. It now is.

This is necessary as part of task 2275051, where we need to know which
payment methods to enable in Stripe depending on a need for tokenization
or not (since some methods are not tokenizable).

closes odoo/odoo#54426

X-original-commit: 09dbbd77d83332c48f62b1c36c3b33ddbfa3a4eb
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-07-14 09:32:57 +00:00