Commit Graph
140847 Commits
Author SHA1 Message Date
Swapnesh Shah bea1613f11 [FIX] stock,stock_account: fix undefined variable and return True
Fixes #29694
Close #47204
Fix #37554

Before this commit, There was Traceback on calling this method w/o any inventories as variable `res` was not declared but Returned or Calling this methord over RPC will raise TypeError as this method does not returns amything.

In this commit, We return True at original `post_inventory` method and Declare `res` to prevent undefined variable.

closes odoo/odoo#51320

X-original-commit: cfb2f00ae2fcbe33184d76383e3b624700101a75
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-15 09:14:06 +00:00
David Beguin 0cc6a76891 [IMP] crm: improve automated probability cron
Purpose
=======

Update Lead Probability CRON is currently running in a single transaction
and is locking lead table for too long.
This task aim to improve the performance of the cron by:
- reducing the number of update (instead of updating one by one the leads,
  update all lead with same value to update)
- Making it multi-transactional (to avoid locking table during
  the whole process)

Spec
====

- compute probability and automated probability values with only 2 decimals
  (needed to compare new and old probability + to avoid too many values
  in the group by probability)
- Group the leads to update by Probability value (rounded by 2 decimals)
  Note : This commit doesn't change the field definition to avoid migration.
- Update leads by batch of limited number (=step), to avoid transaction to take
  too long. After each batch execution, commit to unlock the table before
  continuing with next batch.

Task ID: 2224677

closes odoo/odoo#51310

X-original-commit: ee346936efc6cabce14cb73223ecd2e6a0cc1e3f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-15 08:35:35 +00:00
Jorge Pinna Puissant a63a314f20 [FIX] crm: update email alias when crm setting is modified.
-Configure alias on sales team;
-Send email, opportunity is created for sales team;
-Enable leads on CRM settings and enable leads for sales team;
-Send email to alias, lead is created for sales team;
-Disable leads in CRM settings;
-Send email to sales team alias;

Before this commit a lead is created even those these have been disabled
in CRM settings and you cannot access this menu anymore.

Now, an opportunity is created for sales team.

opw-2244379

closes odoo/odoo#50943

X-original-commit: 3e9f07e8fe2f31b66087db4b0fc274df2e6253c8
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-05-15 07:50:39 +00:00
jbw 26175ea7a1 [IMP] account : remove analytic default modules
Merge account_analytic_default into account
Merge account_analytic_default_hr_expense into hr
Merge account_analytic_default_purchase into purchase

Prevent having to manually install default modules after activating analytics

closes odoo/odoo#50816

Task: 2182900
Related: odoo/upgrade#1186
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-05-14 07:53:18 +00:00
Yannick Tivisse 152097d099 [IMP] hr*: Use correct default employee_id based on company
Followup of https://github.com/odoo/odoo/pull/50982/commits

Courtesy of https://github.com/sswapnesh

In a multi-company environment `self.env['hr.employee'].search([('user_id', '=', self.env.uid)], limit=1)` could be wrong while `employee_id`represents correct employee based on company.

https://github.com/odoo/odoo/blob/fb17af76d791488c69eb3829376940b32998d374/addons/hr/models/res_users.py#L13

Making behavior Similar to https://github.com/odoo/odoo/blob/fb17af76d791488c69eb3829376940b32998d374/addons/hr_expense/models/hr_expense.py#L663

closes odoo/odoo#51246

Taskid: 2254687
X-original-commit: d7d1557e7a0f613335a9ca5ca1355d246093f9d1
Related: odoo/enterprise#10599
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-15 07:06:59 +00:00
Julien Castiaux b6537c4335 [REV] base: restore removed deprecated osv and exceptions
To ensure backward compatibility, stuff removed by ab4000fb3 have
been restored.

closes odoo/odoo#49603

