Commit Graph
121326 Commits
Author SHA1 Message Date
William Henrotin 70091972b2 [FIX] stock: correct wizard test
Accessing one2many items by their index seems to produce issue regarding the order. This commit fix the potential issue in the test by summing the two quant quantity instead of comparing them one by one.

closes odoo/odoo#27627
2018-10-10 08:27:28 +00:00
Aurélien Warnon c76734655e [FIX] (website_)sale: handle archived variants - product configurator
Targets commit d3530eb07e

Purpose
=======
- When a product variant is archived by the user, it should not be selectable in
  the product configurator for both webshop and sale order
- Fixed a typo in the name_get method of ProductTemplateAttributeValue

closes odoo/odoo#27385
2018-10-10 13:36:54 +00:00
Swapnesh Shah a3a49141c9 [FIX] sale: access the content of one record
self is a recordset while we iterate on it above
Produces an expected singleton error when printing multiple quotation

closes odoo/odoo#27492
2018-10-10 12:11:46 +00:00
Xavier Morel 1126485373 [FIX] doc: warnings when installing openacademy
* add _description to openacademy models
* add aria-label to kanban view
* many patches need to be rewritten to unfuzz them

closes odoo/odoo#27617
2018-10-10 11:04:37 +00:00
Christophe Monniez 8d9e276a9f [FIX] web: increase clickEveryWhere test timeout
Actually, in normal conditions, the test last a little bit less than 30
min as Admin user in enterprise edition.
This is to close of the timeout and as expected, the timeout was
reached.

With this commit, the Admin test in increased of 2 minutes.
The Demo test duration is slightly faster and does not need an increase.

closes odoo/odoo#27608
2018-10-10 08:03:08 +00:00
Aaron Bohy 60f143c8e7 [FIX] board: handle actions with no view_mode
The view_mode attribute is automatically set to the 'action' nodes
when the action is added to the dashboard using the 'Add to
dashboard' button in the searchview. However, other dashboard views
can be written by hand (see openacademy tutorial), and in this
case, we don't want to hardcode action's params (like context or
domain), as the dashboard can directly retrieve them from the
action. Same applies for the view_type, as the first view of the
action can be used, by default.

Before this rev., the second usecase wasn't handled, and it crashed
when no view_mode was specified. This rev. also ensure that the
context and domain are correctly retrieved from the action.

Closes #24088

closes odoo/odoo#27519
2018-10-08 09:21:39 +00:00
mreficent cfaf1f5ac5 [IMP] doc: fields names shouldn't overwrite python methods
The documentation should be an example of good practices

closes odoo/odoo#27262
2018-10-10 06:58:01 +00:00
Laurent Smet a543063d07 [IMP] account_facturx: search product also using the barcode
closes odoo/odoo#27533
2018-10-08 12:22:27 +00:00
Christophe Monniez 5a04c82fff [FIX] packaging: bump Odoo version to 12 in MS Windows installer
Fixes #27420

closes odoo/odoo#27590
2018-10-09 15:21:02 +00:00
Alexandre Kühn 5bbbd25edf [FIX] auth_password_policy: Cannot read property 'decorations' of undefined
Revision on https://github.com/odoo/odoo/commit/a47f6093f80cefa51c5a1bc1301db01007f97761

The commit above introduced a visual 'password strength' next to
the password wizard in Settings > Users, when the module
`auth_password_policy` is installed.

However, there was an traceback when trying to access the 'General
Settings' when some specific apps and modules were installed.

This issue comes from the small design issue with the new
PasswordField: it was designed as a field object that was
instantiated and returned in the `init` function of an InputField
with the password attribute set. This is not a solid design,
because the documentation of the `init` function does not
specify that it should return the newly instantiated object.

As a result, the implementation was very fragile and only worked
on FieldChar but not FieldText.

This commit fixes the issue by turning the FieldPassword a field
widget. As a result, the enabling of the password meter next to
a password input has changed:

Before this commit:

```
<field name="new_passwd" password="True" options="{'password_meter': True}"/>
```

With this commit:

```
<field name="new_passwd" password="True" widget="password_meter"/>
```

Closes #27440

closes odoo/odoo#27586
2018-10-09 14:26:21 +00:00
XavierDo 70e604a8fa [FIX] core: correctly read test_tags in config file
The test_tags is stored as None by default in the config file,
but 'None' is interpreted as a string when read.

