Commit Graph
121347 Commits
Author SHA1 Message Date
Rémi Rahir cb8bd299fc [FIX] snailmail: avoid next activity spamming
closes odoo/odoo#27665
2018-10-11 11:11:42 +00:00
Carlos Fonseca 8c5d98d9a9 [CLA] signature for cpintofonseca
closes odoo/odoo#27660
2018-10-11 12:27:50 +00:00
Julien (juc) Castiaux e451a3e955 [FIX] web_tour: adjust ACLs to allow tour disabling
Run odoo-bin using "--without-demo=all"
Install any module (I used CRM)
On the main page, a droplet should appear under the newly installed module
As admin, using the debug mode, click on the "Disable tour" button
The action is restricted due to the missing ACL

opw-1890350

closes odoo/odoo#27655
2018-10-11 12:12:18 +00:00
Robot Odoo 42334f5b31 [FIX] web, web_settings_dashboard: several fixes
### [FIX] web_settings_dashboard: load a translation

Before this commit, there was an issue when trying to load
a translation from the 'Settings' application.

        - Go to 'Settings'
        - Click on 'Load a translation'
        > It redirects to 1st app (community) or (enterprise)

This is not a big issue in enterprise, because the modal is
that let the user load a translation is still prompted.
This is however not the case in the community version.

This issue is caused by 'Load a translation' being a `<a>` with
`href='#'`. The purpose of the `href='#'` is to have the pointer
cursor on mouse hover. However, when clicking a `<a>` with `href`,
the browser changes the URL in the address bar with the content of
the `href`, which for the value `'#'` is linked to the top of the
main page. In community, this redirects to the 1st installed app
(usually 'Apps' or 'Discuss'), whereas in enterprise it redirects
to the home menu.

This commit fixes this issue by preventing the default browser
behaviour when clicking on "Load a translation", so that it does
not change the URL in the address bar.

### [FIX] web_settings_dashboard: set up your company

Before this commit, it was not possible to set up a company.
This is caused by the clickable DOM element being a `<a>` with
`href='#'`. This redirects to the 1st app in community (usually
the 'Discuss' app), which prevents opening the form view to
set up information about your company.

This commit fixes the issue by preventing the browser to change
the URL in the address bar when clicking on 'Set up'.

### [FIX] web_settings_dashboard: browse apps

Before this commit, it was not possible to access
apps from 'Browse apps' in the Settings menu when
at least one app was installed.

This is caused by the clickable DOM element being a `<a>`
with `href='#'`. This redirects to the 1st app, usually
the 'Discuss' app, which prevents opening the kanban view
with apps.

This commit fixes the issue by preventing the browser to
change the URL in the address bar when clicking on
'Browse apps' from the 'Settings' application.

### [FIX] web: `self.menu.change_menu_section` is not a function

Revision on https://github.com/odoo/odoo/commit/19eacf7d23c9413de4430a3422b5ed74b37ef242

The commit above changed the menu in community, so that it
looks like enterprise. To do so, it copies the menu management
from the enterprise repository to the community repository.

Some code about the home menu has been removed, since it is replaced
with the app menu in community. However, some functions have been
removed by accident, such as `change_menu_section`.

Closes #27436

closes odoo/odoo#27442
2018-10-11 15:12:48 +02:00
Alexandre Kühn b7cf456560 [FIX] web: self.menu.change_menu_section is not a function
Revision on https://github.com/odoo/odoo/commit/19eacf7d23c9413de4430a3422b5ed74b37ef242

The commit above changed the menu in community, so that it
looks like enterprise. To do so, it copies the menu management
from the enterprise repository to the community repository.

Some code about the home menu has been removed, since it is replaced
with the app menu in community. However, some functions have been
removed by accident, such as `change_menu_section`.

Closes #27436
2018-10-10 15:39:25 +00:00
Alexandre Kühn 4f3e051891 [FIX] web_settings_dashboard: browse apps
Before this commit, it was not possible to access
apps from 'Browse apps' in the Settings menu when
at least one app was installed.

This is caused by the clickable DOM element being a `<a>`
with `href='#'`. This redirects to the 1st app, usually
the 'Discuss' app, which prevents opening the kanban view
with apps.

This commit fixes the issue by preventing the browser to
change the URL in the address bar when clicking on
'Browse apps' from the 'Settings' application.

Closes #27434
Closes #27442
2018-10-10 15:39:25 +00:00
Alexandre Kühn 1f7e98dd9b [FIX] web_settings_dashboard: set up your company
Before this commit, it was not possible to set up a company.
This is caused by the clickable DOM element being a `<a>` with
`href='#'`. This redirects to the 1st app in community (usually
the 'Discuss' app), which prevents opening the form view to
set up information about your company.

This commit fixes the issue by preventing the browser to change
the URL in the address bar when clicking on 'Set up'.

Closes #27434
Closes #27442
2018-10-10 15:29:31 +00:00
Alexandre Kühn a943d8a712 [FIX] web_settings_dashboard: load a translation
Before this commit, there was an issue when trying to load
a translation from the 'Settings' application.

	- Go to 'Settings'
	- Click on 'Load a translation'
	> It redirects to 1st app (community) or home menu (enterprise)

This is not a big issue in enterprise, because the modal is
that let the user load a translation is still prompted.
This is however not the case in the community version.

This issue is caused by 'Load a translation' being a `<a>` with
`href='#'`. The purpose of the `href='#'` is to have the pointer
cursor on mouse hover. However, when clicking a `<a>` with `href`,
the browser changes the URL in the address bar with the content of
the `href`, which for the value `'#'` is linked to the top of the
main page. In community, this redirects to the 1st installed app
(usually 'Apps' or 'Discuss'), whereas in enterprise it redirects
to the home menu.

