Commit Graph
96727 Commits
Author SHA1 Message Date
Denis Ledoux 8a098df7e6 [FIX] account_asset: can't adapt browse record to id
During the conversion of the module
`account_asset` to the new API,
in revision 6120bab,
the variables `current_currency` & `company_currency`
have been changed from identifier integers to
browse records.

The currency passed in the `create` method
values must therefore be adapted according
to this change.

This prevented the correct use
of the assets when the currency of the assets
was not the same as the currency of the company.

opw-669571
2016-02-23 15:19:48 +01:00
Denis Ledoux 7c7ee5d0ec [FIX] account_asset: currency conversion inverted
During the conversion of the module
`account_asset` to the new API,
the currency conversion in `create_move` has been inverted.

```
amount = currency_obj.compute(cr, uid, current_currency, company_currency, line.amount, context=context)
```
has been converted to
```
amount = company_currency.compute(line.amount, current_currency)
```
while it should have been converted to
```
amount = current_currency.compute(line.amount, company_currency)
```
See:
https://github.com/odoo/odoo/commit/6120bab#diff-e35933343c229da0afceb2a3b9e3639bR356

opw-669568
2016-02-23 15:11:07 +01:00
Denis Ledoux 020ae64f16 [FIX] website_portal: currency rounding for "My Orders"
t-field handles better the currency rounding than t-esc.

When setting the currency rounding to 0.05 instead
of 0.01 (e.g. Switzerland), for 600.00:
 - t-esc returns 600.0
 - t-field returns 600.00, as expected.

opw-669945
2016-02-19 13:49:27 +01:00
Christophe Simonis 9363372efe [MERGE] forward port of branch 8.0 up to 0f46e6a 2016-02-17 16:20:23 +01:00
MORIN Fabien 0f46e6a04c [FIX] l10n_fr_hr_payroll: update plafond_secu to 2016 values
The previous amount was for 2011. New amount is 3218€
https://fr.wikipedia.org/wiki/Plafond_de_la_S%C3%A9curit%C3%A9_sociale#Historique_des_valeurs
2016-02-17 13:51:31 +01:00
MORIN Fabien fab7902924 [CLA] signature for fabienmorin
Closes #10878
2016-02-17 13:49:40 +01:00
Josse Colpaert eafebcb308 [FIX] mrp: for the consume move lines, the expected date should also be the planned date of the production order
It was like that for the date field, which is taken into account for the forecast quantity,
but in the view the scheduled date field is shown.  We put the scheduled date equal to the date.
That way it is clear to the user when the products are foreseen to be consumed.
2016-02-17 10:11:57 +01:00
Adrien Peiffer (ACSONE) b21773456c [ADD] Add test with half hours to compute working hours. 2016-02-16 17:24:39 +01:00
Adrien Peiffer (ACSONE) 5e940643a5 [FIX] In some cases, the half hours are not considered in intervals computation 2016-02-16 17:24:21 +01:00
Denis Ledoux 1d7c12022d [FIX] stock_account: valuation history with moves having multiple quant prices
The revision 29bd622521
aimed to improve the performance by changing
the view index, to use a BIGINT instead of a text.

It was assumed that the index used
(`stock_move.id`) could not appear
multiple times with the JOINs and
group bys defined.

This was in fact possible, if a
stock move is associated to
several quants with different costs,
because of the JOIN on the many2many table
`stock_quant_move_rel`
linking quants to moves,
and the GROUP BY
`price_unit_on_quant`
that caused the different moves/quants association
not to be merged within one unique line
if the costs on the quants are different.

Instead of the group by, we now aggregate the quants
costs, using the weighted average, so the index
used can be unique, as expected.

From now, the inventory value per line in
this report view can therefore
be different than what can be found on the quants,
but this report view is based on the stock moves
rather than the stock quants, and this is therefore accepted.

In other words, the inventory value is computed for the stock move
rather than for the stock quant.

