Commit Graph
117156 Commits
Author SHA1 Message Date
Martin Trigaux fc6a04c622 [FIX] mass_mailing: don't specify search title
It is an inherited view.
It makes no sense and may be interprated as an xpath

Fixes #23014
2018-02-14 16:42:20 +05:30
Odoo Translation Bot 91f2209216 [I18N] Update translation terms from Transifex 2018-02-14 11:53:12 +01:00
Nicolas Lempereur 268443657e Revert "[FIX] project: follow stage change"
This reverts commit 5fa4f4cc31.

Explanation: https://github.com/odoo/odoo/commit/5fa4f4cc31#commitcomment-27551833
2018-02-14 09:53:46 +01:00
Jeremy Kersten c9edca7896 [FIX] website_sale: force int for qty in UI to stay coherent
Previously, some screen in front was casted in Integer, others not.

This commits closes #22443

To improve in master using precision decimal, t-field, ...
But avoid to change in dom tree in stable version
2018-02-14 09:00:02 +01:00
Christophe Simonis 19a37782fb [MERGE] forward port branch 9.0 up to 2d73ea9bed 2018-02-13 19:02:37 +01:00
Nicolas Martinelli 5fa4f4cc31 [FIX] project: follow stage change
- Create a project and a task
- Add a channel as follow of the project and task
- Set the channel to follow task stage change only

When changing the stage, the tracking is sometimes received in the
channel, sometimes it is not.

In the case of a stage change, the subtype returned for tracking depends
on the stage sequence. If the sequence is `<= 1`, the subtype for task
creation is returned. Therefore, if the channel is not following task
creation, the tracking message might or might not appear, depending on
the which stage is impacted.

We can remove this specific case, since the creation will be handled
when `user_id` is in the `init_values` or when `mail_create_nolog` is in
the context.

opw-802924
closes #22926
2018-02-13 17:38:25 +01:00
Goffin Simon 33e7c8d60c [FIX] website_event: Duplicating event with a menu
When duplicating an event.event record with a website_menu, the duplicated
event had also a website_menu pointing to the first record.

opw:813270
2018-02-13 17:19:17 +01:00
Raphael Collet 34c52e9938 [FIX] fields: performance of onchange on related fields
Optimize the copy of the cache being made by related fields to compute
themselves.  Instead of traversing records data in cache, follow the cache
structure itself and copy everything!

OPW 816125
2018-02-13 17:08:49 +01:00
Nicolas Martinelli f19e0f8047 [FIX] project: set as favorite
- Connect as a user with only 'User' rights on projects
- Set a project as favorite (click the star)

The project is not set as favorite.

Since only project managers are allowed to write on projects, the field
`is_favorite` is set as read-only. Therefore, it is filtered out by
`_generateChanges`, and nothing happens.

First step is to set the attribute `force_save` in the view, so the RPC
`write` call is forced. Second step is to compute directly the inverse
thus bypassing access rights.

Co-authored-by: Nicolas Lempereur <nle@odoo.com>
opw-814604
opw-801587
closes #22938
2018-02-13 16:07:21 +01:00
Goffin Simon 5ca0ef978f [FIX] account, point_of_sale, stock_account: POS Anglo-Saxon Accounting
Anglo-Saxon Accounting entries are not created when the POS session
was closed with button "Close and post entries

opw:802727
2018-02-13 15:52:54 +01:00
Goffin Simon 2d73ea9bed [FIX] point_of_sale, stock_account: POS Anglo-Saxon Accounting
Anglo-Saxon Accounting entries are not created when the POS session
was closed with button "Close and post entries

opw:802727
2018-02-13 15:46:21 +01:00
qsm-odoo 5e6c5d24be [FIX] mass_mailing, *: duplicating two-columns snippets
* web_editor, website

This commit fixes a bug with table duplication in mailing template:
- Click on a snippet with two columns
- Duplicate it
-> the snippet is duplicated but the two columns are transformed in two
   rows.

