Commit Graph
107534 Commits
Author SHA1 Message Date
Martin Trigaux 93a9da54bd [I18N] l10n_ch: add German translations 2017-03-27 15:27:45 +02:00
Laurent Smet 3fa807397b [FIX] purchase: missing UOM digits
In Sale order decimal accuracy works well as expected for Order
quantity, Delivered Quantity and Invoiced Quantity BUT in PO there is
issue to show decimal accuracy into the "Received Quantity" and "Billed
Quantity".

opw-726110
2017-03-27 13:44:12 +02:00
Goffin Simon f97eb0ac2b [FIX] hr_expense: Creation of entries from several expense lines
When posting journal entries for an hr.expense.sheet with several expense lines
(by clicking on the button "Post journal entries"), all the account move lines
created for the same sheet must be linked to the same account move because
the model hr.expense.sheet has just a field "account_move_id" to access all the entries
(by clicking on button "Accounting Entries")

opw:715523,709930,725798,716239
2017-03-27 13:11:40 +02:00
Nicolas Martinelli 5c0901b9d7 [FIX] hr_expense: expense of zero
Complement of commit cab436819f

Previous commit was not considering a complete expense sheet of zero.

opw-710695
2017-03-27 11:59:15 +02:00
qsm-odoo eac7e16e20 [FIX] web: no formview dialog during editable list edition
Clicking on an editable list row makes the row editable. Clicking on
an editable list row while another row is being edited, first make
the row being edited readonly before making the clicked row editable.
The row which goes back to readonly have to be reloaded, operation
which is not instantaneous. If another row is clicked while a row
is going back to readonly (this typically happens if a row is double
clicked while another one is being edited), a form view dialog was
opened to edit the row (behavior which was not expected).

opw-710627
2017-03-27 10:35:55 +02:00
Nicolas Martinelli 92d25e7f08 [FIX] mrp: BOM count
- Create a product with 2 variants
- Create a BOM specific for each variant
- Go in the product variant page

the stat button indicates 2 BOMs instead of one.

opw-725126
2017-03-27 08:31:51 +02:00
Odoo Translation Bot a18c453dd5 [I18N] Update translation terms from Transifex 2017-03-26 04:30:35 +02:00
luisg123v 5d66082edf [CLA] add luisg123v to Vauxoo's CLA
Done at #16028
2017-03-24 16:32:58 +01:00
Nicolas Martinelli 906bde20c8 [FIX] mrp: "Unreserve" visibility
- Create a MO, components needed are 1 unit of Prod A and 1 unit of Prod
  B.
- Click on "Check Availability"

The button "Unreserve" does not appear unless all components are
available.

opw-724940
2017-03-24 15:51:42 +01:00
Jérome Maes 8bfc7ef2d5 [FIX] hr_timesheet_attendance: missing widget on pivot report
All total of hours should be displayed with float_time widget.
2017-03-24 15:37:48 +01:00
qsm-odoo 1a40e7b6c7 [FIX] report: allow to use Dialog API in report editor
When editing a report, the editor is launched in an iframe with an
environment which is different from backend and frontend. The problem
here is that the editor uses the `Dialog` API while the report editor
was not loading the associated xml file this API needs to work. Indeed,
when clicking on the "Discard" button for example, nothing seemed to
happen as a dialog was supposed to be opened.

This worked before as the editor was not using the `Dialog` API until
commit 62fb1bb924.
Unfortunatly, this commit adapted "iframe.js" to load the associated
xml file but forgot to adapt the report editor. In a future
amelioration, this "iframe.js" file could be added to the report editor
so that all "iframe editor" environement work properly with the same
adaptation code.

opw-724784
2017-03-24 14:39:09 +01:00
Martin Trigaux b3934619d4 [FIX] hr_holidays: allow overlapping leaves and allocations request
The allocation requests have date fields that are only informative.
Having an allocation request (e.g. specifying dates of a public holiday)
overlapping the dates of a request is actually fine (if an employee is sick
during a public holidays, he can still use it for a leave request).

Closes #11026
2017-03-24 12:09:17 +01:00
Fabien Meghazi 1217ae914b [FIX] web/mail: many2many_tags_email widget returns erratic values (opw: 693067)
The many2many_tags_email's internal value change logic fails to process
all its values. It is not concurrency proof either.