opw-658903
2016-02-16 16:37:32 +01:00
Yoshi Tashiro 7b445112bc [CLA] add contributor to roomsfor CLA
Adding @manamirfhk
Closes #10932
2016-02-16 08:36:08 +01:00
Christophe Simonis 0a1362a19b [FIX] website: video snippet size detection 2016-02-15 14:37:44 +01:00
Denis Ledoux fcd10521e9 [MERGE] forward port of branch 8.0 up to 5401345 2016-02-15 11:37:27 +01:00
Denis Ledoux 5401345ce2 [MERGE] forward port of branch 7.0 up to ce38582 2016-02-15 11:36:02 +01:00
Denis Ledoux ce38582907 [FIX] mrp: update production quantity wizard factor
Use the same factor than the one used when
computing the products to consume at confirm.

Before, the quantity of products to consume was wrong
when using a different unit of measure in the BOM
than in the production order.

e.g.
 - BoM defined as:
   - 1 dozen of milk
   - BoM lines: 1 cow
 - Production order:
   - 1 unit of milk
   - BoM: The above one
At confirm, the quantity to consume is 0,083 cow (1 cow / 12, this is correct)
But, when updating the quantity to 2.0,
it updated the quantity of cow to 24.0, instead of 0,16.

opw-669447
2016-02-15 11:34:16 +01:00
Odoo Translation Bot f35fd798f1 [I18N] Update translation terms from Transifex 2016-02-14 02:59:46 +01:00
Denis Ledoux 4c7e33fd93 [FIX] event_sale: event tickets domain in sale order line
From saas-6, setting `0` as maximum available seats
means there is an unlimited amount of tickts that
can be sold, as stated in the help message of the field:
```
Define the number of available tickets. If you have too much registrations you will
not BE able to sell tickets anymore. Set 0 to ignore this rule set as unlimited.
```

This domain is the same domain used than in
the QWeb views of `website_event_sale`.

opw-669355
2016-02-12 14:21:49 +01:00
Jeremy Kersten e48439d89c [FIX] website: encode lang (come from database) into utf-8 before join
Join can fail if url contains non-ascii char

Fix urls like:
   /page/波
   /page/русский
   /page/%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9
2016-02-11 09:30:04 +01:00
Christophe Simonis 07d7147846 [MERGE] forward port of branch 8.0 up to cdf21eb 2016-02-10 18:03:42 +01:00
Joren Van Onder cdf21ebe4a [FIX] point_of_sale: make POSBox print only one ticket when losing wifi
The POSBox attempts to maintain whatever Wi-Fi connection it has as best
it can. When it loses it's current Wi-Fi connection it will attempt
to recreate it every 30 seconds. This works well, but a side-effect of
this is that it'll also print a 'Could not connect to LAN' ticket every
time it fails. If you where to leave the POSBox with Wi-Fi on for an
extended period of time you could return to a lot of 'Could not connect
to LAN' tickets.

This makes it so that the 'Could not connect to LAN' ticket only gets
printed once upon connection loss. Although it would be simpler to just
not print this ticket at all when losing connection, it is very useful
to know when the POSBox has lost connection. Otherwise when it loses
connection it would stop working and noone would know why.
2016-02-09 16:30:01 +01:00
Denis Ledoux 3266d43399 [FIX] marketing_campaign: pass context as kwargs in overriden search
When converting a new API call to an old API call,
the context is expected to be found within the kwargs
argument. If not, it is seen as a regular argument.

See `get_context_split` in `openerp/api.py`

As it was not the case in the overidden method
`search` in `marketing_campaign.py`, if a module
overriden the method `search` of
`ir.actions.report.xml` using the new API, the
context wasn't treated as such correctly, and it leaded
to wrong number of arguments passed.

I take the opportunity to pass all arguments
that are passed as kwargs in the base `search`
as kwargs as well, to be clean.

opw-668471
2016-02-09 11:30:44 +01:00
Nicolas Lempereur 3ea3348d20 [FIX] website_crm: fix medium_id for website sent form
In ddac26c `crm.crm_medium_website` was replaced by
`utm.utm_medium_website`.

There was one place where it was not reverberated so the medium_id was
always unset in that instance (a crm.lead created from a website form).

