Commit Graph
103249 Commits
Author SHA1 Message Date
Antonio Espinosa a0ff74b78d [FIX] website_mail: do not propagate csrf_token to message_post method
Indeed through portal users can post a message. Form used in order to
do so include a csrf token. However this one should not be propagated
to message_post because it is not a mail_message model field.
This creates unnecessary warnings.

Closes #13956 .
2017-05-29 13:57:10 +02:00
qsm-odoo b21426ab9c [FIX] web_editor: properly match snippet options' DOM
Backport of 10.0 commit: 5331a87f81

The snippet options are attached to `closest`, `all` and `is` functions
to be able to find/check DOM they are associated to. Their behavior
depend on the snippet option type: the search in the DOM is either done
in the body, the editable parts, the editable children only, ....

The problem is that when searching from a given DOM element, jQuery
won't match the elements whose selector contains this given DOM element.
Or in code terms, jQuery find function behavior is:
`$('A').find('A B')` <=> `$('A A B')` (not `$('A B')`)

This was indeed a problem on the job position apply form pages where the
main editable element is the <form/> element itself. Indeed, the snippet
options' selectors which began by 'form' were not able to match. Worse,
the selector is used for a jQuery search for drag & drop and saving but
not for initialization (where it is used as a `is` check on clicked
elements). So, some DOM were able to be modified by options but not
properly (re)configured before saving.

opw-705902
opw-741305
2017-05-29 13:14:22 +02:00
Odoo Translation Bot 14b30c4000 [I18N] Update translation terms from Transifex 2017-05-28 00:28:16 +02:00
Sylvain GARANCHER e529dc1e95 [FIX] mass_mailing: set cron to noupdate
To avoid forcing the frequency or active.
Move to data file with noupdate enabled

Closes #17227
2017-05-26 17:33:40 +02:00
Jerther e1cd0dc821 [FIX] project: view_mode of open_view_project_all_config
"list,form" should be "tree,form"

Closes #17118
2017-05-22 09:23:55 +02:00
Odoo Translation Bot 3d904cf694 [I18N] Update translation terms from Transifex 2017-05-21 00:28:50 +02:00
Nicolas Martinelli 2c86366610 [FIX] crm: convert lead to opportunity
- Create a contact
- Create a lead
- Convert lead to opportunity w/ link to existing customer option

Salesperson on the lead to opportunity merge overrides the salesperson
in the contact record.

Link with existing customer should not override salesperson on contact
record. The two fields should be independent of each other unless you
are creating a new contact.

opw-659028
opw-740526
2017-05-18 17:06:42 +02:00
Nicolas Seinlet 12808c512d [FIX] point_of_sale: speedup order creation
When creating orders from the interface, all the orders of the current session
are in the cache and slow compute methods are recomputed.
Clear the cache before evaluating to execute _compute_amount_all on the current
order only.

The cache mechanism has changed in v10 and no longer contrains all orders.

opw-741442
2017-05-18 16:17:50 +02:00
Martin Trigaux f4ce2c7c2a [FIX] point_of_sale: restore removed method
Was removed at 173b76c7bb but was used in pos_blackbox_be (and maybe other
custom modules)
Restore the previous method that will call a read on the computed fields
2017-05-18 14:34:52 +02:00
Jérome Maes c5555a439e [FIX] calendar: use the correct model
Getting the recurrent event in an order that make
sense for this model.
`self` is mail.message model, so this order can cause
crashes, since calendar.event and mail.message have
many different fields.

opw-743265
2017-05-18 09:30:11 +02:00
Nicolas Lempereur 65808bbb2e [FIX] models.py: less botched copy for callable translate
Fields translated with function such as `xml_translate` or
`html_translate` have translations such as:

  lang=fr_FR, src="Tree", value="Arbre"

when the value directly stored in the table could be:

 <strong>Tree</strong>

The code to copy translations when duplicating a record did not take
this into account and when not in english, would add previously not
existing translations such as:

 lang=fr_FR, src="<strong>Tree</strong>", value="<strong>Arbre</strong>"

This is wrong since for example after a copy in french, what is in the
database is:

 <strong>Arbre</strong>

This commit change this so that the translation in the database stay the
same:

  lang=fr_FR, src="Tree", value="Arbre"

