Commit Graph

77409 Commits

Author SHA1 Message Date
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
Goffin Simon 47208550a2 [FIX] account: periods in general ledger report
When "Filter by Periods" is choosen in the wizard, the right periods
must be set in ctx to filter the account moves according to the right periods

opw:674593
2016-05-11 09:44:27 +02:00
Denis Ledoux a0366b3a66 [FIX] google_calendar: do not copy user Google info
If a user syncs his calendar with Google,
and a second user is created in the database by copying this first
user, the Google information of the first user was copied
(The Google account to sync, the token to use, the last
syncrhonization date, ...), which is obviously wrong.

On calendar syncrhonization, which can be done
manually or automatically with the according cron, all
events of the first user were created a second time,
as a second user synchronized the same Google Calendar.

opw-674141
2016-05-10 16:09:28 +02:00
Denis Ledoux 3954affc30 [FIX] account_anglo_saxon: default account value
The default account value set for purchases invoices
lines for product of type Service was wrong: It used
the stock account, which is wrong as a Service
as no stock. Instead, it should left the product
expense account, as usual.

opw-676110
2016-05-09 17:39:12 +02:00
Martin Trigaux 88749790d1
[FIX] sale: outdated .pot file
Was having content of website_quote
2016-05-09 12:36:39 +02:00
Denis Ledoux 7923999f12 [FIX] google_calendar: user invited to one recurring event occurence only
When a Google user was invited to one occurrence of a recurring event,
but not to the recurring event itself (and the other occurrences, therefore),
and the user owner of the recurring event did not sync his calendar in Odoo,
the event occurrence could not be synced in Odoo, because it attempted
to attach it to the parent/main recurring event, which was not present
in Odoo.

In such a case, Odoo now syncs the event occurrence as a simple classic
event. In addition, if the owner of the event sync his calendar with Odoo
afterwards, or if the user is invited later to the main/parent recurring event
and then sync again his calendar,
it then attach the event occurrence that was previously
synced to this main event, to avoid events duplication.

