Commit Graph
103366 Commits
Author SHA1 Message Date
Nicolas Martinelli 2cf80e0075 [IMP] purchase: set scheduled date of lines
Commit 4326d864 removes the inverse function of the `date_planned`. This
is necessary to avoid unexpected changes of the scheduled dates.
However, this removes the ability to set the scheduled dates of all
lines at once.

This commit introduces back the functionality thanks to a new button.
This way, the functionality remains without unexpected behavior.
2016-07-27 15:19:28 +02:00
qsm-odoo 931e5567b6 [FIX] base: let the debug value be 'assets'
This commit fixes a bug introduced by the forward port 1fca5e01cb.

In saas-11, the commit f970906c9e introduced the 'assets' value
for the debug mode, to active the assets splitting. To do that, the
commit had to stop the conversion to a boolean of the debug value
(initially introduced by commit 522dec2fcd).

The problem is that the forward port mentionned above did not resolve
correctly the conflict for the commit 3455daf948, reintroducing the
boolean conversion.
2016-07-27 14:26:57 +02:00
Nicolas Martinelli 4326d864d8 [FIX] purchase: do not reset expected date
A misleading behavior occurs with the recomputation of scheduled date.
Here is the use case:
- Create a PO with 2 products
- For the product 1, set the scheduled date to today + 7 days
- For the product 2, set the scheduled date to today + 14 days

When saving, the scheduled date of product 2 is reset to today + 7 days.

This is of course unexpected, but moreover, a different behavior can
happen depending on how the scheduled dates are modified. In the
previous case (both products have now the same scheduled date), one can
observe 2 situations.

Case 1.
For the product 2, set the scheduled date to today + 14 days and save.
In this case, the scheduled date of product 2 is not reset.

Case 2.
- For the product 1, set the scheduled date to today + 8 days
- For the product 2, set the scheduled date to today + 14 days

In this case, the scheduled date of product 2 is reset to today + 8 days
when saving

The reason of a different behavior in the 2 situations is that the
scheduled date of the PO is changed in case 2 and not in case 1. Since
the scheduled date of the PO is changed, it triggers the inverse
function `_inverse_date_planned`.

When saving, it is not possible to know whether the scheduled date of
the PO was changed on purpose by the user or recomputed. There are 2
solutions to get a consistent behavior:

- Force the scheduled date of each line to be the same than the
  scheduled date of the PO. However, this makes the scheduled date of
  the line useless.
- Do not change the scheduled date of the lines when the schedued date
  of the PO is changed. However, this removes the ability to reset
  automatically the scheduled date of the all lines at once.

This is the second solution which is chosen with this commit.

opw-682934
opw-684063

Closes #12904
2016-07-26 14:14:24 +02:00
Christophe Simonis 7ae5121877 [MERGE] forward port branch saas-10 up to fc0f023 2016-07-25 16:06:15 +02:00
Christophe Simonis fc0f023053 [MERGE] forward port branch 9.0 up to 1089dcf 2016-07-25 15:07:47 +02:00
Christophe Simonis 1089dcf15c [MERGE] forward port branch saas-6 up to 7df4ea5 2016-07-25 14:33:15 +02:00
Martin Trigaux 880df4e8b6 [IMP] doc: clarify web client terminology
To avoid confusion such as in #12884
2016-07-25 14:30:20 +02:00
Nicolas Martinelli 150bf7dba6 [FIX] point_of_sale: missing tax in accounting entry
The accounting item generated from a PoS order does not contain the
related taxes. Although the accounting entry is globally correct since
the tax line is created manually, the tax should still be written on the
accounting item for reporting purpose.

Note that this is already the behavior when the accounting entry is
generated directly from an invoice.

Fixes #10855
2016-07-25 14:08:19 +02:00
Christophe Simonis 7df4ea5b57 [MERGE] forward port branch 8.0 up to 43cff22 2016-07-25 14:07:50 +02:00
Martin Trigaux b85ef7ff1b [FIX] doc: indendation
Otherwise the text is considered as a quote
2016-07-25 13:56:33 +02:00
Olivier Dony 43cff22950 [FIX] base: fix broken URLs when redirecting
Similarly to werkzeug.urls.url_fix(), attempt to
correct some leftover special characters that
should have been URL-encoded.