The internal value change logic is now replaced by a mutex and deferreds
are used for the partner's form view popups in order to allow concurrent
events.
2017-03-24 11:31:56 +01:00
Goffin Simon 2b013d193b [FIX] website_quote: Description on a sale.quote.line
To have the same behavior when the variant is added manually on the SO
or when it's added with a sale.quote.template. The description on the
SO line must include the default_code and the name of the variant.

opw:725072
2017-03-23 18:54:41 +01:00
Raphael Collet 9e23458d40 [FIX] models: ensure recomputation after inversing fields (#15683)
When updating record using "record.field = value", we need to ensure that
all fields in cache depending on "record.field" will be recomputed.
2017-03-23 17:11:00 +01:00
Nicolas Martinelli 0cfb7fc347 [FIX] website_sale: redirect if no order
- Visit the webshop without being logged in, do not put anything in the
  cart.
- Visit the URL /shop/address
- An expty SO is created

opw-725277
2017-03-23 14:45:54 +01:00
Martin Trigaux 71d86afb58 [FIX] base: deactivate default language
When a language is deactivated, it may still be referred to in a default value.
A ir.value is created at the database setup to specify the default language.
If a user deactivate the default language but not the ir.value, the creation of
a res.partner would fail as trying to set an unknown value to a selection field.

This commit removes the default value when deactivating the linked language.

The patch is minimal for the bug. A more generic solution would be to verify the
ir.value when calling the default_get method.
This is however a risk of performance degradation (e.g. during a csv import) for
a rare scenario.
The dynamic selection scenario is probably on relevant to res.lang.
A similar problem can occur with many2one fields but is difficult to fix without
performance degradation.

Closes #16009
Fixes #15979
Fixes #3854
2017-03-23 14:38:05 +01:00
Goffin Simon 1031a699b7 [FIX] rating_project: Unescaped signature
Typo error

Steps to reproduce:

1. Go to a project and activate customer satisfaction on tasks
2. Activate the developer mode and go to Settings > Technical > Templates
3. Find the "Task: Rating Request" template
4. Click on Preview

Bug: Signature is in HTML code

opw:725722
2017-03-23 13:17:45 +01:00
Nicolas Martinelli 0e7ced70c1 [FIX] mail: reply message type
- On a model, log a note and ping User A
- Go in the inbox of User A, and reply to the message

The reply is a comment (therefore sent to all followers of the
document), not a note.

opw-710326
2017-03-23 11:14:42 +01:00
David Tran bfb2771d63 [FIX] mrp: mrp.message security
The security policy did not allow mrp manager to create mrp alert
message

Closes #14675
2017-03-23 10:27:06 +01:00
David Arnold 14368a0e72 [FIX] stock: stock user shall scrap
Before this, the stock user had readonly ACL on the scraping action. He
therefore could not scrap products during his normal operations. It is assumed,
that this was not an intended default, as not being otherwise documented.

Closes #15955
2017-03-23 10:22:28 +01:00
Nicolas Martinelli c6a7e4fbb9 [FIX] purchase: billed qty
In a SO, the "Invoiced Qty" can decrease if the refund is generated from
the SO. It doesn't decrease if the refund is generated from the Invoice.
However, we don't have this mechanism in a PO since the invoice is not
generated directly from the PO. There is therefore no way to decrease
the "Billed Qty".

We authorize the "Billed Qty" to decrease in the case of PO.

Complement of commit 9b5281adb4

opw-724474
2017-03-22 10:43:04 +01:00
Nicolas Martinelli ffaa65833d [FIX] website_forum: missing translations
The attribute `data-content` is not part of the translated attributes.

The fix is similar to e8f1c5dbc6

opw-710314
2017-03-22 10:00:38 +01:00
Martin Trigaux f1d004b996 [FIX] mail: disable prefetching on send mail
Minimal backport of 00bd7274
Processing large mails may reach the memory limit and crash the mail queue.

Such scenario was found at opw-724697
2017-03-21 16:48:31 +01:00
Goffin Simon b957fa76b7 [FIX] mrp: Wrong domain filter for mrp.production
When clicking on smart button "Manufacturing" for a variant, the action
"act_product_mrp_production" was called to apply the default filter on
product_id = active_id to select the right mrp.production. But the field
product_id was also called "Raw material" and a wrong domain was applied
each the action was triggered from a variant.

opw:725050
2017-03-21 16:44:08 +01:00
Nicolas Martinelli 0ecc9c3034 [FIX] hr_expense: partner on AML
It will cause issues later on. A workaround has to be found.

This reverts commit d69aa2d98b.
2017-03-21 15:28:00 +01:00
Nicolas Martinelli d69aa2d98b [FIX] hr_expense: partner on AML
- Create a partner who is a contact of a company
- Associate this partner to an employee
- Create an expense for the employee, validate and post entries

The AML created are linked to the company, not the partner.

Since the bank account account is registered on the partner, and not the
company, this is more logical to link the AML with the partner.

opw-724550
2017-03-21 13:36:19 +01:00
fwi-odoo 1213920e40 [FIX] web_editor: correctly fetch the inherited views
The `issuperset` method check if a set contains all the element of the set given
in paremeter. So in our case, the user needed to be in all the view groups
to get the inherited view. That's not the behaviour expected.
If the user is in only one of the group required to have access to the view,
we want to return the inherited view.
2017-03-21 12:59:54 +01:00
qsm-odoo 3aabf8101a [FIX] web: correctly check editable list validity
The editable list has a `is_valid` method which checks that all the
records it contains have valid data. The problem is that it was
considering that all the records in the `dataset.cache` were part of
the x2x field the editable list is working with. This is wrong as the
`dataset.cache` can contain information which are not part of the
editable list anymore.
See the commit which introduced the use of the `dataset.cache`:
a9d20d9fa0

This was causing issues with rare cases of an editable list which
contains another editable list (even invisible) which was sharing
common information with its parent editable list.

opw-710627
2017-03-21 11:55:45 +01:00
Martin Trigaux 1cefe8d787 [FIX] point_of_sale: IE close itself on the POS opening
When a session was opened in Internet Explorer (11 at least), it was directly
closed.
This is due to the concurrency mechanism created to avoid having two tabs opened
with the same window.

To avoid having two tabs opened on the same session, the browser listen to
'storage' event, triggered when the localstorage is updated.
On most browsers, this is only triggers when the localstorage is updated in a
different window of the same browser.
On IE 11, it is also triggered when the localstorage is modified in the current
window.
It is unclear if this is a bad interpretation of the specification or not.

A bug has been reported[1] to Microsoft about it but is, as of today, postponed
without action.

To avoid the above issue, add a parameter containing a timestamp at the session
launch and be able to detect that the storage events comes from the current
window.

opw-724851

[1] https://connect.microsoft.com/IE/feedback/details/774798/localstorage-event-fired-in-source-window
2017-03-21 09:56:57 +01:00
Nicolas Lempereur a247939620 [FIX] test_new_api: new steps for onchange and o2m
In f65475d6 one2many fields of default view in a form view were propagated
to the ORM so the value received from an onchange was not empty.

These new steps test this on a tree view embedded in a form view, or a
tree view originating from a default view by testing onchange adding row
or updating values of a one2many.
2017-03-20 13:25:40 +01:00
Nicolas Lempereur f65475d68c [FIX] fields, web: improve form onchange to x2many
In a form view, when a field onchange lead to a change on a x2many,
there was two different behavior:

- if the x2many had an embedded view (eg. a tree view inside a form
view) the onchange would notify that it expected the x2many field in
this embedded view to be changed and handled the changes correctly.

- if the x2many had a default view, the onchange ORM would not be
aware the x2many could be modified and would not sent the changes
back causing blank or not updated x2m lines and error on save.

---

Two solutions were birthed to solve the second point:

=> PR #10557 = solving everything

With this PR the onchange in the ORM is aware of every fields in the
current view (even field in a x2m in a x2m in a x2m in a form view) and
if any of these are change the javascript gets back the value of the
fields present in the view.

This PR has currently not been merged by fear of changing too much and
anyway could only be done in master.

=> PR #12249 = if no field for x2many, send its form view fields

With this change, if the ORM onchange is not aware of the fields in the
x2many widget to returns, all the field in the x2m default form view are
returned.

This was merged in bbdf960 but introduced a number of other issue:

- in most situation the x2many is represented by a list view, which may
have fields missing of the form view,  so the original is still present.

- the view used may differ from the default form view in other way
(depending on value in context or other possibilities).

- the form view could have fields not present in the form view which
could end up in `write` on fields which should not be written to.

---

This commit reverts bbdf960 and adapts a small part of #10557 so the
x2many with default view works as an embedded x2many. For more than one
level (eg. a x2many in a x2many) this would still not work but it is
only solvable by a PR such as #10557 which could only be targetted for
master.

With this commit:

- the list of fields sent to ORM onchange is computed at the first onchange
- the fields from a x2many field default view is sent for onchange
- the initial onchange on record creation is delayed to when x2many are loaded

closes #12249, closes #15336, closes #15890
fixes #11236, fixes #12249, fixes #15129, #15419
opw-705965 opw-716095 opw-715619 opw-710440
2017-03-20 13:25:07 +01:00
Nicolas Martinelli 9b5281adb4 [FIX] purchase: count billed qty in refund
- Create a PO, receive products (1.0 unit)
- Create corresponding invoice, validate => Billed Qty = 1.0
- Refund invoice => Billed Qty = 2.0

opw-724474
2017-03-20 10:42:53 +01:00
amoyaux 447356f7ee [FIX] calendar: set correct recurring start_date
A recurring event with a start date and a time duration had a wrong start and
stop date computed.

Introduced at 76b724294a.
Previously the r_date contained only the start_date but now it contains both
start and stop dates. This implies that the method 'get_recurrent_ids' could
use 'get_search_fields' with a stop_date (depending on the domain order) and
returns incorrect dates.

This commit ensure to launch the get_search_fields with the start date.

Closes #15922
2017-03-20 10:25:30 +01:00
Nicolas Martinelli 51613744f5 [FIX] account_asset: default account in invoice
- Define a user with accounting rights "Billing"
- Create an invoice or vendor bill
- Add an invoice line without product

It is impossible to save because the mandatory field "Account" is hidden
and empty.

This is because of an onchange which overrides the default method.

opw-716208
2017-03-20 08:29:36 +01:00
Odoo Translation Bot 6e363a5756 [I18N] Update translation terms from Transifex 2017-03-19 04:33:46 +01:00
Christophe Simonis 7043fd529f [FIX] test_converter: use unicode string for comparison 2017-03-18 23:35:58 +01:00
Christophe Simonis 31ebb07773 [MERGE] forward port branch saas-11 up to aefdf96c25 2017-03-17 17:55:30 +01:00
Christophe Simonis aefdf96c25 [MERGE] forward port branch 9.0 up to af64780a2d 2017-03-17 17:06:32 +01:00
Martin Trigaux 2c1257fe88 wow 2017-03-17 14:40:45 +01:00
Martin Trigaux 13bfc8ee50 [FIX] crm: remove unused field from fields to merge
The field email is no longer present on the crm.lead object

opw-725112
2017-03-17 14:33:44 +01:00
qsm-odoo 7401807510 [FIX] web_editor: copy/paste in the editor
Commit 906875fc78 (followed by commit
76be5eed44) tried to tweak to copy/paste
functionality of the editor.
Indeed, in PDF file, when copying a paragraph, a line feed is added at
each forced line break (page width end). This forced a line feed and
a new paragraph in the pasted text. The goal was to get rid of those
useless linebreaks when pasting.

The ideal solution would be to detect that the text was copied from
a PDF but it is not possible. However, this commit improves the
heuristic: if this is not plain text, then nothing is done, the content
is pasted normally. If it is plain text (like when copying from pdf),
then each line break which is surrounded by letters or numbers is
considered an useless line break and replaced by a space. This is
obviously not perfect but the previous implementation was really wrong
(it was removing line breaks which were not preceeded by punctuation in
all cases, which was removing lots of useful line breaks).

Note: this commit also fixes a bug -> text was not able to be pasted
with Internet Explorer.

opw-715920
2017-03-17 11:44:28 +01:00
Martin Geubelle 22e7b6befb [FIX] web_kanban: only give fields in view to record
This commit partially reverts 5b4f7c1 where `fields_view.fields`
had been replaced by `fields`, which could have been set to all
fields in the model.

This modification can sometimes lead to a problem, during the
fields value transformation. The ID, which wasn't given previously
is now parsed. When creating a new record, the field ID is not an
integer but a string (representing the virtual ID). If the field
is in the arch, it will be postprocessed
(see https://github.com/odoo/odoo/blob/saas-11/addons/web/static/src/js/framework/data_manager.js#L201)
and its type will become `id`. As this postprocessing is not done
if the field in the view, the parsing was on the original type
(integer) and not the special id type.
2017-03-17 11:13:49 +01:00
Nicolas Martinelli af64780a2d [FIX] base: no-break hyphen
- Create an invoice with two products
- Each line has a long description (spread on 2 lines)
- The second line has a negative value
- Print the invoice (PDF)

The amount spreads on two lines, split as:
$ -
1,000.00

This is due to the wkhtmltopdf version with patched QT. Unfortunately,
upgrading to the latest version 0.12.4 doesn't solve the problem.

The solution is to replace the '-' by a non-breakable hyphen.

opw-711002
2017-03-17 09:07:15 +01:00
Nicolas Lempereur 508a002e69 [FIX] web_editor: glitch english several times
When using the iframed editor with multilang selector (present if there
is another lang installed than en_US) an "English" language was present
before each translation language.

opw-696891
2017-03-17 08:10:52 +01:00
Nicolas Lempereur fb05d8845d [FIX] web_calendar: events not appearing in arabic
Fullcalendar expect as `start` and `end` property of an event object:

> When specifying Event Objects for events or eventSources, you may
> specify a string in IETF format (ex: "Wed, 18 Oct 2009 13:00:00 EST"),
> a string in ISO8601 format (ex: "2009-11-05T13:15:30Z") or a UNIX
> timestamp.

(as seen in https://fullcalendar.io/docs1/event_data/Event_Object/)

Before this commit we could for example in arabic provide an invalid
date string "٢٠١٧-٠٣-١٦ ١٦:٠٠:٠٦" instead of "2017-03-16 16:00:06".

This commit solves this by always providing fullcalendar an ISO8601 date
string.

opw-705752
2017-03-16 22:07:29 +01:00
Nicolas Lempereur f50ba68be7 [FIX] web_editor: handle margin:initial correctly
The transcoder (which transforms stylesheet rules to inline style) did
some compression of the padding and margin css properties to not always
have margin-top + margin-right + margin-bottom + margin-left.

This could cause an issue when the value of margin or padding contained
an initial or inherit value because browsers (at least firefox and
google chrome) doesn't allow it. Thus the preview could for example have
bigger veritcal spaces arround `<p />` tag than what was seen when
editing.

With this fix instead of invalid:

    margin:initial initial initial initial

we have:

    margin:initial

And instead of invalid:

    margin:initial 5px 6px 7px

we have:

    margin-top: initial; margin-right: 5px; margin-bottom: 6px; margin-left: 7px;

opw-706535
2017-03-16 18:26:32 +01:00
Simon Lejeune be9dce625c [FIX] stock: inventory adjustment and negative quants
It is still possible to have negative and positive quants in the same
location because of returns: if you send something to the customer that
is not there and you return it, you will still be able to reserve the
returned goods to send to another client.

Before, if you would do an inventory adjustment, it would not take into
account these returned quants and their negative counterpart, which made
them difficult to get out of the system.

This fix takes them into account by creating two movements for one
inventory line: move the positive counterpart to the inventory location
before getting back from this location the same quantity.

This way, even if you have 0 as quantity on hand but you have those 2
quants, it will eliminate them. (if you are increasing the stock, part
of the process might have done it automatically already).

Test cases contributed by @jir-odoo
2017-03-16 17:30:02 +01:00
Christophe Simonis 5f9d382ed4 [MERGE] forward port branch 9.0 up to e542b450a3 2017-03-16 16:01:56 +01:00
Nicolas Martinelli 0590af8b3f [FIX] mrp_repair: tax included
- Create a product with price tax included
- Create Repair order
- Add the product in tabs "Operation" or "Invoicing"

The tax is added twice in the total.

opw-709608
2017-03-16 13:23:33 +01:00