This translation will still not apply (if the base language is different
and a translation different than the source exists) but it is more
logical to have this.

This change also magnify an issue that was that if a translation was:

  Tree -> Arbre

and the content `<strong>Arbre</strong>`. The translation doesn't happen
in one way, but does when doing the reverse translation.

So:

 translation (Tree -> Arbre):
  `<strong>Arbre</strong>` -> `<strong>Arbre</strong>` <= FAIL
 reverse translation (Arbre -> Tree):
  `<strong>Arbre</strong>` -> `<strong>Tree</strong>` <= WORKS

this broke the test that something reverse translation of a translation
got the original. But testing this if the translation did not work seems
to make little sense.

opw-740213
closes #16984
2017-05-16 18:05:49 +02:00
Nicolas Martinelli b218c5410f [FIX] point_of_sale: journal domain
- Sell a product in the POS
- Go back in the backend
- Return the product
- Click on "Payment"

The user is allowed to select any journal. It should be restricted to
the payment method available in the POS.

opw-743585
2017-05-16 14:52:09 +02:00
Olivier Dony 1070b83e14 [FIX] l10n_cn*, payment_sips: clarify obsolete licensing info
The license info for these modules was a leftover from previous versions.

Once integrated in Odoo Community they share the same license as all
other modules, as mentioned in the LICENSE notice at the top of the
files.

opw-743686
2017-05-16 13:42:10 +02:00
Goffin Simon 8c22c8b625 [FIX] sale: _get_invoiced with same sequence for PO and SO
When PO and SO used the same sequence, a vendor bill with a source
document equal to the sequence of a SO could be displayed by this
SO(in the smart button "invcoies").

opw:693991
2017-05-16 13:23:57 +02:00
Olivier Dony 2c4512c263 [MERGE] Forward-port saas-6 up to 7dc2ed94c3 2017-05-16 09:22:27 +02:00
qdp-odoo a95a667563 [REF] account: validate of FY lock date into a dedicated method.
in res.company write(), create a sub method _validate_fiscalyear_lock()
so that it is easier to inherit to modify or extend its
functionality.

Was PR #16615
2017-05-15 23:37:48 +02:00
Joren Van Onder 7836a83b3b [FIX] point_of_sale: currency and decimal precision on ESC/POS receipt
Decimals were either hardcoded or not set at all.

opw-741752
2017-05-15 11:30:29 -07:00
Odoo Translation Bot 12a049e551 [I18N] Update translation terms from Transifex 2017-05-14 00:28:46 +02:00
Joren Van Onder 3d3391da86 [FIX] pos_mercury: take into account rescue sessions
If there are open rescue sessions there will be multiple opened
pos.session records with the same user.

A better solution would be to make the POS client send back the
pos.session id it belongs to and use that instead, but this would be
unsuitable for a stable release. It will instead be done in master.

opw-743318
2017-05-12 19:14:01 -07:00
Nicolas Lempereur 89e644000a [FIX] web_editor: don't resize iframe in content
In 4e0e376b0 an iframe for the readonly preview was added when
displaying html fields.

In e5112ee00 this iframe was only used if style-inline was set in the
widget options.

This brought an incompatibility if the not iframed preview contained an
iframe (eg. a youtube video which is then resize to a 30px height) which
is solved by this commit.

opw-725161
closes #16955
2017-05-12 16:21:14 +02:00
Pierre Masereel 36aebfb0f7 [FIX] base: ir_cron active_test in context
When the list view of 'ir_cron' is opened, the key 'active_test' is set
to False in the context to see all cron, even the archived ones.

The problem by passing 'active_test' in context is that it's propagated
to all actions launched from this view, for example whan you run
manually a cron, this key is passed to the cron action, which may leads
to call some actions on archived records which is not intended.

To fix this issue, we removed the key 'active_test' from context and
instead create a filter that show all crons set by default.
2017-05-11 11:25:11 +02:00
Olivier Dony 7dc2ed94c3 [MERGE] Forward-port 8.0 up to e0014387 2017-05-11 09:05:32 +02:00
Olivier Dony e0014387c5 [FIX] report: always close pdf files after merge
If an exception during the merges (such as a file descriptor overrun), we
would otherwise depend on the next garbage collection to close the
files. But the next GC may never come.