We cannot actually use `werkzeug.urls.url_fix` or
`werkzeug.urls.url_quote`, as they expect more/most
characters to be un-encoded.
We have many existing cases where the redirect URL is
already fully encoded or mostly encoded, and those
functions would cause double-encoding, breaking the
final URL.
2016-07-25 13:06:31 +02:00
Olivier Dony 8596a4ccaa [FIX] portal: avoid users sharing non-portal groups 2016-07-25 13:06:31 +02:00
Olivier Dony 01acb8a497 [FIX] base: fix broken URLs when redirecting
Similarly to werkzeug.urls.url_fix(), attempt to
correct some leftover special characters that
should have been URL-encoded.

We cannot actually use `werkzeug.urls.url_fix` or
`werkzeug.urls.url_quote`, as they expect more/most
characters to be un-encoded.
We have many existing cases where the redirect URL is
already fully encoded or mostly encoded, and those
functions would cause double-encoding, breaking the
final URL.
2016-07-25 13:05:01 +02:00
Olivier Dony 3ff242ec0c [FIX] portal: avoid users sharing non-portal groups 2016-07-25 13:05:01 +02:00
Olivier Dony 4c9a0682b3 [FIX] pos_cache: fix rare deserialization problems
Fixes opw-683800
2016-07-25 13:05:01 +02:00
Olivier Dony bb1c6bd5ae [FIX] mail,delivery: fix incorrect imports 2016-07-25 13:05:01 +02:00
Olivier Dony 0e104a1f21 [FIX] payment: restrict field visibility to users who need it 2016-07-25 13:05:01 +02:00
Pedro M. Baeza 7e162e8993 [FIX] account: total_invoiced field should be only for customer
"total_invoiced" must only take customer invoices into account because
when you click on the button "invoiced" in the partner view form
you just see the customer invoices.

Adaptation for 8.0 of 9.0 fix made at 37569695

Closes #12044
2016-07-25 11:29:05 +02:00
Nicolas Martinelli aa1c3946da [FIX] product: rounding in pricelist report
The pricelist report might show price incorrectly rounded. For example,
a calculated price of 20.625 will be displayed as 20.62 in the report
since `formatLang` does not apply a rounding but simply truncate the
value.

Fixes #12875
2016-07-25 10:56:06 +02:00
Christophe Simonis eff0a3b049 [MERGE] forward port branch 8.0 up to 84f9cdd 2016-07-25 10:24:33 +02:00
Richard deMeester 5e7650204b [FIX] l10n_nz: Tax template name conflict (AU/NZ)
Rectify name conflict in tax templates between NZ and AU chart of
accounts. Otherwise, it's impossible to install both charts of accounts
at the same time.

Fixes #12600
Closes #12758
2016-07-25 09:31:49 +02:00
Goffin Simon d014940d1c [FIX] account: Fiscal position - mapping tax
The fiscal position is only mapping the first line,
if you need to replace one tax with 2, it doesn't work.

opw:683372
2016-07-25 09:19:03 +02:00
Odoo Translation Bot 84f9cdd1d9 [I18N] Update translation terms from Transifex 2016-07-24 02:59:48 +02:00
Odoo Translation Bot 6dcaffa3e0 [I18N] Update translation terms from Transifex 2016-07-24 00:30:28 +02:00
Adrien Peiffer (ACSONE) 611eae7959 [FIX] account: remove duplicated field in view
The account_analytic_id field was present twice.

