Commit Graph
117975 Commits
Author SHA1 Message Date
Christophe Simonis d952e3678b [MERGE] forward port branch saas-14 up to 1677d618f0 2018-02-15 19:32:28 +01:00
Christophe Simonis 1677d618f0 [MERGE] forward port branch 10.0 up to 6cedc90f69 2018-02-15 19:31:24 +01:00
Christophe Simonis 6cedc90f69 [FIX] stock_account: method expect a record, not an id
opw-816729
2018-02-15 19:26:33 +01:00
Christophe Simonis c5899612ef [MERGE] forward port branch 10.0 up to 251b2fdc54 2018-02-15 18:43:15 +01:00
Mohammed Shekha e93a5cec48 [FIX] web: archive records in a new Kanban column
Create a new column in Project, add a record and then hit 'Archive Records' : a
traceback occurs.

When creating the new column, the `groupedBy` attribute on the datapoint is set
according to the parent list datapoint, which makes no sense as the records are
not grouped inside the column.

The mentioned attribute is now removed as the records cannot be grouped inside
the column.
2018-02-15 17:26:48 +01:00
Nikunj Ladava 4c186f30c3 [FIX] web: ActionManager: handle false actions
Server actions return an action to execute, or false. When they
return false, an 'ir.actions.act_window_close' must be executed,
such that the current dialog closes (if any) and mostly, the
'on_close' handler is executed, which ensures for example that the
current view is reloaded.

The case where server actions return false has been broken by rev.
32b8cec53. It produced tracebacks in several models, when clicking
on some actions in the 'Action' dropdown. For instance, in lunch,
go to Configuration > Products, open one in a form view, and click
on 'Lunch: Archive/Restore products' in the Action dropdown.
2018-02-15 17:25:00 +01:00
Christophe Simonis 71c36f608b [FIX] hr_holidays: use renamed model. 2018-02-15 16:35:09 +01:00
Jeremy Kersten 665496fc5c [FIX] website_forum: fix 'submit a link' feature
The pooling of the title was wrong since P3 refactoring.
2018-02-15 16:01:45 +01:00
Goffin Simon 1550c27b84 [FIX] mrp_repair: Only sale taxes must be available on a repair order
Like for the SO, only the taxes of type_tax_use = 'sale' must be displayed
on repair order.

opw:815028
2018-02-15 15:00:15 +01:00
Thibault Delavallée 6a1047111a [MERGE][IMP] portal, various: add access tokens in document access button for customer notification emails
Previously to this merge portal customers receiving a notification email
on a shared document could not directly reach the document on the portal
as the access token was not given to them. The only way to give access
to portal was done using the specific email implemented for sale orders
or invoices. This behavior is now extended to notification emails.

This merge adds the token support for customers through inheritance in
portal mixin. It also fixes inherit order so that the call chain
effectively goes through portal before calling the mail.thread base
implementation.

This merge is related to task 40064. #Closes #21426.
2018-02-15 14:57:31 +01:00
Thibault Delavallée 398c126cfa [IMP] account: display access buttons in notification email only on not draft not canceled invoices
Indeed draft and canceled invoices should not be displayed to customer or
portal customers.
2018-02-15 14:50:36 +01:00
Thibault Delavallée 467e490e5d [FIX] project: reorder inherit to be able to pass through portal before mail thread
Purpose is to enable override of mail.thread methods in portal mixin.
An example is the _notification_recipients method defined in mail.thread
and customized in portal.mixin.
2018-02-15 14:50:36 +01:00
Thibault Delavallée 2bf370ac28 [FIX] account: reorder inherit to be able to pass through portal before mail thread
Purpose is to enable override of mail.thread methods in portal mixin.
An example is the _notification_recipients method defined in mail.thread
and customized in portal.mixin.
2018-02-15 14:50:36 +01:00
Thibault Delavallée 75ec7ab257 [FIX] sale: reorder inherit to be able to pass through portal before mail thread
Purpose is to enable override of mail.thread methods in portal mixin.
An example is the _notification_recipients method defined in mail.thread
and customized in portal.mixin.
2018-02-15 14:50:36 +01:00
Thibault Delavallée 0e22ccb721 [IMP] portal: add access token link in notification emails for customers
Purpose of this commit is to allow customer portal to have an access link
containing an access token. Portal mixin now override the default mail.thread
behavior when classifying recipients of a notification email in groups.