Task: 2234749
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-05-14 14:00:41 +00:00
Stéphane Debauche 55cb0de1db [IMP] tools: remove unnecessary lxml Cleaner override
Purpose
=======

Currently a custom override of Cleaner.allow_element()
exists in tools to allow object tags for SVG images.
This was due to the first prototype of website builder
and its first implementation of image and svg management.

This is not necessary anymore as using the tag is sufficient.
We can safely clean code in the cleaner, allowing to speedup
its performances. As it is used in most html fields and email
parsing each unnecessary code removed is time gainged.

Task 2215228

closes odoo/odoo#51294

X-original-commit: 4a0b09fd3b0d3b63f2df00f002e4d6825cac4eef
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-05-14 18:51:22 +00:00
fja-odoo c54824dfee [IMP] website_forum: hide negative karma posts
Currently posts are hidden at the post level only (by giving a 404).
The posts are still visible in the list of posts on the main forum page.

Now we hide the posts of users with negative amount of karma.

task-2093636

closes odoo/odoo#46194

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-02-25 09:05:02 +00:00
Goffin Simon 969ea2a0d3 [FIX] account: Wrong base amount with included tax
Fine tuning of the test of https://github.com/odoo/odoo/commit/d9eaae8acc600f936fbc4fa48a49a7f4d65fcd7f

As the journal was not explicitely set, a default journal with a company different that the one set up from
function setUpClass() defined in class InvoiceTestCommon

So a traceback was sometimes raised in the test saying:

Some records are incompatible with the company of the Journal Item.\n\nIncompatibilities:\nFields: account_id\nRecord ids: 1809, 1810, 1811

opw:2244708

closes odoo/odoo#51285

X-original-commit: dd40fb63b4ebdd4dd7b44c75d415e99b52d633a1
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-05-14 16:39:08 +00:00
Lavish Chhatwani 35308b674c [IMP] crm: display currency after Expected Revenue in lead list view
This commit displays the currency of the `Expected Revenue` field of
lead in the list view.

Known drawback : the sum is not correct if multiple currencies are involved.

