Commit Graph
131060 Commits
Author SHA1 Message Date
Julien Mougenot da2b247146 [FIX] web: m2o updates its value after reload
Changes the behaviour of many2ones when their value is changed via a form dialog.

Before this commit, when editing a m2o with a form dialog opened by an external button,
the field triggered an onchange with its old value before reloading its widget.
This caused the edition in list views to display outdated information when
saving multiple records.

Now, the reload is executed first, then the onchange occurs so that the value is
the newly updated one.

Part of task 2078807

closes odoo/odoo#37576

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-10-07 11:22:04 +00:00
Gert Pellin 0f412d56d6 [FIX] point_of_sale: restore table style"
The global table style was changed with the purpose of affecting only one table
in commit 7c31e0d2e7.

This fix moves the changes to the style of the table in question and
restores the global style.

This reverts commit 7c31e0d2e7.

solves #37992

closes odoo/odoo#38036

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-10-07 08:14:21 +00:00
fw-bot 4c10ff6683 [FIX] crm: avoid copying stage_id and probability when duplicating a lead
When Lead is duplicated, `stage_id` should not be copied for obvious reason.
Indeed it should go through the pipeline again, with probably and stage_id
being freshly computed again.

closes odoo/odoo#37927

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-07 10:28:04 +00:00
Martin Trigaux 42417956c0 [I18N] *: export 13.0 source terms
closes odoo/odoo#38028

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-07 07:55:34 +00:00
Martin Trigaux 94ae15315d [I18N] account_cancel: remove remaining translations
The module was not removed from .tx/config file so still fetching translations
2019-10-07 07:55:34 +00:00
Swapnesh Shah 0e98e657c9 [FIX] sale: Remove depricated view_mode from action
Fixes https://github.com/odoo/odoo/issues/38016
calendar, graph, pivot views don't exists for "account.move"

closes odoo/odoo#38022

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-10-06 17:24:26 +00:00
mreficent cb4d5fbb01 [FIX] base: fix display of creation info in form view
Currently when creating an attachment in backend, history section holds
a "Creation: on" void line that is populated after create with "creation:
administator on 2019..." . This is quite ugly and not usability oriented.

Let us hide the history line while create information are not set, aka
before first save of record.

closes odoo/odoo#37940

X-original-commit: 9ef4cb3ada349b34ba8a5daa5ca9f9765bc43437
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-03 17:58:01 +00:00
wan 51c58782db [FIX] account: do not validate when pressing enter on edit amount
In the reconciliation widget, pressing enter validates the line
focussed. This should not happen when editing an input, like it was the
case for the partial amount input.

closes odoo/odoo#38037

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-10-07 08:16:03 +00:00
fw-bot ee8147996d [FIX] project_timesheet_holidays: holiday name shouldn't be exposed
closes odoo/odoo#37976

X-original-commit: 2a7fa7e58f5ac504b260f3caed9113936991b54f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-04 11:29:22 +00:00
Swapnesh Shah 147e61a3bc [FIX] lunch: Add required argument location_id
This commit fixes Tracbacki coming when the user removes a location on New order.
It is because of location_id was not passed on Route.

closes odoo/odoo#38023

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-10-06 17:50:38 +00:00
Alexis de Lattre a05f4b7589 [FIX] barcodes: no update on nomenclature
Some barcodes nomenclatures and rules are added in the modules that use
the barcode module. We should set them in no update to avoid loosing
modifications when the module is updated.

closes odoo/odoo#37985

X-original-commit: c4251c1c55d010e52b956817c2d4a588ee9379a9
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-10-04 13:31:42 +00:00
Thomas Binsfeld c6480a23a6 [FIX] point_of_sale: access rights on POS for product deletion
When we are trying to delete a product, a check is made to be sure that
no POS session is running. This check is not made as sudo, leading to
raise an access right error when you are trying to delete a product
without having access rights on the pos session object.

So we just call the search_read in sudo.

closes odoo/odoo#37977

X-original-commit: edb591cc1eae65660f88e676315276bba8b70ee8
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-10-04 11:39:55 +00:00
Odoo Translation Bot b6e7ed6c7b [I18N] Update translation terms from Transifex 2019-10-07 09:11:11 +02:00
lejeune quentin 5ee7fabcd7 [IMP] point_of_sale: Change build version for IoT Box
We change the build version of IoT Box to 13.0

closes odoo/odoo#38019

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-10-06 10:02:47 +00:00
Florent de LabarreandAdrian Torres b1d5ddd18b [FIX] doc: add more information about company-dependent fields
closes odoo/odoo#37986