This is a dirty fix in order to avoid to launch tests when using
a config file, we should do something cleaner in master and refactor
part of this code (substitute 'None' in the load method as it is
done for boolean)

closes #27498

closes odoo/odoo#27564
2018-10-09 09:19:30 +00:00
Martin Trigaux 9f209dd77e [FIX] project: do not crash when no result
If the selected project has no task (e.g. new project), still make a search.
The previous code was making a KeyError on the filterby as the read_group
returned no result.
Introduced at d5bc0e57cd

As a portal, a user may have access to some projects (when set explicitly as
the customer on the project configuration).
Make this with a first search and add the other tasks also with the read_group
in case the user has access to some tasks but not the project.

Fixes #27457

closes odoo/odoo#27581
2018-10-09 14:14:31 +00:00
Adrian Torres a277bfb44a [REM] packaging: drop PyYAML dependency
Commit cf853a785b removed all yml tests
and the yml import engine from Odoo forever, however PyYAML remains a
dependency even though it's not used anymore.

This commit removes any reference to this lib that could be found.

closes odoo/odoo#27563
2018-10-09 12:56:03 +00:00
jem-odoo 026064c3c9 [FIX] sale_timesheet: include milestone in profitability report
The project overview is based on the profitability report to get the
amount invoiced and to invoice for service sold on a sale order
linked to a project. This request is wrong as it does not take the
milestone sale line into account. This commit fixes it.

opw-1890106

closes odoo/odoo#27538
2018-10-08 12:58:16 +00:00
mreficent dddd4072de [FIX] v12 urls
Was still pointing to old links

closes odoo/odoo#27443
2018-10-09 13:44:38 +00:00
Nicolas Lempereur f3bd4e425f [FIX] models.py: modified field with uppercase
In 7f29b31cf the modifed has been improved but there was a typo if a
column contained an uppercase letter (which happen easily with random
field name in Odoo Studio).

opw-1890248
closes #27546
2018-10-09 13:14:47 +00:00
celm1990 b83ed53325 [FIX] portal: generate access token on restricted records
Allow to generate an access token even on records where the portal user does not
have the write access.
e.g. a customer can access its invoices but is not allowed to modify it

Fixes odoo/odoo#27454

closes odoo/odoo#27455
2018-10-09 12:42:40 +00:00
qsm-odoo 8caf84f70a [FIX] web: clear form button box before an alert
On the user form view, just after the button box, there might be an
alert component. Since BS4, this alert goes over the floating button
box in community. Before BS4, the button box went over the alert (so it
was functional but still ugly).

This commit adds an extra style for community only: clear the button
box before an alert component.

Closes https://github.com/odoo/odoo/issues/27435

closes odoo/odoo#27566
2018-10-09 09:08:48 +00:00
Aurélien Warnon 6048355fee [IMP] (website_)sale: improve product configurator layout
Targets commit d3530eb07e

Purpose
=======
- Improved the layout of the product configurator window in both sale order and web shop
- Added some other minor improvements such as editable="bottom" instead of "top", fields reordering, ...

closes odoo/odoo#27567
2018-10-09 08:30:31 +00:00
Goffin Simon 6c0c1259bc [FIX] purchase_requisition: System pick wrong operation type in Purchase Agreement
When creating a "purchase.requisition" record, the default Operation Type was
always the one defined in the company 1 even if the user was not in the company 1.

opw:1890190

closes odoo/odoo#27520
2018-10-08 09:22:34 +00:00
Nicolas Martinelli ebe43bad9e [FIX] l10n_lu: remove deprecated reports
The `account.financial.report` model has been removed, so these reports
are now deprecated. They will be added back in Enterprise.

opw-1891341

closes odoo/odoo#27559
2018-10-09 07:01:29 +00:00
Martin Trigaux 3e178daa30 [I18N] l10n_multilang: export source terms
closes odoo/odoo#27544
2018-10-08 14:34:21 +00:00
Nicolas Martinelli 94a4b695e9 [FIX] account: remove useless file
The file is not imported by the manifest following the removal of the
reports.

opw-1891341

closes odoo/odoo#27542
2018-10-08 13:55:31 +00:00
Laurent Smet 2d242b1ed9 [FIX] account: fix $.when(defs) in reconciliation widget
Introduced by: https://github.com/odoo/odoo/commit/b0a29c9bad4fb9180ddcdae80529e244c6b61d49

Suppose def1, def2, def3, three deferred.
$.when(def1, def2, def3) is ok
$.when([def1, def2, def3]) is not ok
$.when.apply($, [def1, def2, def3]) is ok

