Commit Graph

77409 Commits

Author SHA1 Message Date
Paul Catinean ee2f2f2229
[FIX] website_sale_options: untranslated term
Case sensitive term wrongly exported
Introduced at 414175c
2016-12-05 17:02:20 +01:00
Odoo Translation Bot efdeb6779f [I18N] Update translation terms from Transifex 2016-12-04 02:57:30 +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
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 adb12f95ea
[IMP] sale: remove untranslated terms
Closes #14497
2016-11-30 08:37:57 +01:00
Jeremy Kersten 1f10ef8055 [FIX] website_sale: fix amount format display
Before this commit, amount updated from ajax request don't respect currency format.
Eg: 1.200,000 => 1200.00

Now we use the grouping/thousand separator/decimal separator from l10n,
and if class decimal_precision is defined in dom, we use it. (format=0.001)

This commits closes: #11553
This commits is related to #1103
2016-11-29 17:00:18 +01:00
Odoo Translation Bot 8d724924f7 [I18N] Update translation terms from Transifex 2016-11-27 02:57:09 +01:00
Nicolas Martinelli cd440312ce [FIX] account: partial payment reconciliation
When processing a partial reconciliation in a foreign currency, a
currency exchange difference might be generated during the
reconciliation process (see OPW for a detailed use case).

This prevents the user to process the reconciliation since he will get
the error: 'You have to provide an account for the write off/exchange
difference entry.'

The fix is to use the company-related foreign echange gain and loss
accounts automatically to book this difference.

opw-687975
2016-11-25 10:21:01 +01:00
Denis Ledoux 456d7b38f1 [FIX] sale: store triggers for related stored `company_id` sale orders
When changing the company of a sales order,
the change was not propagated to the related, stored, company field
of its sale order lines

These triggers makes that happen.

opw-694683
2016-11-24 16:14:36 +01:00
Denis Ledoux 295b96c0b3 [FIX] product: store triggers for related stored `company_id` in pricelists
When changing the company of a pricelist,
the change was not propagated to the related, stored, company fields
of the `product.pricelist.version` and the `product.pricelist.item`

These triggers makes that happen.

opw-694683
2016-11-24 16:08:07 +01:00
Jairo Llopis fbdac9c853 [FIX] website: fix search in existing pages
Previous implementation did not allow the user to search for pages 'name'
but only on the slugified name.

Now we slugify the needles before to find a match.

1. Create a new page: 'The new'
2. add a link on your website and try to find this page...
    - Before this commit, the only ways was to type 'the-new'
    - After this commit 'the new', 'The new', 'The-new', ... will match

This commit closes #10771
2016-11-22 13:47:17 +01:00
Jairo Llopis 954fb6da3c [FIX] website_event_sale: Preserve context when updating cart
Without this patch, when a product was added to cart, if this addon
was installed, it always landed in English in the SO.

This happened because the context, containing the current language,
was being aborted here (`context=None` instead of `context=context`).

This commit closes #14340
2016-11-21 22:18:48 +01:00
Odoo Translation Bot f9f562339f [I18N] Update translation terms from Transifex 2016-11-20 02:58:43 +01:00
Damien Bouvy 205b5542ca
[FIX] payment_paypal: accept PDT requests on /dpn route
It seems Paypal does not always send the same responses on auto-return
even when PDT is off. Although not reproducible on a Paypal sandbox,
sometimes the system auto-return to /payment/paypal/dpn without any
meaningful POST data. This seems to only happen with new accounts
that use the 'Hermes' web application of Paypal.

The correct thing to do would be to add a new field on the paypal
payment provider for PDT token and make the PDT flow available
to users; but this is a stable branch and this fix is already
sufficiently delicate. This shall be done in master though.

From this revision on, users can then activate PDT on their paypal
account, set the PDT token as an ir.config_parameter value (WITH
GROUP RESTRICTION SET TO ADMIN/SETTINGS GROUP!!!) and the system
will process these requests correctly.
2016-11-18 09:46:37 +01:00
Olivier Dony 8e8b7925d2
[FIX] hw_escpos: auto-detect endpoint address
Instead of hardcoding the IN & OUT endpoint
addresses for the ESC/POS printers, we now
attempt to auto-detect them.

This should increase compatibility with many
compatible thermal printers that are simply
using a different address, such as the
- STMicroelectronics POS58 Printer USB
- HU HAI SUNCSW Receipt Printer Co.,Ltd. Gprinter USB Printer

Fixes #12890
2016-11-16 14:52:34 +01:00
Josse Colpaert 1de37862d6 [FIX] stock: when matching moves with pack operations through quants, it did not match the packages correctly. Courtesy of Pedro Baeza
Before, it did a search to see if the package existed,
but the only thing it needs to do is see if the package
on the pack operation corresponds to that of the quant.  (no need to check children also)

There is a test added:
A picking with 120 pieces incoming, 120 in pack 1, 80 in pack2
When we deliver those in a picking out, with product pack operations: (by taking them out of the pack)

120 from pack 1 and 80 from pack2,
we should only have 2 quants and links between moves in the end

And before, it generated 3 because it matched the wrong quants and made the wrong links.

opw 693760 closes #13836
2016-11-16 11:26:20 +01:00
Olivier Dony 46ce74cdde
[FIX] hw_posbox_homepage: update links and version
Also added a direct link to the remote connect page to
grant remote SSH access via ngrok.
2016-11-14 17:11:57 +01:00
Olivier Dony 265c9f7b06
[IMP] hw_proxy: add lsusb full output to hw status page 2016-11-14 17:11:57 +01:00
Olivier Dony d1b0b9e656
[FIX] point_of_sale: check required commands before building POSBox image 2016-11-14 17:11:57 +01:00
Olivier Dony f579acf02f
[FIX] hw_scale: update driver for rs232_devices map and support AdamAZExtra scale
This commit fixes the driver to respect the new device
registration mechanism via hw_proxy.rs232_devices.

It also refactors the code to more easily support multiple
scale protocols, and introduces support for the ADAM Equipment
AZExtra scale protocol. (Might be compatible with other ADAM
Equipment scales)

Support for th AZExtra scale is experimental at the moment,
especially given two annoying problems with this model:
 -  they do not support proper probing (stays mute until a
    non-zero weight is measured), so they have to be probed
    last and *assumed* to work
 -  the scale beeps when a read attempt is made and the
    weight is not stable yet, or the weight has been already
    read previously. This constant beeping during operation
    is mitigated by extra delays between readings, but might
    still prove to be a major issue for supporting this scale.
2016-11-14 17:11:57 +01:00
Olivier Dony eeadeb0d6e
[FIX] hw_proxy,hw_blackbox_be: make RS-232 drivers protect their device
RS-232 drivers now need to register any device
they are handling in the hw_proxy.rs232_devices map.
This will prevent other drivers from probing them,
possibly messing up with the device.
Any update to rs232_devices must be done while holding
the hw_proxy.rs232_lock.

The hw_scale driver will be updated to use this mechanism
in the next commit, that will also handle a new RS-232
scale protocol.
2016-11-14 17:11:57 +01:00
Olivier Dony 2fd4dfca7f
[FIX] point_of_sale: update POSBox image creation script
- ngrok download URL has changed
- default kernel for raspbian image has changed and needs to match
- remove pre-existing git checkout to avoid conflicting
- wait a few seconds after setting up loop dev with kpartx to access image
  contents - sometimes required to let the device appear in /dev
2016-11-14 17:11:57 +01:00
Odoo Translation Bot fa544c9da0 [I18N] Update translation terms from Transifex 2016-11-13 02:57:18 +01:00
Nicolas Martinelli 4809b57283 [FIX] account: tax line amount
The company currency is USD, the invoice currency is EUR.
- Create an invoice in EUR, set an invoice date
- Compute the taxes (click on "update" button)
- Change the exchange rate between EUR and USD
- Validate the invoice

At validation, the tax lines are not recomputed. Therefore, the tax
amounts, are still converted in the company currency using the old
rates. On the other hands, the other account move lines will have the
appropriate new rate.

