Commit Graph
103218 Commits
Author SHA1 Message Date
Odoo Translation Bot 77be55fcc7 [I18N] Update translation terms from Transifex 2017-05-07 00:28:47 +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; &

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
Christophe Simonis 2a65b8156d [FIX] base: run defined modifiers tests 2017-04-26 19:36:10 +02:00
Nicolas Lempereur 551719a81e [FIX] mass_mailing: mail template not in english
Mass mailing `mail templates` when selected in a mass mailing are
always used in the english version.

But when another language is involved the edition of mass mailing
`templates` had a number of issue. For example saving the edited english
would only modify the user current language.

These issues are cause because the widget with snippets used for mass
mailing templates edition is not compatible.

Several fixes were proposed, what was choosen finally was to use the
correct widget with the following behavior changes:

- the snippets are not showed anymore in mass mailing templates,
- the current language can be edited and is saved rightly,

The shortcoming this give mass mailing templates can be partly
compensated by:

- editing the template back (if someone want the old behavior),
- duplicating mass mailings which keep the snippets and translations,
- doing a customization to improve the situation

closes #16255
fixes #16165
opw-726746 opw-727232

note: this fix is only needed for 9.0 and saas-11.
2017-04-26 18:37:53 +02:00
Nicolas Lempereur cd2b07ea44 [FIX] pad: remove wrong warning at pad creation
When creating a pad before this change these were the steps:

- modify pad URL for new pad URL
- end of record loading