Closes #12882
2016-07-22 16:39:31 +02:00
Martin Trigaux d1cdb4f4b8 [I18N] mail: outdated source terms 2016-07-22 15:11:31 +02:00
rgeleta 794459ade6 [FIX] doc: correct spelling mistake in reference
Closes #12865
2016-07-22 14:11:27 +02:00
Flavio Corpa 43c181926e [CLA] Signature for kutyel
Closes #12866
2016-07-22 14:10:17 +02:00
Martin Trigaux 1094c221fa [I18N] portal_sale: outdated translation sources 2016-07-22 13:26:26 +02:00
Stéphane Bidoul (ACSONE) 862e4c42ba [CLA] Add Thomas Binsfeld in ACSONE CCLA
Closes #12810
2016-07-22 10:51:55 +02:00
Pedro M. Baeza c3b1a0eca7 [FIX] purchase: retrieve product full name in dropshipping
The name field is the name of the product.template while the display_name will
contains the variant description and product code to allow to identitfy which
product.product is moved.

Closes #11311
2016-07-22 10:37:57 +02:00
Martin Trigaux 8b83119fad [FIX] project: add misssing decorator on onchange method
The onchange should have the signature with `ids` instead of `id` for a proper
guess.
Without this, the method can not be overriden with an api.multi (the return
result is a list of dictionnary which is not understood by the ORM as a proper
return format).

Fixes #12856
2016-07-20 17:20:18 +02:00
qsm-odoo f0620a9648 [FIX] web_editor,website: allow creating pages from edit menu
The code for page creation from menu edition dialog was there but
invisible to the user because of a wrong qweb template inheritance.
Indeed, the edit menu dialog relies on an extension of the link dialog
template. But this one is extended in-place in another location and
that extension is not considered when the second extension is made
because a t-extend always use the base template. The only solution to
achieve the same result is to copy the edit menu dialog qweb extension
in Javascript.

Note: the feature was still available from the link dialog in page
edition though because this was not concerned by the wrong qweb
extension.

However, adding a page by this way would create multiple pages because
one was created each time a page name was entered (and not only on
save !). So typing "test", then changing its mind and typing "hello",
then rechanging to "test", then hitting the save button created the
"test, "test-1", "test-2" and "hello" pages.
This fix takes advantage of an already present parameter which can
determine if a new page should be created or not. However, a code
refactoring should be done in master for these classes.
2016-07-20 15:59:53 +02:00
qdp-odoo 7c33417e89 [FIX] account: fix manual reconciliation use case as defined in OPW 682683.
The error was only appearing in case 'writeoff_currency' != 'company_currency' which, here was achieved by having a secondary currency on the reconciled account. As the manual reconciliation wizard is doing a two-step reconciliation to make sure to balance all the secondary currencies, we must check the context to detect its special key and avoid giving an amount_currency that would interfer.
2016-07-19 18:08:49 +02:00
qsm-odoo 7aa9f23955 [FIX] *: use html_translate for non-sanitized html fields
Commit c21568e14f deactivated the sanitization of frontend html fields so
that their modification through the editor worked again. However,
this broke the possibility to display their traduction and to modify
them.

The problem is that the translate option of html fields should not
equal "True" but instead be the html_translate function defined in
openerp.tool.translate. The translate=True option is automatically
change in html_translate though but there is a condition: the field
should be sanitized, which is why this broke since the sanitization
is disabled.

This commit sets the translate option of non-sanitized html fields
to html_translate. Maybe we should investigate for this to be automatic
for non-sanitized html fields as well.

Thanks to @rco-odoo.
2016-07-19 17:02:02 +02:00
Thibault Delavallée c70e2a5777 [FIX] mail: display access button on discussion emails if recipient can see the document
Currently no access button is displayed if the email is a discussion and has
no contextual actions like creating a new document, or setting the responsible
of the document. However it leads to emails being sent without access button.
This can be extremely frustrating and make the notification email quite
impossible to use efficiently.

With this commit when an user has access to a document the link to the document
is always displayed in the notification email.
2016-07-19 16:35:05 +02:00
Thibault Delavallée bcbf4316e6 [FIX] models, mail, *: fix access action crash due to one / multi conversion
get_formview_action and get_formview_id are methods used notably in a
redirection called from a mail controller used in notification emails.
Those methods however are defined as cr, uid, id and are interpreted
as api.one when called by a new-api style method.

With modules being converted into the new API, those methods are called
as api.one and the result is encapsulated into a list.