This was because there is an implemented behavior for column
duplication: if we duplicate a column which was alone on its row, we
duplicate the row instead. This code should however be triggered when
duplicating the column alone to be working, not the snippet that
contains it.

Note: this required a backport of a33ec972ab
which was fixing a non-critical "bug" for 11.0. This non-critical "bug" is
therefor fixed here too.

opw-807105
2018-02-13 14:19:07 +01:00
Goffin Simon d7fdb636b8 [FIX]mrp, mrp_byproduct: Qty is not "produced" for Byproducts
When producing a product as a BoM, the quantity for the byproduct was not increased in "produced".

opw:814768
2018-02-13 14:07:23 +01:00
tde-banana-odoo f78ebb33e3 [FIX] mail: no crash for portal url when not logged in
When portal user get email with portal url (like using
website_quote), it crashes because user is not logged.
For this case, we don't want to display the url with the
access token, but simply redirect it to messaging page.

The crash was about the "KeyError: 'view_type'" in
record_action dict, coming from website_quote.

opw-814647
2018-02-13 13:56:45 +01:00
qsm-odoo 32bdadad13 [FIX] web_editor, mass_mailing: better transcode alignment inheritance
Browsers' default alignement of <td/> is 'inherit'. Some mail clients do
not set this value properly though and even if it is explicitely set,
they do not compute the final value well.

As a fix, this commit forces the 'inherit' value on <td/> and computes
the real alignment for 'inherit' values when transcoding.

opw-813688
2018-02-13 13:37:50 +01:00
Luis González 79f137f342 [FIX] base: Avoid error when keep_query is used outside an httprequest context
When the utility method `keep_query()` is used outside an httprequest
context (e.g. rendering a template from a unittest) the following
exception is throwng:
`RuntimeError: object unbound`

The above exception is caused by the method trying to retrieve
parameters from the HTTP request, even if the request object is unbownd.

This change ensures those parameters are retrieved only when exists,
making possible to use it outside the web client

Closes #18841

Closes #22942
Closes opw-815322
2018-02-13 12:03:20 +01:00
Sebastien LANGE 1a7f3c7335 [FIX] stock: wrong domain in stock.quant.package
Closes #22666
2018-02-13 11:39:27 +01:00
Martin Trigaux ca0875231f [FIX] survey: properly detect wrong token
Was in old API
  user_input_obj.search(...)[0]
but the tr/except was not migrated

Introduced at 66cb880
2018-02-13 15:56:01 +05:30
Rumpen 98a9ee022e [FIX] stock: inventory line write return
The override of 'write' function in inventory line doesn't return the
result, wihch prevent to override it, and may lead to trouble with RPC
calls.

This close the PR: https://github.com/odoo/odoo/pull/22118

Thanks to the author: https://github.com/Rumpen
2018-02-13 10:59:50 +01:00
Nicolas Lempereur a6e66131ce [FIX] web_editor: error on cross domain stylesheet
On latest chromium (as of version 64), accessing rules of a stylesheet
is forbidden for cross-domain.

This commit catch and ignores the error when that happened.

chromium commit: https://chromium.googlesource.com/chromium/src/+/a4ebe08c91

opw-813480
opw-815860
closes #23009
2018-02-12 18:21:00 +01:00
Christophe Simonis 169f899e29 [MERGE] forward port branch saas-16 up to 835e5ed62b 2018-02-12 13:11:09 +01:00
Nicolas Lempereur 1c5bb8564b [FIX] web_editor: regression less editor 5af122387
In 5af12238 a change was made to have the correct hierarchy levels, but
this can cause an issue when editing less files.

This is because we now had "undefined + 1" which gives NaN which breaks
Array constructor.

opw-814579
opw-815397
opw-814322
opw-815265
opw-814021
closes #23006
2018-02-12 11:57:39 +01:00
Christophe Simonis 835e5ed62b [MERGE] forward port branch saas-15 up to 0401a7349e 2018-02-12 11:46:00 +01:00
Christophe Simonis 0401a7349e [MERGE] forward port branch saas-14 up to 851c29ce0e 2018-02-12 11:45:00 +01:00
Aaron Bohy 11dff2b05c [FIX] web: ListView: format footer values
Before this rev., the aggregates values displayed in the footer of
list views were formatted according to the field type, and the
field's widget was ignored, whereas it should be used by default.
For instance, if the 'float_time' widget is set on a float field,
the sum should be formatted as FloatTime as well.

