Commit Graph
132305 Commits
Author SHA1 Message Date
Nans Lefebvre 5ea09c2ed8 [FIX] base: translate error messages at failed import
Forward-port of ffee5bdbd12b0080349da515d01981943355d0cd;
because of 1a315e87b05fcbdefcb3db6d8d4837f6cc3e835c by the same author,
only the following are left:
- we need to translate the untranslated message
- give the temporary cursor a name different from cursor or cr
  so that _'s _get_cr method does not get the closed cursor

closes odoo/odoo#41140

X-original-commit: 926873031d479ec96ca122fe8c3a481b31f2a32b
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-11-29 13:21:18 +00:00
Romeo Fragomeli ecc028c0e8 [IMP] mail: use _notify_get_action_link and not inline string
Note that this also add data-oe-model and data-oe-id in XML.
This allow us to avoid to load these links as external URL when
a user receive it in inbox instead of external mail client.
See file addons/mail/static/src/js/thread_widget.js -> _onClickRedirect

Task ID: 1895451

closes odoo/odoo#39958

Related: odoo/enterprise#6414
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-12-02 09:10:34 +00:00
qmo-odoo a82fd08813 [FIX] website_slides: Fix traceback when creating content in mobile
This commit fixes the traceback that happens when we try to create
a question from the survey form in mobile mode.

The problem was due to the context not being propagated
to the "add record" button that appears in mobile mode.
Therefore, as we use that context in our widget, it crashes.

The solution to this is to just use the normal tree view behavior
instead of our override when we are in a mobile environment.

LINKS

closes odoo/odoo#41143

Taskid: 2071342
Pr: #40694
X-original-commit: 0dc7d956c59dfbece1f05e475c227affd51ce435
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-29 16:00:05 +00:00
qmo-odoo 74854ebf2c [FIX] survey: Fix traceback when creating a question in mobile
This commit fixes the traceback that happens when we try to create
a question from the survey form in mobile mode.

The problem was due to the context not being propagated
to the "add record" button that appears in mobile mode.
Therefore, as we use that context in our widget, it crashes.

The solution to this is to just use the normal tree view behaviour
instead of our override when we are in a mobile environment.

LINKS

Taskid: 2071342
Pr: #40694
X-original-commit: b394a67ccd527b4ff88f0b59083fd3b59cf97681
2019-11-29 15:59:26 +00:00
Xavier Morel ba7afeb5bc [REM] sale_timesheet: dynamic domains
closes odoo/odoo#40947

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-12-02 08:46:03 +00:00
Odoo's Mergebot 73e3ad9159 [MERGE] mail: clean mail.mail creation flows and make this model more private
From now on mail.mail is considered as a technical model. Indeed people should
not really manually craft mails by hand. Instead various functional flows
should either send mails, either craft mails based on some user input.

We therefore make mail restricted to admin users. Flows creating mail.mail
are updated to use sudo, and ensure it was done in a context that makes
sense to delegate this power to the user.

Some cleaning is performed prior to that change of ACLs, done in separate
commits. This cleaning includes

  * ease the use of mail.thread tool method _message_compute_author by
    cleaning its api (return tuple instead of dict);
  * give a way to access to company email and catchall with formatting.
    Those will be used in various automated emails. Indeed currently several
    templates use either ``company_id.partner_id.email``, ``company_id.email``
    or even don't provide fallback values;
  * improve mail creation calls, notably author and email from default
    computation. Purpose is to correctly compute author_id and email_from
    in mail_message and mail_mail as they depends from each other. Moreover
    it is a good idea in various flows to specify email and author when giving
    creation values to avoid default computation that is not always guaranteed
    to be accurate notably when involving super user;
  * improve author / email_from synchronization in default values in mail
    composer;
  * clean some calls to mail.template send_mail();

Task ID 1853147
PR #32243

Related: odoo/enterprise#4001
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-02 11:12:56 +01:00
Romain Derie 9b3de32478 [FIX] http_routing, website: fix frontend lang in http dispatcher
This commit fixes 2 issues, both coming from a misbehavior in
`get_nearest_lang()`:
1. Anyone could reach the website in a lang available in backend but not in
   frontend. Eg, french is activated but not a website lang, going to `/fr`
   would show the page in french.