closes odoo/odoo#27513
2018-10-08 09:06:24 +00:00
Swapnesh Shah d4d820f0bb [FIX] pos_sale: convert string -> datetime.date
fixes #27467

closes odoo/odoo#27468
2018-10-08 11:38:45 +00:00
Swapnesh Shah 87a9780270 [FIX] mrp: print bomstructure report with float quantity
Usecase to reproduce (chrome):
- Create a BoM with float quantity in component
- Print the BoM cost and structure report

When using a type="number" on firefox it is not possible to use a
decimal. However on chrome there is no restriction and a decimal
could be use. It makes senses to be able to work with decimal
(e.g. the UoM is in kg)

It also exists an explicit cast to integer since data are received as
string from the javascript. However since quantity displayed could be
decimal, the cast should be adapted to float.

Closes #27464
Fixes #27437

closes odoo/odoo#27522
2018-10-08 09:33:04 +00:00
Olivier Dony f4041de4ed [FIX] website: use proper env in model methods
Using `request.env` should be reserved for code that lies outside of
model methods (typically: controllers). Model methods have to use the
appropriate `self.env`.

This particular case caused frequent Python-PostgreSQL undetected
deadlocks during installations of website-related modules in 12.0.
One way to reproduce it was to trigger the installation of both
`website` and `website_form` in a single transaction, with neither
pre-installed.

Installing Apps that depend on both would do the job, such as
`website_sale`, provided that GEOIP is available on the system.

In details:
During installation of `website`, new attachments creation would call
get_current_website (see 602807acdf and
4f6ec1cd2a), using the wrong database
cursor: the one from the request instead of the one for the
installation, as provided by `ir.module.module._button_immediate_function`.
This would acquire database locks on `res.country` and `ir.model` in
the wrong transaction, later blocking alterations to `ir.model` in
the installation transaction, e.g. for website_form's
'website_form_access' column.

This combination of events was possible before 12.0, but more difficult
to reproduce as module installations used to happen with a super-user
account, ignoring ACL checks and therefore not locking `ir.model`.
2018-10-08 19:29:24 +02:00
Jairo Llopis a362d0eb9f [FIX] tests: Make at_install and post_install backwards compatible
Fixes #27471 by just using `tagged()` behind the scenes.

calls to `tagged` were done in the wrong order

closes odoo/odoo#27531
2018-10-08 12:16:08 +00:00
Gustavo Valverde 1c0e419a2d [FIX] purchase_stock: buy_route xml_id
When creating a warehouse with purchase app installed, it will
traceback since the route_warehouse0_buy is referenced in a wrong
module.

closes odoo/odoo#27523
2018-10-08 07:52:57 +00:00
Jeremy Kersten c39d559ebb [FIX] website: auto enable multi website when creating a second website
Before this commit, you need to check manually multi website.
And demo data create 2 websites by default, but don't check it.
2018-10-08 15:51:29 +02:00
Jeremy Kersten 7549ea0371 [FIX] website: use email as login for public user
Multiwebsite cannot work on the saas since the login use a constraint to check that it is an email.
2018-10-08 15:29:12 +02:00
len-odoo a034a17d37 [FIX] survey: fix date picker template and validation
The date picker widget was set to text instead of date.
Then we needed to fix the date validation at form submit.

opw 1890130

closes odoo/odoo#27448
2018-10-05 11:28:50 +00:00
len-odoo a9ce28bfb1 [FIX] mail, mass_mailing: remove implicit dependency on mass_mailing
Fix to commit: a1d6064dcc
Which erroneously put a mass_mailing method in mail,
as mail.mail.statistics is defined in mass_mailing.
Since it does not depend on the records, it been extracted from the
loop.

opw 1890461

closes odoo/odoo#27431
2018-10-05 08:47:49 +00:00
Nicolas Martinelli 360212f206 [FIX] web: remove reference to Enterprise version
closes odoo/odoo#27505
2018-10-08 07:27:40 +00:00
Nicolas Martinelli 38ee891bf6 [FIX] web: appropriate color theme
Do not mix Community and Enterprise color themes. Moreover, increase the
contrast of the control panel for better readability.

closes odoo/odoo#27502
2018-10-08 06:20:55 +00:00
Robot Odoo 41bd82244b temp rebasing PR 27473 (e749d70fd9) 2018-10-08 10:45:06 +02:00
Martin Trigaux 961d68f1c5 [I18N] export 12.0 source terms
Including demo data