Task-ID 2238661
Closes #49954

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-14 13:17:48 +00:00
Julien Castiaux d6d0e8d6d2 [FIX] models.py: remove leftover import crm like compatibility
Historically, it was possible to import addons via a naked import. It is
no more possible since 9e1f13bac, since that commit, the only possible
way to import odoo addons is via the `import odoo.addons' prefix.

closes odoo/odoo#46995

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-05-14 14:40:02 +00:00
jvm-odoo 975deb21da Revert "[FIX] sale_product_configurator: fix mobile product template search"
This reverts commit eda451f99fe050bace503d422ebb1a3842c046e7.

closes odoo/odoo#51270

X-original-commit: d7e7eb65aa9f45f78e636360bfaa7277204ba0ff
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-05-14 13:41:09 +00:00
jvm-odoo 9b16e2db8a [FIX] sale_product_configurator: make it works on mobile
With this code, we can do an XML customization on
customers database if they want to have the product
configurator.

Note that this is not the entire feature, just
a "workaround" waiting for a real feature.

OPW-2214095

X-original-commit: ad467a6c1e1e1905ca43912047de4897f3a8fc8c
2020-05-14 13:41:09 +00:00
Victor Feyens 88f3d9c076 [FIX] project: company creation
* Wrong environment for project & task creation
On company creation, a leave project and task are created, but with the
wrong environment, potentially leading to inconsistent values in a
multi-company environment.

* Company creation in batch
Also fix the create override decorator to specify the create override
supports batch creation of companies.

closes odoo/odoo#51264

X-original-commit: e6bd644851819692eeddadaa50950efd0f83f6d9
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-05-14 13:27:08 +00:00
Dharmraj Jhala ad6ea605ab [IMP] crm, event, website_crm_partner_assign: remove useless copy attributes
Editable stored fields are copy by default if their base field
allow it (char, integer, ...). Purpose of this commit is to remove
unnecessary copy=True statements added when using stored editable
fields.

PR #49464
Task 2225253

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-14 13:14:45 +00:00
Martin Trigaux b334dfcbd2 [IMP] web: force a master password on insecure dbs
When creating a new database, a random master password for it is
generated and strongly suggested to be used.

The motivation for this change is to have, by default, a secure master
password set for any Odoo deployment.
Often, users do not realise that, when making an Odoo installation
accessible on internet, anyone else can also access it.

Use autocomplete="new-password" for updating the master password and
play nice with password managers
When generating a new password, use autocomplete="new-password" as
well to prevent autofill of password potentially saved in password
manager.

Make the eye click to toogle on click instead of need to maintain.

closes odoo/odoo#45117

Task-id: 2091260
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-05-14 13:45:40 +00:00
Odoo's Mergebot f6ed407712 [MERGE] base: remove read access to ir.ui.view
Only system and designer users can access `ir.ui.view` records.
An employee, portal or public user should not be able to read a view arch, while
ok in standard (all views are in the code anyway), one may want to integrate
confidential business logic in some views.
All operations on views must be done in `sudo` or use helpers like
`fields_view_get` or `_render`.

This PR is part of the long-term task id 8203 that plans to remove all access to
`ir.*` models

**Changes of ACL**:
- remove read for all on `ir.ui.view`
- remove read for all on `website.page` (uses `_inherits`)
- add read on `ir.ui.view` for website publisher (cf `read_template`)
(maintain all for system and designer)

**Changes of method**:
- `fields_view_get` uses `sudo`. Can only be called only if we have the read
  access on the linked model.
- `render*` becomes private `_render*` and uses `sudo`. Shouldn't be able to
  arbitraly render any template. A QWeb template is not linked to a model so
  can't apply the same ACL check as in `fields_view_get`.
- `read_templates` remains public but without `sudo`. It is called by the method
  `load` method (now private too) or by the web_editor module

**Changes of behaviour**
- the `groups_id` parameter may be used on a view to relax the access and allow
  a specific group to access its content (e.g. frontend assets for employees)

closes odoo/odoo#44993

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-05-14 16:21:54 +02:00
Victor Feyens 51bc8ef124 [IMP] doc: Image field documentation
It was considered important to precise that image fields without 
limitations weren't checked
at all and could therefore contain non image content (and precise some 
other things on Image fields).

Forward-port of #51200

closes odoo/odoo#51259

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-05-14 13:19:58 +00:00
Martin Trigaux 64d0dab0a6 [FIX] *: add group_ids where it is needed
Following the previous commit adding access via groups_id
These views are rendered publicly by specific user
2020-05-14 13:59:10 +02:00
Martin Trigaux 8eb575a1cf [IMP] base: allow using groups_id on ir.ui.view
Allow groups_id on top level view as a way to relax the access of some
views

There was some scenarios where ir.ui.view were still needed to be
accessible.
For instance the website.snippet is needed to display the website
editor sidebar to designers. The website.compiled_assets_wysiwyg is
needed to display the app switcher on the website to employees.

This should cover most of the cases where a view still must be
accessible and no specific controller is available.
2020-05-14 13:59:10 +02:00
Martin Trigaux d879300944 [REM] website: remove lazy template call
Was making a render_template on an arbitrary template
Does not seem to be used anymore
2020-05-14 13:59:10 +02:00
Martin Trigaux d9287caf94 [IMP] *: convert to private methods
render, render_template, load, activity_schedule_with_view,
get_website_pages should all be private:
It should not be possible to render an aribtrary template only with
its name or id

Still need to render some qweb views from js so the method
render_template is kept public.
This explains why the website editor still need read access on
ir.ui.view as we want to allow any snippet to be rendered.
2020-05-14 13:59:10 +02:00
Martin Trigaux 56a8c9e431 [FIX] *: add sudo when accessing views
The method fields_view_get should be the only way to retrieve the view
content. This method is executed in a super-user context.

To avoid retrieving views for a model a user does not have access to
(as it may reveal some informations like name of fields), add a
verification of 'read' rights before retrieving the view content.

Execute _postprocess_access_rights with sudo(False) as this method is
used to evaluate which buttons should be displayed.
Remove the su flag to avoid misleading the user and displaying a
button they won't be able to use.

Retrieving the database id from an view key is not considered as a
sensitive information and get_view_id and viewref can be left as a
public methods.

Add missing sudo when needed

Change _handle_visibility in website to avoid increasing the query
count: Checking the visibility (to fail most of the time) to retry in
sudo was making unecessary queries.
2020-05-14 13:59:10 +02:00
Martin Trigaux ccc98e0169 [IMP] base: remove read access to ir.ui.view
Only system users should be able to access directly ir.ui.view records
Other users should use helper methods like fields_view_get or render
to interact with view records (or use sudo)

Give read access to views to publisher
He needs to call read_template on some views like
'web_editor.colorpicker' in edition mode

Restrict ACL on website.page
Apply the same ACL than on ir.ui.view as the model inherits from it.
Give access to designer to modify views
2020-05-14 13:59:10 +02:00
jerome hanke (jhk) ac9fb3b120 [FIX] base: prevent selecting unsupported "action types" in scheduled actions
Currently, scheduled Actions only work if you choose "Python Code" as
the action type ("Action To Do"). Other action types are not really
supported as they work "record-wise" (using active_ids) which makes no
sense for scheduled actions.

We should help users avoid surprises by hiding the "Action To Do" field
on scheduled actions, and default to "Python Code" implicitly.

Example steps to reproduce :

- go to scheduled actions > create a new action
- select "Execute several actions" as action to do
- add several actions to execute
- run this action

=> the sub-actions were not executed

opw-2227082

closes odoo/odoo#51242

X-original-commit: b19c7c54efceb780806d876efc65a8813e3491d1
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-05-14 10:04:17 +00:00
Raphael Collet 8d99fd9448 [FIX] core: selection override with str or callable
If the original field is defined with a selection list, overrides with
method or methods names fall back on the list.

closes odoo/odoo#51232

X-original-commit: 272ba8d2238d1d1b87f47b114b55e6eed25314a8
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-05-14 08:41:44 +00:00
Anh Thao Pham (pta) dbd87ec464 [FIX] base: fix import of studio customizations
- Activate Studio from dashboard of database A
- Export studio customizations
- Activate Studio from dashboard of database B
- Import studio customizations previously exported
The imported data don't have the boolean studio field set to True.

Since v12, when loading a module, a query is executed to create or update XML ids.
The create and write methods are not called anymore.
Therefore the overridden create and write methods of "ir.model.data" defined in Studio module
are not called and thus cannot set the studio field to True.

The generation of the query creating XML ids has been moved to a private method
allowing another module like Studio to override it.

opw-2245578

closes odoo/odoo#51203

X-original-commit: 198ab837e466f3155ea1c3b35811b981b1c1e537
Related: odoo/enterprise#10586
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-13 16:36:59 +00:00
jvm-odoo 27c3244116 [FIX] web: fix kanban tags overflow
Issue

	- Install Contacts
	- Add a tag on a contact like:
	  "LongTagName_Forcepaymentcomplement"
	  and give it a color
	- Go back to kanban view
	- Resize your window

	With some sizes, the tag gets out of
	the kanban box

Cause

	The tag is moved under the color ball
	when it is too long with some resolution

	But there is others resolutions where
	the tag is too long even if it is moved
	to the next line

Solution

	Add word-break: all which will force the
	tags to break if it is too long.

OPW-2251780

closes odoo/odoo#51243

X-original-commit: 2ac6a8f289fd498794a4e5407eace0e0cd18df4c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-05-14 10:06:38 +00:00
Goffin Simon 2b8e405d75 [FIX] account: Wrong base amount with included tax
Steps to reproduce the bug:

Let's consider a company C with french accounting
Create a new journal entry JE with one line L with debit = 100 and credit = 0
and account = 601100 Achats stockés - Matières premières ou groupe A)
Set TVA déductible (achat) 20,0% TTC on JE (where this tax is included
in price but not included in base amount)
Bug:

A new line is created on account 445660 TVA déductible sur autre bien et service with a debit = 16,67 instead of 20.0 and credit 0

Now with this fix, we consider that the amount encoded by the user is the base on which each taxes must be computed (instead of
magically subtracting included tax from the base)

opw:2244708

closes odoo/odoo#51219

X-original-commit: c9ce26534d2f8fa69068bfdbeb9994eb12d4124e
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-05-14 06:48:25 +00:00
Anh Thao Pham (pta) 5184eedc0e [FIX] mail: fix cancelling of email failures
- Configure your outgoing email server to be sure that a failure will be triggered
  when trying to send an email
- Make sure you don't have enough sms credit to send a sms
- Go to a contact page
- Send a message to the contact via the chatter
- An notification error should appear in the conversations icon in the systray
- Send a sms to the contact
- An notification error should appear in the conversations icon in the systray
- Click on the "Mark as read" icon on the notification error for the email
- A "Discard mail delivery failures" wizard will appear
- Click on "DISCARD DELIVERY FAILURES"
All email and sms delivery failures are discarded.
Only the email delivery failures should be discarded.

opw-2247617

closes odoo/odoo#51204

X-original-commit: d8c177969239a9bd6dcbd6654a914d40a6ba479f
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-05-13 16:44:13 +00:00
Josse Colpaert 4664c35b22 [ADD] l10n_dz: add Algerian localization
Added common Chart of Accounts, standard taxes,
fiscal positions etc.

Originates from a module of Osis.  We were unable
to contact them for further information.

closes odoo/odoo#51199

Task: 1918677
X-original-commit: 0d8ad9221baebe909aae387498297d403f9ecc0b
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-05-13 16:01:36 +00:00
Victor Feyens d2652e971a [IMP] doc: add information on the new populate feature.
* Cmdline interface: how to trigger database population
* Testing: how to implement database population on a given model.
  * autodocumentation of the population methods

+ improve population methods docstrings.

closes odoo/odoo#50596

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-05-13 15:47:04 +00:00
Victor Feyens 55e7b6bbcd [FIX] doc: fix some sphinx warnings
* crashing patch for howto "Build a module"
* javascript_reference: "Bullet list ends without a blank line; unexpected unindent."
2020-05-13 15:10:37 +00:00
Antoine Prieels 312a6d5b03 [FIX] hw_drivers: typo in ExceptionLogger
Exceptions were not logged correctly due to a typo in ExceptionLogger.

closes odoo/odoo#51191

X-original-commit: 9ac2ad249bddc631de9a9d587058d6109918f584
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-05-13 15:12:41 +00:00
Vishnu Thuletiya 9a830432db [IMP] various: Use the new avatar widget in kanban view
The purpose of task is to update the 'user/employee avatar' to the new
widget in all the kanban view across all modules.
The below new widget are introduced for avatar:
 - many2one_avatar_user (for user_id fields)
 - many2one_avatar_employee (for employee_id fields)
which displays the avatar (i.e. picture) of a user/employee in front
of his name and clicking on the avatar will open a chatbox to message
that specific user/employee.

So in this commit, For each kanban view with a user or employee avatar,
replaced it by the field with the new 'many2one_avatar' widget.

TaskID: 2244928
Related Enterprise PR: https://github.com/odoo/enterprise/pull/10420

closes odoo/odoo#50789

Closes: #50789
Related: odoo/enterprise#10420
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-13 12:37:48 +00:00
Nicolas Martinelli 25cb4c18e5 [FIX] purchase_stock: receipt with return
- Create a PO, order 5 items
- Validate Receipt with 5 items
- Return 1 item to Vendor
- Update Order Quantity on PO, from 5 to 8

A picking of 3 units is created.

If the same workflow is used in Sales, a picking of 4 units would be
created, which is the expected behavior.

We adapt the logic of Sales [1] to Purchase.

[1] https://github.com/odoo/odoo/commit/8a3284685856b6980e3b620abdbbb3e2c79f57c4

opw-2233826

closes odoo/odoo#51174

X-original-commit: 74e8b9ab2311ed2c1c9cea53d09e3b352db3dbe6
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-05-13 13:19:10 +00:00
Aurélien Warnon 63b0d01fa8 [FIX] crm_iap_lead_website: fix typos in the crm.reveal.rule lead computation
Oversight of efafadc3ee

This commit fixes typos that raise an error when a crm.reveal.rule is created.

Task 2250137

closes odoo/odoo#51173

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-13 13:08:16 +00:00
Arnaud Joset c2dd034a72 [FIX] sale: fix traceback when clicking on Sales analysis
Before this commit, a traceback occured when user clicked in the Sales Analysis in the sales team  dashboard

closes odoo/odoo#51170

Taskid: 2246368
X-original-commit: fb5e9cb68c922706e356c78680ddfc4876bbbf85
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-13 12:59:32 +00:00
Victor Feyens 0a4b989536 [FIX] base: default check_company domain.
The supported case of check_company on `res_company` model fields was
not considered when specifying a default domain on `check_company=True`
fields.

closes odoo/odoo#48674

Nb: It is already correctly supported in the `_check_company()` method.
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-05-13 12:21:13 +00:00
Christophe Simonis 8ad7e7cb91 [FIX] core: read model from field in field_compute
Oversight of "simple refactoring" in 634775bff6d9eba9d4548cc801071a942895a719

closes odoo/odoo#51158

X-original-commit: 046b0dedda8f43e4ae13958a34a446e8a73c8d3f
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-05-13 11:19:44 +00:00
jvm-odoo fbfe9109e2 [FIX] survey: fix email sent multiples time
Issue

	- Install Survey & Contacts
	- Have 2 contacts with the same email address
          (e.g. test@example.com)
	- Create a survey, send it only to that
          email address

	Email sent 2 times

Cause

	When looking for partners linked
	to that email address, we do not
	provide any limit so the system
	send the email to all partners
	found.

Solution

	If I set one email address,
	I expect one email to be sent.

	So, the solution would be to
	apply a limit of 1 when login
	is not required.

OPW-2247693

closes odoo/odoo#51155

X-original-commit: 55b1cc3108d6b672f10ece26db7e13a65ff655d3
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-05-13 10:47:13 +00:00
Dhruv Patel a75bd4d353 [FIX] partner_autocomplete: auto suggestion box cut on small device
Partner autocomplete suggestion popup cropped from the top in small devices.
once you type anything in M2O box, autocomplete popup will display with all
maximum possibilities consist of the database records and records got from
global search partner API.

Currently, we have limit of database record search is 7 and autocomplete
display maximum 16 items databse records + API generated records.
So with this commit, we have reduced the API record display limit for small
devices, based on height it will display number of items in autocomplete box,
this will reduce chance of cropped issue.

Task:2206844

closes odoo/odoo#51151

X-original-commit: ded375786557ae6c7680409faa32cbe3a4e30e99
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-05-13 09:59:36 +00:00
Hardik PrajapatiandMohammed Shekha d58edef12a [FIX] web: resize lists in form: both lists extended
Have two x2many lists in a group in a form view. Increase the
width of a column in the first table. Before this commit, the
second table was also expanded.

task-2189968

closes odoo/odoo#47652

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2020-05-13 08:08:57 +00:00
Andrea Grazioso (agr-odoo) 747aca10c1 [FIX] website_sale: wrong pricelist assign with geoip
1. Install eCommerce
2. Enable Pricelist settings
3. Choose a product P and enable it in the ecommerce view
4. Create 2 pricelists, for P with:
    - PL1: One with "Benelux" as country group with a price of X
    - PL2: One with a price of Y
5. Assign PL2 to the portal user (Joel Wilis) through "Website > Customer"
6. Connect as the portal user
7. Go into the ecommerce page of the product P

The pricelist PL1 is used instead of PL2, this occur because
geoIp localisation take priority over customer assigned pricelists.
Fixing filter by allowing pricelist with no country defined to be used

opw-2242152

closes odoo/odoo#51115

X-original-commit: aab3c03b2bdab97796e678d3f876ff64d5ecc4d9
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-05-12 15:43:31 +00:00
Laurent Smet b5f4251d26 [FIX] account: Fix access to properties from invoice with wrong company
The properties must always be accessed using the company of the journal entry defined by
its journal.

closes odoo/odoo#51094

Task: 2244829
X-original-commit: bf416d95b1216c5780d3dbeaa32f0e57dc50c574
Related: odoo/enterprise#10543
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-05-13 06:27:18 +00:00
Rémi Rahir 7287800101 [IMP] sms: Add new failure status for unregistered accounts
Since January 2020, users are required to validate their IAP account via
SMS code validation. This new behaviour needed to be properly ported to
the client to correctly inform the user.

This commit adds support of a new failure_type: 'Unregistered Account'.

Task #2209567

closes odoo/odoo#48512

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-12 16:39:40 +00:00
Rémi Rahir 667394d65f [FIX] snailmail: Update country names map
Some country names were not properly handled by the provider.

closes odoo/odoo#51134

X-original-commit: 285d5d65c3c04a12db399000566c8658306622f9
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2020-05-12 18:14:06 +00:00
Okan SUMER (osu) db5517554d [FIX] website_forum: typo in label for mobile menu
This commit fix a filter label

closes odoo/odoo#51119

X-original-commit: 67cc94f5be98d81c91f65bd6eda97610d0ac3e60
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-05-12 16:25:06 +00:00
Nicolas Lempereur c92eed7532 [FIX] website_sale: product.image no broke id>999
Introduced in 7daa85dd, in kanban view .value on a number is formatted
and raw_value is the raw value, so if we had an product.image with ID
like 1000 we could have an query argument `id=1,000` which would result
in server error.

opw-2229427
closes #51105

closes odoo/odoo#51133

X-original-commit: 84294948a4cc248e8c4e26f8ea93e2ff67435bb1
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-05-12 17:58:08 +00:00
Anh Thao Pham (pta) 4c35489d47 [FIX] purchase_product_matrix,sale_product_matrix: fix order lines at save
- Go to Sales > Configuration > Settings
- Activate "Variant Grid Entry"
- Go to Products and edit a product with variants (lets call it "Product A")
- For "Sales Variant Selection" in "Variants tab", choose "Order Grid Entry"
- Go to Sales > Orders > Quotations and create a quotation
    * Add any product except "Product A"
    * Add another product except "Product A" and the previous one
    * Switch the 2 added products with the sequence arrow widget.
      It allows to be sure that the 2 added products have 2 different sequences.
    * Add "Product A" with 1 attribute
- Here there are 3 products in the quotation with "Product A" at the third position
- Save the quotation
After the save the position of "Product A" is not the same anymore.

The bug comes from the fact that when using the matrix configurator, no sequence is provided
and the product is added with the default sequence of the SO line which is 10.

The issue is fixed by checking the sequence of the previous SO line if there is one.

[All of the above steps and explanations can also be applied to Purchase]

opw-2221991

closes odoo/odoo#51112

X-original-commit: 1a2d7e3fa0f33d90c74d3fd5a5ef486b56d8f512
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-12 15:04:12 +00:00