Commit Graph
127612 Commits
Author SHA1 Message Date
Robot Odoo df1fea4de1 [FIX] web_unsplash: new guidelines negociated with Unsplash
Unsplash CEO asked us to stop exposing our key client side (even if it was
only in the browser network and previously allowed by their API team leader).

Also, all our Odoo instances (on premise or not) should share the same
production key, which is not possible in our case obviously.

After multiple exchange, it has been negociated that:
1. Our non saas user won't be able to apply for a production key and should
   prefix they Unsplash application name by 'Odoo:'. Their key will remain in
   test mode.
   Indeed, Unsplash won't be able to review every Odoo application and ensure
   it respects the API terms and it is a real application.
2. Our saas user will query Unsplash server side so the key remain hidden.
3. The documentation should explain it all

task-1911345

closes odoo/odoo#28804
2018-11-23 17:04:50 +01:00
Robot Odoo cd2637cfdf [MERGE] Avoid some unnecessary ormcache invalidations
Avoid invalidating ormcache when possible.
There are currently too many invalidations, which makes the ormcache less effective in practice.

closes odoo/odoo#28993
2018-11-23 16:04:32 +01:00
Romain Derie 55073e3baa [FIX] web_unsplash: add unsplash searched terms in attachement name/url
Before this commit:
An unsplash image would be saved as an attachement with:
  - A name like 'x54ze78z.JPEG'
  - An url like '/unsplash/x54ze78z.JPEG'
  - A filename like 'x54ze78z.JPGED'
We would not store the searched terms in the name/url.
Then, we would not be able to search on local attachement in the media dialog
to retrieve the images based on what we searched.

Now:
We store the searched terms in the name/url so it can be used later in the
media dialog search:
  - Name like 'big_lion.jpg' (duplicates may be possible)
  - Url like '/unsplash/x54ze78z/big_lion.jpg'
  - Filename like 'unsplash_x54ze78z_big_lion.jpg'

Task-1911345
2018-11-23 14:58:48 +00:00
Romain Derie 8b1a05d9e0 [FIX] web_unsplash: don't expose client_id in network
Unsplash CEO asked us to stop exposing our key client side (even if it was
only in the browser network and previously allowed by their API team leader).

After multiple exchange, it has been negociated that:
1. Our non saas user won't be able to apply for a production key and should
   prefix they Unsplash application name by 'Odoo:'. Their key will remain in
   test mode.
   Indeed, Unsplash won't be able to review every Odoo application and ensure
   it respects the API terms and it is a real application.
2. Our saas user will query Unsplash with a dedicated enterprise key
3. The documentation should explain it all

Task-1911345
2018-11-23 14:51:07 +00:00
Raphael Collet c96d4cdbad [FIX] base: ormcache invalidation in ir.config.parameter
Writing on a parameter invalidates the ormcache and propagates the invalidation
to other workers.  Setting a parameter to its current value should not trigger
ormcache invalidations.
2018-11-23 14:02:17 +00:00
qsm-odoo 9049892152 [FIX] website: add some more BS3 compatibility
Completes https://github.com/odoo/odoo/pull/27981

- Correct `col-*-offset-*` support.

- Compatibility for BS3-deprecated `visible-*` classes (only not taking
  care of table/table-row/table-cell cases as difficult with sass and
  those classes were already BS3 deprecated anyway).

- Correct order for BS3 `visible-*-*` and `hidden-*` classes (otherwise
  their combination are not correctly working). Also, the 'inline'
  version was forgotten by previous PR.

- Compatibility for BS3 `btn-xs` class.

closes odoo/odoo#28842
2018-11-22 14:09:22 +00:00
RomainLibert 1111de6eb2 [FIX] hr_holidays: use display_name instead of name
In order to see the remaining days in the tree view we need to use
display_name instead of name, as display name will use the name_get
which is overriden to add this information.

