Commit Graph
106548 Commits
Author SHA1 Message Date
Thibault Delavallée 588b6020a6 [CLEAN] mail: remove unused import 2016-12-06 15:15:48 +01:00
Darshaka Pathirana ecc6733cee [FIX] doc: remove remaining references to 9.0
Closes #14608
2016-12-06 14:58:55 +01:00
Darshaka Pathirana b3a0622b52 [CLA] signature for jkirk
cf #14608
2016-12-06 14:58:54 +01:00
Goffin Simon 45284a3f03 [FIX] sale: action_view_invoice
When clicking on button "invoices" in a SO, the invoice linked
was opened without the action in url. So when refreshing the browser,
a supplier invoice was displayed instaed of a customer invoice.

opw:695844
2016-12-06 14:56:19 +01:00
Atchuthan a55a83cb61 [FIX] report: add fontawesome to print icons in report
Fontawesome icons were available in v9.0, but not in v10.0 following
refactoring.

Closes #14433
opw-694666
2016-12-06 13:24:49 +01:00
Nicolas Martinelli b67871d5c7 [FIX] account: account domain in reconciliation
In the reconciliation widget, create a counterpart line. No domain is
applied on the "Account" field regarding the company, meaning that we
can select an account from any company.

opw-694149
2016-12-06 12:41:06 +01:00
Nicolas Martinelli 34981f5ad4 [FIX] project_issue_sheet: copy issue
- Create a project which handles Tasks and Issues
- Create an issue
- Book some timesheet on the issue, thanks to the tab "Timesheet"
- Go to the Timesheet application, you'll see that the time booked
  appears in the grid
- Change the time spent from the grid view.

The time added is booked on the issue, while the user doesn't expect it.

This is because the modification of a timesheet line copies an existing
line, then change the necessary values (see method `adjust_grid`).

Ideally, we should have a link module between timesheet grid and project
issue. Another solution would be some hack in the `timesheet_grid`
module to prevent `issue_id` to be copied. However, there is little to
no use of copying a timesheet line in general, so the solution chosen
should not affect the existing processes.

opw-697018
2016-12-06 11:07:25 +01:00
qdp-odoo a20d1e9256 [FIX] account: do not create the 'undistributed profits/losses' account if it is already given in the CoA 2016-12-06 10:22:00 +01:00
Balázs Palcsó 09fdda0c7a [ADD] l10n_hu: add a missing Hungarian account tax template entry
Closes #14582
2016-12-05 17:47:35 +01:00
Balázs Palcsó fa66aad703 [CLA] signature for balapal
cf #14582
2016-12-05 17:47:35 +01:00
Nicolas Lempereur 83956d4c49 [IMP] mail: keep multiple spaces in chatter and chat
In chat window, a chatter and discuss, the text zone appear as a pure
text zone but is transformed later on in HTML to add mentions links and
possibly other features.

Thus, when we wrote multiple spaces or a space at the next to html tag,
with how html worked they were collpased into one (or zero).

To keep them, we need to wrap the content with `<pre />` tag or replace
spaces with `&nbsp;`.

closes #14593
opw-695535
2016-12-05 16:53:04 +01:00
Nicolas Martinelli 3ea207b5c3 [FIX] mrp: potential traceback
- Create a MO for 500 Units
- Produce 500 Units
- In the "Finished Products" tab, change the produced quantity to 450

At that point, the button "Mark As Done" doesn't appear anymore.
Therefore, we need to change the "Quantity To Produce" to 450 => This
causes a traceback because of a division by zero.

Fixes #14499
opw-695269
2016-12-05 16:50:37 +01:00
Eric Antones d6b26f1d62 [FIX] base: Catalan separator format and thousands separator
* The thousands separator does not appear by default in Catalan language. Using
it is the usual practice

Closes #14123
2016-12-05 16:43:14 +01:00
Alexis de Lattre ef8116628b [FIX] base: display the value of ir.property
For the records with type='selection' (example: "Cost Method Property")