2. As a logged in user coming from backend in a lang not available in frontend
   (has request.lang set to that lang), the website would show a 500 error page
   since it would not filter out the current request lang.

Both these issues are fixed here by ensuring langs are filtered out if they do
not belong to the frontend (website langs).

Step to reproduce (bug 1):
  - Install french in backend lang (not on website)
  - Visit `127.0.0.X/fr_FR`, the frontend will be displayed in french even if
    it not a lang available in frontend.

Step to reproduce (bug 2):
  - Install french on frontend and remove english from frontend
  - Navigate to the backend /web
  - Navigate to frontend, it will crash

Fixes #40572 and fixes #40078

closes odoo/odoo#41146

X-original-commit: 4bfba037fbbf34c178abd532f7bf52b94ae40b27
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-12-02 08:31:26 +00:00
Thibault Delavallée 69ccabb212 [FIX] mail: restrict access to mail.mail model
From now on mail.mail is considered as a technical model. Indeed people should
not really manually craft mails by hand. Instead various functional flows
should either send mails, either craft mails based on some user input.

We therefore make mail restricted to admin users. Flows creating mail.mail
are updated to use sudo, and ensure it was done in a context that makes
sense to delegate this power to the user.

Task ID 1853147
PR #32243
2019-11-29 13:35:14 +00:00
Thibault Delavallée 1838191eec [REF] mail, various: improve mail creation calls, notably author and email from default computation
Purpose of this commit is to correctly compute author_id and email_from
in mail_message and mail_mail as they depends from each other. Moreover it
is a good idea in various flows to specify email and author when giving
creation values to avoid default computation that is not always guaranteed to
be accurate notably when involving super user.

Mail message creation could lead to desynchronized values between author
and email_from. This is improved with this commit by correctly inheriting
from default_get and computing both of them at the same time instead of having
two default values. Indeed they depend on each other.

Same thing is done for mail composer. Mail Thread offers a tool method to
find email_from / author_id based on having one of those values or current
user and it is called whenever necessary.

Some calls to mail template send_mail are also cleaned.

Task ID 1853147
PR #32243
2019-11-29 13:35:14 +00:00
Thibault Delavallée b9a22d2f24 [IMP] mail: add computed fields for company emails
Purpose of this commit is to give a way to access to company email and catchall
with formatting. Those will be used in various automated emails. Indeed
currently several templates use either ``company_id.partner_id.email``,
``company_id.email``, or even don't provide fallback values.

With this commit from a company record people will be able to use

  * a correctly formatted catchall: ``"My Company Name"
    <catchall_alias@catchall_domain>``
  * an email_formatted field like partner email_formatted that is either its
    partner-related email_formatted value, or formatted catchall if its partner
    is not correctly configured;

Various calls to mail creation are updated accordingly.

Task ID 1853147
PR #32243
2019-11-29 13:35:14 +00:00
Thibault Delavallée 351b0ca6f4 [IMP] mail: improve returned values of _message_compute_author
Purpose of this commit is to ease the use of mail.thread tool method
_message_compute_author. Instead of returning a dict with two values and
having to unpack them, directly return a tuple with both author and
email_from values. All calls and return management are the same in mail.
Let us simplify code.

Task ID 1853147
PR #32243
2019-11-29 13:35:14 +00:00
odoohouse 05606ded0d [ADD] l10n_dk: introducing Denmark localization
added CoA, taxes, fiscal positions and related stuff

closes odoo/odoo#41064

Task: 40224
X-original-commit: 11280c0c601fd29ed875bc4c63e02852ba75ae17
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-11-28 13:39:09 +00:00
Nicolas Martinelli 785a426479 [FIX] project_timesheet_holidays: create company
- Install project_timesheet_holidays
- Create a company with any user (except the SUPERUSER)

An AccessError is risen.

This is because the new project is created in the new company, but the
user is not in this company. The record rule `project_comp_rule`
prevents the constraint to be evaluated.

`sudo` seems the only solution here...

opw-2146153

closes odoo/odoo#41144

