Commit Graph
117156 Commits
Author SHA1 Message Date
Ivan Yelizariev 832d73deb4 [CLA] IT-Projects LLC 2017-11-29 12:43:09 +01:00
Ivan Yelizariev 6ba492fb09 [IMP] point_of_sale: log error message too
It's needed in phantomjs tests.

Without this commit it printed only error stack, which doesn't provide enough
information to fix it. This is a problem when the error is not reproduced on
running tours manually in browser.
2017-11-29 12:43:09 +01:00
Jeremy Kersten 23a953c824 [FIX] website_crm_score: don't display new opp for ungraded partner.
Button to create new opp are reserved to graded partner.
Employees will use backend crm, and classis portal user cannot create lead for them.

+ fix 403 when create an opp because no access on crm activities.

This opw fixes #21222
2017-11-29 12:33:12 +01:00
Olivier Colson 92f7ecc263 [FIX] l10n_ch: only compute postal reference with sanitized number if no iban reference on the account 2017-11-29 11:54:12 +01:00
Martin Geubelle e63c550ed1 [FIX] mail: display chatter inside the sheet
Before this revision, it was not possible to display a chatter inside a <sheet>.

As the chatter is reused (when switching in edit, records, etc.), it is detached
(to keep its handlers) before updating the form $el.

The problem here is that the chatter was detached in `_updateView` from
`$form.contents()` where the chatter is a root element ; when setting the form
view html, the chatter was thus still present. This was thus only working
correctly if the chatter was a direct child of <form>.

To keep it displayed in all cases, we now detach it at the chatter node
rendering.

Closes #20032
2017-11-29 11:47:44 +01:00
Goffin Simon 0d48056d63 [FIX] sale_timesheet: Traceback when launching tests from sale_timesheet module
When launching in an empty db the following command:

 ./odoo-bin --addons-path=../enterprise/,addons --db-filter=11ent -d 11ent -i sale_timesheet --test-enable --stop-after-init

it raised a traceback because no sale journal was defined.

opw:783489
2017-11-28 20:02:49 +01:00
Nicolas Martinelli e56d91be29 [FIX] stock_account: lock date
`_check_lock_date` is defined on a `account.move`, while in this case
`move` refers to a `stock.move`.

We re-implement a logic similar to the original commit 287b293283.

Fixes #20913
opw-782395
2017-11-28 16:17:54 +01:00
adekock11 59a5dfefa8 [FIX] base: South African Rand is before the amount
Closes #21234
2017-11-28 15:24:36 +01:00
adekock11 90d4d7318b [CLA] signature for adekock11
Done at #21234
2017-11-28 15:24:23 +01:00
Simon Lejeune 8fb25e185b [FIX] barcodes: manage several barcode widgets
related to rev 0d19ee989d

It was broken following the refactoring done in saas16, resulting in
barcodes being handled on all the displayed forms and it was problematic
in the case of a form dialog openned over a "fullscreen" form view.

This was particularily problematic for the scrap dialog in the
stock_barcode module.
2017-11-28 15:17:59 +01:00
Simon Lejeune 0ca4b0f373 [REF] stock_account: warn when changing cost method 2017-11-28 15:17:59 +01:00
Christophe Simonis 5851a69aa3 [MERGE] forward port branch saas-16 up to 3f66814a0d 2017-11-28 15:12:31 +01:00
flyingL123 c7cc59e20d [FIX] stock: Add return value
Fixes #21264
Closes #21266
2017-11-28 15:02:31 +01:00
flyingL123 c650e63d82 [CLA] signature for flyingL123
Done at #21266
2017-11-28 15:02:31 +01:00
qsm-odoo 41d2470093 [FIX] mail: properly suggest users to chat with
Before this commit, it was not possible to choose the user you want to
chat with in a chat window anymore. This was because the dropdown that
suggest the users appeared under the chat windows since commit
https://github.com/odoo/odoo/commit/7b965a9673a9124e6e045b8a290a156eed402ad5

Indeed, the mentioned commit changed the z-indexes so that chat windows
are still usable when a modal is opened. This was done by making the
chat windows always have the greatest z-index... forgetting this would
make them appear on top of their own autocomplete dropdowns.

This commit restores the feature while keeping the ability to talk while
a modal is opened. See code comments for details.