For example if we ran out of OS file descriptors during merge, all future
requests will crash for the same reason, and the process will never recover
because the GC will never run.

Much easier to explicitly close the files all the time.
2017-05-11 09:01:12 +02:00
Olivier Dony 3978713996 [FIX] mass-mailing: unsubscribe even when archived
A record (Partner/Lead) that was archived can still be unsubscribed.
2017-05-11 09:00:44 +02:00
Juan Jose Scarafia 53dfb12394 [FIX] sale: deposit product with multiple company taxes
When creating a down payment for a SO, the applied taxes must
be the taxes of the company order. In this way, it's the same behavior
as a product with multiple taxes is added on a SO, only the order company
taxes are applied.

opw:741958
2017-05-10 16:38:48 +02:00
Nicolas Martinelli 3bdea9eb54 [FIX] account, account_tax_cash_basis: incorrect entry
- Activate multi-currency: EUR is main currency, USD is secondary
  currency
- USD currency rate is:
  1.2 on 2017-01-01
  1.5 on 2017-02-01
- Create a journal in USD (e.g. Cash)
- Create a tax with Cash Basis activated
- Create an invoice of 100 USD on 2017-01-15
- Register a payment of 100 USD on this invoice on 2017-02-15
- 4 journal entries are created:
  the payment itself
  the exchange rate difference
  the cash basis linked to the payment
  the cash basis linked to the exchange rate difference

The cash basis linked to the exchange rate difference should not be
created, it is not necessary. The amounts are already included in the
cash basis linked to the payment.

opw-728767
2017-05-09 15:13:29 +02:00
Nicolas Martinelli c401219f97 [FIX] sale_service: new line in task description
Backport of ee6e2f5771

opw-741240
2017-05-09 12:04:52 +02:00
Ayoub Zahid 5da86716be [IMP] pos_restaurant : export the TableWidget and the FloorScreenWidget
These widgets were not exported, which means that there was no good way
to extend them.
2017-05-09 11:53:16 +02:00
Kevin Graveman 180c769ab4 [FIX] hr_timesheet_invoice: Typo in html element name tbody
Closes #16827
2017-05-08 13:42:08 +02:00
Odoo Translation Bot 77be55fcc7 [I18N] Update translation terms from Transifex 2017-05-07 00:28:47 +02:00
Olivier Dony ca27673a54 [FIX] tools: always preload PIL with basic formats
Ensures that only the desired list of images formats are made
available via PIL: BMP, GIF, PNG, JPEG, TIFF and PPM.
2017-05-05 16:57:08 +02:00
Olivier Dony 58114e4954 [FIX] tools: always preload PIL with basic formats
Ensures that only the desired list of images formats are made
available via PIL: BMP, GIF, PNG, JPEG, TIFF and PPM.
2017-05-05 16:56:31 +02:00
Olivier Dony 5e776e7a30 [FIX] tools: always preload PIL with basic formats
Ensures that only the desired list of images formats are made
available via PIL: BMP, GIF, PNG, JPEG, TIFF and PPM.
2017-05-05 16:55:12 +02:00
Christophe Simonis c65db01eb7 [MERGE] forward port branch saas-6 up to 96650373f8 2017-05-05 15:34:30 +02:00
Christophe Simonis 96650373f8 [MERGE] forward port branch 8.0 up to e3081dbb7e 2017-05-05 15:31:08 +02:00
Jérome Maes e3081dbb7e [FIX] ir_cron: log message in the right place
Log message in except clause to force displaying
traceback in logger exception.

Courtesy of chs
2017-05-05 13:57:32 +02:00
Nicolas Lempereur 89ad23bc2d [FIX] web: auto_search false and search view
By default auto_search is set to `True` on window actions, this mean
that for example on a list or kanban view the records will be searched
on the view opening without any user action needed.

Setting it to `False` disable this.

Doing this had two drawbacks:

- depending on race condition, the view could be displayed before the
  search view was loaded,

- the code expected `active_search` to be present which was not the case
  in this instance.

Before 151c9074 the second issue would not happen (active_search was set
directly resolved if a search was not to be done) and this commit also
wait for the search view being ready before showing the view.