X-original-commit: a7d24cabafe1a9c71f9dbdb7cf3f129006250951
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-29 14:29:58 +00:00
Odoo's Mergebot f7fb388330 [MERGE] web_editor, *: new widgets system for editor left panel
This is a first step towards more complex behaviors in the left panel
and more possibilities with standard XML options. The main goal is to
use widgets for internal option components (checkbox, button, input,
colorpicker, ...) as a way to receive a value for an option method
(selectClass, selectStyle, ...) while the two parts of this system were
both handled by the option before.

For example, now, a developer can say: "I want a colorpicker to style
the border-color of this elements" or "I want the combination of two
inputs to be set as a data-example of this element" without writing
any JS.

See sub-commits for details.

In preparation of task-2122935

closes odoo/odoo#40282

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-01 19:03:21 +01:00
qsm-odoo 10a467e3e1 [FIX] web_editor: resolve conflict between tests and options mutex
In a normal flux, this happen when an option is hovered and left:

1) Hover event -> the widget goes in 'preview' state and notifies a
                  preview to the option

2) The preview is received by the option and, after an internal mutex
   resolution, the option enables its methods with the widget values.

3) Leave event -> same as (1), except leaving 'preview' state

4) same as (2), except receiving a 'reset'

Everything is fine and correctly managed... except if a JS code triggers
both hover and leave events in the same execution... and this is what
tests are doing. In this case, as (2) executes after an internal mutex
resolution, the points (2) and (3) were inverted, so the widget left the
'preview' state before (2) got the widget values.

Maybe the test system has to be improved, but this commit solves the
problem for this case explicitely.

Part of https://github.com/odoo/odoo/pull/40282
In preparation of task-2122935 and other tasks
2019-12-01 16:00:06 +00:00
qsm-odoo 3be9ae5672 [IMP] web_editor, *: automatically update snippet option UI on focus
* website, website_blog, website_sale

Some snippet option already needed to implement this by themself and now
that they use custom widget, this is even more needed. The long-term
goal is that developers should not have to override the onFocus method
or the updateUI method but only the _computeWidgetState method.

Part of https://github.com/odoo/odoo/pull/40282
In preparation of task-2122935 and other tasks
2019-12-01 15:49:57 +00:00
qsm-odoo fdac73e99d [IMP] web_editor, *: add new user value colorpicker widget
* web, mass_mailing, website

Introduced a new sub-widget for snippet options: we-colorpicker. This
allows to retrieve a color value (either a normalized css color or a
theme color name) to be used for a snippet option method.

This commit replaces the old 'colorpicker' snippet option whose behavior
is now simply achieved by defining an xml option using a we-colorpicker
widget in combination with the 'selectStyle' standard method.

This commit also adds the possibility to control the border-color of
elements alongside their border-width. Again, just a we-colorpicker
widget in combination with the 'selectStyle' standard method.

Note: this commit reviewed what the colorpalette palette widget
notifies. This is not a cssColor and a 'isClass' flag to say if it is
a css class or not. The colorpalette always returns a color string which
can be the name of a color like 'alpha'. This is up to the caller to
check if the color string is a css color or not with isCSSColor. In the
case it is not, the related code can read the actual color by reading
the related css variable.

Part of https://github.com/odoo/odoo/pull/40282
In preparation of task-2122935 and other tasks
2019-12-01 15:49:57 +00:00
qsm-odoo 216cf93b4d [REF] web, web_editor, *: review normalization of colors
* website

Review colorpicker methods to always allow to use normalized colors.
Also factorize some code in the color palette widget.

Part of https://github.com/odoo/odoo/pull/40282
In preparation of task-2122935 and other tasks
2019-12-01 15:49:57 +00:00
qsm-odoo 702a0cd5c5 [REF] website: fix linter errors in snippets.options.js file
Part of https://github.com/odoo/odoo/pull/40282
In preparation of task-2122935 and other tasks
2019-12-01 15:49:57 +00:00
qsm-odoo b38253f400 [REF] web_editor, *: use widgets for left panel components
Before this commit, the rendering of inner content of the left panel
options was handled through _buildXXXElement methods in the options
widgets. Now they are handled through sub-widgets which also handle
the user events.