If the model has an access_token and a customer field correctly defined
the recipient that matches the customer will have an access link in its
notification email holding the access token. It will also contain an
auth signup token if it is enabled.
2018-02-15 14:50:36 +01:00
Thibault Delavallée 7176d04f3b [IMP] mail: allow parameters to /mail/view link
Purpose is to allow to add parameters to the view link. Currently it is
formatted like '/mail/view?model=model&res_id=res_id'. We would like to
be able to add parameters like access token for example. It will allow
to create view links specifically tailored for some people like customer
portal.
2018-02-15 14:50:36 +01:00
Christophe Simonis 806f42b065 [MERGE] forward port branch saas-11.2 up to 8b9e854be4 2018-02-15 13:46:23 +01:00
Nicolas Lempereur 4e061d8c51 [REV] crm: allow a user assigned to activity to see lead
This reverts commit ab65a02f5a.

Before that commit "Sales / User: Own Documents Only" had access to
self-assigned or without salesperson assigned leads.

With the change, user of this group were meant to also have access to
leads with an activity to which they were assigned to.

But:

- this is a different behavior from activities on other models.

- there is a technical disability that in some case prevent to have
  fully functionning access rules if based on one2many with
  auto_join=True (we will try to fix this in master).

opw-816246
closes #23085
2018-02-15 13:38:40 +01:00
Alexandre Kühn 8b9e854be4 [FIX] im_livechat: livechat button not rely on JS services
Revision of https://github.com/odoo/odoo/commit/02ec09cb1c3e2d7bc7968f40c18f2208d7f3f498

One of the purposes of the previous commit was to test discuss.
There was an attempt to test im_livechat, but it has been aborted due to the possibility
to use livechat on an external website.