To avoid having to take the first element of the returned list we decided
to simplify the call chain and migrate the methods as multi methods, using
ids instead of id. Various addons have been updated accordingly. A temporary
support of ids being an int / long has been added to avoid conflict with calls
using id (for example if javascript is not updated).
2016-07-19 16:32:46 +02:00
Damien Bouvy 0f34eb26db [FIX] crm,project,website,website_sale: replace support e-mail with support form link 2016-07-19 16:13:45 +02:00
qdp-odoo ceef7e3847 [FIX] account: allow import of field 'move_name' in account.invoice
Since users cannot set it manually to readonly=False in the settings or in the view, thatt's the only way to allow them to import invoices and their corresponding accounting entries.
2016-07-19 16:08:41 +02:00
qdp-odoo 82ac891bc7 [FIX] account: remove related payments upon statement line cancellation.
Since commit 3d48f2a375, each statement line creates a payment entry if it creates a move. So the code to cancel a statement line must be adapted to keep the old behavior: remove the payment if it was created by the statement line processing; keep the payment if it was registered before the statement line.
2016-07-19 15:57:59 +02:00
Goffin Simon d7f1270050 [FIX] product: default name in copy on product.product
When duplicating a variant, it's not necessary to append (copy) to
the name of the variant as it changes the name of the template too.

opw:683522
2016-07-19 15:48:49 +02:00
Goffin Simon 978b8f64ec [FIX] sale: onchange on 'note' in a sale order
When website_quote is installed, the Terms and Conditions of the quote
template should replace the Terms and Conditions of the company.
But if T&C of the company is not filled, it will keep the note written.

opw:683543
2016-07-19 14:36:50 +02:00
Nicolas Martinelli 2c19e9be96 [FIX] base: cherry-pick 55fa0912 to 8.0
Backported to 8.0 following report at #12648

[FIX] base: use datetime instead of date

The variable `date` is compared to the field `name` in the selection
query. `name` is filled in with datetime data. In particular, in the
module currency_rate_live, datetime.now() is used in the name. It is
necessary to make an appropriate comparison to make sure we select the
updated rate right away.

Fixes #12648
2016-07-19 12:58:13 +02:00
Odoo Translation Bot c3dd308913 [I18N] Update translation terms from Transifex 2016-07-19 12:10:41 +02:00
qsm-odoo 946b9415cd [FIX] website: correct mobile preview design
* Remove double scrollbar which appeared on chrome
* Remove strange whitespace on top of the preview due to the removal
of the odoo navbar (the code was wrongly adapted)
2016-07-19 11:46:25 +02:00
Stefan Rijnhart 2757ec3d0c [FIX] web: prevent kwargs position confusion
The fith arguemnt of the search method in count in new API.
Passing all arguments as positional arguments will make the context passed for
the value of the `count` argument.

bbc67ec is a similar fix in 9.0

Closes #12830
2016-07-19 11:19:46 +02:00
Tanguy Charlier 22090d3648 [FIX] sale_timesheet: don't count expenses as timesheets
On sale orders, the timesheets stat button should display the number of related timesheets.
0b55f2ee6d changed the computation system to have the number of timesheets
instead of the total time for several reasons, but used a domain which also includes expenses.

This commit changes the domain to make sure that the stat button only displays the number of timesheets,
and that the action leads to a list view of timesheets only.
2016-07-19 10:32:07 +02:00
Goffin Simon 7111ec0b7b [IMP] web, openerp: Remove the function ir_set on model ir.model.data
The function ir_set is deprecated since 9.0
Refactorisation of load_actions_from_ir_values
2016-07-19 09:35:41 +02:00
Goffin Simon 523209379a [FIX] calendar, openerp: Remove deprecated set and get on ir.values
Since version 6.1 the functions set and get on ir.values are deprecated.

The overwrite of the function get on "ir.values" didn't set the context
at the right argument.

opw:682883
2016-07-19 09:35:40 +02:00
Goffin Simon 02d686f9e1 [FIX] account_set: ensure_one in compute_depreciation_board
An error was raised when trying to call compute_depreciation_board with
a recordset containing more than one record.

opw:683341
2016-07-19 09:09:57 +02:00