Each sub-widget is notified with the string value it should hold
according to the snippet option target and methods. Each sub-widget
notifies a string value following user interactions, which snippet
options can use to adapt their target through their option methods.

The current sub-widgets introduced by this commit are (others will
follow):

1) we-button
2) we-checkbox
3) we-input
4) we-select (typically containing multiple we-button widgets)
5) we-multi (typically containing multiple we-input widget)

Following this commit only 3 standard option methods remain, which can
be used with any meaningful widget:

1) selectClass

-> Same as before + handle the old 'toggleClass' method when used with
   a checkbox-like widget.

2) selectStyle

-> Same as old setStyle, introduced recently (simply renamed)

3) selectDataAttribute

-> Handle both old selectDataAttribute and setDataAttribute, introduced
   recently

The parameters these methods received are now:
- previewMode: same as before
- widgetValue: the string value the widget currently holds
- params: additional parameters (mainly dataset of the related xml)
    + params.possibleValues (all the possible values for the method,
      meaninful for a select or a checkbox)
    + params.defaultValue (the value that the widget would give if it
      even holds no value)

When defining a method in XML, the given value is the default value.
e.g. data-select-style="34px" data-css-property="margin-top"
-> if set on any widget, allows to retrieve a value from the user to
   customize the margin-top, the default value being 34px.
   -> if used with a we-input, allow to retrieve any value and an empty
      value will be equal to 34px
   -> if used on a checkbox, allow to toggle between no value and 34px.
   -> ...

Hopefully, detailed documentation about all of this will follow. Code
documentation should already be helpful.

Last note: the _updateUI method (replacing the old _setActive) is now
async (so does all the functions calling it). In particular, the _select
method is now async.

Part of https://github.com/odoo/odoo/pull/40282
In preparation of task-2122935 and other tasks
2019-12-01 15:49:57 +00:00
qsm-odoo 75ab52af9c [REF] web_editor, *: make options in charge of their rendering
* website, website_sale

Also make the "isTopOption" method a property.

This is done in preparation of better code for coupling sub-widgets used
to retrieve user value (button, input, colorpicker, ...) to actual
change in the edited DOM through snippet options methods.

Part of https://github.com/odoo/odoo/pull/40282
In preparation of task-2122935 and other tasks
2019-12-01 14:07:07 +00:00
qsm-odoo 0dd1f4595b [IMP] web_editor: add new way to edit data-* on a target
Now, the editor UI can suggest options the same way as select-class but
for editing a data attribute.

Note: the public widgets are now refreshed on data attribute changes
through the select-data-attribute and set-data-attribute methods.

Part of https://github.com/odoo/odoo/pull/40282
In preparation of task-2122935 and other tasks
2019-12-01 14:07:07 +00:00
Adrien Dieudonne 2392454011 [IMP] mail: Unsychronize chat windows between mobile and desktop
Currently when you open, for example, 5 chat windows on the desktop,
each of those windows will be opened on mobile as well.
The big issue with that is that I have to shut down all windows before
starting to work on the application.

To make things simple, you have to explicitly open chat window to
make it appears on mobile. Synchronization is blocked in both direction.
We don't update the chat window state on the server and we no longer
consider notifications (bus) about it.

Tests were added in enterprise.

Task ID: 1891952

closes odoo/odoo#41052

Related: odoo/enterprise#6943
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-11-30 15:33:31 +00:00
Jeremy Kersten 39c7579277 [FIX] ir_http: support redirect pitcure for theme
Missing / wrong indented code during rewrite of binary controller:
https://github.com/odoo/odoo/commit/7d85ab1#diff-1407a8ce197a04eefaefa26c127a4418L343-L348

In case you have:

    <record id="s_cover_default_image" model="theme.ir.attachment">
        <field name="key">website.s_cover_default_image</field>
        <field name="url">/web/image/theme_treehouse.bg_img_15</field>
    </record>

theme_treehouse.bg_img_15 will be not found in /web addons.
So we need a 301 redirect too.

opw-live

How to reproduce:
odoo.com/trial > Website > Install theme Clean
Drop first snippet > background is 404