closes odoo/odoo#28981
2018-11-23 10:52:42 +00:00
Yenthe V.G 5fd5c4095b [IMP] hr_recruitment: improve English in demo data
closes odoo/odoo#28970
2018-11-22 16:59:58 +00:00
Raphael Collet e181f592f3 [FIX] odoo: ormcache invalidation on loading registry
Do not propagate cache invalidations to other workers when simply loading the
registry.  Only do it when installing/upgrading/uninstalling modules.
2018-11-22 11:05:30 +00:00
Raphael Collet ad065093eb [FIX] models: ormcache invalidation on import
Do not propagate cache invalidations to other workers when changes must be
discarded, because of an import error or a dry run, which are both handled as
successful transactions.
2018-11-22 11:03:51 +00:00
len-odoo fff6c93830 [FIX] board: fix the domain of consecutive 'add to dashboard' operations
Add a search containing a domain to dashboard. Remove that domain.
Do a new search with a different domain.
Add that search to dashboard;
the domain sent would be the concatenation of the two domains.

We make it so that only the last domain is sent, with a test.

opw 1907650

closes odoo/odoo#28843
2018-11-20 13:44:56 +00:00
Christophe Simonis 0ef5cedebb [MERGE] forward port branch saas-14 up to 637e4c68fc 2018-10-08 17:29:03 +02:00
Christophe Simonis 637e4c68fc [MERGE] forward port branch 10.0 up to e88c5c1ece 2018-10-08 17:28:08 +02:00
Martin Trigaux 3e178daa30 [I18N] l10n_multilang: export source terms
closes odoo/odoo#27544
2018-10-08 14:34:21 +00:00
len-odoo e88c5c1ece [FIX] mail: sudo on user name
Suppose user A creates a sale order S in company X. He then changes to company Y
Sales manager B, in company X, creates the invoice for sale order S.
Bug: the compilation of the report fails because of the user.name in the
template. Then the tracking update fails, making it impossible to validate the
invoice.

opw 1884915
2018-10-08 15:59:30 +02: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
Nicolas Martinelli a4e46846d7 [FIX] point_of_sale: float comparison
- Create the following pricelist for product A:
  4 Units: 2.88
  3 Units: 3.45
  2 Units: 4.85
  1 Units: 7.50
- In the POS, click several time on A to add in the cart

The 2 first units are merged in a single line, but from the third one a
new line is created.

This is because of the float reproesentation of 4.85, which becomes
4.8500000000000005.

opw-1887586

closes odoo/odoo#27539
2018-10-08 13:16:51 +00:00
Christophe Simonis 1b5f14713b [MERGE] forward port branch saas-15 up to 0ef5cedebb 2018-10-08 18:59:03 +02:00
Christophe Simonis 0efe62d63d [MERGE] forward port branch 10.0 up to 085d504561 2018-10-08 14:51:52 +02:00
Nicolas Martinelli c36dedb095 [FIX] account: prevent incorrect fiscal year end date
We prevent setting a fiscal year end date which doesn't exist.

opw-1890518

closes odoo/odoo#27534
2018-10-08 12:32:05 +00:00
William Henrotin 53bc3d90d8 [FIX] mrp: remove multiness in non multi method
The method button_start begins by an ensure_one() but loop on self too. 
This commit removes to loop for cleaner code.

Task : 1850640

closes odoo/odoo#27532
2018-10-08 12:01:49 +00:00
Duc Dao 085d504561 [FIX] base: use correct field for Vietnamese
There is no name field but a state_name one
Closes #27512
2018-10-08 12:13:32 +02:00
Yannick Tivisse c972b62b3c [IMP] fleet: Load fleet vehicles as data instead of demo data
Purpose
=======

In the fleet module, Models & Brand are in demo data. It should be loaded as regular data.

closes odoo/odoo#27524
2018-10-08 09:55:20 +00:00
Laurent Smet 847ad7a44d [IMP] account: rename write-off to counterpart in reconciliation model
'Write-off' is a wrongly used term in the reconciliation model.

A write-off occurs when a client owes money to you but is unable to pay.