X-original-commit: 1b8acd57f019d4e34eac72d34a8c6ff62731d836
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
Co-authored-by: Adrian Torres <adt@odoo.com>
2019-10-04 13:40:05 +00:00
Luis González 1e75b46c25 [FIX] base: access button apply with keyboard
The button to apply a custom group (Group By -> Add Custom Group ->
Apply) was unreachable when using the keyboard.
Remove the unnecessary attribute `tabindex="-1"` probably added for no
apparent reason.

closes odoo/odoo#37982

X-original-commit: 373c69bca366180601b760f05f219a4698e3c014
Signed-off-by: Luis González [Vauxoo] <luisg123v@users.noreply.github.com>
2019-10-04 12:40:31 +00:00
Laurent Smet a0605ee442 [FIX] account: Fix sorted key on report journal
closes odoo/odoo#37941

X-original-commit: d8462c13d4aa296c4d2ddcc4e74420e7f39ba895
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-03 18:36:58 +00:00
mreficent 72333b2e09 [IMP] stock: add hook to get virtual location
Some companies may have several locations with usage == 'inventory' and they would like to choose each time which adjustment location to use.

closes odoo/odoo#37022

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-03 15:35:47 +00:00
baskhuu a96872defe [FIX] base: change mongolian language configuration
Change decimal point, thousand separator and date format for Mongolian
language

closes odoo/odoo#37934

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-04 07:42:05 +00:00
GabbasovDinar efcf137867 [IMP] binding of context (this) to an object
closes odoo/odoo#37893

X-original-commit: fb3522b54903b19aa42cb3fe23e1a029b4ccfc14
Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-10-03 13:53:22 +00:00
Naglis Jonaitis 24563df00b [FIX] base: XML-RPC controller methods
`method` has no effect, so currently XML-RPC can be called via other
methods, e.g. GET, which is against XML-RPC specification.

closes odoo/odoo#37917

X-original-commit: c2fe13d31f6b55900ad139d4e75b8c1a0c4ac165
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-10-03 16:13:14 +00:00
Jairo Llopis fd0de2261e [IMP] website: Remove hardcoded domains from website menus
A common software development pattern is to have the same data replicated across different environments, such as production and staging. This happens i.e. in Odoo.sh.

Let's assume your production instance is in ``https://www.example.com`` and your staging one is in ``https://staging.example.com``. Then:

1. A user in production modifies a website menu and makes it link to ``https://www.example.com/my-cool-page``.
1. A new change lands in staging, with a fresh copy of the production database.
1. The user goes to ``https://staging.example.com`` and navigates through the menus to validate the changes.
1. While navigating, he clicks in the website menu that links to ``https://www.example.com/my-cool-page``.
1. He makes some changes. **He didn't realize he was modifying production**.

To avoid this kind of problems, if a user pastes a link that starts with the current domain, it gets removed.

closes odoo/odoo#35715

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-03 12:27:55 +00:00
fw-bot c47b1f7dd2 [FIX] website_slides: Add fetch timeout
This makes you actually able to install the module with demo data and unplugged from network. Otherwise, it's impossible.

closes odoo/odoo#37903

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-03 15:09:59 +00:00
mreficent 41c434cd5d [FIX] v13 urls
Was still pointing to old links

closes odoo/odoo#37859

Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2019-10-03 12:48:09 +00:00
Naglis Jonaitis 6404fc80b2 [IMP] point_of_sale, sale: remove digits attribute from monetary fields
Follow-up of #35336

closes odoo/odoo#36047

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-03 14:51:01 +00:00
Pierre Masereel 47b42e7f28 [FIX] point_of_sale: load pos without tax
It was impossible to load the POS when no tax were existing because the
promise is resolved in the each loop instead of after. So we've moved it
after the loop which is its correct place.

closes odoo/odoo#37898

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-10-03 14:20:17 +00:00
RomainLibert 4cc4c9dac4 [IMP] hr_holidays: report_note should be readable only by Leave manager
closes #30825
closes #30884

closes odoo/odoo#37857

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-10-03 08:37:43 +00:00
Ravi Gohil e5ff5040dd [FIX] l10n_ch: fixed typo in method name
closes odoo/odoo#37876

Task: 2079636
X-original-commit: 794e1b91d16cf51a5f6e6bfd237a907c3203a3bd
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-10-03 11:17:58 +00:00
mreficent 6bc944f589 [IMP] mail: make use of is_mail_thread and allow filtering on it
Purpose of this commit is to use is_mail_thread field in a constraint
instead of manually checking classes. Field is also made visible on
model search and group to ease its use.