opw-741186
opw-741546
closes #16805
2017-05-05 13:31:11 +02:00
Thomas Binsfeld d7afa84169 [FIX] purchase: seller selection
- Create an article with one supplierinfo (with a delivery delay and a
  min. quantity > 0) and a customer delivery delay
- Trigger the creation of a PO by a procurement order for this article

The supplier delivery delay is not taken into account in the date order
of the PO because the seller is not selected.

This is because the procurement quantity is not sent to the seller
selection.

opw-16702
Closes #16702
2017-05-04 17:01:50 +02:00
Nicolas Martinelli fb257353fa [FIX] account, purchase: performance when adding PO
- Create 5 PO with 40 lines each for Partner A
- Create an invoice
- Add each PO thanks to the field "Add Purchase Order"

The process takes more and more time for each PO.

Most of the time is spent in the recomputation of the secondary fields
(in the `onchange` method of "models.py"). The root cause is the cache
invalidation due to the relational fields recomputed as superuser by
default.

opw-740485
2017-05-03 12:57:23 +02:00
Christophe Simonis c66e454f06 [MERGE] forward port branch saas-6 up to 671864e72b 2017-05-02 12:07:05 +02:00
Christophe Simonis 671864e72b [MERGE] forward port branch 8.0 up to 0b4d01f1d3 2017-05-02 11:40:48 +02:00
Odoo Translation Bot 0b4d01f1d3 [I18N] Update translation terms from Transifex 2017-05-01 02:40:51 +02:00
Odoo Translation Bot 32ea5ad690 [I18N] Update translation terms from Transifex 2017-04-30 00:29:03 +02:00
Dainius Kaniava 4f9ac6c093 [FIX] web: properly transfer javascript options
Fix options not being passed from view declaration to JS
frontend function. If passing option 'no_create': True,
"Create" button was still visible.
2017-04-28 21:13:28 +02:00
Dainius Kaniava 43cdec0517 [CLA] boolit.md
Signed corporate contributor license.
2017-04-28 21:13:09 +02:00
Nicolas Lempereur a9da6e9f3f [FIX] web_calendar: date start and record move
The calendar view display records with the start corresponding to the
record field set as `date_start`, and the stop to the record field set
as `date_stop`.

Since ef886aed2 there some issue when mingling calendar with
`date_start` or `date_stop` date fields and `all_day` unset:

- if user had timezone between UTC+8 and UTC+14, when moving as
  "All day", the record start would be saved on the previous day.

- if used had timezone between UTC-12 and UTC-5, when moving as
  "All day", the record end would get on the following day.

- if the event was moved onto a given time (in the "Day view"), the
  event start would be set to the previous day if it was before midnight
  in UTC time, and the end would be set on the following day if it was
  after UTC 23:59.

The source of the issue was that after ef886aed2 a datetime was always
sent to the server, so depending on the browser timezone the server
could for example receive '2017-04-27 23:00' instead of '2017-04-28'.

This fix go back to the previous behavior.

fixes #15540
opw-15540
closes #16698
2017-04-28 18:01:32 +08:00
Richard Mathot eefd0de541 [FIX] safer company name as email sender
In some email templates of Odoo, the From: field is generated from the
company name. If this name contains an "&" character, this will lead in
an escaping eg; &amp;

Sender header will look like:
From: Machin &amp; Brol <machinbrol@toto.com>

This case is not well handled by email providers like Gmail, that
splits the line on the ";" and considers there are 2 senders, and then
discards the email.

We then fix the templates, waiting for a better fix in master.
2017-04-28 10:19:06 +02:00
Nicolas Martinelli 814d903109 [FIX] purchase: zero line
To reproduce, see issue #16611.

In the mentioned use case, a line with a quantity of zero is created,
which generates a traceback at invoice validation.

Fixes #16611
opw-741055
2017-04-28 09:28:14 +02:00
Christophe Simonis 283b648c18 [MERGE] forward port branch saas-6 up to 5c05e39713 2017-04-26 19:41:00 +02:00
Christophe Simonis 5c05e39713 [MERGE] forward port branch 8.0 up to 2a65b8156d 2017-04-26 19:38:17 +02:00