closes odoo/odoo#40605

X-original-commit: b8ce93e4eb397e1b7a0e1d408d61d2f283223fb9
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-11-25 09:02:18 +00:00
Jeremy Kersten dc77f67cad [FIX] website: match get/post in is_multilang_url
Old heuristic is not more True:
Force to check method to POST. Odoo uses methods : ['POST'] and ['GET', 'POST']

We have some controller that only allow 'GET' method, so we need to check GET
also when we try to know if an url is multilang or not.

This commit fix case where a controller '/test' only allow GET and you were in
another language that the default, in this case, the rendered url in qweb was
/get instead of /<lang>/get.

Closes #37223

closes odoo/odoo#40519

X-original-commit: c7650106f8588083be12812600a6c94ba703fd6f
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-11-26 14:35:46 +00:00
oco-odoo ef0488ef91 [IMP] account: support multiple tax reports per country
- Introduce a new account.tax.report object
	> Tax report lines now refer to a tax report, and the tax report to a country

- Tax report lines can share tags accross reports within the same country
	> To support the cases where some report is a simplified version of another one: some of its lines can be computed in the same way as the 'bigger' report.
	> This is done by giving the same tag_name to the tax report lines, and the same country_id to their parent report.
	> Full support for tag name modification, and the way it impacts the shared tags (sometimes, we can overwrite them all, sometimes we must delete them, sometimes, we create new tags to replace them on some report lines).

- Support copying tax report (and the lines/tags linked to it), so that it is possible to duplicate them and change the country set on the duplicate for use in another country (coopying is way better as replacing in place, as we don't keep any link to an xmlid, and still allow using the original report in the original country it was created for).

- Make all l10n* modules compatible with those changes

closes odoo/odoo#38964

Related: odoo/enterprise#6217
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-11-29 20:47:29 +00:00
Jason Van Malder de6fa6189c [FIX] sale_management: fix quotation template orderline price
Reproduce the issue

    - Install Sale
    - Create a quotation template with a product price that is different
      than the price on the product form.
    - Create a quotation
    - Select a customer then the quotation template

    The product price is not the price mentionned in the quotation
    template

Cause

    In the method `onchange_sale_order_template_id`, if we have
    a pricelist set and the discount policy "with discount" we
    use the price of the pricelist instead of the price of the
    template line.

This commit use the template line's price if the discount policy
is not 'without' discount and if there is a template line's price

OPW-2146210

closes odoo/odoo#41139

X-original-commit: 1ed2c4dcb76f462497ae669372077446be3dd738
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-11-28 14:01:30 +00:00
Fanny He 58b7907254 [FIX] website_form: link attachments to binary fields
If the name of a file input field is 'x_binary_input', before
commit 9be29371abcdfe57b1738484c5057ad81e76b00d (opw 2092653),
self.form_fields would have names of the form 'x_binary_input[i]'.
After this commit, they are of the form 'x_binary_input[i][j]'.
When calling extract_data, field_name would then be 'x_binary_input[i]'
instead of 'x_binary_input'. Therefore, the file would be considered as orphan
instead of being attached to x_binary_input.
We thus change the split so that it always returns 'x_binary_input'.

opw 2122624

closes odoo/odoo#41135

X-original-commit: 21ed2b971f66879fa3fa53dbd2c349ab39fa3fdb
Signed-off-by: fah-odoo <fah-odoo@users.noreply.github.com>
2019-11-29 10:55:09 +00:00
Alexandre Kühn 4876dd7906 [REV] hr_holidays: consecutive leave date on out of office message
This reverts commit 802817c925.

The new test was crashing when current weekday is Friday.
This is easy to fix, but some other considerations are missing in
the original commit, like taking into account timezones.

We will add a proper fix later, and revert now in the meantime.

closes odoo/odoo#41123

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-11-29 14:16:00 +00:00
Andrea Grazioso (agr-odoo) 72386a4832 [FIX] point_of_sale: respect order date when issuing invoice
Create a sale order in POS with generate invoice option enabled.

When the user timezone is creating a day difference with respect to UTC
the date reported on the invoice will be wrong. This is caused by the
invoice date being written using `fields.Date.today()` , which is using
the UTC date. Respecting the order_date fix the issue

opw-2129440

closes odoo/odoo#41121

X-original-commit: 34fcb7300a8eb73b39f5f871e3553f036d6f3639
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-28 12:04:21 +00:00
Damien Bouvy 1b3b7a61a6 [FIX] payment_ogone: correct list of params for SHA-OUT computation
Some parameters were missing, leading to incorrect SHA-OUT calculation
on Odoo's side. Some were removed as well.

opw-2121544

closes odoo/odoo#41114

X-original-commit: af184e7c4fb89752263a53794e4807f601587ecd
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-11-28 16:34:19 +00:00
lejeune quentin 5caa5d7d2e [IMP] hw_drivers: Change IoT Box version
Change the version of the IoT Box.
From 19_10 to 19_12

closes odoo/odoo#41109

X-original-commit: 2b8779dc657a5a2b877ad2a552dd0dfda0071357
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-11-29 10:23:15 +00:00
Laurent Smet 2b5dbc0ef3 [FIX] account: Fix internal transfer account.payment
1) Don't set an amount_currency without currency_id set.
2) Use the journal's currency only if different of the company one.