closes odoo/odoo#37867

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-03 10:13:03 +00:00
Raphael Collet dc55294953 [FIX] models: consider all inactive records in modified()
closes odoo/odoo#37863

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-10-03 09:44:48 +00:00
Florent de Labarre 7e6e9df12f [IMP] doc: add missing attributes
Add documentation about model attributes
_parent_name
_date_name
_fold_name
_translate

Forward port of #32559 to 13.0

closes odoo/odoo#37840

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-03 07:33:17 +00:00
Nans Lefebvre 393a9a6d27 [FIX] base: fix portal user creation in debug mode
It is possible 29723e351d5 through the interface, in debug mode,
to create a portal or a public user.
Because of 29723e351d5, doing so raise: the user that it tries to create also
has internal user rights, which is forbidden for obvious security reasons.

The goal of 29723e351d5 was to restore normal behaviour when changing rights of
a non-internal user, i.e. to respect the groups given in arguments and their
implications. Most user creations happen programmatically, e.g. when a user
signs up on the website, so without that commit it was not possible to set up
the groups correctly in case of modifications, etc, since both create and write
did not use the provided group arguments.

However when passing through the interface, for portal or public users all the
other groups are hidden, but their values are not removed. Since these groups
confer user privileges, they imply internal user rights, which is forbidden for
a portal user, and raises.
Note that before a user created this way could not have the exact same rights
a portal user should have had, since technical groups should have been added
through the implied ids.
For this reason as well the fact that groups can be badly manipulated manually,
it is discouraged to use debug mode to to these actions, but still possible.

Since both flows simply use create, we fix the data that is sent by
the interface.
We cannot use an onchange to clean the groups since we are in the reified view.
So to avoid the JS sending the commands, we need to put the fields in readonly
if they are invisible.
To do so we also need to process the "user type" groups first.
Note that the sorting is stable, so the order is identical as before.

closes odoo/odoo#37839

X-original-commit: 3c44a5afe83465a76d16356e0fd6336b4d9c9196
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-10-02 17:59:40 +00:00
Andrii Skrypka fe14321881 [FIX] mrp: check value on field
Avoid comparing bool and datetime
Fixes odoo/odoo#36435

closes odoo/odoo#37800

X-original-commit: 2af0a713d849f4a329db6d791e4565724595fe3c
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-02 14:59:25 +00:00
Jairo Llopis 379f6410c1 [FIX] barcodes: Whitelist search inputs
Before this patch, on mobile chrome, if user had focused in a `<input type=search>` element and writes something, the value never lands in the target input element and the on-screen keyboard hides.

closes odoo/odoo#37843

X-original-commit: 12d4040b7196ae8f7a27d0081638413b52340019
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-02 18:41:01 +00:00
Jairo Llopis c780caae50 [FIX] event: Allow to navigate from registration to event
This patch fixes a functional regression introduced in fd3febf7d7. Before that commit, users were able to navigate from a registration to the related event. Now it's impossible, and under some circumstances this confuses the user (i.e. when he comes to the form from an URL that another user shared to him, and there are no breadcrumbs to follow).

Now, users will be able to click in the event and go to its form.

closes odoo/odoo#37834

X-original-commit: eb46c13704bf3aa515fe3a92cc588b762c5e5164
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-02 17:44:38 +00:00
Jairo Llopis 8b899af625 [FIX] event: Do not send unpublished event link
Before this patch, the event link could be sent in the email even
if it was unpublished by hand.

Now, if the event is unpublished, no link appears in the
registration and reminder email.

closes odoo/odoo#37842

Closes: #37700
X-original-commit: 9878f319520861578ccc49796f4335f99ad49f9b
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-02 18:06:35 +00:00
Jean-Charles Drubay 8977ab7d09 [CLA] corporate CLA for Komit
closes odoo/odoo#37841

X-original-commit: 182740fc7be93a5fc928b9a871ea5c4c7ae2b576
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-02 18:04:16 +00:00
Jairo Llopis b6597fdd90 [IMP] base: allow buttons with tabindex
Adding `tabindex="-1"` is the only way a button could be set to not
have a hotkey when user presses <kbd>Alt</kbd>

closes odoo/odoo#37835

X-original-commit: 9e5b8db72e789064f99f58c4f64867307846acc9
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-10-02 17:44:56 +00:00
Swapnesh Shah 52ef177ae5 [FIX] account: create journal with dedicated refund sequence
Billing Manager users were not able to create a new journal with a
dedicated journal
Billing Managers do not have the right to write on
ir.sequence.date_range