However, some bits remain from this attempt, such as LivechatButton becoming a JS service
provider in order to use those services with the external lib. LivechatButton was not working
for the following reasons:

    - ServiceProviderMixin.init was not called (so it couldn't load any service);
    - On website, there are two service providers (LivechatButton & websiteRootInstance).

This fix ensures that LivechatButton does not rely on JS services, such as the bus_service.
2018-02-15 13:24:37 +01:00
Lucas Perais (lpe) 6899bb829a [FIX] point_of_sale: http fetch img require right headers
The pos must be in http to talk to the posbox
The problem here is that imgs can sometime be fetch in https depending on the server's configuration

Before this commit, when converting imgs to base64, a "Tainted canvas" traceback was thrown by the browser
due to difference in domain that http VS https make

After this commit, we explicitly allow cross origin when fetching the image
while requiring the server to send the right headers

OPW 805860
2018-02-15 13:22:39 +01:00
Christophe Simonis 251b2fdc54 [MERGE] forward port branch 9.0 up to 840c3be7b5 2018-02-15 12:56:01 +01:00
Martin Geubelle 995d08b79a [FIX] web: factorize some doAction preprocessing
This preprocessing also needs to be done in Studio so it's factorized in
a separate function.
2018-02-15 12:39:19 +01:00
Christophe Simonis 3b959c313d [MERGE] forward port branch saas-11.1 up to a277b58507 2018-02-15 11:52:10 +01:00
Florent de Labarre 9a67c8b946 [FIX] stock: UserError message improvement
To know the product still having some active reordering rules.
Closes #22615
opw:813476
2018-02-15 11:46:19 +01:00
Lucas Perais (lpe) c1276c154e [FIX] point_of_sale: flattening only group of taxes when creating amls
Revision 89c63096cb fixed the creation
of the taxes applied to account move lines when validating a pos session

The fix though overlooked two things:
- protection against recursivity
(nothing prevents a group of taxes to have a grand-parent as one of its children)
- the fact that when converting a group of taxes into a regular computed one,
the field children_ids is never reset

Those two caveats provoked a "max recursivity error" in python within the right conditions

This commit protects the recursive process from the two issues, and there is no traceback

OPW 816163
2018-02-15 11:21:21 +01:00
Olivier Dony f4bc3acdd5 [FIX] mail: correct errors in b64 images handling
Rev 666b594842 introduced an autodetection
mechanism for transforming base64 embedded images inside emails into
attachment with a Content-ID URL.

The patch suffered from several issues:

- the base64 detection regex failed to detect base64 data that is folded
  over multiple lines - which happens to be the default in many Python
  versions when a binary field is read, or when using the base64 codec
  to encode a string.
  (Those cases where left untouched and the image was therefore missing)
- there was a logic error in the code when the same image was present
  multiple times, leading to an exception (`name` variable was
  referenced before being assigned)

This patch addresses both issues.

Fixes OPW-815073
2018-02-15 11:12:28 +01:00
Christophe Simonis a277b58507 [MERGE] forward port branch 11.0 up to 259686ba78 2018-02-15 10:58:08 +01:00
Lucas Perais (lpe) 840c3be7b5 [FIX] point_of_sale: display python except message on partner creation
Having base_vat installed (but is potentially more general than this)

In the pos frontend, try to save a partner with an incorrect VAT

Before this commit, the generic and cryptic message "your internet is probably down" was displayed to the user
when a python exception occured

After this commit, we display the exception's message

OPW 807656
2018-02-15 10:38:03 +01:00
jem-odoo 93da579623 [FIX] hr_expense: missing file in manifest 2018-02-15 09:56:54 +01:00
Olivier Dony 1605086943 [FIX] reqs.txt: bump up recommended Pillow version
We should normally stick as close as possible to the version we depend
on in the official DEB packages. This in turn depends on the version of
Debian stable at the time of release - for 9.0 that would be Debian 8
(jessie) and thus Pillow 2.6.1.

However Pillow versions before 3.1.1 suffer from a few issues that could
lead to crashes of Odoo workers. The bugfixes have been backported in
the DEB packages for Pillow, so users of Debian/Ubuntu LTS versions
won't be affected if they are keeing their systems updated.

However it's worth an exception to our rule for pip users.

FWD-PORTS: skip
2018-02-14 19:30:16 +01:00
Olivier Dony 962af4b780 [FIX] mail: make List-Id header RFC2919 compliant
Fixes the header initially introduced in
f62f58174b

See also https://tools.ietf.org/html/rfc2919#section-3

Fixes #18408
2018-02-14 19:15:02 +01:00
Christophe Simonis 259686ba78 [FIX] account_voucher: avoid double xml attribute definition 2018-02-14 19:00:22 +01:00
Christophe Simonis 72508cc241 [MERGE] forward port branch saas-16 up to 7792755946 2018-02-14 18:26:57 +01:00
RomainLibert df324c8857 [IMP] hr_holidays: Improve leave type: limit date, visibility, usability
In order to help limit leaves recording errors. We need to add some
configuration on leave type object. For example we need to avoid people
taking legal leaves 2016 on 2017.

  * Add validity dates : start and end dates on the leave type. An empty
    end date means forever
  * Double validation : change the checkbox into a radio button with now
    three choices :
  	- Human Resource Responsible
	- Manager
	- Double Validation
  * Add a sequence field, using handle widget
  * Add a field, to specify if the employee can select the leave type in
    his allocations, requests or in both of them
2018-02-14 17:26:31 +01:00
Jeremy Kersten 2d0bcce58c [FIX] website_forum: allow to submit link
Fix/Simplify previous regex that was wrong (eg: http:// instead of http:\/\/)
2018-02-14 17:20:55 +01:00
Christophe Simonis 7792755946 [MERGE] forward port branch saas-15 up to d24bdbde81 2018-02-14 17:18:59 +01:00
RomainLibert b4bda28f0d [FIX] resource: _get_leave_intervals
We were using start_datetime instead of end_datetime. Which resulted
into wring results if we passed in datetimes with different date parts.
2018-02-14 16:53:00 +01:00
Christophe Simonis d24bdbde81 [MERGE] forward port branch saas-14 up to 9d0de61114 2018-02-14 16:34:13 +01:00
Christophe Simonis 9d0de61114 [MERGE] forward port branch 10.0 up to 73c2ac451a 2018-02-14 16:04:23 +01:00
Christophe Simonis 73c2ac451a [MERGE] forward port branch 9.0 up to b7b82f1267 2018-02-14 15:32:37 +01:00
Raphael Collet e9d944f960 [FIX] product: product with single value for a "nocreate" attribute
The use-case is: update a product template by setting an attribute with
create_variant=False and a single value.
2018-02-14 15:29:43 +01:00
Raphael Collet 90bfad0e34 [FIX] product: unshadow test 2018-02-14 15:29:43 +01:00
fda-odoo f2bcebb9f2 [FIX] payment_paypal: make IPN work again (revert fix) (#23048)
Revert fix from xmo
(https://github.com/odoo/odoo/commit/29b9b74ceac86a17897eff032a24416fb26b38d1) that broke the IPN flow.
2018-02-14 15:03:56 +01:00
Laurent Smet 0f4333ddf1 [FIX] account, account_voucher: fix payment generation in pay directly
-opw: 779688
2018-02-14 15:03:26 +01:00
Christophe Simonis b7b82f1267 [FIX] core: call migration end- scripts with the previous version number 2018-02-14 14:58:16 +01:00
RomainLibert 9717026dcc [IMP] Resource: Expand testing on timezones
We need to check if resource module takes into account the timezone of
the employee taking a leave and the timezone of the user asking to see
when this employee has taken some leave.

Basically everything should be done in UTC internally and then converted
back to the user's timezone.
2018-02-14 14:43:38 +01:00
Denis Ledoux 0db75089ef [FIX] base: prevent PhantomJS tests to send emails
The emails sending is skipped during the tests.
The mecanism to determine if the server was running tests
was to check if the attribute `testing` was set for the thread.

Unfortunately, this `testing` attribute is removed/set to false after the loading/installation
of the modules is done, and phantomJS tests are ran post-installation,
and therefore the emails that were potentialy sent following an action
performed in a PhantomJS tour were not skipped.

This occurred for instance in the tour `project.tour`,
when the responsible of a task was changed,
the sending of the assignation notification email was not skipped.

In the case the machine on which the tests are ran does
not have an smtp server (or mailcatcher) running on the port 25,
this resulted in a test fail.
2018-02-14 14:26:39 +01:00
Haresh Shyara 3a38080ff5 [IMP] account : change unit price according to UoM
It was already the case with the sale order but not on invoices

Task-id: 35387
Closes #18719
2018-02-14 18:49:14 +05:30
Kinjal Mehta 102bb626f0 [FIX] account: changed the name of date filter in journal items search view.
As the old name 'date' of the filter was the same as the field date, the context key 'search_default_date':1 was ambigous and not well processed by the web client.
It was indeed considering on field by default and was trying to set value 1 on date field, which is not possible and it gave traceback.
2018-02-14 14:06:30 +01:00
Mehul Patel efe0112527 [FIX] account: recurring bills filter option always visible.
Previously, the installation of account_3way_match module was loosing these filters
2018-02-14 13:57:11 +01:00