closes odoo/odoo#41094

X-original-commit: 3dd8bf6a38704df0db4f0879e685d2230be572a2
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-11-29 13:17:51 +00:00
Kevin Baptiste edb02d6e94 [FIX] pad_project: prevent crash if no default project_id
Task creation was crashing when there was no project selected in the
kanban's quickcreate window.

closes odoo/odoo#41006

Taskid: 2146564
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 07:54:00 +00:00
Victor Feyens b9fabffe4e [IMP] sale_margin: make the cost a computed field.
And clean the code mess.

closes odoo/odoo#40953

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-11-29 12:09:40 +00:00
Xavier Morel 2c123005a7 [REM] dynamic domain from hr_timesheet
closes odoo/odoo#40952

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-11-29 09:10:07 +00:00
Xavier Morel 3895ecfb3a [FIX] gamification: remove dynamic domains on field_[date_]id
closes odoo/odoo#40951

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-11-27 10:00:18 +00:00
Xavier Morel 6c4ac28f33 [FIX] hr_timesheet: remove onchange domain
Fixes issues where static multi-company filtering would get squashed /
replaced by dynamic domains not having those filters.

The conditional could be replicated in two ways: one would be to use a
python-level conditional expression:

    a if cond else b

this is easier for users to interpret, but harder to analyze: python
expressions are currently opaque to view analysis (and possibly
eventually to domain edition).

The alternative here is to leverage domain simplification:

    (OR (= (not cond) 1) section)

if `cond` is true becomes

    (OR (= 0 1) section)

and thus `section` itself, while if `cond` is false it becomes

    (OR (= 1 1) section)