opw-668853

note: no need to forward port after saas-6 (code change)
2016-02-09 11:05:46 +01:00
Olivier Dony 39b8330331 [FIX] base: enable o2m test foreseen in 4de3f4c4
See 4de3f4c4ba
2016-02-09 10:10:28 +01:00
Raphael Collet 5763c32a6d [FIX] addons: fix usage of decorators api.v7/api.v8
Specifically, when one API implementation calls the other one, it has to call
the method *from the same class*.  Otherwise, overriding the method may result
in an infinite recursion.  Consider:

    class A(Model):
        _name = 'stuff'

        @api.v8
        def foo(self):
            return 42

        @api.v7
        def foo(self, cr, uid, context=None):
            return self.browse(cr, uid, [], context).foo()

    class B(Model):
        _inherit = 'stuff'

        def foo(self, cr, uid, context=None):
            return super(B, self).foo(cr, uid, context=context) + 1

and now call: `env['stuff'].foo()`.  This invokes `B.foo` (new-API), which
calls `B.foo` (old-API), which calls `A.foo` (old-API), which calls `B.foo`
(new-API) instead of `A.foo`!

This issue would not be present if old-API `A.foo` was defined as:

        @api.v7
        def foo(self, cr, uid, context=None):
            return A.foo(self.browse(cr, uid, [], context))
2016-02-09 10:01:43 +01:00
Laurent Mignon d82e489add [FIX] models: use column._symbol_c as placeholder for the column value
When generating SQL queries, `column._symbol_c` must be used as placeholder as
for the method 'set' of the column itself.  Otherwise it is not possible to
define specialized columns.
2016-02-09 09:20:17 +01:00
Nicolas Lempereur dd52faaec0 [FIX] website: reset request attribute
When rerouting from a lang path token to the given route (eg:
/en_US/route_path to /route_path) it is better to keep request variable
clean.

opw-668563
2016-02-08 17:26:32 +01:00
Denis Ledoux ff915dd96e [FIX] import: import new records without xml_ids
This is related to revision 80b373f.

The above revision leads to the inability
to import new records without any `xml_id` set

Technically speaking, this is because
you cannot concatenate `False` with `'_'`, in
`xml_id + '_'`

opw-668962
2016-02-08 16:54:24 +01:00
Denis Ledoux fead627dd5 [MERGE] forward port of branch 8.0 up to 3ff4dae 2016-02-08 13:31:27 +01:00
Odoo Translation Bot 3ff4dae5b0 [I18N] Update translation terms from Transifex 2016-02-07 02:58:52 +01:00
Olivier Dony bc26a49194 [MERGE] Forward-port 7.0 up to 4de3f4c4ba 2016-02-05 15:42:12 +01:00
Cedric Snauwaert 4de3f4c4ba [FIX] expression: fix search for o2m with non existing id
The result of searching on a o2m field for a missing ID was
the whole set of records which do not have any lines in the
o2m fields. This is definitely not the desired behavior,
and could lead to disatrous performance, because the
returned set could be extremely large.

One example of such behavior is for recomputing fields
in the env cache in 8.0+. When a o2m line gets deleted,
it triggers the recompute of any dependent fields.