Closes #14413
2016-12-05 16:33:56 +01:00
Osval Reyes 5a4c548ab1 [REF] base: update peruvian currency symbol
- Currency symbol position is set before the amount, not after
- Since last month 2015 (see https://es.wikipedia.org/wiki/Sol_(moneda_del_Per%C3%BA) )
the currency passed from S/. to S/ (without the dot)

Closes #14370
2016-12-05 16:26:55 +01:00
Osval Reyes e4d1155d6f [CLA] include osvalr as a member of Vauxoo
cf #14370
2016-12-05 16:26:54 +01:00
Sebastián Ramírez f378a31564 [FIX] project: raise validation error
The ValidationError in Task._check_dates was returned instead of raised
Closes #14393
2016-12-05 16:20:59 +01:00
Goffin Simon 14e5b7fcb6 [FIX] portal_stock: access rights
When clicking on the delivery order linked to the SO with a portal user,
a access right error was raised.

1. Due to this record rule: res_partner: portal/public: read access on my commercial
The portal user cannot read the fields of the partner linked to the warehouse of the picking.
The unreadable fields were in external_layout_footer.

2. The portal user is not allowed to read the field barcode on a product.

opw:693238
2016-12-05 15:52:48 +01:00
Lucas Perais (lpe) 1f795a2d5a [FIX] hr_holidays: notifications: This commit corrects the behavior of notifications.
The actions on notifications are appended to an empty list

[FIX] hr_holidays: appending actions on notifications

Closes #14565
Related to ticket 695738
2016-12-05 10:25:16 +01:00
Andrea Stirpe b431e18226 [FIX] l10n_nl: adjust sequence to handle default taxes
Default sale tax should be Verkopen/omzet hoog
Default purchase tax should be BTW te vorderen hoog (inkopen)

Closes #14174
Fixes #14166
2016-12-05 09:21:36 +01:00
Jared Kipe 88114f45b6 [FIX] website_project_issue_sheet: duration rounding
Complement of commit 4fea5d1020

opw-694014
Closes #13781
2016-12-05 09:14:45 +01:00
Moisés López 44a6366ba4 [REM] all: Remove es_MX.po files
- Previous information:
  - `es_MX` language is not published to [transifex](https://www.transifex.com/odoo/odoo-10/languages/) this is a official announce from thread [Regional languages and Spanish (Latin America) translations](https://www.odoo.com/es_ES/groups/community-translators-63/community-translators-20325962?mode=thread&date_begin=&date_end=) by @mart-e
  - Currently we have the files `es_MX.po` with terms translations outdated or wrong translation.
    - [Example wrong translation es_MX.po](https://github.com/odoo/odoo/blob/8de795291/addons/account/i18n/es_MX.po#L7788) should be [es.po correct translation](https://github.com/odoo/odoo/blob/8de795291/addons/account/i18n/es.po#L7975)
  - Now to change a `es_MX.po` a PR is required.
  - `es.po` terms translations and the most terms are fine for México too. (Not regional translation is required for most cases)

Then our regional translation process should be:

| step | If accepted | If not accepted |
|------|-----|-------|
|   Create a proposal to original language `es.po` from transifex    |   good and finish!  |   Create a new PR to odoo/odoo adding just that special term to `es_MX.PO` |

This PR reset the `es_MX.po` terms in order to fix many wrong terms using the good `es.po`.

Closes #14555
2016-12-05 09:11:13 +01:00
Odoo Translation Bot 260a3da768 [I18N] Update translation terms from Transifex 2016-12-04 03:44:39 +01:00
Olivier Dony 553ea82f81 [FIX] ir.qweb: invalidate cache only when active
Complements rev. 8a7af44a07

The assets cache is only active while not in "xml dev" mode,
so the cache clearing must not be done while this development
mode is active (i.e. with `--dev=xml`)
2016-12-02 17:19:08 +01:00
Nicolas Martinelli 4fea5d1020 [FIX] website_project_timesheet: duration rounding
- Record a timesheet line duration of 2 minutes
- View the record in the frontend: it gives 1 minute 59 seconds

opw-694014
2016-12-02 12:52:38 +01:00
Olivier Dony 8a7af44a07 [FIX] ir.qweb: force multi-worker bundle invalidation
When a newly-spawned worker detects a stale asset bundle
(due to its empty cache), it regenerates the new bundles,
but has to notify other workers, who would otherwise continue
serving the old list of bundles. This typically leads to
some missing bundles (served as empty files with 404 status),
that could only be cured by restarting the whole server.

Forcing the cache invalidation on the worker that notices
the staleness has no effect (the cache was empty) except
that it causes a cache refresh signal to be broadcast to
all workers.
2016-12-02 12:25:16 +01:00
Simon Lejeune 12e36a66f2 [FIX] qweb: render a child view with its xmlid
QWeb's get_template:
  * remove the fallback that returned the entire result of IRQweb's
    `load` if no match was made between the t-name of the first children
    of this result and the template to render
  * When get_template receives an etree, directly return it and don't
    try to find a matching t-name in it. The loader was not called but
    a matching was trying to be made, now that we removed the fallback
    a lot of tests that were relying on passing etree didn't work
    anymore.

IRQweb's load now return consistently the full result of IrUiView's
`read_templace` when asked to load an id or an xmlid. We make a special
case to patch the result if asked with an id or with a child view so
that the "t-name" of one of the first children of what we return is
always what QWeb is looking for.
2016-12-02 12:24:51 +01:00
Simon Lejeune 9dd5bd9349 [ADD][TEST] qweb: render a child view with its xmlid
Issue: rendering a child view with its xmlid return its `read_template`
wrapped in a "templates" tag. In the context of asset bundles, it leads
to the browser not being able to handle it correctly.

Explanation:

What happens when you render a view? First, QWeb will call is method
`get_template` with the argument `template`. This argument contains the
name of template you try to render. It can be an id or an xmlid (also an
etree but let's forget this one at the moment). Within the method
`get_template`, it'll call IrQweb `load` method, again with the argument
`template`.

This `load` method will call IrUiView's `read_template` wih `template`
as argument. This method will return the view in the database with all
inheritance applied, wrapped in a "templates" tag. When `read_template`
has returned, the `load` method will, according to `template` and in the
following order:

  * if `template` is an xmlid, return the whole `read_template`.
  * if `template` is an id and if one of the first child has "t-name"
    attribute (whatever its value): return the subtree of this first
    child.
  * if `template` is an id and one of the first child is a "t" tag: set
    a "t-name" attribute to this first child with the id as value and
    return the subtree of this child.

As you may note, inconsistencies already appear.

Now that QWeb's `get_template` has finished its call to IRQweb's `load`,
it'll do:

  * if one of the first child of what's returned as a "t-name" attribute
    matching the `template` argument, return this subtree
  * return the whole thing returned by IRQweb's `load`.

Let's say we have a view:

                <t t-name="base.dummy">
                    <div><span>something</span></div>
                </t>

What happens if we render this view with its xmlid? First Qweb's
`get_template` will load the template with the help of IRQweb's `load`
method. As it received an xmlid as argument, it'll return the whole
`read_template` output, wrapped in a "templates" tag. Qweb's
`get_template` will now check if one of the first child has a "t-name"
attribude matching the `template` argument (base.dummy in our case). It
has one, so it returns the subtree and the compilation continue.

What happens if we render this view with its id? IRQweb's receives an id
as argument, gets the `read_template` of it and check if one of the
first child has a "t-name" attribute. It does, so it returns this
subtree to `get_template`. The latest will check if one the first
children has a matching "t-name" attribute with the `template` argument.
It does not, so it returns the whole thing.

Weird things in the way we got here but the result is the same whatever
you tried to render the template with an id or an xmlid.

Now let's add an extension to this view and try to render it (the
extension):

                <xpath expr="//div" position="inside">
                    <span>another thing</span>
                </xpath>

What happens if we render this view with its xmlid? `load` will receive
an id, so it'll return the whole `read_template` stuff. Note here that
if you try to render a parent or child view, `read_template` will return
the same thing: the parent with all inheritance applied. Now `get_template`
looks through the first children of this to find a matching "t-name" and
it doesn't find one, as the "t-name" is the one of the parent view and
we tried to render with the child xmlid. It so returns the whole thing,
wrapped in a "templates" tag. There's our issue.

It's working if we tried to render the thing with its id because `load`
would have returned the right subtree.

This commit adds a test showing the failure.
2016-12-02 12:24:51 +01:00
Nicolas Martinelli a894fb33c1 [FIX] product: bigger ratio
- Create a new unit of measure with 'Bigger than the reference Unit of
  Measure'
- Save
- Edit and change the ratio ==> the ratio is set back to its value

opw-695507
2016-12-02 11:10:19 +01:00
Whitley 3344cce465 [FIX] doc: Updated link for ProxyFix
Dead link
Closes #14484
2016-12-02 11:07:14 +01:00
Alexis de Lattre fc57a20f6e [FIX] mrp: don't use the same default_code for different products
Wrong demo data
Closes #14544
2016-12-02 07:08:09 +01:00
Christophe Simonis 18fc260369 [FIX] website_sale: fix js error introduced by previous forward-port 2016-12-01 19:05:28 +01:00
Christophe Simonis 5dc1c57601 [MERGE] forward port branch saas-11 up to 7842498 2016-12-01 16:59:33 +01:00
Christophe Simonis 7842498934 [MERGE] forward port branch 9.0 up to 5bed95f 2016-12-01 15:33:21 +01:00
Christophe Simonis 5bed95fbd5 [MERGE] forward port branch saas-6 up to 97af232 2016-12-01 14:47:17 +01:00
Christophe Simonis 97af2325cd [MERGE] forward port branch 8.0 up to 0105cbb 2016-12-01 14:39:25 +01:00
Martin Trigaux 2e960afd37 [I18N] update saas-11 translations by merging 9.0 and 10.0 2016-12-01 13:52:01 +01:00
Nicolas Martinelli 4f43ec4fcf [FIX] calendar: invitation template lang
- Create a calendar event
- Add invitees

The invitees receive a mail so they can accept/decline. When clicking,
the page is always displayed in the language of the administrator.

Since the `request` object is not directly associated to the attendee,
the template is not rendered in his language. Since (i) the template
should not be rendered lazily (see comment in code) and (ii)
`request.render()` does not allow the rendering in an arbitraty
language, we do a manual call to `render_template`.

opw-694718
2016-12-01 11:52:27 +01:00
Denis Ledoux 0105cbbcf9 [FIX] website: make website default language required
The website `default_lang_id` was not required,
while the algorithm choosing the website language
expects it to be required.

This solves the below issue, when your browser language is en_US:
 - add a second language to the website (e.g. fr_BE or es_VE),
 - in the website settings, remove English from the languages
 - in the website settings, unset the default language
 - try to go on the website

You will have a crash:
```
  File "/home/odoo/src/odoo/saas-11/addons/website/models/ir_http.py", line 193, in _dispatch
    resp.set_cookie('website_lang', request.lang)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wrappers.py", line 992, in set_cookie
    self.charset))
  File "/usr/lib/python2.7/dist-packages/werkzeug/http.py", line 905, in dump_cookie
    value = to_bytes(value, charset)
  File "/usr/lib/python2.7/dist-packages/werkzeug/_compat.py", line 106, in to_bytes
    raise TypeError('Expected bytes')
TypeError: Expected bytes
```

This is because the `request.lang` is set to `False`
because of the below algorithm in `ir_http.py`:
```
    nearest_lang = not func and self.get_nearest_lang(path[1])
    url_lang = nearest_lang and path[1]
    preferred_lang = ((cook_lang if cook_lang in langs else False)
                      or self.get_nearest_lang(request.lang)
                      or request.website.default_lang_code)

    is_a_bot = self.is_a_bot()

    request.lang = request.context['lang'] = nearest_lang or preferred_lang
```
`nearest_lang` is `False`, because there is no nearest language
available for the browser lang (`en_US`)
`cook_lang` is `False` for users who never went on the website
`request.website.default_lang_code`, which is the last feedback,
is also `False` because you removed the default language
in the website settings.

opw-695621
2016-12-01 11:37:03 +01:00
Goffin Simon a433ae65cb [FIX] purchase: default picking_type_id with ir.values
The deleted code put the same picking_type_id for all companies.
The function _get_picking_in returns the right default picking_type_id
according to the company.

Steps to reproduce:
-stock.warehouse0 is on company A.
-Define another company B with its own warehouse.
-Update the purchase module -> a new default value for picking_type_id on purchase
order for company B is created wtih the value of company A
-Create a purchase order on company B, Odoo tries to get the picking_type_id from company A.
If user doesn't have any rights on company A, it occurs a security warning.
Otherwise the purchase order is linked to a picking operation of another company.

opw:694059
2016-12-01 10:04:30 +01:00
Nicolas Martinelli e6ba772406 [FIX] mrp: BOM Cost report
1. Set up BoM component A with cost of $1 per kg
2. Create a BoM which uses 1t of component A
3. Execute the BOM Cost report

Cost of component A is $1, while it should be $1000.

opw-695014
2016-12-01 09:59:09 +01:00
Denis Ledoux 021878f9c4 [FIX] tools: formatlang currency digits
When passing a value along with a currency
to the `formatLang` method,
the currency symbol was added to the value,
but the amount wasn't rounded to the currency
decimal places, as it would be expected.

For instance, when using the currency "XOF",
with as symbol "CFA" and 0 decimal places,
2 digits after the comma were still displayed
in the accounting dashboard, while the user expects none.

This behavior to take the number of digits out of the currency
is already the behavior of the `formatLang` methdod in the reports
(`/openerp/report/report_sxw.py`)
it was just not yet the case in the misceleanous tools
(`/openerp/tools/misc.py`).

opw-695496
2016-11-30 16:46:49 +01:00
Goffin Simon 60300fc287 [FIX] website_sale: _get_pl_partner_order
The function _get_pl_partner_order must also return the available
pricelists on the website with promo code. In this way, the user
can use promo code on the website.

opw:694556
2016-11-30 16:19:56 +01:00
Goffin Simon c352945bf5 [FIX] account: Reversing exchange rate difference entry
To reverse all the the exchange rate difference entries created during the reconciliation.

Before the fix:

Configuration
- Company Currency USD
- Multicurrency
- Other Currency EUR with exchange rates per day.
- Bank journal in EUR with allow cancelation.

Steps
- Create more than 1 invoice for customer in EUR and validate it. (Example. 3 invoices 100 EUR each)
- Create a bank statement in EUR Bank with the payment of that invoices (Example. 300 EUR)
- Conciliate the payment with the invoices.
- The journal entries for exchange difference are correctly created(three exchange rate difference entries).
- Cancel the payment from bank statement.

Bug:
There was only one reverse journal entry created for the exchange rate difference of the all reconciliation.
But three reverse journal entries  for exchange rate difference entries were expected.

opw:694120
2016-11-30 15:57:29 +01:00
Antonio Espinosa aac0faafb8 [FIX] membership: remove date_cancel for draft invoices
In `action_cancel` method below, the date_cancel is set when the linked invoice
is canceled.
When the canceled invoiced was reset to draft, the date_cancel was not removed.
This change makes sense as the state of the membership line is changed from
`cancel` to `waiting` when the invoice is reset to draft.

Closes #14313
2016-11-30 14:33:16 +01:00
Martin Trigaux c965e64e52 [FIX] l10n_multilang: add only translate flag
No need to redifine existing attributes.
Introduced at db682bf
2016-11-30 13:58:03 +01:00
Nicolas Martinelli e5cad9a45e [FIX] web: date autocompletion
When a user fills partially a date or datetime field, the system will
somehow autocomplete the value entered. For example, if the user enters
"11//11" then clicks on the Tab key, it will be completed as
"11/11/0000".

However, the year 0000 is not recognized in Python, and this causes a
crash upon saving.

opw-695035
2016-11-30 13:56:20 +01:00
David Tran 0d160851c7 [ADD] l10n_multilang: allow to translate account tag
Account tags are used to describe accounts and contains text that makes ense to
be translated for multilangue CoA

Closes #14527
2016-11-30 13:55:53 +01:00
David Tran f16d2e9ec7 [ADD] sign the CLA
Closes #14527
2016-11-30 13:55:53 +01:00
Denis Ledoux 05010362d5 [FIX] product: remove currency rounding check against DP account
The decimal precision `Account` no longer exist.
This check is therefore pointless, and prevent
to change the rounding of the currency of the main company
2016-11-30 13:24:03 +01:00