opw-785162
2017-11-28 14:28:40 +01:00
Rémi Rahir 7a379039ec [FIX] website_portal: edition of company name
Before this commit, one could edit its company_name (char) at will but this has no effect on the actual company name (commercial_partner_id that is a company). Thus once the partner is linked to a company, the information entered in the 'details' form will not be in synch with the details info on the '/my/home' page.

After this commit, we only allow edition of the 'Company name' field while the partner doesn't have a company set and display the company name once it is set.
2017-11-28 14:15:38 +01:00
Christophe Simonis 3f66814a0d [MERGE] forward port branch saas-15 up to 09badbed98 2017-11-28 13:37:35 +01:00
Florent de Labarre f7e80442d1 [FIX] account: Access error when opening a partner
If a user can read account.analytic.account but not the account.move.line,
when he tried to open a partner, there were an raise AccessDenied errors.

opw:782961
2017-11-28 13:12:43 +01:00
Nicolas Martinelli 8b854ab660 [FIX] mail: auto subscription to channel
1. Install mail and hr
2. Create a new mail channel:
   name: test
   Who can follow: selected group of user
   Authorized group: Employee / Manager
   Auto subscription: Employee / Manager
3. Edit the Demo user, and add him to group Employee Managers

The Demo user is not subscribed to the channel (only Admin is)

In this case, the web client sends a `sel_groups_` key, which is not
handled by the `write` method.

Fixes #20897
opw-782301
2017-11-28 13:07:07 +01:00
Christophe Simonis 299a5e058b [MERGE] forward port branch 10.0 up to 7754538750 2017-11-28 12:25:16 +01:00
Christophe Simonis 7754538750 [MERGE] forward port branch 9.0 up to cae188514f 2017-11-28 12:08:34 +01:00
auyeung112002 ecbf7aa471 [CLA] auyeung112002 signs the CLA
Closes #21281
2017-11-28 11:56:23 +01:00
Christopher Tribbeck f20df81c20 [FIX] stock: remaining quantity
Uses `float_compare` instead of comparing floats directly, which is
anyway something that leads to precision errors.

See related PR for detailed use case.

Closes #20770
opw-781384
2017-11-28 11:55:53 +01:00
jem-odoo 85726e33b0 [FIX] sale_timesheet: do not create project/task when expense
When expensing a service product, an SO line is created
on the SO from the hr expense. This creation triggers
the service object creation (task and/or project), and
should not.
To avoid this, we check if the ordered quantity
is not zero to avoid use the expense policy (or
any expensable product will not be able to create
task/project).
The same mecanism is used in stock to avoid picking
creation when expensing stockable product.
2017-11-28 11:46:07 +01:00
Mehul Patel 3680e099a6 [FIX] project, sale_timesheet: analytic account and project creation
When we create an analytic account, a project is automatically
generate, and it should not. This is a bug coming from
the removal of 'use_tasks' field. See eb4ad33513.

We can now remove all the 'project_create' and
'project_creation_in_progress' context key.
2017-11-28 11:45:42 +01:00
Mehul Patel bf6894c5b1 [FIX] sale_timesheet : sale_line_id field not exist in sale.order.line 2017-11-28 11:45:22 +01:00
jem-odoo ef2a3b1342 [FIX] sale: name_search of SO line with its own name
When searching a SO line, we want to search on its own
description in case of 2 product with the same name
are present on the SO. This help user to differenciate
them.
2017-11-28 11:44:59 +01:00
Lucas Perais (lpe) cae188514f [FIX] web_editor: Fieldtexthtml wait until iframe loaded to save
In the case where:
- you are too fast editing a mass mailing, trigger an onchange (e.g. mailing_model) and then save
You can use the edit/save shortcuts to make yourself believe you are Flash Gordon
- your internet is too slow (Down: 4Mb/s, Up: 500kb/s, Latency: 20ms)

Before ths commit, the onchange will return *before* the field (the iframe actually) is loaded.
This onchange contains a signal *in* the body_html of the field to allow communication with the iframe.
If you save before the iframe is loaded, this body_html keyword will be saved.

After this commit we deactivate the save button until the iframe is loaded.
We could have gone for a python user error on the value of the body_html too.
But it would have added a supplementary click and potential reloading