closes odoo/odoo#27518
2018-10-08 09:20:56 +00:00
Julien (juc) Castiaux fbd4eba87d [FIX] mail: groupby was using a wrong create_id field
Grouping mail activities by "Created by" was grouping on the
"create_uid" field which is always the admin user. New groupby
groups using the "create_user_id" field which is the real id
of the creator.

opw-1886369

closes odoo/odoo#27718
2018-10-12 10:58:54 +00:00
Aurélien Warnon f25ead03c6 [FIX] (website_)sale: fix product_attribute_custom_value access right
Targets commit d3530eb07e

Purpose
=======
Users within the "sales_team.group_sale_salesman" group should be able to
access/add/edit/delete custom attribute values.

closes odoo/odoo#27654

closes odoo/odoo#27679
2018-10-11 11:19:51 +00:00
Rémi Rahir cf9d962dc9 [IMP] iap: split charge to ease developer's work
Imp/refactoring of the charge function to make tools available for asynchronous services.

closes odoo/odoo#27686
2018-10-11 14:43:15 +00:00
Christophe Monniez 4f28121065 [FIX] web: increase clickEveryWhere test timeout again
Two minutes increase was obviously not enough.

closes odoo/odoo#27709
2018-10-12 08:34:37 +00:00
Romain Derie 47406d6e5d [FIX] website_hr(_recruitment): make website specific
As commit 066cfc9598 did for other website_module, this commit make theses
2 modules multi-website compatible.

Mostly by:
  - Adding website_id in form/list views
  - Preventing routes from being accessed by wrong website (only needed for
    admin as portal users will get a 403)
  - Adapt search([]) with multi website domain
  - Add domain in model converter in routes for URL autocomplete (eg menu URL)
    Note that it is not needed for sitemap.xml

closes odoo/odoo#27528
2018-10-11 17:08:20 +00:00
Aaron Bohy 76cc621c1d [FIX] web: grouped list view: group header layout
This rev. ensures that the group name is vertically centered inside
the group header row. Padding rules have been moved from enterprise
to community.

Task 1878254

closes odoo/odoo#27603
2018-10-11 19:03:57 +00:00
Jeremy Kersten c4e0e5461c [FIX] web: guess resize placeholder
Before this commit, if you ask for a small image, you was waiting a picture of
64x64 but in case this image was not found, a placeholder with an other size
was returned.

Now, we try to guess the asked size, and return a resized placeholder.

This bug appear since we change the default placeholder picture with a big one

This will fix several issue and avoid to hard code size everywhere in the code

Eg: commit 92f837c and commit https://github.com/odoo/odoo/commit/154fc7d9dd550d35b7266af024e54c20e18938fc#diff-9af1af2039d16d6b544d481b4ee1ed7cR144

closes odoo/odoo#27695
2018-10-11 17:21:53 +00:00
qsm-odoo c7f72248a9 [FIX] web: clear all BS4 alerts
Commit https://github.com/odoo/odoo/commit/8caf84f70ada259f041b424d37686845604d182a
was not handling the case where there was an invisible DOM element
between the button box and the alert component. Let us clear all alerts.

This commit also introduces a way to properly fix/extend bootstrap in
future fixes/updates (some of our rules may already be moved in that
file once it is forward-ported to master).

closes odoo/odoo#27662
2018-10-11 16:31:24 +00:00
Manuel Vázquez Acosta c77f7fc5cd [FIX] models: Allow rich comparison with third party objects.
Instead of returning False directly when comparing a non-model, return
NotImplemented that will trigger the __eq__ test from the other side.

This allows third party objects (for instance a serialization/deserialization
scheme) that cannot be a Model to be considered equal is some scenarios.

closes odoo/odoo#19977
2018-10-11 16:59:49 +00:00
Antoine Prieels (ANP) a5b3246dcd [FIX] Convert the estimated price for snailmail server-side
Currency rates were not updated client-side so we moved to make the convertion happen server-side, where rates are updated daily

