Commit Graph
108413 Commits
Author SHA1 Message Date
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
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
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
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
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
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
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
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
Pierre Masereel 934dd57b81 [FIX] point_of_sale: close session without ordered
We cannot close a session without POS order as we are giving explicitly
a name to the account_move, it is not possible to delete it at the end
when it is empty.

So we don't name it anymore, and it takes its name from the journal
sequence when it is posted, which actually do exactly the same as
before, except that it avoid to have gaps in the sequence and allow
deletion of the move if it's not named.

closes odoo/odoo#37787

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-10-02 13:13:03 +00:00
Pierre Masereel 6e846b1add [FIX] point_of_sale: remove radio button widget
We don't want a radio to be able to select none of the options.
2019-10-02 09:03:41 +00:00
Lucas Perais (lpe) e47e74afc4 [FIX] account, l10n_in: amount by group base when overriden
Fine tuning of 7bea912
In india there are as many tax lines on an invoices as there are
repartition lines (classic) * products

So, before this commit, preventing adding the base if tax was already seen
was not enough, the base was still added many times

After this commit, hopefully, the based on amount is correct for each tax

Forward port of #37390

closes odoo/odoo#37784

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-02 13:00:58 +00:00
Jairo Llopis 7d93c80693 [IMP] mail: allow auto_commit parameter with templated message posts
The underlying `mail.compose.message` model has a useful `auto_commit`
argument when sending emails, which is unavailable when posting messages with
template through message_post_with_template.

This patch simply exposes the preexisting feature, to ease developments that
need it.

closes odoo/odoo#37783

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-02 12:57:32 +00:00
Florent Lejoly 824f55f3ad [FIX] website_sale_slides: remove buy button from already bought course
Currently, when trying to complete a quiz of an already bought course,
there is still a button to buy the course below the "check answers"
button. This commit removes the buy buttons for courses where the users
is not readonly (the user is readonly if he has not joined/bought the course).

closes odoo/odoo#37717

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-02 13:29:39 +00:00
Jairo Llopis 32c1c5ab1b [FIX] website_event_track: rename Partner to Speaker and remove duplicated fields
Before this patch, the word "Partner" wasn't specific enough to make the user
know that it was referring to the speaker. This was OK in the form, bug i.e.
in the calendar view it's very confusing.

This change comes from 1e61522d19 and we revert back to Speaker labelling.

Also, in the form view, the partner field was duplicated, contributing even
more to the confusion. It probably comes from c058562d73 that duplicated the field
probably because of a bad conflict resolution.

Now partner is labelled Speaker and multi company domain is correctly taken
into account.

closes odoo/odoo#37781

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-02 12:36:19 +00:00
Yenthe Van Ginneken e947a0fbfc [IMP] phone_validation: allow editing blacklisted phone number
closes odoo/odoo#37775

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-02 11:55:42 +00:00
Josse Colpaert 8ba449ccdd [FIX] account: pos receivable account might be only set on the parent
On installation of the CoA the company's pos
receivable account is set, but it is possible that
the account is not set on the chart template itself,
but on its parent.

closes odoo/odoo#37761

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-10-02 10:16:26 +00:00
Nans Lefebvre d46befdf25 [FIX] account: add a test on settings change
Because of f206714af0 and subsequent commits, adding groups may raise.
We ensure that switching between tax included and tax excluded keeps working.

Closes #37481

closes odoo/odoo#37633

Forward-port-of: #37517
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-10-02 09:28:17 +00:00
Jigar Vaghela 21cccf9d72 [IMP] l10n_in: Remove GST tax column from invoice PDF
closes odoo/odoo#37759

X-original-commit: 0b04219514fc312b185d74d1512d11debfd2bae2
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-10-02 10:13:30 +00:00
Kishan Gajjar 083c5bddb7 [IMP] social_media, website_*: remove google+ mention
Google+ was shut down for business use and consumers.

closes odoo/odoo#36271

See: https://plus.google.com/
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-02 10:14:12 +00:00
mreficent c67f6d8794 [FIX] pos_mercury: revert of 48b3893b84
The previous change was done to solve a case of duplicated xmlids in
v12. By some confusion, both xmlids were changed in separated
commits. This new commit returns the original xmlid of one and assures
to avoid more confusions by adding 'settings' to the other.

Closes odoo/odoo#36885

closes odoo/odoo#37755

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-02 09:32:22 +00:00
Pierre Paridans 245ef4b0fd [FIX] website: check uid on request.env
Without this commit, connection with mobile app crash
since there are no uid set on the env.

_is_public_user expecting singleton.

closes odoo/odoo#37756

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-02 09:32:58 +00:00
Florent de Labarre 2e8307b5f1 [IMP] point_of_sale: add pos_order pivot view
Add a pivot view mode to the pos_order model.

closes odoo/odoo#37613

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-01 08:57:32 +00:00
Simon Lejeune 61fa590e67 [REV] stock: remove move 'without package' properly
This reverts commit 3431d7b1cd.
Due to recent changes in the orm, editing a draft move crashes. We
revert this commit while we find a proper fix.

closes odoo/odoo#37752

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-02 06:56:43 +00:00
Lucas Perais (lpe) acde911e44 [FIX] account: invoice, refund in foreign; payment, writeoff in domestic reconcile
Have an exchange rate of 1.1106

Have an invoice and a refund in a foreign currency
(amounts: 800 and 400)

Have a payment and a writeoff in domestic currency
(amounts: 200 and 160.16))