OPW 783616
2017-11-28 11:22:30 +01:00
Christophe Simonis ad6f307976 [MERGE] forward port branch 9.0 up to 6d2bf44fee 2017-11-28 11:10:59 +01:00
Goffin Simon 37d9e5fee2 [FIX] report: Overlapping fields on printed delivery slip
Use position relative and not negative margin which could bring overlapping.

opw:782172
2017-11-28 10:36:26 +01:00
qsm-odoo 6d2bf44fee [FIX] website: do not duplicate iframes at each edition
Before this commit, when an user added a video in his page (an <iframe>)
it was then duplicated each time the snippet in which the video is was
edited and saved again, slowing the page loading.

As the code responsible for that is quite outdated, it should be
reviewed and refactored in master. This commit only fixes the problem
with more code. This commit will also fix existing databases, if the
user edit the video snippet once again.

(Note: even if this commit's code will be even more strange in master,
it *should* be forward-ported anyway).
2017-11-28 10:03:27 +01:00
qsm-odoo d66997dd39 [FIX] website_hr: restore employee publishing feature
Broken with https://github.com/odoo/odoo/commit/4ecbacaf59576a22ff45615a5aa5c67244e4fb93
2017-11-28 09:59:13 +01:00
Joren Van Onder 11ae103e12 [FIX] point_of_sale: search customers with full search query
When the keypress handler is called the pressed key has not yet been
added to this.value. This leads to the search being performed with
e.g. 'Agr' when the user has typed 'Agro'.

Fix this by getting this value when the timeout expires. At this point
the value will be updated.

Fixes #21129
2017-11-27 16:03:47 -08:00
qsm-odoo 948c429e8b [FIX] website: declare correct mimetype for data images
Some website default images were declared with the wrong filename
extension, inducing the wrong mimetype. As a result, some browsers
(IE...) were unable to render these images.
2017-11-27 16:48:10 +01:00
Martin Geubelle ccaced9292 [FIX] web: display selection label in graph
When grouping a graph view by a selection field, the labels on x axis
were the selection values themselves (not their corresponding label).

This issue was only present if there was only one group by field. In
this case, the attribute `grouped_on` is not an array but a string
containing the field name. This case wasn't correctly handled.

Note that this issue is not present in the new views (from saas-16).

Closes #19790
2017-11-27 15:47:35 +01:00
mreficent 0cb86017e2 [FIX] sale: fix typo
Closes #21205
2017-11-27 15:37:13 +01:00
Adrien Dieudonne d2e1a1deb3 [FIX] web: search_filters: need to convert datetime to utc
When a datetime was selected in a search filter, the time wasn't
converted to UTC to the server.
So, there were unexpecting records due to the wrong query domain.

When we retrieve the value from the datepicker, we need to convert
it to UTC before sending it to the server.
2017-11-27 15:19:54 +01:00
Goffin Simon 12c7d35fa0 [FIX] mail: Wrong Activities "Created by"
Steps to reproduce the bug:

- Login as demo user on runbot 11.0e
- Open a contact
- schedule an activity, "todo" , assigned to Administrator
- Clicking on the "i" icon next to the planned activity,
you see that the "Created by" is "Administrator" , which is incorrect

Since this commit: 53ad585bfc, the field
create_uid is always 1.

opw:783650
2017-11-27 15:02:14 +01:00
Arnold Moyaux 81b43bd329 [IMP] purchase: Add a next activity on SO cancel
It could happens that an SO is canceled once the
associated PO has been confirmed/shipped.
In this case it could be usefull for the end user
to notify him in order to process manual actions.
2017-11-27 14:50:52 +01:00
Arnold Moyaux 9e0724088b [FIX] purchase: cancel rfq set destination move to mts
Use case to reproduce:
- Create a SO with a product MTO and confirm the PO
-> PO -- Stock -- SO
- Cancel the SO
-> PO -- Stock    canceled SO
- Set the quotation to draft and confirm it again
-> PO  -- Stock
   RFQ -- Stock -- SO
- If the user cancel the RFQ we will get this diagram:
-> PO -- Stock
         Stock -- SO
The user can't reserve the chain correctly. Also a new RFQ will be
generated each time the user delete the existing one even if the PO
already exists.

It happens because the move keep the procure methode MTO although
the moves origin and destination links are broken.