Closes #14024
opw-692430
2016-11-07 14:31:00 +01:00
Nicolas Martinelli 0a17be70e0 [FIX] account: tax line amount
The company currency is USD, the invoice currency is EUR.
- Create an invoice in EUR, set an invoice date
- Compute the taxes (click on "update" button)
- Change the exchange rate between EUR and USD
- Validate the invoice

At validation, the tax amounts are not recomputed. Therefore, they are
still converted in the company currency using the old rate.

Closes #14024
opw-692430
2016-11-07 13:35:54 +01:00
Odoo Translation Bot 369e0bcb45 [I18N] Update translation terms from Transifex 2016-11-06 02:56:48 +01:00
Goffin Simon e0ffc23a59 [FIX] report_intrastat: Not allowed to delete record
It's not allowed to delete record from the tree view of intrastat report.

opw:692016
2016-11-03 14:46:47 +01:00
Nicolas Martinelli 2508786127 [FIX] account_asset: first depreciation amount
When an asset is set as Prorata Temporis, with a one month period, the
first depreciation amount is computed on the basis of the remaining days
in the purchase year. This doesn't make sense for a monthly
depreciation.

This commit makes the distinction between a monthly and a yearly
depreciation. In the case of a monthly depreciation, the remaining days
in the purchase month are taken into account.

opw-690034
2016-11-03 09:15:05 +01:00
Goffin Simon d406314638 [FIX] account_voucher: Wrong reconciliation of customer payments
Steps to reproduce :

1. Create a new customer
2. Create an invoice with an amount of 50.- for this new customer and validate it
3. Create a refund with an amount of 70.- for the same customer and validate it
4. Create a Customer Payment for this customer and validate it. The Invoice will be paid with 50.- of the refund. 20.- are still on residual in the refund.
5. Create a new invoice with an amount of 50.- for the same customer.
6. Create a new Customer Payment for the same Customer and validate it.

The Full Reconcile Boolean stays checked inspite of "Open Balance" of Refund amount is less than the Invoice amount.

After the fix:
Full Reconciliation Boolean doesn't get checked and Allocation amount on invoice journal item line should be same
as Open balance of the Refund Journal Item. So Invoice stays open with Balance amount.