closes odoo/odoo#27504
2018-10-08 07:13:33 +00:00
Odoo Translation Bot b6c8919444 [I18N] Update translation terms from Transifex 2018-10-07 02:27:57 +02:00
Swapnesh Shah e749d70fd9 [FIX] Correct Icon for Button 2018-10-06 21:39:53 +05:30
Robot Odoo 9a0e63d9ac [FIX] account,website_crm_partner_assign: fixes
Several fixes

closes odoo/odoo#27430
2018-10-05 12:16:13 +02:00
Martin Trigaux 1b2913fcc0 [FIX] website_crm_partner_assign: set correct model name
Fixes odoo/odoo#27321
2018-10-05 11:38:03 +02:00
Martin Trigaux 35151b62b3 [FIX] account: use datetime object
Unlike the name suggested, today is expected to be a datetime, not a date object

Fixes odoo/odoo#27445
2018-10-05 11:16:28 +02:00
Nicolas Lempereur 23bec7fb7f [FIX] auth_password_policy: remove deferred when not needed
When auth_password_policy is installed, and a field with
`password="True"` is in a res.config.settings (eg. google calendar is
installed) we could have an error caused by deferred not expected in the
res.config.settings _render.

Since the RPC is only needed when the password_policy has been been
defined, this commit do this removing the error that currently happened.

A customization of res.config.settings adding password_meter would still
break settings (but it is currently not done) and will be solved in a
future fix.
closes #27426
2018-10-04 10:38:53 +00:00
Christophe Simonis 1868713dbd [REL] 12.0 2018-10-03 19:56:18 +02:00
Christophe Simonis e6c27216be [MERGE] forward port branch saas-11.4 up to 1d90e93543 2018-10-03 18:52:09 +02:00
ThanhDodeurOdoo 8ea5637c1d [FIX] base: ir_http access mode
Before the fix, routes using binary_content with access_mode
and access_token didn't work properly since access_token
was compared to the object's access token in all cases.

This commit:

 -prevents the object's access_token check if
access_mode is truthy (since access_mode does its own access_token
check).

 -changes check_access_mode so it now returns a boolean instead of
 a record and is now private.

Closes #27401
2018-10-03 18:10:07 +02:00
Christophe Simonis 1d90e93543 [MERGE] forward port branch saas-11.3 up to c43f35ee9d 2018-10-03 17:56:58 +02:00
Pedro M. Baeza 1ad4d42f0b [ADD] *: replace hardcoded data URIs with helper
- Add a method for generating an image data URI, and expose it in QWeb context

- Fix reports, website templates or mail templates with data hardcoded
  data URIs, to use the helper (Python cases), or the existing
  kanban_image helper (for JS cases)

This will gracefully handle SVG support in addition to classical image
formats.

Closes #26635
2018-10-03 17:48:14 +02:00
Pedro M. Baeza 1be50fdeaf [ADD] *: support SVG images
Introduce official support for SVG files in the framework, including the
following parts:

1. When client-side SVG images are uploaded, the content is displayed until
you save using data URI scheme according RFC 2397 [1]. This scheme requires
to specify content format. Using hardcoded "image/png" works for all images
types except SVG.
Type-sniffing is done using "magic byte" detection via the first base64
encode byte, so that the proper data URI scheme can be used.
This should not cause SVG-related security problems as the file is
displayed through `<img>` tag, which does not allow SVG scripting [2].

2. Make /web/image controller compatible with SVG

3. Add support for SVG files for company logo, which uses a dedicated
controller.

4. Resizing of SVG files is a no-op, as it makes little sense for a
vector-based format. We also want to avoid micro-alterations to the SVG
document (in "natural" viewport parameters) as we would store multiple
copies of the files in the filestore.

5. Because SVG files are inherently dangerous, upload of SVG files is
restricted to administrators, either by blocking it directly before
saving it in the database (binary fields with attachment=False), or by
neutering them to text/plain mimetype (for binary fields with
attachment=True)

6. Add tests for the SVG upload cases and for the non-admin uploads.

[1] https://tools.ietf.org/html/rfc2397
[2] https://www.w3.org/wiki/SVG_Security

Closes #26635
2018-10-03 17:48:01 +02:00
Christophe Simonis c43f35ee9d [MERGE] forward port branch 11.0 up to 45922f397f 2018-10-03 17:12:38 +02:00