This commit fixes this issue by preventing the default browser
behaviour when clicking on "Load a translation", so that it does
not change the URL in the address bar.

Closes #27434
Closes #27442
2018-10-10 15:29:31 +00:00
Yenthe V.G 5822d3cbdb [FIX] account: set enterprise widget on setting
Both modules account_budget and account_asset are in enterprise since 2870af948

closes odoo/odoo#27606
2018-10-10 14:32:40 +00:00
Martin Trigaux e098bcacfb [FIX] google_calendar: correct use of datetime object
Remove useless .split calls now that we have datetime objects
Avoid manipulating strings

Fixes odoo/odoo#27453

closes odoo/odoo#27521
2018-10-08 09:44:18 +00:00
qsm-odoo 1f9bf60260 [FIX] web_editor, website: review grays
What was designed as a new feature appeared as a regression: users were
not able to choose a bootstrap gray as a background color anymore but
instead got the possibiility to choose a hardcoded gray. This commit
restores the use of the custom gray palette that themes can customize
and which automatically uses the correct text color when used as a
background. This also allows to remove ugly inline style from snippet
definitions and allows to solve bugs like the described below one:

---------------------------------------
Also add bg-* classes on snippet cards:
---------------------------------------

Snippet cards are often put (or may be put by the user) in an element
which have a bg-* class on it. This means that the card will still have
a white background (as chosen by BS4 by default) but the text color will
be adapted to that ancestor bg-* classed element.

This commit forces the card background color (as suggested by BS4) with
bg-* classes.

closes odoo/odoo#27637
2018-10-10 15:09:24 +00:00
ThanhDodeurOdoo 1dbb555aab [FIX] document: JS feature disabled
Reason: This feature currently has unfixed bugs, does an unnecessary RPC and
was functionally replaced by a button inside the chatter in commit
7f97c9f and the menu inside the debug manager in commit d12b88315.

This commit disables the JS part of the document module to prepare
for the complete removal of the whole module and the MOV of
the indexation to base.

Closes #27613
2018-10-10 18:28:13 +00:00
Martin Trigaux 51d9589e02 [FIX] base: print report without template
In case a report has no template defined, the fallback is on the first
body_parent that matched the xpath '//main'
xpath method returns a list

Fixes #27406

closes odoo/odoo#27630
2018-10-10 13:59:02 +00:00
Martin Trigaux 0aa0cec97a [FIX] web: do not warn on empty field
If no value is specified on the datefield, do not set a warnfuture message

Remove code comment that was referring the condition present at b51b0d66c2
but no longer present.

Add tests

Fixes #27551

closes odoo/odoo#27593
2018-10-10 13:59:36 +00:00
Nicolas Lempereur 5c6edfc8d3 [FIX] base: res_config_settings allow deferred field
If a deferred field, for example with auth_user_policy installed:

  <field name="f" password="True" widget="password_meter"/>

is inside the res_config_settings view, the rendering will be deferred
which is not taken into account when initializing the content
(_initModules) or attaching to DOM (after start).

Thus we would would get an error and have no access to settings.

The issue that happened in 12.0 was solved with 23bec7fb7 and refactored
in between in 5bbbd25ed, but the heart of the issue was not solved in
the case of a customization.

With this commit, we do not lose the deferred when it is necessary to
keep them in the case of deferred while rendering.

Without fix, the added test fails with a traceback and message:

 TypeError: Cannot read property 'settingView' of undefined

opw-1890343
closes #27589
2018-10-10 15:02:10 +00:00
Aurélien Warnon c9041e8dcf [FIX] (website_)sale: hide single attribute value in p. configurator
Targets commit d3530eb07e
References task id 1892022

Purpose
=======
- When there is only one attribute value for an attribute configured in a product's variants,
  it should be hidden in the product configurator.
  e.g: The only value selected for the "Material" attribute is the "Wood" value for the "Customizable Desk".
  The radio selection is hidden and "Material: Wood" is displayed in the product's description.

- Fixed a class name typo

closes odoo/odoo#27604
2018-10-10 06:24:25 +00:00
Jeremy Kersten 36cadc374b [FIX] website_sale: add scss to make checkout responsive
removed by error by product configurator

closes odoo/odoo#27635
2018-10-10 14:33:18 +00:00
Jeremy Kersten 8f96d75466 [FIX] website_sale: fix 'I have a coupon code' alignment
closes odoo/odoo#27633
2018-10-10 14:06:14 +00:00
qsm-odoo 3daab8ac16 [FIX] web_editor, *: allow cropping all theme images
* base, website

An image URL may be like "/web/image/<xml_id>" where <xml_id> is the
xml id of an ir.attachment. In fact, the route does not use the xml_id
but the 'key' field, which is normally equal to the xml_id for standard
attachment. In the context of themes + multi-website, the value used as
an xml_id may refer to a theme.ir.attachment instead of an ir.attachment
and this led to a bug as those must not be used the same way.

The crop route which gets image information is adapted by this commit to
always look for the *current website* *ir.attachment* related to the
given xml_id/key.

Thanks to @kig-odoo for spotting the issue.
Closes https://github.com/odoo/odoo/pull/27588

closes odoo/odoo#27611
2018-10-10 09:47:45 +00:00
Martin Trigaux 5ccba6c54a [IMP] doc: add guidelines about extandability
If the code is well written from the start, won't get so many hook requests

closes odoo/odoo#27570
2018-10-09 15:24:24 +00:00
Jeremy Kersten 32cfa621cf [FIX] website_sale: re-add indentation for sub categories
Delete by product configurator by error.

A sub category in shop need a left margin to make difference with his parent.

closes odoo/odoo#27629
2018-10-10 13:24:45 +00:00
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