opw:691577
2016-10-31 11:55:49 +01:00
Odoo Translation Bot c340284a60 [I18N] Update translation terms from Transifex 2016-10-30 02:56:40 +02:00
Martin Geubelle 9f09c625f5 [FIX] calendar: rule._bynweekday can be a set
Depending on the version of dateutil, rule._bynweekday can either be
a tuple or a set (see https://github.com/dateutil/dateutil/pull/54), which,
in the case of a set, breaks the access by index (see related issue:
https://github.com/dateutil/dateutil/issues/24).

By casting it into a list, we make sure that we can access [0] in both case.

Credits to jke ; closes opw-690761.
2016-10-28 11:26:23 +02:00
Nicolas Lempereur 5d17749ff4 [FIX] web: repair length field in view list
Underscore method _.each expects an array like object when a "length"
property is present.

This was an issue with a record having a numeric "length" field set to a
non-negative value. When changing a line the change would not appear on
blur.

This issue was fixed with 0e664c9e9 but introduced back with f0e331e00.

opw-691070
2016-10-24 13:25:58 +02:00
Odoo Translation Bot 8f484fd137 [I18N] Update translation terms from Transifex 2016-10-23 02:57:47 +02:00
David Beal e773c1dce8
[FIX] resource: prevent error when deleting resource.calendar records
Attendance entries should be cascade-deleted along with the parent
record.

Closes #10310
Closes #13044
2016-10-21 19:57:23 +02:00
qdp-odoo 001610ece9 [FIX] anglo_saxon_dropshipping: fix accounting entries creating on anglo_saxon + real_time + dropship.
This revert the fix made on 7bdd4de and replace it with a proper one that do create an account entry from stock_input to stock_output on a dropship move. That way, we avoid the manual change of account on supplier invoice. See the whole discussion on odoo#12687
2016-10-17 09:39:53 +02:00
Odoo Translation Bot d1c81f136c [I18N] Update translation terms from Transifex 2016-10-16 02:57:56 +02:00
Jeremy Kersten 33978d7a7a [FIX] stock: adjustement inventory, check options activated in res config
Before this commit, the inventory by lot/pack/serial/... was only visible
if you switch quickly between res_config and adjustment inventory... once
the vaccumn clean the osv memory, the options was ignored.

Same issue with the _get_string_qty_information function.
2016-10-14 18:07:21 +02:00
Adrien Peiffer (ACSONE) d81258ab8e [FIX] Consider currency rate to compute total amount in expense analysis
Like in Invoices Analysis, the expenses must be expressed in the currency
of the company. In this way, it makes sens to sum them to compute the total.

opw:689760
2016-10-13 11:24:06 +02:00
Jeremy Kersten d3609f7f19 [FIX] web,crm: list view, don't fallback on group_operator declared in python
Partial revert of odoo/odoo@633780a
2016-10-12 18:03:51 +02:00
Alexandre Fayolle 65c685ad24 [FIX] context mutations (#10368)
when extending these methods with the new api, the context is a frozendict
so we need to copy before mutating.

this patch was made by searching for key addition to context and calls to the
update() method on the 8.0 addons, and checking if a copy was made before in
the method.
2016-10-12 12:30:42 +02:00
Jeremy Kersten f4aae1c58b [FIX] email_template: encode date/datetime format
See more details here: odoo/odoo@6191e3f6d0

This commit closes #13704
2016-10-11 17:04:36 +02:00
Olivier Dony 789566a0d0
[FIX] website_livechat: make it auto-install
Most people install the im_livechat module and expect it
to be enabled automatically on their website.
When it doesn't work they try to use the integration JS
code and add it to their website layout, which does not
work as expected.

Setting it as auto-installed solves the issue.
2016-10-11 16:36:39 +02:00
Jeremy Kersten 633780a00c [FIX] web,crm: view_list respect group operator defined in the view.
Remove useless avg defined on crm view.

If you define avg='Average Values' in a view, now we see in the footer of list view the average.
2016-10-11 11:50:24 +02:00
Nicolas Martinelli a1d6c2d631 [FIX] account: check exchange rate
An issue occurs in the following situation:
- Define a currency exchange rate at day 1 and day 2
- Create an invoice at day 1, and calculate the taxes. Do not set an
  invoice date!
- Validate the invoice at day 2

The exchange rate for taxes is the rate at day 1, while the exchange
rate for other amounts is the rate at day 2.

There is actually no way to know what was the rate applied for the
taxes at invoice validation. There are two solutions:
- recompute the taxes at validation
- force the user to set an invoice date and recompute manually the
  taxes

The first solution might have unexpected effects, therefore the second
solution is applied.

Fixes #13473
opw-688517
2016-10-10 10:08:33 +02:00
Odoo Translation Bot d3c4ab23e4 [I18N] Update translation terms from Transifex 2016-10-09 02:56:21 +02:00
Denis Ledoux 964f42fb86 [FIX] purchase_double_validation: from waiting approval to cancel
It wasn't possible to cancel a purchase order
within the state "Waiting for Approval", despite
the fact the button cancel is displayed.

Clicking on the cancel button just did nothing.

This is now properly working, thanks to the additional
path added by this revision, between the workflow states
`CheckForApproval` and `cancel`.

opw-688685
2016-10-06 16:07:16 +02:00
Olivier Dony 12634e1227
[FIX] base_import_module, tools: raise a clear error for unsupported file types
Also restrict XML data attribute evaluation context
even for real module data files. This will prevent
accidentally depending on context parameters that
would not be available inside base_import_module.
2016-10-03 19:48:09 +02:00
Odoo Translation Bot ca18a1699c [I18N] Update translation terms from Transifex 2016-10-02 02:57:59 +02:00
Manuel Vázquez Acosta 5b692df1b1 [FIX] mail: Ignore case for mail aliases.
When receiving new mail (not replies) to an alias we should not take
case into account.

This also homogenize the treatment of local parts.  For instance, lines
967 and 980 convert the local part to lower case to avoid
case-sensitivity issues.

Also `mail_alias` normalizes alias names by lowering case and finding,
if necessary to make it unique, a suffix to alias name provided.

From RFC 5321, section 2.4:

  > Exploiting the case sensitivity of mailbox local-parts impedes
  > interoperability and is discouraged

Closes #334
Closes #13037
2016-09-30 18:41:39 +02:00
Alexandre Fayolle 94f58d647c [FIX] auth_ldap: fix authentication with special chars
encode the filter in utf-8

This prevents a UnicodeDecode error in python-ldap when the
filter contains non ascii characters.

opw-682783
closes #10899
closes #12710
2016-09-28 12:58:32 +02:00
Cesar Lage 4ab34d4156 [FIX] l10n_de: set reconciled to False for accounts of type liquidity… (#13520)
Courtesy of Cesar Lage. Thanks for the contribution
2016-09-26 09:43:08 +02:00
Odoo Translation Bot 6baef31c8f [I18N] Update translation terms from Transifex 2016-09-25 02:59:19 +02:00
Nicolas Lempereur e083d720a9 [FIX] website_blog: blog pager page issue
When we are on the page:

 /blog/myblog-1/page/2

the link to page 3 is:

 /blog/myblog-1/page/3

So we need to give /blog/our-blog-1 as source url of pager.

Previously in this instance, since 4faed0b7 the page 3 url
in this scenario would erroneously be:

 /blog/myblog-1/page/2/page/3

opw-688681
2016-09-22 08:05:20 +02:00
Jeremy Kersten 8b41933a9e [FIX] web_graph: force row title to be string
If the title was 'true' or 'false', the export failed, because we are tying to
concat bool and str. TypeError: cannot concatenate 'str' and 'bool' objects

How to reproduce, install sale, be sure to have one order with delivered = True
In Reporting / Sale analysis, add a group by 'shipped' filed to have 'true' as
title.

This commit closes issue odoo/odoo#13425
2016-09-21 10:59:39 +02:00
Odoo Translation Bot 6a1ecef775 [I18N] Update translation terms from Transifex 2016-09-18 03:05:57 +02:00
Nicolas Lempereur 1da79b872e [FIX] web: keep m2m value in list view
Currently, when rendering a list view cell with a many2many we would
empty the list of ids, and fill it again once a name_get is resolved.

But in some instance, the code could use the data when it has been
emptied out.

For example, if we set the tax_id field (inside the order_line list view
inside the sale.order form view) as requred, if we modify the order line
and save directly (without clicking outside of the list view) we can get
an incorrect error saying that the "Order Line" is not valid.

It has been reproduced when saving with CTRL + SHIFT + S on google
chrome and firefox, and there have been reports that for some
configuration it also happen when clicking on the "Save" button.

This commit change the behaviour so the value is kept whilst the name_get
is ongoing, and just use a default "false" value for the name during this
interval.

closes #13478
opw-668067
2016-09-14 15:52:48 +02:00
Damien Bouvy 3e4206b4d4
[FIX] payment_paypal: accept GET requests for Paypal DPN
Although we have been reluctant to perform this change, a specific
use case can cause customers to be redirect to the Odoo DPN url
with a GET request.

This happens when a Paypal Merchant account has the feature Guest
Checkout active; in that case, a customer can pay without having
a Paypal account (using only his credit card) and will *not* be
subjected to auto-return; as detailed here:
https://www.sandbox.paypal.com/be/cgi-bin/webscr?cmd=p/pop/help-account-optional
Request coming from that payment flow will always trigger a GET
request, causing the customer to be welcomed by a
405 - Method Not allowed
error on the Odoo server. The payment is normally correctly processed
through IPN, so this does not normally causes loss of data; however
this is not a nice way to welcome back your customer right after
they pay you.
2016-09-12 09:24:38 +02:00
Odoo Translation Bot 40691d31f3 [I18N] Update translation terms from Transifex 2016-09-11 03:04:01 +02:00
Olivier Dony b17b2a2eb7
[FIX] http: do not allow passing spaces around db in URL param
Until 9.0 our psycopg2 DSN connection strings do not allow having
spaces within the db name, and passing some can cause duplicate
registries to be loaded.

Stripping spaces is a simple workaround until we actually support
spaces within db names.

Fixes #13078
2016-09-09 09:28:10 +02:00
Ravi Gohil b226510840 [IMP] payment_*: avoid access error on provider model
As provider model is intended to be used internally restricting the read of
some private fields to the employee group avoid creating access issues.
2016-09-06 10:20:41 +02:00
Odoo Translation Bot 75a196972e [I18N] Update translation terms from Transifex 2016-09-04 03:06:55 +02:00
qdp-odoo 7bdd4de805 [FIX] anglo_saxon_dropshipping: fix dropship use case in anglo saxon with perpetual valuation.
OPW: 684742
When using dropship+anglo-saxon+perpetual valuation, there is no journal move for the delivery to debit outgoing inventory (since the goods don't transit by an internal stock) but the sale does credit it so there was a build up in the holding account that has to be moved out manually. This was also reported in #12687.

The solution implemented is to check if the invoice line is related to sale order lines having one of its procurement_ids with a purchase_line_id set. If yes, it means that it is a confirmed dropship and in that case we don't call to super (we don't create the cost of sale line).

That means that:
* If the procurement is in exception at the customer invoice time, the behavior will be as it is currently, but it's fine as you don't know how the procurement will be solved, and it'll be only at the beginning (once the config is done it shouldn't go in exception anymore). People will have to manually fix those amounts with a miscellaneous operation.
* users in anglo saxon mode should not use the 'stock interim account (received)' on supplier invoices for dropshipped goods, but rather use the COGS directly (sounds to me logical, and that's actually why I wouldn't go for the solution to create the stock move entries every time even for the dropshipped goods. That, and the fact that it would pollute the accounting with useless moves)
2016-09-02 14:13:17 +02:00
Nicolas Martinelli 2559b2cf4f [FIX] web: statusbar click
When the statusbar is clicked, a `debounce` function prevents a
doucle-click, and therefore making several `write` calls. On some status
bars, clicking doesn't work anymore.

The reason is because, in some mysterious cases, the event is propagated
to the parent. The `currentTarget` is not the `li` element, but the
parent `ul`. By setting the `immediate` argument to `true` (execute the
first function instead of the last), this solves the issue.
2016-09-02 10:27:41 +02:00
Nicolas Martinelli 7b93e1dc7b [FIX] l10n_be_intrastat: skip EXTXVAL=0
An entry with EXTXVAL=0 should not be included in the Intrastat
declaration, otherwise it is rejected.

opw-686201
2016-08-31 11:02:48 +02:00
Jeremy Kersten f1a331850d [FIX] website_sale: fix order for the pager in front end.
In psql, use LIMIT and OFFSET together without a fully specified and uniq sort order
will generate unexpected behaviour.

Eg:
> id   id_dept  name
> -------------------
> 1    1        Tom
> 2    1        Mike
> 3    2        Meggie
> 4    2        Marge
> 5    3        Bart
> 6    3        Lisa

> using LIMITed selects like:

>    SELECT * FROM employee ORDER BY id_dept LIMIT 3
>    SELECT * FROM employee ORDER BY id_dept LIMIT 3 OFFSET 3
>    SELECT * FROM employee ORDER BY id_dept LIMIT 3 OFFSET 6

> You can have some result missings from the 3 requests, and others duplicated.
> Because id_dept is not a uniq order.

opw-686639

note: backport of saas-12 4dce8616
2016-08-29 17:08:25 +02:00
Odoo Translation Bot 671fa0c7d4 [I18N] Update translation terms from Transifex 2016-08-29 11:48:02 +02:00
Christophe Simonis c7d9695f52 [MERGE] forward port branch 7.0 up to b431e6c 2016-08-25 11:02:01 +02:00
Martin Trigaux 4cb2dc6d71
[FIX] web_graph: no label for ungrouped pie chart
When a pie chart has no grouping selected, the label was "undefined" (the
javascript variable). Replace by the already translated string "Undefined".

Fixes #13288
2016-08-25 10:39:39 +02:00
Jeremy Kersten abf17354f8 [FIX] account: remove domain that depend of purchase when not installed
This commit avoid a traceback when you open the form account_invoice_line
for a supllier invoice without having installed purchase.

The fields_view_get method add domain with purchase_ok field, but this
field can be missing on the model product.template because purchase is not
a dependence of account.

Invalid field 'purchase_ok' in leaf "<osv.ExtendedLeaf:
('purchase_ok', '=', True) on product_product

In stable version, the best fix found, is to remove the domain.
But we need to fix it in master, moving this field from purchase module to
product module. (odoo/odoo##13271)

This commit closes #13268 and closes #315 for stable version.
Todo: merge odoo/odoo#13271 in master (@qdp-odoo agreement)
2016-08-24 12:21:48 +02:00
Jairo Llopis 4faed0b792 [FIX] website_blog: fix pager when existing filters in url
Go to a URL such as `/blog/our-news-1?date_begin=2015-01-01`
Now click on page 2.

Without this patch you will go to `/blog/our-news-1?date_begin=2015-01-01/page/2`.
With this patch, you will go to `/blog/our-news-1/page/2?date_begin=2015-01-01`.

This commit closes #13206
2016-08-22 10:30:56 +02:00
Odoo Translation Bot 29f5719254 [I18N] Update translation terms from Transifex 2016-08-21 03:05:30 +02:00
Damien Bouvy 08ed48e24c
[FIX] stock,purchase: stop shortening picking type names
In purchase, a special key is set in the context to simplify the name
of the picking type: instead of the normal name, only the name of the
warehouse is used. This is problematic if more than one incoming picking
type exists for a given warehouse, as it prevents you from being able to
differentiate them. Asking users to modify the view to remove the
context key seem a bit too much to ask for something that should be
simple.

It is my understanding that this was implemented only for cosmetic
reasons, but I am willing to assume that having to select
"YourCompany: Delivery Orders" instead of simply
"YourCompany" for people who only have one picking type should not
be too disruptive or obscure.

opw-685751
2016-08-18 13:59:42 +02:00
Goffin Simon c844534f8a [FIX] account_asset: asset depreciation with refund
When an asset is created from a refund invoice, the negative amount
must be taken into account to create the depreciation moves.

opw:685630
2016-08-18 11:11:49 +02:00
Goffin Simon 3846d35d02 [FIX] account_voucher: unreconcile with deleted journal items
Inspired from e2d16ea

When cancelling a voucher from a customer payment receipt,
the voucher lines linked to the deleted account move lines
have to be updated by clicking on button "unreconcile".

opw:683258
2016-08-17 09:25:01 +02:00
Damien Bouvy 6cb84a1048
[FIX] analytic: add missing context propagation
Courtesy of @adrienpeiffer
2016-08-16 15:11:31 +02:00
Nicolas Martinelli c2fe9fe0e6 [FIX] web: prevent double-click on statusbar
When double-clicking on the statusbar widget, two calls to write are
performed. This can cause unwanted behavior, and when the `write` method
takes a lot of time to process, it's not possible to prevent it
server-side.

Courtesy of @gurneyalex and @aab-odoo

Closes #13134
opw-686025

FORWARD-PORT UP TO SAAS-6!
2016-08-16 13:09:49 +02:00
Odoo Translation Bot 71594f5958 [I18N] Update translation terms from Transifex 2016-08-14 03:04:34 +02:00
Goffin Simon 43e25b336d [FIX] account_voucher: unreconcile with deleted journal items
Inspired from e2d16ea04a

When cancelling a voucher from a customer payment receipt,
the voucher lines linked to the deleted account move lines
have to be updated by clicking on button "unreconcile".

opw:683258
2016-08-10 15:04:30 +02:00
Odoo Translation Bot 0606247a8b [I18N] Update translation terms from Transifex 2016-08-07 03:07:40 +02:00
Martin Trigaux d56b03465f
[I18N] Update translation terms from Transifex
Last one before dropping a few non-active languages
2016-08-05 16:12:06 +02:00
Jeremy Kersten 7f6c669530 [FIX] website: /website/info use website.info xmlid
When a user try to create a new page info, he is redirected
to the /page/info because the xmlid already exists...

The problem is that this view need to be rendered via the
controller /website/info which gives some extra values (version, ...)

The fix for v8 is to redirect /page/info to /website/info.

In V9, the behavior is changed and one page info-1 will be created.
But this fix is also required for direct access to /page/info.

To do in master: maybe use another xml_id that this basic name 'info'?

This commit fix issue #8022
2016-08-05 12:05:24 +02:00
Martin Trigaux b431e6c324
[I18N] Last 7.0 update translation terms from Transifex 2016-08-04 15:56:34 +02:00
Nicolas Martinelli ebb52cbbdf [FIX] stock: backorder sequence
When an internal move is partially delivered, name of the backorder is
'False'. This also occurs if an internal move is copied.

This is because there is not sequence for code 'stock.picking.internal',
but there is one for 'stock.picking'.

opw-683725
2016-08-03 14:43:40 +02:00
Goffin Simon 1213de3ff5 [FIX] account: get_reconciliation_proposition
The bank statement reconciliation widget should look for the name
of the account.move if the ref is not found.

Backport of 11f8e8d

opw:683741
2016-08-03 13:38:44 +02:00
Nicolas Martinelli f0d6138712 [FIX] im_odoo_support: link "Odoo Support"
The free livechat support doesn't exist anymore, therefore the link
"Odoo Support" does nothing.

opw-683486
2016-08-02 17:45:20 +02:00
Christophe 980ff5ef10
[FIX] account: correct typo in css
Closes #11662
2016-08-01 17:49:41 +02:00
Ondřej Kuzník fafeb9fb83 [FIX] stock: avoid traceback when owner on picking and transfer more.
If you create a picking, with an owner, for qty x, and confirm it.
Next transfer x+1, it will raise a traceback 'cannot adapt res.partner'

Now, we pass the id, and not the browse record.

This commit closes #12978
2016-08-02 00:47:05 +11:00
Jeremy Kersten 7f86272b94 [FIX] hr_timesheet_sheet: set timesheet widget dirty when editing
Without this commit, there was no warning displayed when clicking
on a button that would make the user lose all he entered in the
widget, which is insonsistent with other odoo widgets.

opw-684276
2016-08-01 09:04:58 +02:00
Odoo Translation Bot d99745302c [I18N] Update translation terms from Transifex 2016-08-01 00:33:47 +02:00
Odoo Translation Bot 337049baa8 [I18N] Update translation terms from Transifex 2016-07-31 03:07:08 +02:00
Gourav Chawla f7b8028f67
[FIX] hr_payroll: display employee's identification number
The report "Payslip" was displaying both the employee's job, the second time
being in the "Identification No" box.
Remove the second job and replace by the field 'Identification No' which makes
more sense.

Closes #12937
2016-07-29 15:30:49 +02:00
aetna-softwares 9fe930e6ba [FIX] survey: prevent saving issues of answers to multiple_choice questions, when id starts with id of other questions
Fixes #11873 #12215
2016-07-29 11:13:08 +02:00
Olivier Dony c372708b01
[FIX] website_google_map: do not allow invalid partner prefix
The only supported prefixes are the following:
 - /partners/ when website_partner and/or website_crm_partner_assign are installed
 - /customers/ when website_customer is installed
2016-07-28 17:27:54 +02:00
Nicolas Martinelli de2d7d9acd [FIX] sale_stock: incorrect value in error message
The error message has an hardcoded precision of 2 digits, which is not
enough of the product precision is higher than 2. Since this error
message is often used, we should avoid its modification to prevent
breaking the translations.

opw-683639
Fixes #12629
2016-07-28 15:10:59 +02:00
Nicolas Martinelli f57f55966d [FIX] sale_stock: UoM in warning
The warning message of the product packaging change does not take into
account the appropriate UoM.

opw-12827
Fixes #12827
2016-07-28 13:36:30 +02:00
Nicolas Martinelli 6742d1fafe [FIX] account: wrong initial balance in GL
When the General Ledger is printed, the initial balance is zero if the
filtering is done by period.

It appears that in this case, the method `_query_get` selects all the
periods before the selected period range thanks to:
`build_ctx_periods(cr, uid, first_period, context['period_from'])`
On the other hand, `_query_get` builds the query as:
`date_start <= %(date_start)s AND id NOT IN %(period_ids)s`

That doesn't make sense since we first choose the periods before the
selected period range, then we exclude them. What the method
`_query_get` is doing seems wrong, but since this method is used in many
reports, it is safer to only fix the GL report directly.

Another solution could be
https://gist.github.com/nim-odoo/453176d9ae820615e69f9a809a3780cc

opw-681601
2016-07-26 18:12:14 +02:00
Goffin Simon dbf44a9680 [FIX] payment_paypal: country and state code required for paypal
As explained in:

-https://developer.paypal.com/docs/classic/api/country_codes/
-https://developer.paypal.com/docs/classic/api/state_codes/

The country and state code is required to create a paypal transaction.

But in some cases, the complete name of the state/province is required.
For example, for India, sometimes the complete name of the state is required.
Check the list of those state/province in the documentation.

Hint: form_preprocess_values

opw:682872
2016-07-26 15:59:55 +02:00
Jeremy Kersten 077dde3a69 [FIX] calendar: don't duplicate all the calendar_contact
Before this patch, add_filter was called 2 times.
Once when we select a partner in the drop down, we trigger a onchange value
to change from false to the partner id.
Once to reset to false the value after the first add_filter()

This commit closes #9758
2016-07-26 13:35:11 +02:00
Jeremy Kersten e1c55b2d2d [FIX] calendar: avoid local variable referenced before assignment
When the get_one_event_synchro crash, the status variable is not initialize.
So the return status, content, ...  raise an error:
    "local variable 'status' referenced before assignment"

This commit closes the issue #11513
2016-07-26 11:00:51 +02:00
Jeremy Kersten 78f00700e3 [FIX] product: keep precision in historized cost field.
Now we use the same decimal precision for cost in table 'Historization cost'
and 'product'.

It is one fix, but that will not fix the case where decimal precision has been
updated between 2 historizations.

This commit closes #12861
2016-07-26 10:07:20 +02:00
Martin Trigaux 64c80ddb4a
[FIX] product: add missing argument in read
The list of fields was not present, making the call to fail.

Closes #11716
2016-07-25 17:01:03 +02:00
Stefan Rijnhart 4712fddd88 [FIX] account: never allow modification of posted entries
Posted moves are not protected from modification if the journal is set
to 'autopost'.

If an account move is posted in a journal with 'Autopost' set, it is
possible to modify the associated move lines without any restriction.
This can for example lead to the creation of unbalanced moves.

The original issue fixed by this extra condition
(https://bugs.launchpad.net/openobject-addons/+bug/615268) does not
occur if the commit is reverted.

This reverts 4e95e4223

Closes #12014
opw-683165
2016-07-25 15:50:47 +02:00
Jeremy Kersten 3418b9f8aa [FIX] calendar: avoid infinite recurrent event
Old check was always ignored since 0 is False.

This commit closes #12715

Other fix; when we detach an event, we reset the rrule_type to avoid to have a
warning popup (about empty final_date) if the old one value was end_date.
2016-07-25 15:48:25 +02:00
Olivier Dony acc531a9d7
[FIX] portal: avoid users sharing non-portal groups 2016-07-25 13:07:29 +02:00
Olivier Dony 8596a4ccaa
[FIX] portal: avoid users sharing non-portal groups 2016-07-25 13:06:31 +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
Odoo Translation Bot 84f9cdd1d9 [I18N] Update translation terms from Transifex 2016-07-24 02:59:48 +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
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
Odoo Translation Bot c3dd308913 [I18N] Update translation terms from Transifex 2016-07-19 12:10:41 +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
Ronald Portier 17a1304285
[FIX] hr_timehseet_sheet: drop view before creation
When the schema of a view change (e.g. drop of column), the "CREATE OR REPLACE"
will not be enough and dropping the view is required.

Fixes #12754
Closes #12756
2016-07-14 11:42:52 +02:00
Goffin Simon 965024902d [FIX] delivery: Invoice line for delivery method
Steps to reproduce:

1. Activate the following options
** Settings > Warehouse > Products > Manage different units of measure for products
** Settings > Accounting > Accounting & Finance > Analytic accouting
2. Desactivate the following option
** Settings > Accounting > Analytic accouting > Sale > Use multiple analytic accounts on sales
3. Create a Sale order
** Add 2 qty of the product iMac
** Add in quote the delivery method "Normal Delivery Charges" and set 2 qty
** Set an analytic account under Contract/Analytic
** Set the field Create Invoice to "On delivery Order"
4. Deliver only 1 quantity of the iMac and then create the invoice
5. Deliver the last quantity of the iMac and then create the invoice

Behavior before the fix:
The first invoice contains 2 qty of the Transport
The second invoice contains 1 qty of the Transport, has no analytic account set, has no UOM set

Behavior after the fix:
The first invoice contains 2 qty of the Transport
The second invoice contains 0 qty of the Transport because it has already been invoiced

Closed #12644

opw:682284
2016-07-11 14:30:16 +02:00
Odoo Translation Bot ef83f798d5 [I18N] Update translation terms from Transifex 2016-07-10 03:01:32 +02:00
Denis Ledoux 0c3cd7cbb4 [FIX] website_hr_recruitement: website desc translation
Backport of the revision
26c44a58df2cab1790f78ed127390075f84c1de7

opw-682716
2016-07-08 10:14:10 +02:00
Daniel-CA 5e466d3507
[FIX] stock_account: prevent division by zero
In case of a move where source location = destination location, the result of
SUM(quantity) would be 0 and ending up with a division by zero.

Closes #12247
Closes #12423
2016-07-06 11:18:20 +02:00
Lionel Sausin 5537c5a13c
[FIX] stock_account: do not sum price unit
The view yields one line per stock move, with a price/unit on each line.
It doesn't make sense to sum price/units, the avg will be only meaningful when
grouping per product but it's correct in the default state.

Closes #11309
2016-07-06 11:16:07 +02:00
Laetitia Gangloff 77de330c03 [IMP] stock: stock_change_product_qty : add hook to complete inventory line data
Improved by Denis Roussel (Acsone). Closes #10598
2016-07-05 17:55:26 +02:00
Alex Comba e3954a3457 [FIX] stock: fix AccessError on stock.quant while trying to resolve an inventory line linked to a package closes #12511 2016-07-05 17:36:45 +02:00
Joren Van Onder 75dbd545c8 [FIX] point_of_sale: mount /boot when building the POSBox image
We don't mount /boot in fstab to prevent systemd-udev looking for
corresponding kernel modules in /lib/modules. We need to do this
because the modified kernel-qemu image we use for emulation is usually
not 100% the same version as in the Raspbian image. Therefore
systemd-udev won't be able to find the 'correct' kernel modules in
/lib/modules.

This causes issues when the raspberrypi-kernel package is updated
however. apt will update /lib/modules and will write the new
kernel{7,}.img files to /boot. Before this patch /boot was just a
directory on /dev/sda2, not the 'real' /boot which is on /dev/sda1. So
you'd end up with old, not updated kernel images but new, updated
kernel modules in /lib/modules.

This mounts /boot after the system booted. /boot gets mapped to
/dev/sda1 by /etc/udev/rules.d/90-qemu.rules.

Fixes #12650
opw-682320
2016-07-05 16:18:25 +02:00
Martin Trigaux 64b0e67a38
[FIX] hr_recruitment: wrong id on composer
When an applicant is moved from a stage to another, an email is sent to the
applicant(s) if an email template is specified on the stage.
The active_ids is correctly set in the compose context to be used by the
send_mail method to send a message to all the applicants in the new stage.

However, a potential active_id may be propagated from a previous action.
This is the case when a user goes from a Job Position record to the list of
applications and change the stage using the kanban view (active_id & active_ids
is the id of the hr.job).
The default_get method of mail.compose.message will use the active_id as the
default value for the field res_id which is wrong as it is the id of another
record).

Forcing the value at False instead of ids[0] as it would not work in batch mode.
The list of records is correctly used in send_mail anyway.

Closes #12494
2016-07-05 10:28:34 +02:00
Anton Engelhardt 8914de8c53
[FIX] mrp: missing context
context was not passed to move objects in action_cancel

Closes #12598
2016-07-04 17:24:47 +02:00
Odoo Translation Bot 1986980a51 [I18N] Update translation terms from Transifex 2016-07-03 02:59:06 +02:00
Odoo Translation Bot ff31e0381a [I18N] Update translation terms from Transifex 2016-07-01 00:28:27 +02:00
Nicolas Martinelli 830fc8922d [FIX] purchase: traceback when copy
If a PO has no product, a traceback is raised because
`onchange_product_id` returns no planned date.
2016-06-30 08:27:49 +02:00
Odoo Translation Bot 3e965ecf58 [I18N] Update translation terms from Transifex 2016-06-26 02:57:50 +02:00
Alexis de Lattre 297bbff6f5 [FIX] stock: use float_compare to avoid an error in the transfer (The roundings of your Unit of Measures kg on the move vs. kg on the product don't allow to do these operations or you are not transferring the picking at once.) 2016-06-22 15:05:07 +02:00
Christophe Matthieu a9fac2ea2d [FIX] web: required attribute on one2many field
Require One2many field without any line must show an error like many2many fields.

issue 11782
2016-06-22 09:16:07 +02:00
Odoo Translation Bot 41ec7eec56 [I18N] Update translation terms from Transifex 2016-06-22 07:12:57 +02:00
Josse Colpaert fe15829c16 [IMP] stock: when applying a push rule the new move should not be linked to the same procurement anymore 2016-06-21 10:16:07 +02:00
Goffin Simon c77745b9c5 [FIX] sale, slae_stock, website_quote: get sale_delay in onchange_template_id
Inspired from a706ada

opw:681245, 681289, 681285
2016-06-20 15:13:01 +02:00
Nicolas Martinelli 8a1d7dfe7b [FIX] sale_stock: do not count discount twice
When a product is a kit and a discount is applied thanks to a pricelist,
the discount is counted twice if the invoice is created from the stock
picking.

This is because the pricelist will modify the price unit, but moreover
the discount will be applied a second time by the method
`_compute_price` of the account move line.

opw-676838
2016-06-20 08:36:19 +02:00
Odoo Translation Bot cd369396d9 [I18N] Update translation terms from Transifex 2016-06-19 02:59:13 +02:00
jeffery chen fan bcb191f273
[FIX] crm_profiling: backport of cf9230d1ff
Do not redefine the view arch but do a proper inherit.
It was a problem as the redefinition removed some fields (headers,..).
It was also a problem if crm_profiling was uninstalled as the redefinition was
not removed.

Closes #12454
2016-06-17 15:19:39 +02:00
qdp-odoo ba49172929 [FIX] account: on ir_sequence, number_next_actual must always be read instead of number_next which might contain wrong value in case of 'standard' sequence. This was causing a crash on creating a new invoice, if demo data were installed and the user went to settings\accounting to do some modification. Issue #12471 2016-06-17 14:41:12 +02:00
luc-demeyer 1750b90252 [FIX] account: fixed group_lines method of invoices.
The group_lines method didn't make the sum of the quantity field, hence resulting in incorrect results when making product based statistics from the account.move.line records.

Courtesy of Luc De Meyer. Was PR #10551
2016-06-17 10:27:53 +02:00
Martin Trigaux 9007ed4c0b
[FIX] doc: Research -> Search
If I need to do researchs to find a quotation, the goal of having a userfriendly
software may be missed.
2016-06-17 09:48:47 +02:00
Denis Ledoux ae74ebb5ce [FIX] purchase: `related_usage` must be readonly
The `related_usage` field of `purchase.order`
is a related field to the location `usage` field,
which is defined in order to display/hide
some other field in the PO according to the location usage

This is purely a technical field, which is set only
to change the form view according to the location
usage.

This is not expected to change the location usage
through this field, this field must therefore
be set to readonly.

A change on the location usage could happen because
of the `onchange_picking_type_id`:
If the user changed the picking type, and then the location,
the usage returned by the `onchange_picking_type_id` was
applied on the location, and this must not have happened.

In addition, since `related_usage` is a related to the location
usage, it should be changed as well when the location is changed.
(in the new api, this is no longer required, the related field
is updated automatically).

This revision therefore adds an onchange on the location as well,
to handle this.

opw-676428
2016-06-16 11:32:10 +02:00
Stefan Rijnhart 606eab8ef8
[FIX] product: make copy friendlier to overrides
Do not force to use "<name> (copy)" when duplicating

Closes #12397
2016-06-15 12:07:14 +02:00
Simon Leblanc baa4cc0e97
Backport of ec005af5 to 8.0
[FIX] anonymization: default anonymization fields

res_partner.name was twice : remove one
res_users.name doesn't exist (now, it use the partner name) : remove
remove training.* fields that do not exists

Closes #11806
2016-06-14 15:52:18 +02:00
Simon Leblanc 7db7b2dd6a
Backport of 45483b96 to 8.0
[FIX] anonymization: allow anonymization on HTML fields

Was missing in the (old) list of fields
2016-06-14 15:51:46 +02:00
Nicolas Martinelli 6817c48a8b [FIX] website_sale: check email address
Partial backport of ef19830. The error message cannot be included for
compatibility reason, but the browser will highlight the field in red,
which should be enough to locate the error.

opw-677121
2016-06-13 14:08:26 +02:00
Jordan Vrtanoski d43d1ddf4b [FIX] hr_payroll: do not unlink records in onchange method
Fixing the error ValueError: "name 'date_from' is not defined"
while evaluating '[date_from, date_to, employee_id, contract_id]'

This commit close #12383, close #8883, close #3116
2016-06-13 10:05:09 +02:00
Odoo Translation Bot 3215a81bab [I18N] Update translation terms from Transifex 2016-06-12 03:06:37 +02:00
Nicolas Martinelli 26b3501ca9 [FIX] l10n_fr_hr_payroll: use `child_of`
Previous commit 8f7129216 searches recursively for children of a rule
category. Use `child_of` instead which is way more efficient.

opw-673222
2016-06-10 11:39:47 +02:00
Nicolas Martinelli 8f71292162 [FIX] l10n_fr_hr_payroll: children categories
When a rule category has children, the total of the category should
include the total of the children categories.

opw-673222
2016-06-09 15:21:03 +02:00
Shelton Freddy 35536b7206
[FIX] purchase: do not allow creation on purchase.order.line
To match the behaviour on sale.order.line.
Purchase line form is expected to be open in popup (where parent is defined),
not individually when creating a line alone is not useful.

Fixes #6644
Closes #12325
2016-06-09 13:46:08 +02:00
Peter Hahn 6d7cb5408e
[FIX] sale,procurement: use super instead of direct call
Otherwise inheritance is not properly propagated

Closes #12337
2016-06-09 13:19:09 +02:00
Pedro M. Baeza e3e5cfe82c
[IMP] l10n_es: Added a new tax "IVA soportado no sujeto" 2016-06-08 16:15:20 +02:00
Pedro M. Baeza 730890f369
[IMP] l10n_es: New taxes, taxes codes and fiscal positions according law changes
* v5.2: Añadida retención 19,5% arrendamientos.
* v5.1: Renombrado todo lo relacionado con arrendamientos para no incluir la
  palabra "IRPF", ya que no es como tal IRPF.
* v5.0: Se ha rehecho toda la parte de impuestos para dar mayor facilidad de
  consulta de los datos para las declaraciones de la AEAT y para cubrir todas
  las casuísticas fiscales españolas actuales. Éstas son las características
  más destacadas:

  * Desdoblamiento de los impuestos principales para bienes y para servicios.
  * Nuevo árbol de códigos de impuestos orientado a cada modelo de la AEAT.
  * Nuevos códigos para los códigos de impuestos para facilitar su
    actualización.
  * La casilla del modelo viene ahora en la descripción, no en el código.
  * Posiciones fiscales ajustadas para el desdoblamiento.
  * Nuevo impuesto y posición fiscal para retención IRPF 19%.
  * Nuevo impuesto para revendedores con recargo de equivalencia.
  * Nuevas posiciones fiscales para retenciones de arrendamientos.
  * Pequeños ajustes en cuentas contables.

Closes #8453
2016-06-08 16:14:35 +02:00
Goffin Simon d0d3ba921d [FIX] website_quote: delay in SO line
When creating an SO line with a quotation template, the customer
lead time must be set.

opw:678039
2016-06-08 14:17:40 +02:00
Martin Trigaux f307e36e66
[FIX] base_import: disable tracking during validation
Force the value tracking_disable to be make sure that the validation (which is
supposed to have no impact), will not send any email.

Fixes #3173
2016-06-08 11:37:03 +02:00
Joren Van Onder fe99c51703 [IMP] hw_scanner: support multiple simultaneously attached devices
The hw_scanner module not only supports barcode readers (although that
was it's original intention). It also happens to support certain card
readers (like the MagTek Dynamag we use for Mercury) because they act
the same way as barcode scanners (like a keyboard and end sequence with
ENTER).

Before we supported Mercury there was no real reason to support multiple
devices on the POSBox, because it didn't make much sense to attach >1
barcode reader to the same POSBox. With Mercury however, this is a real
use case, as users want both a barcode reader and a card reader.

This commit implements support for this, while keeping the functionality
as close as possible to how it was before (eg. care was taken to not
break plug and play support).
2016-06-08 10:03:09 +02:00
Nicolas Martinelli 6140300da0 [FIX] account_analytic_analysis: fpos of invoices
When an invoice is created automatically thanks to the cron task, the
superuser is used. However, this implies that the company of the
superuser will be used for the account invoice creation, leading to
potentially incorrect taxes and fiscal positions.

opw-669714
2016-06-07 12:20:23 +02:00
Martin Trigaux ff3a0b12c6
[FIX] hr_evaluation: badly rendered form
The date was positioned inside the h1 and was badly rendered (field too small)
Fixes #2476
2016-06-07 12:16:38 +02:00
Denis Ledoux b9a006c1c0 [FIX] account: Exchange test failing on Jun 6
The test `test_balanced_exchanges_gain_loss`
failed on Jun 6, because it created a specific rate
for today's date at midnight
(e.g. on Jun 6, 201x-06-06 00:00:00) for the test purpose,
but a rate is created in the demo data for Jun 6 midnight exactly:
`base.rateUSDbis`, making the test confused about which rate
to use.

We solve this by making the test use the rate `base.rateUSDbis`,
modifying the rate for its own need, instead of creating a new
rate.
2016-06-06 13:11:20 +02:00
Odoo Translation Bot eb48b94cea [I18N] Update translation terms from Transifex 2016-06-05 03:01:35 +02:00
Adrien Peiffer (ACSONE) 2779d463e8 [FIX] l10n_lu: Change the sign for VP-IC-EX. Was PR #12041 2016-06-02 17:38:05 +02:00
Martin Trigaux 30f06fd39e
[FIX] website_forum: convert content of posted comment to plaintext
HTML content should be escaped before being sanitized. Any content (link, image,
code,...) that is acceptable in usual mail.message but should not be interprated
when posted on a comment of the forum.

Fixes #3737
2016-06-02 17:00:17 +02:00
Denis Ledoux c751c129da [FIX] website_sale: `State` select readonly in shipping info
If we take the below facts:
 - The country select is set as disabled
   when Shipping is set to "Ship to the same address"
 - The disable property of select inputs is
   removed when shipping is set to
   `create a new address`:
   In `website_sale.js`:
   ```
   $selects.attr("disabled", value <= 0 ? null : "disabled" ).prop("disabled", value <= 0 ? null : "disabled" );
   ```

We can safely assume that the select input "State / Province" was supposed
to be set as `disabled` in the first place, not as `readonly`

Before this revision, State / Provice was greyed when choosing
"Create a new address" for shipping, and selecting the United States
(but the select input was still usable, though, it was just greyed)

opw-675739
2016-06-02 16:57:36 +02:00
Christophe Simonis bde083a5f9 [MERGE] forward port of branch 7.0 up to 0ae392c 2016-06-02 12:42:34 +02:00
Jairo Llopis 57e5d703c2
[FIX] mass_mailing: filter emails to avoid duplicates
When subscribing a user to a mailing list, the `mail.mass_mailing.contact`
created is processed to identify it's name and email from the address (method
`get_name_email` called in `add_to_list` and `name_create`).
For a better consistency, the search of existing contacts should also be done
using the method `get_name_email`.

This avoids that subscribing twice `Example <example@example.com>` fails to
detect duplicates and creates two subscriptions.

Closes #12265
2016-06-02 11:38:00 +02:00
Jeremy Kersten b49818e1ee [FIX] website_sale: add color value on attributes
xml template was using color name, because color index was empty.
It works in English, but once translated (in french e.g.) we have background-color:noir

Fix #12251
2016-06-01 10:01:38 +02:00
Odoo Translation Bot 0ae392c9e3 [I18N] Update translation terms from Transifex 2016-06-01 00:27:50 +02:00
Ronald Portier (Therp BV) d73648fe0d
[FIX] crm,gamification: flexible reference to field
The field generation is most of the time following the pattern
`field_<table name>_<field name>`
but in case of name clash (e.g. res.partner.category - id and res.partner -
category_id), the id of ir.model.field is added at the end of the external id
during the field creation.

The more flexible way to link to an ir.model.field is to use the syntax
`search=[('model', '=', <model>), ('name', '=', <field name>)]`
to avoid errors as in #12192 when the "first" external id no longer exists.

Fixes #12192
Closes #12198
2016-05-30 15:02:20 +02:00
Nicolas Martinelli 63ca2d1b9f [FIX] purchase: wrong call to super
opw-675480
2016-05-30 11:24:10 +02:00
Olivier Dony cd3f52ba10 [FIX] account,*: preserve deactivated taxes
By default, when reading a m2m field, entries that are
deactivated in the destination table are not included.
This behavior is desirable in some cases (e.g. for
"tags" or "categories", but not for entries that
significantly impact other field values in the parent
record, such as taxes.

The problem is rather obvious: when displaying a
paid invoice that used taxes that are now deactivated,
the taxes are hidden while they still affect the
computed amount. And after cancelling + resetting
to draft, the tax is not taken into account anymore,
while still being linked.

Forcing the field-level (python) domain to include
both active and inactive entries solves the problem:
 - when reading, displaying and recomputing values,
   deactivated taxes will be included.
 - when trying to pick a tax, deactivated entries
   will still be ignored, as expected.

This commit applies the technique to all m2m
fields that refer to taxes.

Fixes #12066
opw-677751
2016-05-30 09:07:31 +02:00
Odoo Translation Bot cb70a8ff98 [I18N] Update translation terms from Transifex 2016-05-29 02:58:42 +02:00
Jeremy Kersten 0413a4ab08 [FIX] sale: avoid division by zero in _get_price_reduce
close #11999
2016-05-27 17:06:32 +02:00
Kinner Vachhani deef119d72
[FIX] account: substitution in aged partner report
'foo %s bar' % 'alice' if False else 'bob' returns 'bob', not 'foo bob bar'

The previous strings returns '>=' when the direction is future while it should
be 'COALESCE(l.date_maturity,l.date) >= %s'

Fixes #10654
Closes #10695
2016-05-27 15:00:59 +02:00
Nicolas Martinelli ff38b370a1 [FIX] payment_ogone: missing key
The key 'PAYIDSUB' should be added in the list of SHA-OUT keys.,
otherwise the signature is wrong.

opw-678718
2016-05-27 13:35:09 +02:00
Jeremy Kersten 2164383fe4 [FIX] website_sale: allow to override product order on shop
Close #11202
2016-05-27 11:56:35 +02:00
Joren Van Onder 49b1742477 [FIX] point_of_sale: respect user timezone for all data in Sale Details
9f0120d73b solved this issue already, but
it was only applied to POS orderlines. There is other data on the
report (eg. payments, taxes, ...) that should also correctly respect the
user time zone as well.

opw-678748
2016-05-27 09:52:20 +02:00
Martin Trigaux 66221968b8
[FIX] crm_partner_assign: minimum access rights to employee
Give the same as access rights to the employee as for the public user.
This patch is needed to allow a user to access the partner form.
Same for portal.
The list of grades in not a confidential information.

Fixes #7719
2016-05-26 11:56:24 +02:00
65HQqp5QTq8QwA3f 9c28b6fbfa
[FIX] sale: propagate context
Closes #9521
2016-05-26 08:39:59 +02:00
Martin Trigaux 37bbe87d57
[INP] gamification: skip check for not required fields
Could get a definition with a model only
2016-05-26 08:33:20 +02:00
Martin Trigaux a4687c6e42
[FIX] gamification: bad backport to 8.0
UserError was defined in version 9, not 8
2016-05-26 08:30:51 +02:00
Jeremy Kersten 9772bbef07 [FIX] web: fix backport #4c7a9bd 2016-05-25 23:38:28 +02:00
Denis Ledoux 4176030cd3 [FIX] calandar: all day events email notification
When sending a notification email to an event attendee
for an all day event, the timezone must be ignored
as the `start` and `stop` datetime are stored as
the day date + '00:00:00'. If the timezone is applied,
for users being in a negative timezone (such as an American
timezone), the day displayed would be the day just before.

opw-677019
2016-05-25 18:11:08 +02:00
Goffin Simon 4c7a9bdac4 [FIX] web: raise a warning for bad domain
When a user wrote a wrong value in char_domain field it should raise a warning
message instead of a traceback.

Backport of b3a88b6ed846a13c0cd07cc25ea49bccbdf84aa8

opw:676783
2016-05-25 15:52:59 +02:00
Martin Trigaux 97492a12a9
[IMP] gamification: prevent misconfiguration
Prevent selecting wrong field or models or computed fields

Fixes #8545
2016-05-25 14:58:55 +02:00
Joren Van Onder be48a1402c [FIX] hr_payroll: avoid infinite recursion
The get_recursive_parent function seemingly depended on the ordering of
the rule_categories recordset which happens to work fine in most cases
because all data first defines the parent before defining the children
rule categories. But if you happen to do it the other way around it
won't work and it will infinitely call itself because:

if rule_categories[0].parent_id:
    rule_categories = rule_categories[0].parent_id | rule_categories

won't change the value of rule_categories[0].

opw-673222 (loosely related)
2016-05-25 09:57:37 +02:00
Goffin Simon 08416b2335 [FIX] account: partner_id set on a bank fee
Used case:

-Create several customer invoices and validate them
-Register a payment without any partner_id and in a bank statement for an amount
a bit lower than the total of the invoice (the difference is the paypal fees)
-Reconcile the invoices with the payment and create a write-off for the paypal fees
-When you close the bank statement, check the journal items, the paypal fees are
automatically assigned with a partner.

Fix:

-When creating the account move line for the fee, if all the account move lines
linked to the move are for different partners then you cannot determine the partner
of the fee.

opw:674822
2016-05-24 09:55:32 +02:00
Odoo Translation Bot 95c9036aef [I18N] Update translation terms from Transifex 2016-05-22 02:57:09 +02:00
Martin Trigaux e3523113e0
[FIX] hr_holidays: missing context
Closes #9386, opw-677958
2016-05-19 13:19:35 +02:00
Goffin Simon 7c5275b6a1 [FIX] mail: to prevent infinite loop
Introduced by fac04424ca
2016-05-19 12:03:59 +02:00
Martin Trigaux 7f02fc9e4f
[FIX] l10n_be: allow more than 120 periods
The widget selection only shows the first 120 results.
The selection was most likely set to avoid creating new entries but it can be
done with an option tag. This allows to use the search on many2one fields.

opw-677908
2016-05-19 11:06:45 +02:00
Nicolas Lempereur ae9d57bc1e [IMP] web: multi-click on save on view form (no fp)
When clicking on save several time when editing a view form it can be
saved several times which can be an issue for one to many.

The normal happenstance when saving should be as follow:

-> save (click)
-> wait write result
-> received write result
-> reload the form with updated data and updates buttons

But when clicking several time, it could become:

-> save (click)
-> wait write result
-> received write result
-> save (click)
-> wait write result
-> received write result
-> reload the form with updated data and updates buttons

This commit only reinstate the saving feature once the form is reloaded.

related to opw-671793
backport of 8.0's dd714ac

note: no need to forward-port
2016-05-18 17:37:14 +02:00
Goffin Simon fac04424ca [FIX] mail: receiving a notification without notifying the parent message.
Used case:

If you add a user which has no acces on a model(ex:purchase.order)
as follower on a record of this model. When someone responded by email on
this record, and when a message is sent on this record, an exception is raised
at the connection of the user added as a follower.

Fix:

To have the rights to read the message, a read notification for this follower must
be added to all parents of this message.

Closes #11902

opw:676699
2016-05-18 14:07:54 +02:00
Goffin Simon 0fc73a2067 [FIX] account: readonly bank statement line
Like in "view_bank_statement_form" when a line is linked to
a journal entry, this line must be in readonly.

opw:676344
2016-05-17 15:40:01 +02:00
Odoo Translation Bot 8f46a6fe73 [I18N] Update translation terms from Transifex 2016-05-15 02:56:59 +02:00
Alexis de Lattre fb84f95f91 [FIX] l10n_fr: FIX default Sale/Purchase tax. Courtesy of alexis-via. PR #11139 2016-05-12 17:37:17 +02:00
Goffin Simon 746cda7f89 [FIX] website: URL of website_published is wrong when using next/previous
Steps to reproduce:

-go to runbot 8.0 and connect
-go into human ressources/job positions
-pass into list view and click on the first item
-click on the url to open this record into the website (website_published)
-go back (back into the browser)
-you're now into the form view again and then next step is to click on the button
"next" to access the following record
-click on the url of website_published

Before the fix:

wrong record, this is the previous one that is into the href

After the fix:

correct record with the correct id into the href

Closes #11800
opw:675832
2016-05-12 13:31:19 +02:00
Goffin Simon 7061acd2c1 [FIX] purchase: fiscal position from onchange_partner_id
Used case:

-Configure admin as multi-company user
-Create 2 fiscal positions (one for company "Odoo BE" and one for company "Odoo US")
-Set admin on company "Odoo BE"
-On supplier (Asustek) configure fiscal position Odoo BE
-Set admin on company "Odoo US"
-On supplier (Asustek) configure fiscal position Odoo US
-Configure a product (Laptop E5023) with:
   *route "Buy"
   *supplier (Asustek) without company
   *reordering rules (min qty: 20, max qty: 40)
-Set admin on company "Odoo BE"
-Run scheduler via the cron

Behavior before the fix:

-Fiscal position on the created PO is the fiscal position for "Odoo BE" (and PO is for the company "Odoo US")

Behavior after the fix:

-Fiscal position on the create PO is the fiscal position for "Odoo US".

Closes #11537

opw:673288
2016-05-12 13:05:52 +02:00
Nicolas Seinlet f207ef5fae [IMP] account: improve reconciliation speed
- Only invalidate cache for fields and records we modify
 - Rewrite query to be more efficient
 - Avoid o2m commands to be more efficient; write directly on reverse m2o
2016-05-12 11:41:13 +02:00
Nicolas Seinlet 6f29bfc181 [FIX] mail: remove unneeded call to `refresh()`
With new api, this call is not wanted anymore. The cache is cleared
automatically, no need to clear the whole cache; that's a little bit
overkill and reduce performances.
2016-05-12 11:35:46 +02:00
Nicolas Martinelli 529481991a [FIX] purchase: date planned
When a PO is copied, the date planned of the order lines should be
recomputed based on the order date.

opw-675480
2016-05-12 09:25:58 +02:00