This caused an issue because modifying the record at this point would
mark it as dirty before displaying it (which would result in a erroneous
warning "The record has been modified, your changes will be discarded.
Are you sure you want to leave this page ?").

With this fix:

- modifying the pad URL is done after the record is ready

- deferred have been unified (to remove possible race conditions)

closes #15239
opw-702797

forward port note: this change is needed up to saas-15, over saas-15
only a small part is needed (because x2many views are loaded with the
root view and there is one widget instance per record).

code note: it would be better to modify load_record of form view and
delay `record_loaded` upto after x2many views are loaded, but possible
impacts have been judged too risky so this is done only in pad widget.
2017-04-26 18:32:18 +02:00
Olivier Colson 863f46ec71 [FIX] resource: conditions on id
Don't check ids with "id is None" statements, as it won't match if id is False. This caused some bugs with MRP when confirming a MO with no calendar defined, if mrp_operations was installed.
2017-04-25 11:49:01 +02:00
Nicolas Martinelli ec8699db17 [FIX] account: performance in issued total
When a partner has a lot of contacts, the computation of the issue total
takes a lot of time. Indeed, it performs the computation for the
partner, but also for all the children, despite the fact that the amount
is not displayed.

opw-726355
2017-04-24 13:27:02 +02:00
Xavier Morel 577d986391 [FIX] account: subtract refund amount from "awaiting payments" total
Currently the amounts of all invoices (linked to sale or purchase
journals) is summed regardless of these invoices being bills or
refunds, this means e.g. if you create an invoice for 1000 then a
refund for 500 on this invoice, the dashboard will display an
"awaiting payment" total of 1500 which while technically correct is
not really logical or helpful from a user's POV.

Fix summation to take in account the invoice type (invoice or refund)
and remove refund amount from the total amount.

Intent validated by @lap-odoo, also not ignoring or removing refunds
from count to avoid situations like "0 Awaiting Payments [for] $-1200"
which would be really strange.

OPW-728860
2017-04-24 11:58:42 +02:00
Goffin Simon 5b50284127 [FIX] point_of_sale: fiscal position with included taxes in POS
To substract the included tax from the unit price when it's mapped
by a fiscal position in the POS.

To keep the same behavior introduced by this commit odoo@503820a

opw:710437
2017-04-24 11:40:25 +02:00
Nicolas Martinelli 9e6860a228 [FIX] web: make DB name more flexible 2017-04-24 08:02:22 +02:00
Odoo Translation Bot 91c00bc011 [I18N] Update translation terms from Transifex 2017-04-23 00:31:08 +02:00
xmo-odoo f5e197570b [FIX] translation 2017-04-21 14:46:05 +02:00
Christophe Simonis 8de514f805 [MERGE] forward port branch saas-6 up to b084ffd7f1 2017-04-21 14:07:02 +02:00
Christophe Simonis b084ffd7f1 [MERGE] forward port branch 8.0 up to 716ceede16 2017-04-21 14:05:52 +02:00
Christophe Simonis 144ff9a61a Revert "[FIX] web: refuse DB name with space"
This is too restrictive.

This reverts commit 606712a5d2.
2017-04-21 14:02:58 +02:00
Oliver Dony 60d7e9a307 [FIX] point_of_sale: avoid creating multiple rescue sessions
If multiples orders are sent when the original session is already closed

Replace and closes #16525
2017-04-21 12:37:26 +02:00
Christophe Simonis 53288aa837 [FIX] base: show "Contact Creation" group option in non-debug mod 2017-04-21 12:20:00 +02:00
Pedro M. Baeza e7a2a542b8 [FIX] account: filter 'Due Payments' report on reconciled flag
SQL that retrieves data for the "Due Payments" report doesn't include
any filter for excluding AR/AP move lines already reconciled, which
shouldn't be presented in this report.

Courtesy of Pedro Baeza. Was PR #16440
2017-04-20 17:50:36 +02:00
Nicolas Lempereur 716ceede16 [FIX] web_enterprise: kanban_state_selection ie
On IE (from 9.0 up to at least IE EDGE 14) we have this behavior
for the method serializeToString of XMLSerializer:

> (new XMLSerializer()).serializeToString($('<b>"</b>')[0])
  '<b xmlns="http://www.w3.org/1999/xhtml">"</b>'
> (new XMLSerializer()).serializeToString($('<b>"</b>')[0].firstChild)
  '&quot;'

Whilst browser such as chromium or firefox have:

> (new XMLSerializer()).serializeToString($('<b>"</b>')[0])
  '<b xmlns="http://www.w3.org/1999/xhtml">"</b>'
> (new XMLSerializer()).serializeToString($('<b>"</b>')[0].firstChild)
  '"'

Hence for IE9 and over, if in a `<t t-extend/>` a `t-jquery`
sub-directive (without `t-operation`) is available, we can have
broken javascript if a " is transformed into an &quot; at a unfortunate
location.

This commit favour node.data over XMLSerializer serializeToString to
avoid the possibility of this issue when a text node is processed.

opw-727283
2017-04-20 17:08:17 +02:00
Goffin Simon 0ae30c5997 [FIX] base_partner_merge: deduplicate contacts in multi company
When deduplicating contacts, the function _process_query doesn't use
the orm to fetch the partners to merge according to the criteria.
So there were some access error in multi company when trying to merge
contacts from a not allowed company.

Now a check is made with the orm before merging the contacts.

opw:708457
2017-04-19 15:45:38 +02:00
Ankit Joshi 7591f59c5e [ADD] stock: add the field 'description_picking' in picking report
The field is defined but never user. It could be useful to indicate
to the delivery guy that the product is 'fragile' or whatever.

opw-728874
2017-04-18 14:36:32 +02:00
Nicolas Martinelli b4193cd35b [FIX] sale: set timesheet line to zero
- Create a SO with a product that is a service and will be invoiced
  based in delivery quantities and will be tracked on timesheets and
  contract.
- Confirm
- Use a simple user that only has for rights: "Employee"
- Create a timesheet as the employee for the contract created by the sale
- Log some time
- Save it
- Check the SO: ok the number of hours should be "to be invoiced"
- Edit the timesheet and set one day to 0 hours => Access Error

In case of a zero value, the timesheet widget sends an unlink command
for the corresponding entry. In this case, the `sudo` is not set at the
appropropriate moment since the context key `force_so_lines` will resue
lines which are not defined in the `sudo` environment.

opw-728453
2017-04-18 11:55:16 +02:00
Odoo Translation Bot 5d5bd2c404 [I18N] Update translation terms from Transifex 2017-04-16 02:54:21 +02:00
Odoo Translation Bot 2c75ad396f [I18N] Update translation terms from Transifex 2017-04-16 00:30:18 +02:00
Ronald Portier e479828025 [FIX] account_voucher: add missing context
Fixes #16420
Closes #16421
2017-04-14 15:11:30 +02:00
Raphael Collet 975086c039 [FIX] fields: avoid invalidation of fields computed on new records
Issue: when a field is computed on a new record, the record is not marked as
"being computed", and it could therefore be invalidated.  The fix consists in
using the standard method that marks records before calling the compute method.
2017-04-12 17:15:03 +02:00
Christophe Simonis f10ef71f06 [MERGE] forward port branch saas-6 up to 87b21d19eb 2017-04-12 12:58:19 +02:00
Christophe Simonis 87b21d19eb [MERGE] forward port branch 8.0 up to ded636eae1 2017-04-12 12:56:09 +02:00
Nicolas Martinelli eb9b888c5a [FIX] point_of_sale: empty picking
- Create 2 stockable products (A & B).
- Sell these products in the POS, but leave the qty of Product A to
  zero.
- Validate and pay
- In the backend, return the products and register payment

Two pickings are created, and one of them is empty.

Products with a quantity of zero are not included in a picking.
Therefore, we should ignore them when the pickings are created.

Fixes #16292
opw-728101
2017-04-12 09:33:01 +02:00
Raphael Collet 4f98311623 [FIX] fields: recompute recursive stored fields
This is a backport of rev 3481f0faff.
2017-04-12 09:18:23 +02:00
Goffin Simon a0fed3b845 [FIX] sale: _compute_analytic with amount=0
Steps to reproduce:
-Create a product P  with a standard price = 0 and its internal category
is in perpetual valuation
-Create a SO with an analytic account and a line with one product P
-Confirm the SO
-Create and validate the invoice

Bug: The delivered qty on the SO was equal to 2 instead of 1 because two
analytic lines are created by function create_analytic_lines with amount=0.
So in function _compute_analytic, the domain was [('so_line', 'in', self.ids), ('amount', '<=', 0.0)]
and it summed the two analytic lines for these two lines. Now analytic lines with amount=0 and linked
to a move line are summed if the they are linked to entries for an account of type "Expenses"(user_type_id).

opw:727302
2017-04-11 15:00:14 +02:00
Goffin Simon 1dc361704e [FIX] account: Making a refund with modified taxes
Step to reproduce the bug:
1.Create a product with a customer tax(15%) for a price=100
2.Create a customer invoice with this product
3.Change the amount of the tax to 10(instead of 15)
4.Validate the invoice
5.Click on "Refund invoice"
6.Select the refund method "Modify: create refund, reconcile
and create a new draft invoice"

Bug the new draft invoice has 15 as amount of tax

Now all the taxes from the invoice when preparing the refund in function
_prepare_refund, in this it keeps all the modified taxes.

opw:726491
2017-04-11 14:15:39 +02:00
Nicolas Martinelli 8c326c5cc5 [FIX] stock: reordering rules of archived products
When the scheduler is run, the reordering rules of archived products are
selected.

opw-728316
2017-04-11 13:19:44 +02:00