Closes #22724.
2018-02-12 11:11:43 +01:00
Aaron Bohy 0982ceaa37 [FIX] web: ListView: reset selection when reloading
Before this rev., the list of selected records wasn't correctly
reset when the list was reloaded (e.g. when coming back using the
breadcrumbs). In the UI, the records weren't selected anymore, but
in javascript, the list of selected records wasn't empty. As a
consequence, the aggregates were wrongly computed, and always
displayed 0.

Closes #22725.
2018-02-12 11:11:43 +01:00
Lucas Perais (lpe) b6d156ad7a [FIX] web_planner: take 'view_type' of action into account
Before this commit, when a planner made a link from an action, the view_type was always 'list'
This prevented the view from being properly loaded, as an action of view_type form wouldn't be recognized

After this commit, such links are well formed, and form view_type actions are correctly loaded

OPW 806758
2018-02-12 11:05:30 +01:00
Christophe Simonis 851c29ce0e [MERGE] forward port branch 10.0 up to 0351677a00 2018-02-12 10:52:34 +01:00
Géry Debongnie e0cb522bf2 [FIX] web: update form widgets when state has changed
Since the <widget> tag is not used anymore in any of our views, it was
not really properly supported. In particular, the form widget was not
notified when the state of the form view has changed, which makes it
very difficult to actually do any useful work.

With this commit, we make sure that the widget method 'updateState' (if
it exists) is called with the new state whenever it changed.

This should allow developers to do useful work without having to work
around the issue. Note that this is not really a perfect solution, since
the updateState methot may or may not have been implemented.

I think that we need some kind of ViewWidget abstraction, which could be
used to have a better and more complete API for widgets in a basic view.
And AbstractField could inherit from ViewWidget.
2018-02-12 10:35:54 +01:00
Raphael Collet 9e6bc391be [FIX] stock: workaround to make dp work in tests 2018-02-12 10:28:59 +01:00
Rémi Rahir 8b9bcf1b7e [FIX] crm_phone_validation: fix lead phone validation
Fixes country_id and company_id mismatch in 65832dc.

Removes the view added by said commit as it was not a true stable
fix since it required users to update the module.

This commit uses a workaround to get the missing company_id field
which is monkey-patching the fields_view_get of the model, as
suggested by rco.

This commit also removes the exception catches that were rendered
useless by the False value given to the raise_exception parameter
of phone_format, introduced in 65832dc as well.

This commits fixes the behaviour in the website form as the phone
numbers were sanitized but never saved as such on their record.

This commit also renames the Phone Validation config setting to
suit its true functionality.
2018-02-12 09:16:17 +01:00
Odoo Translation Bot 26468bfaba [I18N] Update translation terms from Transifex 2018-02-11 04:26:28 +01:00
Odoo Translation Bot 0351677a00 [I18N] Update translation terms from Transifex 2018-02-11 00:48:18 +01:00
Olivier Dony b8c8a5aef8 [FIX] l10n_fr_hr_payroll: adapt terminology for simplified payslip
Partial adaptation of terminology for simplified french payslips.
A thorough review of the current payslip is necessary and planned.

Cfr. https://www.economie.gouv.fr/entreprises/nouveau-bulletin-paie

OPW-805984
2018-02-09 18:20:57 +01:00
qdp-odoo 2aabdc00c3 [FIX] account: allow XML-RPC call to action_validate_invoice_payment on account.payment.
The method was returning no value (~None) which then blown up when serialised back to XMLRPC. Fixes #22630
2018-02-09 17:29:56 +01:00
Aaron Bohy 20e4cd5bcd [FIX] web: field widget with readonly modifier
Rev. dbdd742 introduced the 'baseMode' parameter of field's nodes
in the BasicRenderer. Its purpose is to encode the generic mode
of the field, regardless of its readonly modifier (i.e. in form
views, the baseMode of all fields is the mode of the renderer and
in list views, the baseMode of all fields is 'readonly', except for
fields in the row being edited, whose baseMode is 'edit').

