Commit Graph
137723 Commits
Author SHA1 Message Date
Barad Mahendra 00a7f3aaad [IMP] various: Reseuence the module and module category
The purpose of this task is to improve the UI of the 'Apps', by
improving the clarity of the kanban, sequencing the apps and
simplifying the app categories in the searchpanel

So in this commit, Added the new sequences for ir.module.module
and ir.module.category records.

TaskID: 2240257
Related Enterprise: https://github.com/odoo/enterprise/pull/12413
Closes: #55907
2020-08-14 07:38:58 +00:00
Mathieu Duckerts-AntoineandAaron Bohy 3da3ae1178 [FIX] web: pivot: avoid to toggle invalid measure
Before this commit, click on the divider in the menu 'Measures' of the
pivot control panel would cause a crash. The present commit fixes that
situation.
We also bring another small correction: the menu won't close if one
clicks on the measure list but not exactly on a menu item or the
divider.

closes odoo/odoo#55902

X-original-commit: aad9f3fd7499ef8b660cc25fea840a34d70f75a6
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-08-14 07:52:49 +00:00
Nasreddin (bon) a137f22363 [FIX] web_editor: Multi-company error when adding image to task description
Issue

	- Select "My Company (Chicago)" as current company
	- Open "Projects" module
	- Create a new Task
	- Edit description, upload a new Image and add it to description.

	Multi-company error "Write" on project.task .
	In frontend, can optimize uploaded picture.

Causes

	Wrong "allowed_company_ids" value in context.

Solution

	Remove allowed companies from context to avoid allowed_company_ids
	which may erroneously restrict based on website.

opw-2304511

closes odoo/odoo#55897

X-original-commit: 8f6506a57853040d065569fdd60f9d94be8e26e1
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-08-13 16:22:18 +00:00
qsm-odoo c5fee9d009 [FIX] web_editor, *: restore custom snippets thumbnails
*: website

Since [1], the thumbnails of the saved snippets were not right anymore,
all fallbacking to the default image. This is because snippets thumbs
now use svg files instead of png and the snippet saving feature did not
allow it. This commit fixes that and makes the feature more robust.

- Allow to use any original thumbnail, and not only for website app.
- Remove useless defaut image, a fallback for when the feature is broken
  is useless.
- Identify snippets by key instead of by main class (possible since
  the new `data-snippet` attribute on snippets).

[1]: https://github.com/odoo/odoo/commit/b7fe2bdae2f45372c0d538767a226a413b806f3f