Before this commit, the invoice was not fully reconciled
even though the whole chain was
This was because, when checking if we should fully reconcile
we did so by forgetting that some members of the reconciliation
chain has a foreign currency
So, the exchange rate difference was never posted
(which amounts to 0.01 in foreign currency, and 0.00 in domestic)

After this commit, all the chain is reconciled, including the invoice

OPW 2057845

closes odoo/odoo#37738

X-original-commit: 74fb177c292c156a20818a12b47c53c40f37a2ee
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-01 17:17:02 +00:00
Lucas Perais (lpe) 2721dd522c [FIX] base, account, product, hr_holidays: document layout save and print
In an onboarding situation, the company doesn't have a logo
make an invoice, send and print, print

The document layout editor's layout opens, because nothing is set up
on the company

Click Save

Before this commit, it was impossible to make the invoice print
because each time the document layout was displayed

After this commit, the invoice prints when clicking on Save
There is no default external layout for main_company

Also, the heuristic used to evaluate whether a company
has been set up, onboardingly speaking, has changed.
Before we used the existence of the logo, after we check if
a layout has been setup. When saving the document layout
modal, a report layout is written on the company

So, practically, the document layout modal only appears once
when trying to print invoices (or other documents)

closes odoo/odoo#37137

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-01 14:32:43 +00:00
fja-odoo 423402f1e5 [IMP] http_routing, *: move error pages to http_routing
* = portal, website, test_website, account, sms

Portal an Survey error pages were ugly default pages.
Now the error pages will be the same as the website ones.

Also fixing single module builds tests

task-2059969

closes odoo/odoo#35535

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-02 06:59:15 +00:00
Nicolas Lempereur 8decc3dc56 [FIX] web_editor: ol in ol have first number hidden
In the case of an <ol> in an <ol> we would have something like:

1.
2. 1.
   2.
3.

With this changeset we get back what we had in 12.0:

1.
   1.
   2.
3.

which is not perfect but the same as 12.0 version.

opw-2073751
closes #37163

closes odoo/odoo#37706

X-original-commit: 479db16fdb86c6925a7f94a24f2821f3a5c047b5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-10-01 12:55:44 +00:00
fw-botandRomain Derie b77d8a0974 [FIX] website_theme_install: properly attach new views to specific views
When a theme declares a view (a 'theme.ir.ui.view') with an inherit_id,
on installation, a view (a 'ir.ui.view') will be created with the
corresponding inherit_id. The problem is that this inherit_id may
reference a view that has been cow'ed at some point and thus the new
theme view will be attached to the non specific view by mistake.

Part of https://github.com/odoo/odoo/pull/37142

closes odoo/odoo#37750

X-original-commit: https://github.com/odoo/odoo/commit/f30b4dfdb90515bc54e691302f894184c9b1c55b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>
2019-10-02 01:02:56 +00:00
Jeremy Kersten eded0294ab [FIX] base, website: fix routing redirect
Redirect_type was renamed from 3xx to redirect_3xx, but name is used as http
status code. It is better a redirect(301) instead of redirect(redirect_301)

Re-add the bind_to_environ, it was removed because it seems not useful, but
once you are behind a proxy, werkzeug need the environ to find the correct
hostname and more ... Transformed relative url into absolute by werkzeug was
wrong.

closes odoo/odoo#37733

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-01 15:53:04 +00:00
Christophe Simonis 0467cab225 [FIX] l10n_*: accurate module version
closes odoo/odoo#37732

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-10-01 16:03:59 +00:00
Ravi Gohil 84629a03fa [IMP] l10n_lu: few improvements
- updated tax name/description
- shown code as per official tax report in tax report lines
- changed types of few account
- set 17-S-S as default sales tax
- added a new account with code 703001

closes odoo/odoo#37731

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-10-01 15:23:44 +00:00
Meghna Jaswani 5e240146aa [FIX] sale: correctly set default fiscal position on invoice
default fiscal position of previously selected partner is not getting
cleared up when current selected partner doesn't have a default one

task: 2071608
closes: #37231

$XX

closes odoo/odoo#37728

X-original-commit: bce4bcc61196bbeafb41f77b7a95051b225faea6
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-10-01 15:59:59 +00:00
Romeo Fragomeli ce879f2be4 web: kanban more menu is cropped on mobile
This commit removes some historical overflow-x properties needed
for old kanban views.

Steps to reproduce:
* Open Project App
* In kanban view and with one element, click on "more button" (3 dots)
* This menu will be truncated at the end. (BUG)

Task ID: 2058510

closes odoo/odoo#37727

Original-signed-off-by: Romeo Fragomeli <rfr@odoo.com>
X-original-commit: f4031c62f97fa170b74b0d13a0856b7d58ed4da6
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-10-01 15:59:38 +00:00
Romeo Fragomeli 6b847c543a [FIX] web: calendar some operation enable swipe in mobile
This commit avoids the swipe feature when we are moving/resizing an event.

Task ID: 2071605

closes odoo/odoo#37715

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-10-01 14:10:53 +00:00
Hugo Adan 780c857184 [FIX] mail: use correct template attribute
Custom CSS should be in style attribute

Closes odoo/odoo#37638

closes odoo/odoo#37707

X-original-commit: c1254cca7aae54982d270227d58aad8bdf0a7804
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-01 13:10:24 +00:00
Victor Feyens cbb921329f [FIX] product: currency computation depends on the product company_id. 2019-10-01 15:09:47 +00:00