closes odoo/odoo#27688
2018-10-11 14:48:25 +00:00
XavierDo 356a421660 [FIX] mail: avoid sending mail when creating record from data
Before this fix the creation of task assigned to admin was leading
to the creation of mails.

This is a generic fix to avoid to notifiy a user when he is add as a
follower when creating data from odoo data files.

closes odoo/odoo#27682
2018-10-11 15:30:33 +00:00
Martin Trigaux 57884ccdc8 [I18N] all: convert remaining model: translation entries
It should be model_terms:

Fixes odoo/docker#219

closes odoo/odoo#27664
2018-10-11 09:49:01 +00:00
Romain Derie 11c950ef23 [FIX] web_editor: bs4 '.is-invalid' not applied in technical modal
Adding bs4 `.is-invalid` class is supposed to add red borders on the
`form-control` element.

But the mixin `o-w-preserve-forms` prevents that style to be applied as it adds
`border: 1px solid $o-we-color-text-light;` on `.form-control`.
As the mixin selector has more strength (specificity), the bs4 is simply not
applied.

This is the case for `form-control` inside `o_technical_modal`.

closes odoo/odoo#27691
2018-10-11 14:25:34 +00:00
Nicolas Martinelli ee67457ad1 [FIX] point_of_sale: throw error if incorrect configuration
- Install a new DB without demo data, with only the `point_of_sale`
  module
- Do not configure the accounting
- Open the POS, sell a product

At payment, an error is thrown at `this.cashregister.journal_id[1]`
because `this.cashregister` is `undefined`.

We throw a proper error instead.

opw-1891901

closes odoo/odoo#27683
2018-10-11 13:04:32 +00:00
Nicolas Lempereur 92bfbfd4f7 [FIX] web: improve style header background layout
As per fpodoo specification:

- decrease max width of logo (from max 33% of header width, to max 22%)
- decrease font-size of tagline by 30%

So logo is smaller, and company address has less probability to get
pushed lower (since sum of contents are larger than width).

Sizing the header works as follow:

If the header is equal to wkhtmltopdf page width or bigger, it is zoomed
out until it fits. So with current configuration:

- 100% of width is 900px,
- company tagline is at maximum 33% (300/900),
- company logo is at maximum 20% (200/900),
- remaining (company address) is remaining space of 44% (400/900)

closes #27641
2018-10-11 14:18:13 +00:00
Yenthe V.GandDaniel Yang, zyyang 9ffe661d1a [FIX] mrp: use id for warehouse creation
Expected type is an id, not a record

Fixes odoo/odoo#27556
Closes odoo/odoo#27596

Co-authored-by: Daniel Yang, zyyang
2018-10-11 14:58:51 +00:00
Goffin Simon 9a6f245540 [FIX] sale: All sales orders from a customer
Steps to reproduce the bug:

- Create separate contacts and sales orders.
- Go to contact
- Click the smart button for sales.

Bug:

All the sales orders in the system were displayed instead of displaying
only the sale orders of the contact.

opw:1891796

closes odoo/odoo#27675
2018-10-11 11:21:39 +00:00
qdp-odoo 91b7c8a6aa [FIX] account_bank_statement_import: fix crash when there's no import format available
When you run the setup wizard to add a bank from the setup bar, it will write 'file_import' on the field 'bank_statements_source'. But in the module 'account_bank_statement_import', the possible values of the field 'bank_statements_source' was updated with 'file_import' ONLY if additionnal account_bank_statement_import_xxx modules are installed.

So, prior this fix, if you only had the module 'account_bank_statement_import' and no additionnal bank statement import modules, you were getting a traceback.

Fixes #27423

closes odoo/odoo#27672
2018-10-11 10:26:23 +00:00
Nicolas Martinelli ea091e4c40 [FIX] account_facturx: incorrect Python statement
`str('a', 'b')` just doesn't work and returns:
`TypeError: decoding str is not supported`

opw-1891767

closes odoo/odoo#27669
2018-10-11 09:50:41 +00:00
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