and thus `true` (so the section doesn't apply).

It works OK though the inversion of the condition itself is a bit
bizarre.

And in this specific case since we need both branches the negated
condition requires explicitly converting the condition to a boolean if
it might not be one: the expression compiler recognizes specifically
`(= 0 1)` and `(= 1 1)` (`(= False 1)` and `(= True 1)` also work for
Python reasons).

[REM] dynamic domain from hr_timesheet

closes odoo/odoo#40945

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-11-29 12:02:57 +00:00
Yannick Tivisse 4411cedde8 [IMP] base: Display 'Contains In-App Purchases' on module form views
Purpose
=======

There are no mentions that a module may contain In-App Purchases in Apps.
We should inform the users of this so they make a conscious decision when
installing such app.

closes odoo/odoo#40731

Taskid: 2129214
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-29 14:03:41 +00:00
Julien Castiaux dec397b86d [IMP] base_automation: refine CRON frequency
The current 'Base Action Rule: check and execute' CRON search every
four hours for delayed actions to run. This mean, any action scheduled
later can be delayed up to four hours.

We now dynamically reset the CRON frequency according to the least
delayed automated action to minimize the potential gap.

closes odoo/odoo#40633

Task: 1998809
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-11-29 09:07:58 +00:00
Hoste Patrick ec9e389f2f [IMP] website_slides: allow to create and update quizzes directly in frontend
Purpose is to ease designing your courses by allowing to create and update
slide quiz directly in frontend, within the slide display.

With this commit you are able to

  * add a quiz to a slide or add a question to an existing quiz;
  * edit an existing question from a quiz:

   * change the title of the Question;
   * add, remove or update answers;
   * change the right answer;
   * delete an existing question;
   * reorder the questions from a quiz;
   * reset the quiz for the current user if he is a website designer, allowing
     to test the quiz and its answers;

New frontend widgets are introduced allowing to manipulate quiz. Slide page
now supports a readonly / taking quiz mode and an edit mode for quizzes
used notably for website designers / course maintainers.

Task ID : 1999636
PR : #35326

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-29 13:36:25 +00:00
Thibault Delavallée a4abdfa316 [IMP] website_slides: merge slide quiz answers constraints in a single method
Currently there are several checks on answer integrity for slide quiz
questions. In this commit we simplify code to effectively implement
what is requested: 1 valid answer and at least 1 invalid answer.

Task ID 1999636
PR #35326
2019-11-29 13:36:25 +00:00
qsm-odoo 0b5f1fbead [FIX] web_editor: restore fa icons used in editor following lib update
Commit https://github.com/odoo/odoo/commit/ff1c35513aecef5fbc30f7c2f3834450e719714e
broke some editor icons.

closes odoo/odoo#41097

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-11-29 10:47:02 +00:00
Victor Feyens 51e289dac3 [FIX] doc: force_company isn't supported in master anymore.
New multi-company guidelines for 13.0 documentation explain the use of 
force_company. This is still valid in 13.0, but removed in 13.1 and 
replaced by the with_company mechanism.

closes odoo/odoo#41108

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-11-29 10:56:51 +00:00
Laurent Smet a4c2a1425a [FIX] account: Fix fy lock date check on account.move
The trailing check on the fiscal year lock date is wrong and is
triggered whatever the values passed to 'write'.

closes odoo/odoo#41100

X-original-commit: 5b3486a434dbb0d9d1ed583e59f6b478b33e9745
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-11-29 08:45:26 +00:00
Nans Lefebvre b66c6c0f75 [FIX] l10n_nl: set depreciation lines as cost in report
Afschrijving means depreciation.
However all depreciation lines have been copy-pasted with
wrong tags and types:
e.g. Aanschafwaarde overige immateriele vaste activa
has a counterpart Afschrijving overige immateriele vaste activa,
the first user_type_id is data_account_type_non_current_assets, but the
counterpart should be depreciation; similarly tags should go to their
Afschrijving counterpart.

opw 2115991

closes odoo/odoo#41071

X-original-commit: edac3bf4147aa4853660621b6c34f3a750882a94
Related: odoo/enterprise#6953
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-11-28 11:54:30 +00:00
Antoine Prieels 6f645925a4 [IMP] hw_drivers: Clean MPD manager in driver.py
We clean the code for the MPDManager by removing useless lines and
simplifying the way we run the MPD server.

closes odoo/odoo#40892

Related: odoo/enterprise#6892
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-11-28 14:04:33 +00:00
mgh-odooandMohammed Shekha 5c004c2e83 [IMP] mail: show out of office ribbon on discuss
This commit adds the out-of-office ribbon at the top of the
conversation in the discuss app.

Task-2066672

closes odoo/odoo#39362

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2019-11-29 08:56:15 +00:00
Julien Mougenot bf18802c1d [FIX] web: CalendarView: event edition in month mode
Fixes the way record end hours are computed in calendar views.

Before this commit:  objects `record start` and `record end` properties being copied by reference
and being incorrectly rewritten by other functions.
This caused incorrect end hour computations (and a SQL crash in the Planning app).

Now, objects are copied by value and don't interfere with each other.

Task 2072961

closes odoo/odoo#37690

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-11-29 09:06:04 +00:00
Julien Mougenot 9d9dc29c3a [REF] web: revert 13.0-opw-2093111-calendar_fixex-jpp
Most of the diff changes don't seem to affect the  issue, and
there is no test to prove that it has been actually fixed.
2019-11-29 09:05:58 +00:00