opw-676535
2016-05-09 11:39:38 +02:00
Nicolas Lempereur dd714ace55 [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.

closes #11926
opw-671793

note: no need to forward-port
2016-05-09 10:54:16 +02:00
Odoo Translation Bot 859fe655d2 [I18N] Update translation terms from Transifex 2016-05-08 02:57:57 +02:00
Nicolas Lempereur 48a35ca8f9 [IMP] product: order attribute by name
closes #11951
fixes #11602
opw-673857
2016-05-06 16:38:47 +02:00
Olivier Dony c8dc4c8daf [MERGE] Forward-port 7.0 up to a0484cbe45 2016-05-05 03:52:47 +02:00
Olivier Dony 7cafe6a9c1 [FIX] account: set reconciliation date as admin
The user performing reconciliations may not always
have the right to update the corresponding partners,
for example if a partner is also a system user.

Doing it as super-user after verifying that the
user is indeed allowed to reconcile journal items
works around the problem.

Fixes #11931
2016-05-05 03:37:08 +02:00
Adrien Peiffer (ACSONE) 9ac9869a57
[FIX] purchase: Context propagation in wkf_confirm_order.
Closes #11916
2016-05-04 15:39:00 +02:00
Adrien Peiffer (ACSONE) e664d3074c [FIX] account: A negative amount with sale taxes on bank statement line must be considered as a refund. Courtesy of Adrien Peiffer (ACSONE). PR #11877 2016-05-04 11:31:20 +02:00
Goffin Simon e588d85315 [FIX] product_expiry: 'product_id' in context
When creating a new lot from an incoming picking transfer, the product_id
is written in the context.

opw:674608
2016-05-03 09:40:41 +02:00
Holger Brunn a4c4c43bd9
[FIX] project: make copy overridable in v8 api
Without the proper decorator, the method is matched as `cr_ui_context`.
This is because the `guess` mechanism expects a name `res_id` instead of
`record_id`.
For stability reason it is better to add the decorator than modify the signature
of the method.
Closes #11735
2016-05-02 12:08:06 +02:00
Odoo Translation Bot 8651d0815d [I18N] Update translation terms from Transifex 2016-05-01 02:57:51 +02:00
Odoo Translation Bot 534b7c5553 [I18N] Update translation terms from Transifex 2016-05-01 00:28:37 +02:00
Christophe Simonis 7e51d98553 [FIX] calendar: correct search on mail.message and ir.attachment
Handle the case of immutable (tuple) domain leafs.
2016-04-26 14:55:41 +02:00
Goffin Simon d812175390 [FIX] account_asset: asset_create
When creating assets from invoice lines, the system must check
that assets have not already been created for the related invoice.
If assets already exist then these assets have to be removed.

Used case:

- In the purchase journal, tick "allow canceling entries"
- On a supplier invoice line, set an asset category
- validate the invoice
- cancel the invoice
- set to draft
- validate the invoice

Before the fix: the asset is created twice.
After the fix: the asset is created once.

opw:674674
2016-04-26 10:39:27 +02:00
Nicolas Martinelli f5eae92f12 [FIX] website_sale: log if no pricelist
The pricelist field is not a mandatory field on the partner. A default
value is usually defined for any new partner created. However, if the
pricelist is manually removed from the partner, errors (tracebacks) will
occur in the eCommerce when no pricelist is found.

We cannot make the field mandatory, as it could potentially break the
workflow of some users which are not using eCommerce. Therefore, we
simply log an error message to help debugging.

opw-673453
2016-04-26 10:14:56 +02:00
Ludwik Trammer 61c808b774
[FIX] web: Allow for translation of a login error message
Closes #11815
2016-04-25 16:03:27 +02:00
Odoo Translation Bot 0410d1187b [I18N] Update translation terms from Transifex 2016-04-24 02:59:16 +02:00
Adrien Peiffer (ACSONE) 600f884524 [FIX] account: Allow to select sale taxes in bank statement reconciliation process. Courtesy of adrienpeiffer. PR #11673 2016-04-22 15:25:10 +02:00
Levent Karakas 7c584d3ebb
[FIX] sale: untranslated label
attribute string is translatable on a search filter, not name (which is used as fallback label
Closes #10419
2016-04-22 13:49:12 +02:00
Levent Karakas 9d445442ef
[FIX] mail: mail template translation
Do not match with source
Closes #11789
2016-04-22 09:09:34 +02:00
Denis Ledoux 8395f0d217 [FIX] website_event: event dates within event timezone
The dates of an event on the website was always
within the user timezone. If not signed in,
it was within the public user timezone
(which is quite not user-friendly to change)

For this purpose, we weed get the context
from the record (the context used when using
`record.with_context`), and therefore
the QWeb field
`ir.qweb.field.datetime` is slightly altered,
to use the context from the record.

opw-675427
2016-04-21 17:52:36 +02:00
Goffin Simon 7f05692cb9 [FIX] account_asset: compute depreciation board
From af61494
Allow to compute the depreciation when the asset is in state: draft
2016-04-21 16:12:32 +02:00
Denis Ledoux db699e86b4 [FIX] mail: Missing translation `Send a message to the group`
The above string was not translated, when creating a new
discussion group, in the group message input placeholder.

opw-673712
2016-04-21 14:16:40 +02:00
Nicolas Martinelli d951a7d5ee [FIX] stock_account: stock history view
The stock history doesn't take into account internal moves. For example,
in the following situation:
- Receive 1000 products to Internal Warehouse 1
- Move these 1000 products to Internal Warehouse 2

The 1000 products are still recorded on the Internal Warehouse 1.

opw-672277
2016-04-21 11:24:49 +02:00
Nicolas Martinelli e21de5013d [FIX] membership: update membership state daily
This is a complement to commit 6d4a78a2a. The 'invoiced' status should
be removed automatically once the membership is expired.

opw-672259
2016-04-21 08:29:58 +02:00
oihane 630f3d566f [FIX] hr_timesheet_invoice: fully qualify grouped fields in SQL view
Avoids name collisions when custom columns are involved.

Closes #11743
2016-04-20 16:13:13 +02:00
Nicolas Martinelli b112631bef [FIX] stock_landed_costs: precision
Oversight of commit bd025cda.
I'm an idiot, I should have checked that another solution was applied
from 9.0 with accounting refactoring. We apply it here as well.
2016-04-20 14:05:32 +02:00
Nicolas Martinelli eb26694e0f [FIX] stock_landed_costs: account/valuation inconsistencies
When stock landed costs are divided per product unit, inconsistencies
may arise between the real stock valuation and the stock valuation
account. This is likely to happen when several products are bought, but
these products leave the stock one at a time.

A numerical example is the following: a landed cost of 15.00 is applied
to a purchase of 13 units. An amount of 15.00 is recorded when the
products enter the stock. If the product leave the stock one at a time,
13 entries of 1.15 are recorded (15.00/13 = 1.153846... ≈ 1.15), which
is then equal to 13 * 1.15 = 14.95. In this case, All the products have
left the stock (stock valuation is zero), but 5 cents remain on the
account.

This is of course even worse the higher the ratio is. For example, a
landed cost of 4.00 split into 1000 units sold piece by piece will never
be recorded when a product leaves the stock.

The fix is to record the rounding difference on a specific quant. In the
previous example, instead of adding 1.153846... on the unit cost of the
13 units, we do the following:
- 12 units to which we add 1.15 on unit cost
- 1 unit to which we add 1.20 on unit cost

opw-675222
2016-04-20 13:09:25 +02:00
Nicolas Martinelli 262d98bb69 [FIX] stock_account: account/valuation inconsistencies
When the product price is divided per product unit, inconsistencies
may arise between the real stock valuation and the stock valuation
account. This is likely to happen when a product is bought in a UoM
different from the standard UoM of the product.

A numerical example is the following: a box of 13 is bought for 15.00.
An amount of 15.00 is recorded when the products enter the stock. If the
product leave the stock one at a time, 13 entries of 1.15 are recorded
(15.00/13 = 1.153846... ≈ 1.15), which is then equal to
13 * 1.15 = 14.95. In this case, All the products have left the stock
(stock valuation is zero), but 5 cents remain on the account.

This is of course even worse the higher the ratio is. For example, a
box of 4.00 split into 1000 units sold piece by piece will never be
recorded when a product leaves the stock.

The fix is to record the rounding difference on a specific quant. In the
previous example, instead of adding 1.153846... on the unit cost of the
13 units, we do the following:
- 12 units to which we add 1.15 on unit cost
- 1 unit to which we add 1.20 on unit cost

opw-675222
2016-04-20 13:09:25 +02:00
Nicolas Martinelli bd025cda6a [FIX] stock_landed_costs: former_cost_per_unit precision
The precision of `former_cost_per_unit` should not be set. Indeed, a
stock move can contain several quants with different unit prices.
Therefore, we should not round the field when stored, otherwise the
difference per unit will not be calculated correctly.

This is a workaround since we cannot change the DB structure in stable.

opw-675222
2016-04-20 13:09:24 +02:00
Nicolas Martinelli 85fd972149 [FIX] stock_landed_costs: use correct UoM
Use the normalized quantity, otherwise the amount per unit is wrongly
calculated.
2016-04-20 13:09:24 +02:00
Olivier Dony fc2aa73606 [FIX] web: fix db manager layout in Chrome 50
Complement of f992c8ee19,
to be reverted in saas-6+ and in 8.0 when Chrome's
fix reaches the stable Chrome channel.

Fixes #11629

See https://bugs.chromium.org/p/chromium/issues/detail?id=603507
2016-04-20 11:42:03 +02:00
Joren Van Onder d043fd03ce [FIX] point_of_sale: display correct uom on weighable products
Everything's displayed fine on orderlines with weighable products, this
only affected the small blue labels on the products.

opw-674264
2016-04-20 11:09:07 +02:00
Olivier Dony 7f6bd2dc66 [FIX] web: fix layout issue in Chrome 50 (again)
Makes the fix in f992c8ee19
specific to the view manager of the main oe_application
container, in order to avoid disrupting other view manager
occurrences (such as the ones in modal windows or x2many
list views).

Fixes #11629 (again)

Note: Hopefully the Blink team will fix Chrome so we can
get rid of this hack in the future:
  https://bugs.chromium.org/p/chromium/issues/detail?id=603507
2016-04-19 17:44:24 +02:00
Denis Ledoux e1a17b433d [FIX] audittrail: prevent loop between models having *2m between each other
When setting rules on models having o2m/m2m relationship
between each other
e.g.
- `res.partner`:
  o2m `sale_order_ids` to `sale.order`
- `sale.order`
  o2m `message_follower_ids` to `res.partner`

an infinite loop could occur if records
of these models referenced records of the
other models in their o2m relationships
e.g.
 - `res.partner` ID 68:
   `sale.order` ID 9 in its `sale_order_ids`
 - `sale.order` ID 9:
   `res.partner` ID 68 in its `message_partner_ids`

This revision solves this use case, by passing the already
treated records in the context and checking that the records
haven't yet be treated before making the recursive call.

This revision makes sure to not break the API of methods
`get_data_context` and `prepare_audittrail_log_line`
(a new parameter had to be introduced for the above purpose)

opw-670904
2016-04-19 16:56:20 +02:00
Stefan Rijnhart 04765d4917 [FIX] hw_escpos: RBG images do not necessarily have an alpha channel 2016-04-19 15:34:45 +02:00
Goffin Simon cb5d41da3b [FIX] account_asset: asset_create
When creating assets from invoice lines, the system must check
that assets have not already been created for the related invoice.
If assets already exist then these assets have to be removed.

Used case:

- In the purchase journal, tick "allow canceling entries"
- On a supplier invoice line, set an asset category
- validate the invoice
- cancel the invoice
- set to draft
- validate the invoice

Before the fix: the asset was created twice.
After the fix: A warning is raised if an asset already exists for the invoice.

opw:674674
2016-04-19 11:27:34 +02:00
Joren Van Onder 9fa53b7ee7 [FIX] point_of_sale: adapt to Chrome 50's new handling of cell heights
Chrome 50 treats percent-height divs inside of auto-height cells as
auto [1]. So from now on it's important that an explicit 'height: 100%' CSS
property is set on parent tds, otherwise you'll end up with elements
with a height of 0.

An extra difficulty is that this new height property on
subwindow-container will result in the element being as high as his
parent table. So the collapsed trick doesn't work anymore in the
customer list.

This has to be done conditionally. The proposed workaround of adding
100% height to parents of affected elements causes issues in IE/Edge
because the effect of adding a height in percent to a table-{cell,row}
element is not defined by CSS [2].

DO NOT FORWARD-PORT!

[1] 8876584335
[2] http://stackoverflow.com/a/27384730
2016-04-19 08:53:10 +02:00
Goffin Simon 6057e645d6 [FIX] purchase: Shipping exception when cancelling a PO
When canceling and clicking on "reset to draft" button a PO with
invoicing method = Based on generated draft invoice, the purchase
workflow led to a shipping exception.

To be in state done the PO must have:

All its PO lines invoiced with _set_po_lines_invoiced
All its incoming shipments done with test_moves_done

opw:673561
2016-04-19 08:47:22 +02:00
Joren Van Onder 09a9e4aeb5 [FIX] point_of_sale: deal with Chrome 50's new height inheritance
Chrome 50 treats percent-height divs inside of auto-height cells as
auto [1]. So from now on it's important that an explicit 'height: 100%' CSS
property is set on parent tds, otherwise you'll end up with elements
with a height of 0.

DO NOT FORWARD-PORT!

[1] 8876584335
2016-04-18 16:42:09 +02:00
Simon Lejeune f992c8ee19 [FIX] web: fix layout issue in Chrome 50
A 100% height is not distributed anymore to the children of a table-row
if they are not themselves table-cell in Chrome 50. This breaks the
indenpendent scrolling of the menu and the view manager.

However, setting the `table-cell` display breaks the layout in Internet
Explorer.

When the webclient is loaded by Chrome 50, we load a stylesheet
forcing a `table-cell` for display.

Seems to be related to https://bugs.chromium.org/p/chromium/issues/detail?id=353580
and 8876584335

Related to e1a99192bd
Fixes #11629
2016-04-18 14:43:50 +02:00
Simon Lejeune e1a99192bd Revert "[FIX] web: fix layout issue in Chrome 50"
or how to break every internet explorer releases while
attempting to fix chrome 50
2016-04-15 12:12:26 +02:00
Olivier Dony 9a0124591b [MERGE] Forward-port 7.0 up to 605b94e64c 2016-04-15 11:54:38 +02:00
Olivier Dony 605b94e64c [FIX] point_of_sale: do not hide transactional errors
Catching and hiding database transactional errors can
sometimes cause a POS order to be entirely lost.

When it occurs, the transaction won't be committed
into the database, and if there is only one order
in the batch, the server won't return any error to
the frontend POS which will consider the order saved.
2016-04-15 10:03:55 +02:00
Olivier Dony 1d25fe1e05 [FIX] qweb: escape alt-field properly in image widget
This is very unlikely to be exploitable because the
alt-field usually comes from master data (e.g. product
names) that can't be injected.

Courtesy of Naglis Jonaitis
2016-04-15 09:51:19 +02:00
Goffin Simon dc3f1e2211 [FIX] account_analytic_analysis: comment field in account.invoice
When creating an invoice from a contract with button "create invoices",
the description linked to the contract has to written in the comment field
of the invoice.

opw:671660
2016-04-14 16:32:24 +02:00
Simon Lejeune 00ead29c7c [FIX] web: fix layout issue in Chrome 50
The height was not distributed anymore to the children of a `table-row`
element if they are not themselves `table-cell` elements.

Fixes #11629
2016-04-14 14:31:12 +02:00
Joren Van Onder 967629f8ac [IMP] point_of_sale: release POSBox image v14
Marks official support for the Raspberry Pi 3.
2016-04-14 11:24:48 +02:00
Joren Van Onder f5a527fb0a [IMP] point_of_sale: move POSBox AP to a less used subnet
When the POSBox boots without a network cable attached it will
automatically launch a wireless AP that people can connect to. This
allows them to configure what wireless network the POSBox should connect
to.

This wireless AP was configured to use the 10.10.0.0/24 subnet. The AP
itself was on 10.10.0.1. Although this is fine if used as intended it is
a quick way to take down an existing network if you where to plug in an
ethernet cable after the wireless AP has started. 10.10.0.1 is commonly
used by routers all over the world and plugging in a booted POSBox into
their networks will cause serious issues because the POSBox will share
the same IP as the router.

This moves the POSBox AP to the 10.11.12.0/24 subnet, with the AP on
10.11.12.1.

This also makes the DHCP server listen only on wlan0 because otherwise
you can end up with two DHCP servers on the same network which would
still break stuff.
2016-04-14 11:24:48 +02:00
Joren Van Onder fd43faac16 [IMP] point_of_sale: redirect POSBox image init script output to file
Useful when updates to the initialization scripts don't go as
planned. This leaves something to inspect.

The initialization script already automatically stops (because of 'set
-o errexit') but it was a bit tricky to actually see what went wrong
because scrollback in QEMU isn't great.
2016-04-14 11:24:48 +02:00
Joren Van Onder 5af1c085bf [IMP] point_of_sale: migrate POSBox to Raspbian Jessie
The main reason for doing this is supporting the new Raspberry Pi 3. No
functional changes where made.

For Raspbian Wheezy we used to download the full image and strip it as
best we could to obtain a reasonable image size for people to
download. Since Raspbian Jessie the Raspberry Pi Foundation has started
releasing an official minimal image (Raspbian Jessie Lite) which we will
use from now on to build our image. One downside of this is that the
minimal image is a 1.3 GiB image which is too small for our
purposes so it has to be resized.

Because Raspbian Jessie migrated to systemd we cannot rely on
/etc/init.d/rcS to set up the ramdisks anymore. Jessie provides a
compatibility layer so old SysVinit scripts still work but rcS does not
block like it does in a SysVinit system, it is run in parallel with
other startup services. In our case this is a bad thing as setting up
the ramdisks has to be done before any other services are started. To
accomplish this the rcS hack has been migrated to a systemd service
running before basic.target and with DefaultDependencies=no. This has a
similar effect as the rcS hack because normal systemd services (with
DefaultDependencies=yes) all require basic.target by default.
2016-04-14 11:24:48 +02:00
Olivier Dony 46c5f93b6c [FIX] website_sale: verify match between TX and SO amount
When processing a payment transaction, double-check the
match between the amount of the transaction and the
amount of the SO, to be sure that we won't be validating
a SO that has been modified since the payment.

Such cases have to be double-checked manually.

Also add a bit of extra logging to make auditing ecommerce
transactions easier.
2016-04-13 15:34:34 +02:00
Olivier Dony ffdfadfc91 [FIX] paypal: no spurious warning about IPN version
In addition to being mostly useless because Paypal's API
changes are supposed to be backwards-compatible, this
warning was using inconsistent version numbers.

Switched to a simple INFO line with IPN version.
2016-04-13 15:34:34 +02:00
Goffin Simon 880e951f34 [FIX] website_event_sale: get_unit_price with event ticket
When the line is linked to an event ticket, the price must be taken
on the ticket.

Fixes #11521

opw:673176
2016-04-12 11:25:33 +02:00
Holger Brunn b25c054c93 [FIX] web: prevent crash in rare case with status field
Current behavior before PR: if you create a new record within a one2many
field and the model's form has a clickable status bar defined, clicking
this status bar will raise an exception because the virtual id
(one2many_v_XXXX) will be passed to the model's write method

Desired behavior after PR is merged: clicking just changes the cached
value
2016-04-11 15:21:45 +02:00
Denis Ledoux 7f571f0852 [FIX] crm_partner_assign: avoid report view deletion
The SQL view `crm_partner_report_assign`
makes a join on `account_invoice_report`

A column is added to
`account_invoice_report` in the module
`sale` (`section_id` is added to the view),
making the SQL view `account_invoice_report`
replaced automatically at the install/update
of the `sale` module, which leads
to the automatic deletion of the SQL
view `crm_partner_report_assign`,
because the SQL view `account_invoice_report` is
altered.

Therefore, after the install/update of the `sale`
module, the view `crm_partner_report_assign` was
deleted, and the "partnership anaylsis" unusable.

This revision makes sure to init the
`crm.partner.report.assign` report after
every init of the `account.invoice.report`.

opw-674177
2016-04-11 13:05:03 +02:00
Odoo Translation Bot 05223f558d [I18N] Update translation terms from Transifex 2016-04-10 02:59:08 +02:00
Nicolas Lempereur 0c9355a8fb
[FIX] website: prefer to get exact language
request.website.get_languages returns a list of tuple in the form:

        (`language code`, `language name`)

With this commit the code first check if there is a language exactly
matching, and only if failed check if there is a match on the short
form.

closes #11613
opw-672412
2016-04-06 15:31:58 +02:00
Xavier Morel ceb87b78f0 [REV] usage of m2m listview for o2m
Turns out to break way more than it fixes.
2016-04-05 11:32:59 +02:00
Odoo Translation Bot 678a84e626 [I18N] Update translation terms from Transifex 2016-04-03 02:59:02 +02:00
Olivier Dony 37744cb55f [FIX] base_import: avoid JS error in callback 2016-04-01 20:30:57 +02:00
Olivier Dony 7546123a6b [FIX] base_import: avoid JS error in callback 2016-04-01 20:28:13 +02:00
Nicolas Martinelli 1d0b9da3f0 [FIX] project_issue: partner email
When a new issue is created, the partner email is not pre-filled.

Fixes #11395
opw-672380
2016-04-01 11:12:39 +02:00
Odoo Translation Bot 6aa601da2a [I18N] Update translation terms from Transifex 2016-04-01 00:28:28 +02:00
Goffin Simon 214231fbce [FIX] purchase: _get_price_unit_invoice
If the costing method of the product is "average", the price unit
of the stock move is set in the currency of the field "price_currency_id"
with the function "do_partial" (addons/stock/stock.py).

opw:672552
2016-03-31 14:05:19 +02:00
Goffin Simon bbb317c547 [FIX] crm: merge partner
It is not allowed to merge a partner with one of his parent.

opw:673104
2016-03-31 11:54:25 +02:00
Denis Ledoux 6e07ae5a5c [FIX] google_drive: Generate Google Authorization Code URL
When checking `Attach Google documents to any record`
in the general settings, if you are not redirected
to a module, but, instead, the current page is refreshed
(the wizard is reloaded instead of creating a new
configuration wizard),
the default value for `google_drive_uri` was not correctly
loaded, the `client_id` in the URL
remained `False` because the wizard was not being
re-created, but reloaded,
and therefore `default_get` hasn't been re-called,
and the `client_id` changed
(it was added to the system parameters after
the installation of the module)

Therefore, the link did not include the correct
`client_id`, and it leaded to the inabibility
to use the URL:
401. That’s an error.
The OAuth client was not found.

Replacing the simple char fields by a function
field, with the correct store trigger,
force the URL value to be reloaded
when the system parameter is inserted.

opw-673274
2016-03-30 16:15:36 +02:00
Denis Ledoux 1d5db33638 [FIX] website_sale: perform onchange as sudo
This revision is related to 9752aedb4e

It looks like in some cases, the user cannot read the
partner associated to his own cart.

This is the case when shopping without being signed in.

opw-673187
2016-03-30 11:06:08 +02:00
Denis Ledoux 461162f3ec [FIX] calendar: display_start and stop are not private
Add `display_start` and `display_stop` to the fields
which are public even if the event is marked as private.

There is no reason it should be public,
especially if `start` and `stop` are. Besides,
this leads to issues in
`get_search_fields`, when doing:
```
sort_fields['sort_start'] = browse_event['display_start'].replace(' ', '').replace('-', '')
```
opw-672997
2016-03-29 16:13:07 +02:00
Manuel Vázquez Acosta ad979b71a2 [FIX] account: account balances computation
Commits 7b7f3fa and d6c88b8 filter out special periods from the account
balances. However, this filtering is not necessary anymore for a closed
fiscal year. The result is that the opening balance becomes wrong as
soon as the previous fiscal year is closed.

This commit fix this by computing the balance over all fiscal years.

Closes #11515
2016-03-29 11:17:58 +02:00
Odoo Translation Bot 8d9b309f9a [I18N] Update translation terms from Transifex 2016-03-27 03:14:28 +02:00
Peter Hahn c2abdbbc37 [IMP] Make many2many widgets in listview usable for one2many
Existings many2many widgets in ListView can be used also for one2many if
the supplementary data is provided for the column.

closes #11282
2016-03-25 16:54:32 +01:00
Martin Trigaux eeffda9689 [I18N] website_quote: missing terms in .pot file 2016-03-25 14:45:12 +01:00
Christophe Simonis d519daca1d [MERGE] forward port of branch 7.0 up to f1b9b30 2016-03-24 15:02:45 +01:00
Nicolas Martinelli f1b9b301da [FIX] web: clear filename if image error
When the user chooses as product image a file which is not an image, the
message "Could not display the selected image" is displayed. However, at
saving, a traceback is thrown since the file chosen is uploaded anyway.

If the image cannot be displayed, the image field is cleared.

opw-672206
2016-03-24 11:18:14 +01:00
Denis Ledoux d8d1681a13 [FIX] account: check journal centralization performances
This revision is related to 99d8cd6

Avoid to check the journal centralization
mutliple times, for each move lines.
Checking the journal centralization
for each journal for each period just
before the call to `super` is enough.

Before this revision,
if a large number of move lines
was passed in the `ids` parameter
of the `write` method, with all
the same journal / period, this
could lead to huge performances issues,
the `_check_moves` being called
a large number of times for the same
journal and period couple, uselessly.

opw-672797
2016-03-23 18:48:59 +01:00
Denis Ledoux 9752aedb4e [FIX] website_sale: update partner details when reusing payment transaction
When attempting to pay a cart in the ecommerce,
if the customer went on the payment acquirer site
(meaning, the `payment.transaction` is created
in the database), then come back to the checkout form
using the browser back button, and changed his customer
details (address, email, phone,...),
these changes in the details were not applied
in the `payment.transaction` record that was being
re-used.

e.g.
Checkout > Confirm > Choose Paypal, Pay Now
> History back to the checkout and apply changes
in the address > Confirm > Pay Now.
2016-03-23 15:38:20 +01:00
Denis Ledoux a0c473379a [FIX] website_sale: back port of 15f27b2614a4d6f86ded20fc7b3d8e796a2db078 2016-03-23 15:38:20 +01:00
Denis Ledoux a430e2c8c5 [FIX] payment, website_sale: back port of cb9d798 2016-03-23 15:38:19 +01:00
Denis Ledoux e1b1f24516 [FIX] payment, website_sale: back port of f89e8f9 2016-03-23 15:38:19 +01:00
Nicolas Martinelli d39d191cec [FIX] stock: reserve if move not assigned
Commit 4a0b6f6 slightly improves the performances of `action_assign` by
skipping moves which already have pack operations. However, if the move
is not completely assigned, it prevents the possibility to search for
new quants to assign to the given move.

opw-672069
2016-03-22 17:17:37 +01:00
Denis Ledoux 9e624671d2 [FIX] account: bank statement lines order on write
When adding new lines to an existing statement,
the order of the lines was not kept,
due to the re-sequencing operation done in the
override of `write` in `account.bank.statement`:

```
for statement in self.browse(cr, uid, ids, context):
    for idx, line in enumerate(statement.line_ids):
        account_bank_statement_line_obj.write(cr, uid, [line.id], {'sequence': idx + 1}, context=context)
```
as the lines order was based on `statement_id desc, sequence`,
which is the same for all lines added,
(except if the order is forced in the web client,
using the handle widget)
and, therefore, the order
of the lines returned by `statement.line_ids` was
not determinist.

Adding the `id` to the lines order
(as it's done in `sale.order`, for instance),
solves the issue, as the lines will then be fetched
in the order they were created.

opw-667541
2016-03-22 17:12:01 +01:00
Denis Ledoux e94be1856c [FIX] website_sale: non-blocking order confirmation fail
When validating a payment transaction,
if the cart (order) cannot be confirmed or
the email cannot be sent for any reason
(instance, the email template is broken),
the transaction must continue, so the payment
transaction can be set to `done` or `pending`.

In other words, not sending the confirmation
email or not confirming the sale order must
not be blocking to mark the payment
transaction as done.

opw-672486
2016-03-22 15:49:14 +01:00
Nicolas Martinelli d6c88b8809 [FIX] account: filter out special periods
Commit 7b7f3fa filters out the special periods. However, the filtering
should be done only for the display in the form view, nto for the
reporting which is actually correct.

opw-672531
2016-03-22 13:07:30 +01:00
Nicolas Martinelli 43445db7e4 [FIX] point_of_sale: fiscal position on invoice
In v8.0 and saas-6, the PoS does not support the concept of fiscal
position. Therefore, the invoice generated should not use it, otherwise
there might be an inconsistency between the PoS order and the invoice.

FORWARDPORT TO SAAS-6 ONLY!

Fixes #11299
opw-671743
2016-03-22 11:46:49 +01:00
Denis Ledoux ec21006d98 [FIX] account: check context before using it.
This is related to 0977bd9798
2016-03-21 16:41:57 +01:00
Denis Ledoux 0977bd9798 [FIX] account: bank statement fiscal year sequence
When using sequences per fiscal year,
the sequence used to build the bank
statement name must be the according fiscal
year sequence.

opw-671937
Closes #11185
2016-03-21 15:26:44 +01:00
Nicolas Martinelli df212977b8 [FIX] stock_landed_costs: missing AML
There are 2 journal items missing on the accounting entry that
represents the assignation of the landed costs (for a product that has
already left the stock!) => expense account at the debit and stock
output account at the credit (amount is equal to the cost of the landed
cost)

opw-671311
2016-03-21 13:37:42 +01:00
Denis Ledoux 037257b887 [FIX] payment_adyen: back-port of 3dafb19
opw-672504
2016-03-21 13:02:26 +01:00
Goffin Simon cc335879a7 [FIX] sale_stock: _check_routing in drop shipping
When checking the route of a product, if the product is set with route drop shipping
then the product is available.

Inspired from 14fd46c0d59dbb0365019a21bf1263b17ab99dbb

opw:672392
2016-03-21 10:44:00 +01:00
Joren Van Onder 9df2921743 [IMP] hw_blackbox_be: implement support for registered POSBoxes
POSBoxes will be registered with the government. If a POSBox is not
registered it won't load the blackbox driver, preventing communication
with the Fiscal Data Module.
2016-03-21 09:10:34 +01:00
Odoo Translation Bot f5cc04caa7 [I18N] Update translation terms from Transifex 2016-03-20 02:58:59 +01:00
Goffin Simon af61494667 [FIX] account_asset: compute depreciation button
It is not allowed to recompute the depreciations when the asset
is confirmed.

opw:672203
2016-03-17 14:38:42 +01:00
Goffin Simon 21beef4b19 [FIX] account_asset: period_id field
The field period_id didn't exist in model "account.asset.asset"

Closes: #11262

opw:671494
2016-03-17 09:41:47 +01:00
Nicolas Martinelli 7b7f3fa76a [FIX] account: filter out special periods
When computing the balance, debit and/or credit, the opening period must
be filtered out. Otherwise, the invoices which are still opened at the
time of the period closing will be counted twice.

opw-670584
2016-03-16 09:59:13 +01:00
Goffin Simon f66fcf97b2 [FIX] stock: Transfering the pack
When transfering the pack, the priority to the moves in state "assigned"
or partially_available(=true) must be given.

Used case (steps):

-set warehouse with three steps to delivery
-create one product A with qty on hand 10
-create sale order with first line product A by qty 2 and the second line with product A with qty 10
-confirm sale order
-check availability
-transfer pick by qty 10
-transfer pack by qty 10

The pack couldn't be transered

Now the pack is transfered.

Closes: #10764

opw:668682
2016-03-15 16:15:18 +01:00