Commit Graph
132361 Commits
Author SHA1 Message Date
shreya thakrar 4b73bd25a9 [IMP] doc: form view documentation improvement
Using studio odoo doesn't let user drop notebook in a group since it
generates issues with the notebook. (See https://github.com/odoo/enterprise/commit/ea5ccd548bb6781e5ccdf76cf11255c6fd6aa3cb )

For better understanding, a note for 'notebook' tag is added by this commit.

task -  2060330

closes odoo/odoo#41264

X-original-commit: a2d331af0df859fd29e84bfa30a9086c3d2e0fa8
Related: odoo/enterprise#7009
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-12-03 08:55:00 +00:00
shreya thakrar 780f9d1423 [FIX] payment: move notebook outside group
Usually in a form view, a notebook is not placed within group/s.

Also, using studio we don't let user drop notebook in a group since it
generates issues with the notebook.(See https://github.com/odoo/enterprise/commit/ea5ccd548bb6781e5ccdf76cf11255c6fd6aa3cb)

This commit fixes the issue by moving notebook out of the group and making
the 'payment.icon' form view structure consistent(and properly
editable with studio).

task - 2060330

X-original-commit: c4efe0173478be8b6a643d5fefef4244384ea6c2
2019-12-03 08:55:00 +00:00
wan f9a9c1a9f0 [FIX] account: multi-post in order
When we post multiple draft moves at the same time, the numbering should
be done by starting with the oldest one up to the newest.

closes odoo/odoo#41138

X-original-commit: 5b745eb61377e5b4532f2e370f9b1559a9b66c0a
Related: odoo/enterprise#6975
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-11-26 09:41:07 +00:00
Nicolas Lempereur 7c4628b1f4 [FIX] base: render with page-break => ok encoding
If we have eg. a report with a page break (eg. `Print On New Page`
enabled on a financial report section) the encoding is broken.

The reason is that lxml.html fragments_fromstring function accepts text
string (OK in unicode) or bytestring => the encoding will be guessed (by
chardet library) if guess_charset argument is set to true.

So since we do not pass guess_charset option, the encoding is not
recognized.

In this changeset, we give a text string to the fragments_fromstring
function since it seems that all our input should be in UTF-8.

note: lxml.html itself uses html5lib.HTMLParser parseFragment that takes
a charset argument, but there is no interface through
fragments_fromstring to specify the charset.

opw-2146715
closes #41255

closes odoo/odoo#41289

X-original-commit: 1d3d517aad08887970e4ba2d9290e260faacae2d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-12-03 12:41:39 +00:00
David Beguin 9830d924e9 [FIX] website: fix authentication of archived visitor
If a visitor logs in (and has a visitor_id in his cookie), the partner will be
linked to the visitor. If, after 1 week, the visitor tries to connect again
with a different session (or another visitor_id in cookies), the authenticate
will crash because

  * _cron_archive_visitors applies on visitor inactive since at least a week
  * there can be only one visitor per partner (sql constraint)
  * the visitor linked to the partner is not retrieved (because archived) and
  we try to link the partner to a new visitor.

Further than that, if the visitor is archived and the linked partner wants to
login again with a new visitor_id, we should

  * reactivate the previous visitor,
  * copy history from newest to previous one,
  * delete the newest one

Note that last two points were already done before this commit.

Task ID: 2120464
PR #40199
Fixes #40077
Fixes #40301

closes odoo/odoo#41273

Original-signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
X-original-commit: 53a6bed3b5c1ae09be490254ed09f18acbb970c4
Signed-off-by: David Beguin <dbeguin@users.noreply.github.com>
2019-12-03 08:34:32 +00:00
Victor Feyens e7fba2e8a1 [FIX] product: correctly pass pricelist arguments to recursive calls.
When computing the price of a product through a pricelist item, if the
item was based on anotherp pricelist, the dates and uom weren't given to
the subsequent method call.

As the majority of the calls to those pricelist methods put all their
arguments in the context, it wasn't noticed until now.

Functional example:
Pricelist A:
Rule A1 : 10% discount on Pricelist B, from day 3 to day 6.

Pricelist B:
Rule B1: 5% discount on Sales price, from day 3 to day 6,
Rule B2: 10% discount, from day 7 to day 9.

If today was day 8, the call to pricelist(A)._compute_price_rule(day=5)
would use rules A1 and B2, but should have used rules A1 and B1.

closes odoo/odoo#41295

X-original-commit: df9b113805ed28f274711bb4ba0dd9a2610e5035
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-12-03 14:28:53 +00:00
Josse Colpaert 5d70e17c17 [FIX] l10n_nz: adapt nz tax report to the multiple tax report model
closes odoo/odoo#41291

X-original-commit: 81eb531009ccc7acc11ef18791e5bb7f9fee16ae
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-12-02 12:08:18 +00:00
17c4f47b0a [FIX] base: allow custom model to use SQL (materialized) views instead of table
closes odoo/odoo#41267

X-original-commit: f17d389c4625e95f52c299c13a3f2983127c70bc
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Denis Ledoux <dle@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
2019-12-03 07:45:25 +00:00
Nicolas Martinelli d17e6a6750 [FIX] stock_picking_batch: default company
Set a default company since it is mandatory and hidden in mono-company
mode.

opw-2129187

closes odoo/odoo#41259

X-original-commit: ffb6360e87ed8b6fbe5ae19a801230d1f89bc660
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-12-03 08:08:49 +00:00
Vincent Schippefilt 4bcad6d546 [FIX] web: fix incorrect test of py utils
Before this fix, a QUnit test was wrong (didn't parse)
After this fix, the test actually works and tests something.

closes odoo/odoo#41257

X-original-commit: 3818a7f0df754717a7379dc8341729b508a166be
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-12-03 09:38:16 +00:00
Xavier Morel ee15b8461d [REM] payment: dynamic domains
Make the domain stricter as well:

* no reason to have / match a token if the payment method is not
  electronic
* don't lose the capture mode
* don't remove the company filter though it's probably not useful (as
  the journal and payment should already be in the same company so the
  check on the token's acquirer's journal should be enough)

The domain used to select the default payment should not matter too much.

Task 2147923

closes odoo/odoo#40959

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-12-03 13:59:25 +00:00
Xavier Morel 4e4813aee6 [REM] l10n_latam_invoice_document: dynamic domains
Note: the original would only set the domain if
`l10n_latam_use_documents` was enabled but even if the fields are not
shown without that it doesn't make much sense to allow any document
type to be selected when latam docs are *not* being used.

In this revision, the document type is always filtered by available
types and that is only non-empty if we're using latam documents.

Task 2147923

closes odoo/odoo#40955

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-12-03 13:11:47 +00:00
Goffin Simon 144523217c [FIX] repair: No fiscal position from repair order
Steps to reproduce the bug:
- Let's consider a fiscal position FP with automatic detection for customer in your country
- Let's consider two taxes T1 and T2 where T1 is mapped by T2 in FP
- Let's consider a product P with T1 as customer taxe
- Let's consider a customer C in your country with no fiscal position
- Create a repair order for C
- Add P as an add line

Bug:

T1 was set as customer taxe for P instead of T2.
When manually creating an invoice for C with P, FP is automatically
detected and T2 is set.

With this fix, the automatic detection of FP is applied on repair order.

opw:2120595

closes odoo/odoo#40856

X-original-commit: 3810f9d96246fbc21297b71c34704e87288eb77a
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-12-03 10:36:53 +00:00
Aaron Bohy ef2d4f6640 [FIX] web: list: do not escape cell titles
Task 2046921

closes odoo/odoo#41251

X-original-commit: d81cadc1a133117b4d692d2a7019e0100d8e411c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-12-03 08:55:11 +00:00
Jason Van Malder bde09810c7 [FIX] l10n_ch: fix isr report crash with studio
Issue

    - Swiss company
    - Install Accounting & Studio
    - Journals > Customers Invoice
        - Communication standard: Switzerland
    - Journals > Bank
        - Swizz account with CHF ISR subscription number
    - Studio > Reports > ISR

    Traceback

Cause

    If the statement of the `l10n_ch_isr_optical_line` compute
    method is False, the value will be `None`.

    In the view, we do a foreach on the value which is `None` and
    it crashes.

Solution

    Set an empty string as default value for the
    `l10n_ch_isr_optical_line` field

OPW-2129122

closes odoo/odoo#41247

X-original-commit: a0dc556b0e04c9e89e7f6a8e4e9af045151614f7
Signed-off-by: Jason Van Malder <jasonvanmalder@users.noreply.github.com>
2019-12-03 07:55:32 +00:00
Laurent Smet 32b2718b3b [FIX] base: Preserve loosing embedded files when printing 1 attachment
With the reload from attachment ticked (attachment_use) when dealing with
a single pdf, the attachment's content must be returned without calling _merge_pdfs
in order to preserve the embedded files. Since PyPDF2 doesn't support completely
the embedded files, there are simply dropped with creating a new pdf in _merge_pdfs even
with a single attachement.

closes odoo/odoo#41246

Issue: https://github.com/odoo/odoo/issues/41079
X-original-commit: a8f96bc7f35d047999cd16b7dd03bcddd3c32263
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-12-02 13:41:34 +00:00
Nicolas Martinelli 56ee149f11 [FIX] product_email_template: use proper parameters
`custom_layout` should be set as a context key, otherwise it crashes at
creation because of non-existing field.

opw-2146695
opw-2149726

closes odoo/odoo#41238

X-original-commit: f9837eb08a316965057fe239f434b1c6d5c0196c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-12-03 07:55:13 +00:00
Raphael Collet 2554d197ff [IMP] test_new_api: add subtests (to ease debugging)
closes odoo/odoo#40574

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-12-03 09:31:32 +00:00
Julien Castiaux a5bbc90885 [IMP] base: new fields are copy=True by default
New fields created from `ir.model.fields` view form are copy=True by
default (copy=False in case of One2many) thanks to an onchange but
manually created fields were not (e.g. created from Studio)

Task: 2067885
2019-12-03 09:31:28 +00:00
Nicolas Martinelli 5fb29a25b1 [FIX] base: country change
Do not remove the country set on the company when the state is removed.

closes odoo/odoo#41234

X-original-commit: dfa2a3b7c5d75bfc5a3e5f07171daf373b319ed8
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-29 12:24:22 +00:00
mightyjol (jhk) 4a8a49d288 [FIX]mrp:remove undefined progress field on gantt view
steps to reproduce:
-install the manufacturing app
-install studio
-go to manufacturing > click on the studio icon (top right of the window)
> click views > activate the gantt view

you should see a traceback with the following error
"Invalid field 'progress' on model 'mrp.production'"

mrp_production does not have a progress field => removal of the
property "progress" in the view fixes the issue

opw-2144823

closes odoo/odoo#41197

X-original-commit: 31bf253110b9a77ec8d6185b66157cdbfe9e67f5
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2019-12-02 13:30:51 +00:00
Damien Bouvy d2b02cab29 [FIX] web,(various): don't pollute session_info for portal users
The `session_info` dictionnary is used to bootstrap some JS code client
side (usually in the backend). It includes relevant information, such
as some parameters key for the OdooBot onboarding, the Enterprise
subscription expiration alert, etc. to avoid triggering a lot of RPC
calls upon webclient start.

`session_info` is also called by the remote authentication mechanism
located at `/web/session/authenticate`, which can be used by external
mechanism to obtain a valid session remotely.

Revision odoo/odoo@8a28cc2 introduced the concept of cache keys for
some oft-requested data (such as menus, translations and dynamic qweb
templates) to avoid requesting them on each webclient start, since they
tend not to change often. Unfortunately, it introduced a read on the
ir.ui.menu model that raised an `AccessError` if the authenticating user
was not a member of the `base.group_user` group ('Internal' user type).

While fixing that issue, it became apparent that `session_info`
returns a whole lot of information through this remote connection route
which is entirely unnecessary if not used in the context of a webclient
start, such a currencies, the state of the enterprise subscription, etc.

This commit fixes the access right issue by removing this non-relevant
information from the returned dict (including cache keys) if the user
is not an internal one.

closes odoo/odoo#40770

X-original-commit: 6e99ac2c6cd5ca9af87b4fc7a3a1394359e30b02
Related: odoo/enterprise#6860
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-12-02 09:21:32 +00:00
Nicolas Martinelli a7a9362e07 [FIX] base, base_automation: make active field visible
For better usability.

opw-2146601

closes odoo/odoo#41201

X-original-commit: 807dddabd0bd485b1c694e8ace21804a5d2c9ba1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-12-02 15:54:53 +00:00
Xavier Morel baabfc9ecf [REM] survey: dynamic domain
Task 2115472

closes odoo/odoo#40961

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-12-02 15:15:07 +00:00
Jason Van Malder eefa19f60b [FIX] web, account: fix RTL popover on invoice
Reproduce the issue

    - Load Arabic language
    - Install Accounting
    - Create an invoice & add credit note
    - Switch to arabic
    - Click on the "(i)" icon near the total price

    The popover is displayed at the other side of the screen

Cause

    - RTLcss was reversing the "left: 0" css property to "right: 0"
    - The popover configuration was not adapted for RTL

This commit ignore RTL for the popover css "left" property and
configure correctly the JS side

OPW-2146210

closes odoo/odoo#41200

X-original-commit: 88f03f0444a2533b1f6085369af431131da42b54
Signed-off-by: Jason Van Malder <jasonvanmalder@users.noreply.github.com>
2019-12-02 14:28:31 +00:00
Jason Van Malder 1e6b25672e [FIX] web: fix RTL pivot view dropdown
Reproduce the issue

    - Load Arabic language
    - Install Sales
    - Report > Sales
    - Switch to arabic
    - Click on the pivot view to display the dropdown

    The dropdown position is incorrect

Cause

    The calculations are based on a `left` value who is weird.

This commit use the mouse X position to compute the `left` value.

OPW-2146210

X-original-commit: d021f4257c87863b75f148c4809f5e2797a1e99f
2019-11-29 13:28:59 +00:00
svs-odoo 621a93b7b7 [MOV] *: _prepare_purchase_order_line
Move the method `_prepare_purchase_order_line` from 'stock.rule' to
'purchase.order.line'. The purpose is to reuse it in approvals_purchase.

task-2040710

closes odoo/odoo#41046

Related: odoo/enterprise#6702
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-12-02 14:18:39 +00:00
qdp-odoo 7037cf6ce8 [IMP] account: usability in account form view
closes odoo/odoo#41186

Related: odoo/enterprise#6989
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-12-02 13:16:51 +00:00
Nicolas Lempereur aff4b58c1f [FIX] website_sale: delete child category on parent
In the case of deletion with `ondelete="set null"`, return_path of
children of deleted record will not have return_path updated.

So remove the children recursively.

Another fix was done in 13.0 to avoid most issue in 6d5cd8b1d19.

opw-2148046
closes #41075

closes odoo/odoo#41178

X-original-commit: 6d5cd8b1d194fb173c486355c89d2ce503fd0ba4
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-12-02 14:29:21 +00:00
Simon Lejeune 22b9343c9a [FIX] stock: multiple orderpoint
- the oderpoint_id field on the purchase order line wasn't used to not
  merge the po lines
- if the orderpoint_id field is set, use the orderpoint location to
  create the move
- if multiple stock moves with different source locations go through
  `_merge_moves`, they should obviously NOT be merged
- `virtual_available` computed field was not being invalidated when the
  context keys "warehouse" and "location" changed

task-2001462

closes odoo/odoo#40573

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-12-02 12:33:38 +00:00
Odoo's Mergebot f341a48b7e [MERGE] mail: move website part of message and rating to mail / portal
PURPOSE

Clean posting process and improve mail.message definition and comprehension.
Move as much possible content from website_* modules to portal_* modules
to ease their use in customer portal without having to depend on website.

SPECIFICATIONS: MAIL.MESSAGE DESCRIPTION

Move description from website_mail directly to mail. Anyway it is a
non stored computed field and therefore having it available directly
in mail does not cost anything.

SPECIFICATIONS: MAIL.MESSAGE WEBSITE PUBLISHED

Website mail defines a website_published field allowing to publish / unpublish
comments on the frontend of some modules. This field has several drawbacks :

  * it is used only for front-end people (portal, public) and has no real
    effect in chatter / classic discussions;
  * it is used only in some advanced front-end module and is not available
    in portal by default;
  * its naming is not really correct as it is not linked to fields coming
    from the website_published mixin and its behavior is not really
    the same;
  * its use is a bit duplicated with internal flag coming from subtype
    allowing to hide messages related to an internal subtype;
  * there are overrides of standard mail.message methods just to handle
    this flag;

In this merge we change that field by an is_internal flag directly on
mail.message model itself.It tells if share people (customers, share users)
are allowed to read the message. This field can be given through posting
API or set manually using widgets. It is also used in access rights custom
methods and managed like the internal flag of subtypes.

Mailgateway was already using an internal flag for internal note replies. It
is renamed to is_internal and propagated as it is now a standard field. It
also eases code understanding.

Portal is updated to allow managing the flag directly. It means customer portal
now natively allows to moderate customer comments without any need of website
modules.

Rating is updated accordingly. An is_internal field is added, replacing the
related on website published.

Also rename subtype parameter of message_post to subtype_xmlid. In
order to be more explicit subtype parameter is renamed to subtype_xmlid.
It therefore clearly indicates it should be a valid subtype Xml ID. Support
of ill formatted Xml IDs is removed because there is no reason to try to
add some random prefix. Give something that exists or go to hell, punk !

Finally mail.message and rating.rating form views are updated to include
is_internal flag and perform some view cleaning. An entry of ratings in
Technical/Discuss is added for debugging / management purpose.

SPECIFICATIONS: MOVE WEBSITE RATING TO PORTAL RATING

Now that publish feature is replaced by internal directly in mail and portal
rating portal inclusion can be done safely in a portal_rating module instead
of website_rating. It allows to remove the dependency and give the rating
feature of customer chatter directly in portal applications.

LINKS

Task ID 2071556
PR #38692

Related: odoo/enterprise#6410
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-02 18:16:31 +01:00
Thibault Delavallée dc89f58467 [IMP] mail, rating, portal_rating: improve message and rating views
Purpose of this commit is to add some missing fields in message view, notably
is_internal newly added flag and its ratings. Rating form view is also
updated to display is_internal flag, and form view is a bit reorganized.

Task ID 2071556
PR #38692
2019-12-02 15:18:45 +00:00
Thibault Delavallée 7fae045d48 [MOV] website_rating: now move translations to portal_rating
PURPOSE

Clean posting process and improve mail.message definition and comprehension.
Move as much possible content from website_* modules to portal_* modules
to ease their use in customer portal

SPECIFICATIONS

Now that website_rating is now portal_rating, let us update translations
files accordingly.

LINKS

Task ID 2071556
PR #38692
2019-12-02 15:18:45 +00:00
Thibault Delavallée 9e0677882d [MOV] website_rating: move to portal_rating
PURPOSE

Clean posting process and improve mail.message definition and comprehension.
Move as much possible content from website_* modules to portal_* modules
to ease their use in customer portal

SPECIFICATIONS

Now that publish feature is replaced by internal directly in mail and portal
rating portal inclusion can be done safely in a portal_ratign module instead
of website_rating. It allows to remove the dependency and give the rating
feature of customer chatter directly in portal applications.

LINKS

Task ID 2071556
PR #38692
2019-12-02 15:18:45 +00:00
Thibault Delavallée 82f56ffddf [IMP] mail: simplify parent and parent internal computation in routing
PURPOSE

Clean posting process and improve mail.message definition and comprehension.

SPECIFICATIONS

In this commit we use the is_internal flag to correctly propagate it from
mail gateway and clean some parent check. In this commit some code is cleaned.
No functional change should occur with this commit.

LINKS

Task ID 2071556
PR #38692
2019-12-02 15:18:44 +00:00
Thibault Delavallée 5649fc88e8 [REF] {website_}mail: move and replace published field of mail.message to is_internal
PURPOSE

Clean posting process and improve mail.message definition and comprehension.

SPECIFICATIONS

Website mail defines a website_published field allowing to publish / unpublish
comments on the frontend of some modules. This field has several drawbacks :

  * it is used only for front-end people (portal, public) and has no real
    effect in chatter / classic discussions;
  * it is used only in some advanced front-end module and is not available
    in portal by default;
  * its naming is not really correct as it is not linked to fields coming
    from the website_published mixin and its behavior is not really
    the same;
  * its use is a bit duplicated with internal flag coming from subtype
    allowing to hide messages related to an internal subtype;
  * there are overrides of standard mail.message methods just to handle
    this flag;

In this commit we change that field by an is_internal flag directly on
mail.message model itself. It tells if share people (customers, share users)
are allowed to read the message. This field can be given through posting
API or set manually using widgets. It is also used in access rights custom
methods and managed like the internal flag of subtypes.

Mailgateway was already using an internal flag for internal note replies. It
is renamed to is_internal and propagated as it is now a standard field. It
also eases code understanding.

Portal is updated to allow managing the flag directly. It means customer portal
now natively allows to moderate customer comments without any need of website
modules.

Rating is updated accordingly. An is_internal field is added, replacing the
related on website published.

LINKS

Task ID 2071556
PR #38692
2019-12-02 15:18:44 +00:00
Thibault Delavallée 46b9a97b56 [MOV] {website_}mail: move description field of mail.message directly in mail
PURPOSE

Clean posting process and improve mail.message definition and comprehension.

SPECIFCIATIONS

Move description from website_mail directly to mail. Anyway it is a
non stored computed field and therefore having it available directly
in mail does not cost anything.

LINKS

Task ID 2071556
PR #38692
2019-12-02 15:18:44 +00:00
Thibault Delavallée e2b33f460d [REF] mail, various: rename subtype parameter of message_post to subtype_xmlid
PURPOSE

Clean posting process and improve mail.message definition and comprehension.

SPECIFICATIONS

In order to be more explicit subtype parameter is renamed to subtype_xmlid.
It therefore clearly indicates it should be a valid subtype Xml ID. Support
of ill formatted Xml IDs is removed because there is no reason to try to
add some random prefix. Give something that exists or go to hell, punk !

LINKS

Task ID 2071556
PR #38692
2019-12-02 15:18:44 +00:00
Thibault Delavallée 06f169a0ee [FIX] mail: give default void list instead of None when checking user groups for notification
Some override of ``_notify_classify_recipients`` may not check that groups
is None and expect a (maybe void) list.

Task ID 2071556
PR #38692
2019-12-02 15:18:44 +00:00
Julien Castiaux 98374bb0cd [FIX] website_slides: external tour used old code
Fine tunning of 07f70e3c1

closes odoo/odoo#41194

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-02 15:05:48 +00:00
Florimond Husquinet (fhu) 30cd679b81 [IMP] sms: allow to send SMS to oneself
Currently discuss post (through mail or sms) does not allow the author
to be notified of its content, as

  * he posted it and is therefore already updated;
  * it could create email loops;

However with SMS one could easily try to send SMS to himself using the
sms composer that is different from the mail composer. In that case
just use the ``mail_notify_author`` context key allowing to bypass the
"no author notification" rule.

Task ID 2091685
PR #40650

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-02 15:34:14 +00:00
Debauche Stéphane 88145eb645 [FIX] im_livechat: fix the ajax loading on external website
Bug
===
The file "public_root.js" try to load "/web/webclient/locale/en_US" with ajax.loadJS
we do not have the address to the Odoo server, so we try to load the file locally
but this file might not exist on the website which is using the widget

Fix
===
Overwrite ``ajax.loadJS`` and ignore ajax loading
(also printing a warning message in the JS console)

Task #2081146

closes odoo/odoo#41177

X-original-commit: 50f8508ca8569acc538a2af6a3c1162d39f834cd
Signed-off-by: std-odoo <std-odoo@users.noreply.github.com>
2019-11-04 15:02:50 +00:00
Hetal Dhanak 67951fe074 [FIX] mrp, purchase_requisition: prevent stage altering
Previously, when grouped by state, user was able to drag
and drop kanban boxes to alter the state of an unbuild, a
purchase requistion or work order. However the state should
be readlonly and could only be modify via public methods on
those objects. Those methods do additional required stuff than
just modifying the state.

task-2087309

closes odoo/odoo#40759

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-12-02 14:32:04 +00:00
lejeune quentin 270fa57d64 [FIX] point_of_sale: Rename posbox.img to iotbox.img
Renames the file created by the build,
from "posbox.img" to "iotbox.img"

closes odoo/odoo#41190

X-original-commit: 3abe39e785d28d1e0b1a18eb9b98c1d341e5a116
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-12-02 11:15:00 +00:00
lejeune quentin 5986481c69 [FIX] point_of_sale: Fix kpartx mapping
Kpartx did not erase the mapping correctly
Now we delete the mapping directly in "/dev/loopx"

X-original-commit: a33482ed703d162e79493b05a01e9724912b0385
2019-12-02 11:12:38 +00:00
lejeune quentin e943e80526 [FIX] point_of_sale: Fix locale variable for the IoT Box
We change the locale variable from en_GB to en_US.
But we need to re-generate variables.

X-original-commit: 0c5b5078872263a160fac56a1c326620c5e1d765
2019-11-29 16:09:20 +00:00
William Henrotin 53252ed7bc [FIX] mrp_workorder: suggest total quantity by lot
Use case:
Plan a production of 10 units on 2 workorders. Produce 4 units of lot1.
Record the production and produce the 6 next ones with the same lot1. On
the second workorder, the suggested quantity is 4 and not 10.

This issue is due to the fact that we fill the next workorder quantity
only at the first production batch and we don't check that the same lot
can be used again.

This commit call the mathod to update the quantity on the next workorder
if the first lot is produced again.

closes odoo/odoo#41189

Opw: 2127665
X-original-commit: e15fc6ac994edabc8907c13295c883cff9320d10
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-11-29 15:23:26 +00:00
Romeo Fragomeli 9cee8c36f9 [FIX] web: restore mobile responsive viewport in mobile test suite
After commit odoo/enterprise@8a38a60b1f
mobile tests didn't run correctly because of missing viewport META in HEAD.

This commit add the missing META. This META must be before all
JavaScript file to ensure that JavaScript also know that we work in
a viewport.

Note that "runbot" run tests in a chromium headless with a size screen
reduced and so it worked without this fix.

closes odoo/odoo#41183

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-12-02 13:43:28 +00:00
mcm-odoo fea8d452b2 [FIX] im_livechat: allow manager to read all sessions
Managers could see only their sessions like other operators.
Now they can see all the sessions so they can check and help the operators.

task-2048498

closes odoo/odoo#41175

X-original-commit: 6ae791335a1986aa4cc72f7ed9aadd471c1774c5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-22 14:27:10 +00:00
Yenthe666 3cf3c2dbd4 [FIX] account: remove duplicated field
The field user_id was created twice in the model with the same values and options, only a different help message. This removes the duplicated one.

closes odoo/odoo#40542

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-11-20 08:35:26 +00:00