closes odoo/odoo#55896

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-13 15:44:48 +00:00
Yannick Tivisse 4afdebbb7e [FIX] hr_holidays: Fix undeterministic crashing tests
The tests in hr_holidays/tests/test_company_leave.py seem like they randomly fail if the default value for
date_to is computed on a different second than the date_from (it's a dict of fields so not ordered).

Cfr https://runbot.odoo.com/runbot/build/3727451 2020-07-30 08:28:32 vs 2020-07-30 08:28:31
for which date_from > date_to.

I imagine the call to leave._onchange_request_parameters() is meant to fix it, but it occurs after
the create() which is flushed immediately, so it's too late and the date_from/date_to SQL constraint
still triggers.

It could happen for real production usage too, so we might want to do something about that outside of tests.
Options include:

1/ making the date_from/date_to fields writeable computed fields, with the compute method setting
   better defaults on both fields at once
2/ alternatively, remove the default=fields.Datetime.now and override default_get instead for
   deterministic defaults on both fields at once

The second solution seemed to be the better one.

closes odoo/odoo#55880

Taskid: 2312029
X-original-commit: 6908ea471dd18182f83c81046f0000a00898fb66
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-14 09:29:30 +00:00
Nikunj Ladava ee28ab8132 [ADD] l10n_ec: added module dependency
added l10n_latam_base, l10n_latam_invoice_document
modules as a dependency of l10n_ec

task- 2316911

closes odoo/odoo#55839

Related: odoo/upgrade#1629
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-08-14 10:02:09 +00:00
Katherine Zaoral 8793d40211 [FIX] l10n_ar: be able to install demo data
For some reason odoo is not copying the expense_currency_exchange_account_id
and income_currency_exchange_account_id from the partner chart template.

In order to avoid errors in the demo we explicitly define this accounts in
the exempt and responsable inscripto chart templates.

closes odoo/odoo#55831

Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-08-12 21:30:48 +00:00
Victor Feyens fdb23e282b [IMP] *: wrong any() usage
Replace wrong usages of any(list|recordset), by any(generator)
to speed up computations, avoiding list creations and/or looping twice on a recordset
for nothing.

any([generator]) => any(generator)
any(filtered) => any(generator)

closes odoo/odoo#55768

Related: odoo/enterprise#12360
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-08-14 09:56:10 +00:00
Florian Gilbert 65bf6988f9 [FIX & IMP] purchase: Remove weird domain in attrs & add purchase order on account move line.
This commit removes "state = purchase" in account move attrs domain. The purchase state doesn't exist.
This commit adds a related field to purchase order in account move line.

Task ID: 2312024

closes odoo/odoo#55611

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-08-14 12:02:38 +00:00
william 98b64be59f [IMP] account: misc improvements of reconciliation models
Task 2292368
Bundle
https://runbot.odoo.com/runbot/bundle/master-reconcile-model-boost-wan-60105

* Search in Notes and References, not only in the statement's
communication.
* Activate the partner mapping for Suggest Counterpart models
* Always show the Amount Matching field
* Do not block the deletion of models with a partner mapping
* Allow to archive models
* Add a button to get back to Processing state from Validated state on
bank statements.

closes odoo/odoo#55031

Related: odoo/upgrade#1619
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2020-08-13 13:10:33 +00:00
william d23f91b80f [FIX] account: partner mapping and model order
Because we used the same variable to compute the partner, it was
overriden once we went through a model with a partner mapping, and kept
for models with lesser priority.

Also remove the key param to sort the recocniliation models. We want the
models to be sorted according like in the list view, and that is exactly
what the .sorted() function does without params. (no need to worry about
changing it if we change the _order)
2020-08-13 12:53:47 +00:00
william 733f1f8887 [FIX] account: previous statement at the same date
Lets assume we have these records
```json
{
    'id': 1,
    'journal_id': 1,
    'date': '2020-01-01',

},
{
    'id': 2,
    'journal_id': 1,
    'date': '2020-01-01',

}
```

with the domain
```
[('date', '<=', st.date),
 ('journal_id', '=', st.journal_id.id),
 ('id', '!=', st.id)]
```
in the compute method of `previous_statement_id`, the previous
statement of 1 will be 2 and vice versa.

A solution is to change the declaration of the field from Date to
Datetime
2020-08-13 12:53:47 +00:00
Patrick Hoste a54f3852d6 [IMP] crm: add recurring revenues feature
PURPOSE

Allow users to configure contract recurrences and Monthly Recurring Revenues
on Opportunities they're trying to close. One short revenues are not sufficient
to cover real life use cases of CRM revenu analysis.

SPECIFICATIONS

Adds an option in the settings to activate the recurring revenue feature.
This feature is set on an opportunity to indicate a revenue that could be
perceived over time. This time indicator is set by the crm.recurring.plan
model in which the number of months is determined.

By default some plans are added in data. When using plans, revenues are
computed across the plan months.

LINKS

Task ID-2283052
odoo/odoo#54194
odoo/enterprise#12423
odoo/upgrade#1463

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-14 12:59:30 +00:00
Patrick Hoste 8066ab4348 [REF] crm: update revenue fields names
PURPOSE

Link field name with their content.

SPECIFICATIONS

This commit changes the field name "expected_revenue" into "prorated_revenue"
and the field name "planned_revenue" into "expected_revenue".

Indeed content of those fields evolved since their first naming. Their content
is not what the field name indicates. Better rename those fields to understand
code flow inside CRM.

LINKS

Task ID-2283052
odoo/odoo#54194
odoo/enterprise#12423
odoo/upgrade#1463
2020-08-14 12:59:27 +00:00
Kevin Baptiste ea1fa673c8 [IMP] sale_timesheet: return timesheets to merge
Add a method for timesheets that can be merged.

closes odoo/odoo#53779

Taskid: 2275778
Related: odoo/enterprise#11365
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-14 09:43:40 +00:00
Prakash Prajapati 40146bff7f [FIX] hr_recruitment: Include archived applicants on job's button count
Currently in the job's stat button and on kanban button the archived
applicants are not counted and not display while click on button.

So in this commit, count of the  archived applicant's in form views
and show the archived applicants when clicked on stat button.
also curently there is no indication for applicant is refused or not
so in this commit add badge on kanban and form for archieve(refused)
applicant.
we should not count the archived applicantion in the kanban
button.

closes odoo/odoo#55755

Taskid: 2308448
Closes: #55104
X-original-commit: d272d0bbaa5847753236bbee11bff94683cb66f4
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-14 09:30:44 +00:00
oco-odoo 07fbfbb5fb [IMP] account: remove account_fiscal_country_* config parameter
This config parameter was used in order to choose another country than the company's to select the tax report. It is now replaced by a new account_tax_fiscal_country_id field in account_reports.

closes odoo/odoo#55308

Related: odoo/enterprise#12156
Related: odoo/upgrade#1624
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-08-14 07:59:16 +00:00
std-odoo 50abd90b38 [IMP] website_jitsi: allow custom server deployment
Purpose
=======
Allow to customize the domain name of the Jitsi server used
to create chat room on website.

This is done with an `ir.config_parameter`.

Task-2316718

closes odoo/odoo#55869

Related: odoo/upgrade#1618
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-13 12:19:17 +00:00
Arnaud Joset 2923c8a6cf [IMP] hr_expense: display upload button on all tree and kanban views in "My expense" and "My expense reports"
Before this commit, the upload button was not displayed in all the tree/kanban views.

closes odoo/odoo#55867

Taskid: 2315124
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-14 07:16:06 +00:00
Arnaud Joset 3a2374157b [IMP] hr_expense: add upload button on list view
Before this commit, the upload button was not displayed on the list view.

taskid: 2315124
2020-08-14 06:43:20 +00:00
Swapnesh Shah ffd260972e [IMP] hr_attendance: display hours with float_time widget
`float_time` widget is supprted in pivot since dbaa345cec27d1a99556af6305e22e17e9760bb6

closes odoo/odoo#51367

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-17 15:43:28 +00:00
shivam shah 570e7c5972 [IMP] sale: Add icon to sale module same as sale_management
Purpose of the task is, all users have access to activities and will
see "empty" icon on systray activity list and won't understand why it
doesn't show. so to favour majority user add  the icon to sale module.

So in this commit added the icon to the sale moduel so we can see the
icon in the systray activity list.

closes odoo/odoo#55714

Taskid: 2312117
Closes: #55714
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-11 08:36:36 +00:00
Mihai Fekete 4145f4baca [IMP] l10n_ro: improved Romanian localization
this includes improvements in accounts, taxes,
fiscal positions, tax report, account groups etc

closes odoo/odoo#43095

Task: 48668
Closes: 43095
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-08-13 18:42:42 +00:00
Anh Thao Pham (pta) 0f6ebbc6b9 [FIX] account: fix "account.bank.statement.cashbox" export with data update
- Go to Point of Sale
- Switch to View list
- Select a POS and click on Action\Export
- On Export wizard:
  * check "I want to update data (import-compatible export)" option
  * expand "Default Balance" section
A KeyError is triggered while trying to access undefined field referred by "_rec_name"
of "account.bank.statement.cashbox".

opw-2309064

closes odoo/odoo#55480

X-original-commit: 7e3143b93ffd7162c90e0c50758a4f44b0645cd6
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2020-08-14 06:42:52 +00:00
tino480 4efd701c92 [I18N] account: translate in es_MX
The correct translation for "credit notes" in regular Spanish is
"factura recficativa" but for Mexican Spanish, it is "Nota de crédito"

closes odoo/odoo#55900

X-original-commit: 9d49d97ef54e8e3c3d28102146d7c120eb7ed529
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-08-13 18:03:16 +00:00
Nicolas (vin) 7354da6923 [IMP] account: Accounts m2o behavior
There are inconsistencies in the m2o accounts create & edit behavior.
New off-balance account type was not correctly filtered

This change correct those two issues

Task ID: #2288757

closes odoo/odoo#54626

Related: odoo/enterprise#11920
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2020-08-13 08:56:53 +00:00
Sébastien Theys c2918c139b [IMP] web, *: improve mock server and replace most mail mockRPC
Improve mock server:

- add support for mocked `fetch`
- add support for `active_test`
- add support for x2m `in` in domains
- add support for default values computed from a function
- implement a more natural "next id" compute
- allow initial data without ids
- ensure write and x2m commands integrity
- improve bad data/bad commands error messages
- always warn for failing RPC, not only in debug mode
- fix all existing tests that had inconsistency data

Other changes done in mail (or dependents) that are not just related to tests:

- remove `direct_partner` from formatter result
  ->`correspondent` can be computed from other keys, especially `members`

- fix `livechat_visitor` convertData
  -> only process if there is value

- add `current_partner` and `current_user_id` as `init_messaging` result
  -> easier to mock than session

- remove usage of `need_moderation`
  -> that was just a search indirection to `moderation_status`

- adapt `partner_id` -> `res_partner_id` key in `_notification_format`
  -> to be consistent with field name

- add name in result of `mail_partner_format`
  -> sometimes display_name is not the same

- remove usage of `is_moderator`
  -> that was just an indirection to `moderation_channel_ids`

Enterprise counterpart: https://github.com/odoo/enterprise/pull/11523
task-2287171

closes odoo/odoo#55854

X-original-commit: 7ba3fecb3377a720d1eb70e7515a0c45da73836d
Related: odoo/enterprise#12391
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-13 16:26:35 +00:00
xO-Txandqsm-odoo 41527531b7 [IMP] web_editor, *: add snippets search filter
*: website

Add a search bar at the top of the "Blocks" tab to filter snippets.

Part of https://github.com/odoo/odoo/pull/55272
task-2309832

closes odoo/odoo#55272

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-13 14:29:20 +00:00
qsm-odoo 8a48e99e19 [IMP] web_editor: prevent removing data-oe attrs of snippets thumbs
Before this commit, all the data-oe-* attributes were removed from
the snippet panel on editor loading. Some were actually added then
removed by the same function... probably for historic reasons. All of
this is now useless, this commit takes also the opportunity to modernize
that all code section and removes other code which was there for
compatibility reasons too.

Now, the data-oe-* on snippets thumbs are kept (as some will actually
be used by upcoming commits). This commit just makes sure no data-oe-*
is left on the snippet bodies themselves.

Part of https://github.com/odoo/odoo/pull/55272
task-2309832
2020-08-13 14:25:06 +00:00
Nasreddin (bon) eab69bcabf [FIX] website_event: Traceback after reanaming Register button
Issue

	- Install "Events" module
	- Go to website and select an event
	- Edit (in frontend) the event and replace the
	"Register" button text
	- Save & Close the editor
	- Try to register to the event

	Traceback raised

Cause

	Due to this fix on 13.0 (https://github.com/odoo/odoo/commit/8579c0cae839c615415120b79d6ec22c71f7affd),
	the replaced arch will override the style/class if has one.
	In the related ticket; after renaming the "Register" button,
	the 'a-submit' class was removed at rendering, and so,
	after renaming, the class is not present in the new button
	while it's needed to fetch register buttons.

Solution

	Do not remove 'a-submit' class from button since needed in js
	to fetch register buttons.

opw-2317119

closes odoo/odoo#55884

X-original-commit: 593a471cc0a65c12416fa97ef583a9ac9392cc73
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-08-13 13:41:07 +00:00
Jeremy Kersten 09cb4533c2 [IMP] website_sale: allow to show extra field on product page
You can in website's settings, add some extra fields to be shown on the product
page.

E.G. if you want to have the internal code, the barcode, or even a custom field
In case of a binary field, 'Technical documentation' or 'Catalog', you will
have a dowload link.

closes odoo/odoo#55872

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-08-13 13:04:44 +00:00
Katherine Zaoral c2bd442034 [IMP] l10n_latam_invoice_document: add account_debit_note as dependency
In version 13.0 we add account_debit_note as dependency to l10n_ar_edi,
but this was made because we were not able to add new depends to
l10n_latam_invoice_document module in stable version.

Now that we are in master we are able to add the dependency directly
here and remove it from l10n_ar_edi

closes odoo/odoo#55771

Related: odoo/enterprise#12361
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-08-11 21:48:33 +00:00
Thibault Delavallée 0f3216047a [FW][FIX] website_event: yet another mobile registration tuning
Some fixes for registration flow

  * in mobile, make Add to iCal / Add to Google Calendar buttons take all
    the screen width. Otherwise they have different widths, each button on
    a line, and this is quite ugly;
  * add a margin on address in mobile as it is displayed below registration
    information and not on its right;
  * display "Registered" badge in tickets section as all other Registered
    badge;

Linked to task ID-2314778
Feedback from internal testing
PR #55702
X-original-commit cf232f7317d81d44faebc20424a2a6b17c87ccae

closes odoo/odoo#55866

X-original-commit: d924ace56943405ee4c8f33916c5b5d5264675eb
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-13 11:44:24 +00:00
Thibault Delavallée 63280d971e [FW][FIX] base: add missing flex term on address marker / text
Currently the address part of the contact widget does not display well as
marker and address are on two separate lines. Indeed a d-flex is missing
along with align-items-baseline in order to render correctly.

Linked to task ID-2314778
PR #55702
X-original-commit 59801738a4c02db4d8dd230d50ec749661db5260

X-original-commit: f19725c6fb0c6df33e7bdb5361dda2bc11359021
2020-08-13 11:44:23 +00:00
root 390c01a430 [FIX] sale: allow adding/modifying values in sale confirmation
closes odoo/odoo#55861

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-08-13 10:02:04 +00:00
Laurent Smet 419d4bbee0 [IMP] account, *: Required currency on journal items
closes odoo/odoo#50711

Task: 1930680
Related: odoo/enterprise#10394
Related: odoo/upgrade#1147
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2020-08-13 11:48:06 +00:00
Yannick Tivisse a37a746b4e [IMP] hr_expense: Improve global UX (back2basics)
closes odoo/odoo#55852

Taskid: 2303951
Related: odoo/enterprise#12394
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-13 10:53:00 +00:00
Bruno Zanotti (ADHOC) a89b68e7b5 [IMP] l10n_ar: update document type names
Update the document type list names to match with the AFIP documentation

closes odoo/odoo#55863

X-original-commit: 06ca34549c33edadc871be15c7443bfc2ab9cd5b
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-08-13 10:20:48 +00:00
Pierre Collinet (pic) 5aa7839d0b [FIX] project: only internal users in "Assigned To" field of task form
Values filled in "Assigned To" m2o were differing:
- if I "CREATE" task with "group by" then m2o is filled with
internal-users + portal-users
- if I "CREATE: task without group by then it filled with internal
users only.

In Project also same case.

To have a more coherent behaviour, we decided to put only internal
users in both cases.

Task ID #2229592
Community PR #54776

closes odoo/odoo#55820

X-original-commit: 8269c1958843002246c589cdd593417dec44f024
Related: odoo/enterprise#12376
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-12 14:19:10 +00:00
Xavier Dubuc a17725e998 [FIX] mail: fix full composer opening with attachments
task-2307201

closes odoo/odoo#55678

X-original-commit: 9c47bb0b0034a3419a0c6e3267d90cb520a59535
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-13 10:23:25 +00:00
Joseph Caburnay b0107e9230 [IMP] pos_restaurant,point_of_sale: set tip after payment
1. Introduce an option in restaurant config to allow setting tips after payment.
2. Tip form is shown in bills so the customers can choose/set their tips.
3. Validated orders are kept in TipScreen (access via TicketScreen) so that at the
end of the day, the user/cashier can set the tips for each validated order.

closes odoo/odoo#55488

Task-id: 2117029
Related: odoo/upgrade#1606
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-08-12 09:17:34 +00:00
Joseph Caburnay 96f7c5eda8 [FIX] point_of_sale: confirm and error popup style
Style of some popups is broken because of the removal of absolute
positioning of the dialog footer. We now remove the absolute
popup height and let the content of the popup body dictate the
height of the popup.
2020-08-12 09:13:02 +00:00
Pedro M. Baeza 7ba8948322 [FIX] l10n_es: New general IRPF worker percentage is 15%
Based on https://www.agenciatributaria.es/AEAT.internet/Inicio/La_Agencia_Tributaria/Campanas/Retenciones/Cuadro_informativo_tipos_de_retencion_aplicables__2020_.shtml

closes odoo/odoo#55851

X-original-commit: 41ac6df5e8483111c5ec33e89c65b6c60b26b81e
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-08-13 09:16:13 +00:00
Aaron Bohy 6eb4762fee [IMP] base,web: set user tz to browser tz at first login
With this commit, the timezone (in the user's preferences) is
automatically set to the timezone of its browser the first time
this user logs in.

Task 2207715

closes odoo/odoo#55726

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2020-08-12 09:23:02 +00:00
Thibault Delavallée f8e0c92bf4 [FIX] website: add missing digest dependency
Related to digest update in 13.4 (a595ebfca5ab7041224c661f404138612257bdda).

QUERY COUNT IN BLOG

Local installation of blog still makes those tests use 27 or 28 queries. On
runbot it grows until 32.

Due to dependency change, installation order changes. It may have an effect on
query count in website loading some pages in blog. This is worth checking why
queries are added.
Digest module itself has nothing to do with website. It could either be a side
effect of some computed field, either an installation order change adding more
modules before installing blog, with side-effect of adding queries due to
another module.

As without this fix installing website is not possible, let us merge this one
and investigate further soon.

closes odoo/odoo#55835

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-13 08:26:08 +00:00
Thibault Francois 3f0597a432 [FIX] crm: prevent data loss during conversion to opportunity
PURPOSE

Avoid automatic partner finding and update on lead to erase too much data.

RATIONALE

On crm.lead, the address fields, email_from and phone, are computed field
since saas-13.3 based on the partner_id. Previously they were synchronized
with an onchange on partner_id which was never triggered during automatic
flows on the lead.

Now computed field are triggered each time the partner_id is written.

Problems

- If someone uses the mass conversion with the action "Use existing partner
  or create", the partner is found for each lead with the method
  _find_matching_partner. This method can find any partner with a name that
  contains the lead name, the lead contact_name or partner name. It can find
  wrong partner. Previously, only the partner was changed and the contact
  information remained on the lead. Now, all the information are erased with
  the wrong partner information.

- If at creation all the address information are set and the partner_id
  as well, the address field from the partner won't be synchronized.
  The lead will end up with the address information we forced.
  During the conversion to opportunity, the partner_id defined on the
  lead, will be written again. It will trigger the synchronization
  of the address field on the lead. Those info can be incomplete or wrong
  You will end up with a data loss.

SPECIFICATIONS

Tell _find_matching_partner to match partner only based on exact email address
in the case of mass convert. Avoid fuzzy matching based on name likeliness.

During opportunity conversion, don't write the partner_id if the partner is
already the one set on the lead.

LINKS

Task ID-2316828
PR #55825
X-original-commit eed0a31e1e2c428c94dae4703c9575534a49ec1d
X-original-PR #55194

closes odoo/odoo#55838

X-original-commit: e82b5a92f44709592b25fa66d9555d64abef1ec9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-13 07:43:29 +00:00
Thibault Francois 6ea7a9a975 [FIX] crm_lead: improve synchronization between lead and partner_id
PURPOSE

Distinguish synchronization of partner values on lead: address fields (all
or none), classic fields (propagate if set) and special cases (names-alike).

SPECIFICATIONS

Follow up of https://github.com/odoo/odoo/commit/f8179007f9aa662be7318edeb18426ea1c906c15

Context: many fields are now synchronized from the partner_id: address fields
as well as other contact fields. A first commit 9c9f477f04e8f4ee9b18092fe894890c2ab31b58 kept the value
from the lead if the value from the partner was empty. This lead to mixed
address fields.

A second commit fixed that behavior f8179007f9aa662be7318edeb18426ea1c906c15 by taking the value from
the partner only when it was set.

Problem: This erases too much information.

```
>>> lead.partner_name
'testtest'
>>> partner_id.name
'testtest@mailinator.com'
>>> partner_id.parent_id
res.partner()
>>> partner_id.is_company
False
>>> lead.write({'partner_id': partner_id.id})
>>> lead.partner_name
False
```

We indeed need a consistent address but for the other fields we want to keep
the maximum of data.

SOLUTION

For the address fields, take all the values from the partner if one of the
address fields is defined, otherwise keep the information defined on the lead.
For all the other fields keep the lead information if the partner information
is empty.

LINKS

Task ID-2316828
PR #55825
X-original-commit https://github.com/odoo/odoo/pull/55194/commits/f53fba6663a34e8e6b13354dde3dc225f5814de3
X-original-PR #55194

X-original-commit: b136df8530279a54c9be96beeea9bdda01643000
2020-08-13 07:43:28 +00:00
Pedro M. Baeza 0158fd90f7 [IMP] l10n_es: Add VAT non deductible percentages
Currently, there's only one tax for non deductible VAT on purchase, but although the
most common one (21% percentage), it's not the only one. There can be cases where
there's 4% or 10% VAT that is not deductible.

With this PR we add that percentages to the CoA.

Forward port to v13 of odoo/odoo#48629

closes odoo/odoo#55830

X-original-commit: 3b51ca0191f4df0f1f7543070b9e23a87286a426
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-08-12 18:50:06 +00:00
David Beguin 4477a9445a [FIX] website_event_track_session: fix mobile track title bell position
Related to testing of EventOnline
Task ID-2314778
Fwd port of PR #55625
PR #55642

closes odoo/odoo#55833

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-13 06:30:33 +00:00
David Beguin 915be3cc40 [FIX] website_event_track_online: fix agenda column size and reduce first column
Purpose is to have same width for all columns and a better display of agenda
with evenly dispatched columns.

Related to testing of EventOnline
Task ID-2314778
Fwd port of PR #55625
PR #55642
2020-08-13 06:30:33 +00:00