Fixes odoo/odoo#34153

closes odoo/odoo#37827

X-original-commit: d92c54bf20ab2f2c996b84d1f129cab954c66563
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-02 17:03:37 +00:00
fw-bot 65e04f304f [FIX] board: Beautiful button
💇 for that button.

closes odoo/odoo#37801

X-original-commit: bdb4896fb310920195ed6a1f13322f91f94d3350
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-02 15:12:15 +00:00
Adrian Torres af46a5c5a4 [DOC] api: warn about onchange pitfalls
closes odoo/odoo#37836

X-original-commit: a8454381ad2151136ee2a49665f69a12b8dc7daf
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2019-10-02 17:45:13 +00:00
Thanh Dodeur 7e0ed840d6 [FIX] mail: fixes src for text files in the document viewer
Before this commit, the url for the src of the iFrame used
to display text files in the document viewer wasn't properly set,
resulting in the `model` argument to be invalid.

This commit fixes this issue.

Task-Id 2058588

closes odoo/odoo#36160

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-10-02 21:30:17 +00:00
Moisés López a5251e1d40 [ADD] test_lint: Add sql-injection pylint check
closes odoo/odoo#36583

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-10-02 14:16:38 +00:00
Romain Derie ae6db1a5f4 [REM] account, project, sale, *: remove dead code 'return_label'
Since Odoo 9.0, the `return_label` in url was not working anymore.
What it did before 9.0 is add an item in the breadcrumb which once clicked
would redirect to the frontend.
This was handled in the `do_load_state` of the action manager in JS.

We don't need to reimplement that behavior as now we have the 'Go to website'
stat button. Thus we remove the code.

Closes #36325

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-02 07:13:27 +00:00
Romain Derie 9b38bcec12 [IMP] website, website_*: improve edit in backend feature
*base, website_blog, website_event, website_forum, website_slides

With this commit:
1. It is now possible to add the 'Edit in backend' entry in the frontend navbar
   for any desired model, not only the ones which have the published mixin.
   It will simply redirect to the main_object form view.
   This commit add it to Forum and Blog.
2. When clicking on 'Edit in backend', it is now possible to land on another
   module than Website.
   That's especially useful for events and slides which are not directly
   related to the website module as they have their own module.
3. Remove the custom Edit in backend from the forum homepage (fa-cog).
   Opportunity was also taken to remove the 'edit welcome message'.
   It will now be editable through the editor (welcome message will appear in
   edit mode). Thus we got rid of the custom edit welcome message controller
   and views.

Closes #36325
2019-10-02 07:13:26 +00:00
Stéphane Bidoul (ACSONE) c8c8413e3e [IMP] mail: enforce kw args for message_{post/notify/log}
Since there are message_post overrides using the form `def message_post(self,
**kwargs)` in some modules, this method is intended to be invoked with keyword
arguments only.

This commit enforces this behavior. Calls such as `message_post("body")` will
fail regardless of which addon is installed, forcing users to use
`message_post(body="body")`.

It also fixes a message_post override in hr, and applies the same
mechanism to message_notify, and _message_log.

closes odoo/odoo#33306

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-02 15:42:04 +00:00
Christophe Simonis 9d0f172f29 [REL] 13.0 🚀 2019-10-02 19:33:34 +02:00
david 350701bf3d [FIX] event: notify to attendee information because its partner by default
Indeed when buying tickets for an event several registrations could be
linked to the same partner while having different information for email
and name on registrations themselves.

Let us therefore format the automated emails first to registration info
if present and fallback on partner.

closes odoo/odoo#37790

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-02 13:37:47 +00:00
david 93157ebe19 [IMP] account,sale: add names to columns for better inheritance
closes odoo/odoo#37769

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-02 14:00:04 +00:00
Christophe Monniez 8c4c439473 [REF] packaging: use docker to build packages
Actually, docker is used to test Linux packages once they are built.
The packaging process is done on the host system where package.py is
run.

Consequences:
    * difficult to reproduce an exact same build on another host
    * changing a Debian/Ubuntu target version means some upgrade steps
      on the build host (mix that with the fact that the host also
      could build old Odoo versions)
    * Fedora rpm package is built on an Ubuntu system (which is not a
      real problem but it could be)

With this commit, the package.py utility is refactored to use Docker
containers to build the Gnu/Linux packages.

Also, the Debian package is adapted for Debian Buster, the RPM package
is built based on Fedora 30.

Some minor changes are also made in the windows packaging system.

closes odoo/odoo#37766

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-10-02 14:24:53 +00:00