In order to locate the records to recompute, the ORM
searches for the 'parent' records in the comodel table.
When this operation is done by 2 users concurrently
the o2m line may not exist anymore, and the bug
is triggered: dependent fields are recomputed on a possibly
very large set of records that did not need any recompute!
2016-02-04 17:10:08 +01:00
Antonio Espinosa d036e3be1a [FIX] membership: remove membership line when deleting invoice
Apply the same behaviour as the unlink done on account.invoice.line.
This should properly be implemented with a ondelete=cascade but this is not
possible in stable version as it requires an update.
2016-02-04 14:48:47 +01:00
Raphael Collet a3ec5a35a5 [FIX] fields: in copy_cache, add single records to set todo 2016-02-04 14:33:53 +01:00
Raphael Collet 0f2e7d783e [FIX] fields: make copy_cache use a todo list instead of recursion
The recursion was based on an incorrect assumption: the cache of the target
environment is initially empty.  If another computation left some value there,
the copying is incomplete, and that causes bugs in onchanges.
2016-02-04 13:48:28 +01:00
Olivier Dony 1f022a0b4a [MERGE] Forward-port 8.0 up to rev. 67a63e2cc9 2016-02-03 16:53:30 +01:00
Olivier Dony 67a63e2cc9 [MERGE] Forward-port 7.0 up to rev. cb609bd425 2016-02-03 16:42:29 +01:00
Denis Leemann 5b4d303d05 [FIX] kanban: 180 in Firefox 43+ and Chrome 48+
The kanban CSS applies both a 90 degree rotation and a top-bottom rtl
writing mode to folded kanban group titles. This was initially fine
because browsers didn't support the (SVG) "tb-rl" value for writing-mode
and the property was thus ignored. Firefox 43 (December 2015) and Chrome
48 (January 2016) added support for this value, and thus now end up with
a 180 degree rotation on the title.

Issue #7955 fixed it in 8.0 due to MSIE impact, this is essentially a
backport to 7.0.

close #10687
2016-02-03 15:03:43 +01:00
Martin Trigaux aca28c82b4 [FIX] website_sale: do not compute price of every pricelist
This controller was very slow as not providing a pricelist computed the price of
all products of all pricelists.
Instead only fetch the prices for the useful products.
2016-02-03 12:05:42 +01:00
bima d01ecb6e79 [FIX] stock: wrong variable used in _handle_renaming
Could incorrectly rename the stock.location.path objects, and in case
the route has push_ids but no pull_ids would crash the method entirely.

closes #10747
2016-02-03 09:55:43 +01:00
Olivier Dony cb609bd425 [FIX] tools.misc: log errors when parsing fails 2016-02-03 02:25:09 +01:00
Olivier Dony 6562309927 [MERGE] Forward-port 8.0 up to e8d06f7b20 2016-02-03 00:44:04 +01:00
Olivier Dony e8d06f7b20 [MERGE] Forward-port 7.0 up to bdbcbea285 2016-02-03 00:40:27 +01:00
Olivier Dony bdbcbea285 [FIX] marketing_campaign: incorrect field accessor 2016-02-02 22:43:39 +01:00
Olivier Dony cc724c2e61 [FIX] base: centralize custom data serialization for builtin types only 2016-02-02 22:42:31 +01:00
Olivier Dony 000c681f1e [FIX] ir.values: remove redundant deduplication logic
Handling update/create of existing values is already
handled by ir.values.set() itself.
2016-02-02 19:49:09 +01:00
Christophe Simonis d6138430e9 [MERGE] forward port of branch 8.0 up to 8848af7 2016-02-02 18:32:46 +01:00
Xavier Morel 8848af76f0 [IMP] account: recordset calling conventions for fixed has_group 2016-02-02 18:28:23 +01:00
Xavier Morel ccb0f6db61 [FIX] base: has_group behaviour under the new API
While the signature makes sense in an old API context (sort-of) it's
very easy to misuse in a new API context as one'd expect `has_group` to
use the subject (recordset), not the user in the environment, compounded
by ``env.user`` being browsed as administrator, resulting in the
"obvious" ``env.user.has_group(foo)`` checking if the
administrator (rather than the current user) has the specified group.

Adds a divergent v8 version of has_group which first checks if it's
called on a non-empty recordset, and in that case use the recordset id,
otherwise fallback on the context user (to handle new API conversions
which used the "correct" call convention rather than the obvious one).

fixes #9649
2016-02-02 18:28:23 +01:00
Christophe Simonis 9ca7ad87b2 [MERGE] forward port of branch 8.0 up to 3ac46ee 2016-02-02 12:25:06 +01:00
Nicolas Martinelli 3ac46ee3d4 [FIX] stock: propagate UoS quantity
Both UoM and UoS quantity change should be propagated.

Fixes #10623
opw-667805
2016-02-02 11:25:57 +01:00