This commit changes the move destination from purchase order
line to MTS if the RFQ is deleted. This implies that RFQ are
not automatically generated by the scheduler.
2017-11-27 14:50:52 +01:00
Swapnesh 4e333607f1 [CLA] signature for sswapnesh
Closes #21177
2017-11-27 14:49:42 +01:00
Martin Geubelle cc031bd226 [FIX] web: Form: handle attributes and modifiers on header
This is done for all other tags (except <form> and <sheet>) but this one has been
forgotten.

Closes #21258
2017-11-27 14:01:50 +01:00
Martin Geubelle 76ba56e60d [FIX] web: List: handle custom class on button
It should be possible to set a custom class on a button in the list view.

Closes #20620
2017-11-27 14:01:50 +01:00
Wolfgang Taferner 2fbbf0b1ff [FIX] sale_stock: cancelled moves should not block product modification 2017-11-27 12:50:10 +01:00
Yannick Tivisse d3efda05fd [FIX] (project_)pad: Don't create/copy pads on tasks that don't use them
Purpose
=======

Currently if a project doesn't use pads, the created and duplicated tasks will initialize/copy them. That could be a real issue when migrating customers if we create a task for all the existing issues, since the models have been merged.

Specification
=============

Avoid this falsy behavior. We're forced to crappy fix with a context key as the project.task model 'inherit' from pad.common.
2017-11-27 12:26:44 +01:00
Yannick Tivisse 09236d0ef9 [FIX] l10n_be_hr_payroll: Set the default commission on target to 0.0 2017-11-27 12:10:05 +01:00
Adrian Torres ac5ba4a2b0 [FIX] server: do not restart if phoenix is True (#21209)
Before this commit, saving a file being watched by watchdog
(--dev=reload) with vim (and possibly other text editors) would
crash the server via a KeyboardInterrupt error.

This happens because vim, emacs cause multiple filesystem events to
happen when saving a single file, the FSWatcher registers these events
as multiple SIGHUPs which in turn calls restart() multiple times in a
very small amount of time which makes the KeyboardInterrupts completely
shut down the server

This is fixed by only calling restart() if odoo.phoenix is False, since
catching a SIGHUP sets it to true.

Fixes #21178

Special thanks to @odony for the help :)
2017-11-27 11:12:27 +01:00
Xavier Morel b46830858f [FIX] web: excel export of binary fields
* In Python 3 xlwt apparently does not support writing bytes values ->
  try to decode assuming the value may be base64-encoded, this is more
  or less the behaviour for CSV exports.

  This will most likely not allow the export anyway as Excel cells are
  limited to 32k data characters, which accounting for base64
  expansion means ~24k worth of data, but that is a pre-existing
  issue.
* Also removed support for way outdated browsers from
  content_disposition: the Safari case is for Safari 5 (circa 2012)
  but versioning apparently changed since then and modern Safari
  report their "external" version number rather than the webkit
  version number => the current Safari reports version 11, and gets
  routed to the "does not support unicode file names", which is
  further bugged in Python 3 as it %s's bytes, leading to a resulting
  filename of e.g. `b'res.partner.csv'.csv` (with the prefix and
  quotes).
* The IE case is for IE8, which has long been unsupported by the web
  client.
2017-11-27 11:11:48 +01:00
Stefan Rijnhart 10de33a57e [FIX] mail: handle emails with a single non-text part
SAP sends out emails that only contain a PDF part, without a text or
html body, e.g.:

    X-Mailer: SAP NetWeaver 751
    Content-Type: application/pdf; name="Afleveringsbewijs.pdf"
    Content-Transfer-Encoding: base64
    Content-Description: Afleveringsbewijs

Before this patch, this single non-text part was parsed into the body of
the final message, as if it was a text part.

Making the check for the main part more restrictive solves the issue, as
there is no reason to assume that a non-multipart content is
necessarily of text/* type. This PR also includes a regression test.

Closes #21102
2017-11-27 10:58:16 +01:00
Nicolas Martinelli 3246f3b388 [FIX] account_dashboard : rounding and zero negative
During the generation of data in kanban view, there are no rounding when
computing the amount differences. It might lead to amount differences
lower than the currency rounding, which should not be displayed.

It also fixes the case where the amount is -0.0.

opw-782962
Closes #17840
2017-11-27 10:13:21 +01:00