Unfortunately, when the value of the readonly modifier of a field
was 'readonly', its baseMode was changed from 'edit' to 'readonly',
which shouldn't, as the baseMode's value should not be affected by
the modifiers.

This produced a bug when a field had a readonly modifier, as once
its value became true, the field was rendered in 'readonly', and
whatever the value of the modifier afterwards, it always remained
in 'readonly'.

The rev. ensures that the baseMode is no longer impacted by the
value of the readonly modifier.

Closes #22729
2018-02-09 15:36:14 +01:00
Christophe Simonis 4b43803dc6 [MERGE] forward port branch saas-16 up to e2ae51c4b0 2018-02-09 15:02:31 +01:00
Lucas Perais (lpe) 89c63096cb [FIX] point_of_sale: aml from pos.order.line should have their tax group and children
Having a product on which a group of taxes apply (containing children taxes, obviously)
Make a sale
Validate the entries

Before this commit, the account_move_line created from the pos.order.line
had only the group of taxes as their tax_ids
Which is inconsistent against what account.invoice do,
and against what the generic report tax does

After this commit, we imitate what happens on invoices, and the movel line
created from the pos.order.line has the children of the group and the group as tax_ids

OPW 806089
2018-02-09 14:46:14 +01:00
Lucas Perais (lpe) e67d6f85c3 [FIX] account: event on onFilterChange
Before this commit, on the reconciliation widget in Firefox
filtering lines through the input triggered a Traceback
This was due to the use of the absence of a defined "event" parameter on the handler

After this commit, filtering does work as expected

opw 813791
2018-02-09 14:42:57 +01:00
Christophe Simonis e2ae51c4b0 [MERGE] forward port branch saas-15 up to 6d0f63ec4e 2018-02-09 12:41:15 +01:00
Christophe Simonis 6d0f63ec4e [MERGE] forward port branch saas-14 up to 9b2d3b19a6 2018-02-09 12:40:16 +01:00
Christophe Simonis 9b2d3b19a6 [MERGE] forward port branch 10.0 up to df3fb9f85a 2018-02-09 12:39:43 +01:00
Christophe Simonis 5cf12bfba4 [FIX] sale_timesheet: extract theoritical revenue values computation
This allow easier potential overwrite and ease migration.
2018-02-09 11:55:08 +01:00
Jeremy Kersten df3fb9f85a [FIX] calendar: fix partners_to_notify to have flat list of ids
Before this commit, user see a traceback:
(res_users.partner_id in (3,ARRA.. ...
operator does not exist: integer = integer[]

After update from initial commit
After append from commit 1bb74b7588
Now,  extend to allow [1].extend([2,3])

This commit closes #22944

Courtesy of @paulius-sladkevicius for reporting
2018-02-09 10:54:54 +01:00
William Henrotin 6718de5393 [FIX] i18n: correct two traduction in tax names 2018-02-09 10:00:18 +01:00
mreficent aac8f9730e [FIX] base: on_change_country() on res.company should return an ID
Previously, the return value was sometimes an int and sometimes a browse record.
Was PR #22810. Courtesy of Miquel Raïch (Eficent)
2018-02-09 09:53:57 +01:00
Christophe Simonis 047796817c [MERGE] forward port branch saas-14 up to 3a1df2cf22 2018-02-08 18:08:52 +01:00
Christophe Simonis 3a1df2cf22 [MERGE] forward port branch 10.0 up to 1b5ecbb047 2018-02-08 17:30:08 +01:00
Christophe Simonis 1b5ecbb047 [MERGE] forward port branch 9.0 up to ce51ad7e69 2018-02-08 16:43:44 +01:00
Christophe Matthieu d288b33648 [IMP] web: use patch for object in tests to avoid edge effects 2018-02-08 15:46:00 +01:00