Commit Graph
107793 Commits
Author SHA1 Message Date
Alexis de Lattre 7e1a523fbf [FIX] product: missing string on field
Closes #16640
2017-04-26 15:37:20 +02:00
Raphael Collet 482fec4838 [FIX] models: support removing an ir.model.fields that no longer appears on model 2017-04-26 15:23:06 +02:00
Raphael Collet 4287a70110 [FIX] models: remove ir.model.fields that no longer exist in registry
This fixes the following issue.  Assume a custom field F is created on
`res.partner`.  This field will appear on `res.users` as an inherited field,
and will be reflected in `ir.model.fields` as a 'base' field.  When F is
removed from the parent model, it no longer appears on the child model in
registry, but remains in `ir.model.fields`.

The patch allows the proper removal of the no-longer-inherited field from
`ir.model.fields`.
2017-04-26 15:11:07 +02:00
Nicolas Martinelli 831322bb92 [FIX] hr_expense: expense lines > and < 0
- Create an expense sheet
- Line 1 is 500
- Line 2 is -200
- The total is 300 => a payment of 300 is made

When the payment is validated, the expense is not set as paid.

In v10, one expense line = one account move. In order to know if the
expense is paid we check that each account move is completely
reconciled. The account move of 500 is never completely reconciled by
the payment of 300, so the expense stays opened.

This simply cannot be supported in v10, since each expense line is
handled in a separate account move.

opw-740492
2017-04-26 14:49:37 +02:00
Pierre Masereel e3cd54bb1d [FIX] pylint: using variable before assignment
Since last version (1.7) of pylint, new errors have been detected.

Related to rev: https://github.com/odoo/odoo/commit/ecac88dcc074b81ede4925a75080e8d2b4975924
2017-04-26 14:16:51 +02:00
Nicolas Martinelli 33630d8f42 [FIX] sale, sale_stock: inconsistent decorator
The decorator is inconsistent, and actually useless.

opw-740787
2017-04-26 11:26:46 +02:00
Xavier Morel 0550da4d88 [FIX] mrp: public/rpc methods not returning any value
XML-RPC can't serialize None, as a result methods callable over RPC
must return something (True, False, an actual value) otherwise an
error is generated when their result is serialized and sent back to
the client. It happens that JSON-RPC has different limitations and can
serialize None, so MRP had multiple button/action methods which could
be called over JSON-RPC but would break when called in XML-RPC for no
reason.

Fix them by returning `True` or result of `write`.

OPW-728844
2017-04-25 15:41:31 +02:00
Martin Trigaux 79519ce400 [FIX] registry: load inheritS models too
When adding a field on a model, only the _inherit were checked, not the _inherits.

This commit fixes the following bug:
1. install `sale` (adding the field `sale_order_count` on `res.partner`)
   - field `sale_order_count` is created on `res.partner`
   - the ir.model.field is tagged with module `sale`

2. install `point_of_sale` (adding another field on `res.users`)
   - field `sale_order_count` is created on `res.users`
   - the ir.model.field is tagged with module `point_of_sale`

When installing sale, the model res.partner is returned in the list of impacted
models, on which _create_fields method is called but not res.users.

A direct consequence of this bug is that, the fields translations are in the
wrong module. May fix some uninstallation bugs too.

Closes #16104
2017-04-25 14:20:34 +02:00
Goffin Simon 7416afed57 [FIX] account: Impossible to call pay_and_reconcile by rpc
In 9.0 the argument pay_journal in function pay_and_reconcile must be an id
but in 10.0, pay_journal must be a recordset with one element. So it was
not possible to call this method by rpc in 10.0

opw:725737
2017-04-25 13:38:42 +02:00
Goffin Simon e25b191b0a [FIX] web_kanban: _is_quick_create_enabled grouping by day, month or year
When grouping by day, by month or by year on a field date in kanban view,
it raised a traceback.

opw:727266
2017-04-25 13:28:46 +02:00
Wolfgang Taferner 29bc0d811d [FIX] base: Make sure start time is not undefined
As debugging might be enabled during runtime we need to make sure that
the condition does only pass in case start time is defined
2017-04-25 12:43:33 +02:00
Christophe Simonis 42bb9aab27 [FIX] hr_maintenance: allow to search and group equipments on employees and departments 2017-04-25 12:19:31 +02:00
Jeremy Kersten d5384f8f9d [FIX] website_portal: portal user don't have access to website.company_id
Avoid portal user to receive 403 when trying to edit vat code on /my/account
There are no risk to read field in sudo in this case.

opw-740314
2017-04-25 10:56:34 +02:00
Rogan 83ec253b78 [CLA] signature for RoganW
Closes #16608
2017-04-25 10:33:44 +02:00
Goffin Simon 4c8c996f4d [FIX] payment: Deleting payment tokens from website
When deleting payment tokens from website, in My account, by clicking
on button "Manage your payment methods", the public user, the user and
the portal user got a 403 error. But when creating a subscription
for a customer with admin user and setting a payment token for
the company of this customer. This payment token could not be deleted
or modified by its users. In a few cases, it's needed to delete or
modify a payment token, for example, when the expiration date of
the payment token is expired.

opw:740169
2017-04-25 09:53:18 +02:00
Martin Trigaux 08fcda5c94 [CLA] realsaiko no longer works for vialaurea
Closes #16599
2017-04-25 09:20:04 +02:00
Goffin Simon 7d15a6e6d6 [FIX] payment_stripe: handler.open in deferred
As explained in https://stripe.com/docs/checkout#integration-more-runloop
the function handler.open cannot be called in a deferred because it can
block in some browser.

opw:726101
2017-04-24 23:04:52 +02:00
SauliusZ cb999050bb [CLA] signature for realsaiko
Done at #16600
2017-04-24 15:02:23 +02:00
BizzAppDev 3f6e573c67 [FIX] marketing_campaign: typo in search function
Courtesy of BizzAppDev

Closes #16588
2017-04-24 11:29:30 +02:00
Christophe Simonis eb672d81e6 [MERGE] forward port branch saas-11 up to b5b8239870 2017-04-24 11:09:52 +02:00
Christophe Simonis b5b8239870 [MERGE] forward port branch 9.0 up to 9e6860a228 2017-04-24 11:07:55 +02:00
Xavier Morel aab90cc5bd [FIX] crm: recompute mail.alias defaults when *unsetting* use_leads on teams
Default mail.alias for crm.team are currently recomputed/modified
when *setting* use_leads on the team (type changes from opportunity to
leads), but not the other way around (*unsetting* use_leads doesn't
rollback type to opportunity).

Fix this issue.

Leaves over the issue that *disabling* the global setting doesn't
recompute aliases, which it probably should.

OPW-728690
2017-04-24 10:10:33 +02:00
amoyaux 834b38a84d [FIX] stock : traceback pivot view for stock moves
Use case when it can happens (non deterministic):
- Enable product variant
- Have different stock moves with the product variant
- Click on the stock moves in the section reports
- Switch to pivot view
-> Traceback : can't find path of null

This happens in the js in the function find_path_in_tree,
this function try to find path for children object. There is
a condition root.children[i].path[l] === path[l] (2 strings
comparaison).

With product variant this condition can be overpass when it should
have been triggered. The product path string is represented as follow
[Ref]Name(variants) -> Sometime the variants in the string do not have
the same order and thus the condition is never true and the function
return null instead of the correct root.

This commit corrects the name_get function for product product
in order to always return the variants in the same order.
2017-04-24 09:26:54 +02:00
Nicolas Martinelli 9e6860a228 [FIX] web: make DB name more flexible 2017-04-24 08:02:22 +02:00
Odoo Translation Bot 07c563e075 [I18N] Update translation terms from Transifex 2017-04-23 04:30:51 +02:00
Odoo Translation Bot 91c00bc011 [I18N] Update translation terms from Transifex 2017-04-23 00:31:08 +02:00
Christophe Simonis 814c550913 [MERGE] forward port branch saas-11 up to a0ff1f2ad8 2017-04-21 14:34:11 +02:00
Christophe Simonis a0ff1f2ad8 [MERGE] forward port branch 9.0 up to 8de514f805 2017-04-21 14:19:05 +02:00
Christophe Simonis 8de514f805 [MERGE] forward port branch saas-6 up to b084ffd7f1 2017-04-21 14:07:02 +02:00
Christophe Simonis b084ffd7f1 [MERGE] forward port branch 8.0 up to 716ceede16 2017-04-21 14:05:52 +02:00
Christophe Simonis 144ff9a61a Revert "[FIX] web: refuse DB name with space"
This is too restrictive.

This reverts commit 606712a5d2.
2017-04-21 14:02:58 +02:00
Oliver Dony 60d7e9a307 [FIX] point_of_sale: avoid creating multiple rescue sessions
If multiples orders are sent when the original session is already closed

Replace and closes #16525
2017-04-21 12:37:26 +02:00
Christophe Simonis 53288aa837 [FIX] base: show "Contact Creation" group option in non-debug mod 2017-04-21 12:20:00 +02:00
Daniel Reis 3e0b720e51 [IMP] cli: extract the project's path from active virtualenv (closes: #16512)
The start command takes the default dbname from the path.
But when running inside a virtualenv, it is a better default to take the
dbname from the virtualenv's path.
2017-04-21 10:32:09 +02:00
Pedro M. Baeza e7a2a542b8 [FIX] account: filter 'Due Payments' report on reconciled flag
SQL that retrieves data for the "Due Payments" report doesn't include
any filter for excluding AR/AP move lines already reconciled, which
shouldn't be presented in this report.

Courtesy of Pedro Baeza. Was PR #16440
2017-04-20 17:50:36 +02:00
Nicolas Lempereur 716ceede16 [FIX] web_enterprise: kanban_state_selection ie
On IE (from 9.0 up to at least IE EDGE 14) we have this behavior
for the method serializeToString of XMLSerializer:

> (new XMLSerializer()).serializeToString($('<b>"</b>')[0])
  '<b xmlns="http://www.w3.org/1999/xhtml">"</b>'
> (new XMLSerializer()).serializeToString($('<b>"</b>')[0].firstChild)
  '&quot;'

Whilst browser such as chromium or firefox have:

> (new XMLSerializer()).serializeToString($('<b>"</b>')[0])
  '<b xmlns="http://www.w3.org/1999/xhtml">"</b>'
> (new XMLSerializer()).serializeToString($('<b>"</b>')[0].firstChild)
  '"'

Hence for IE9 and over, if in a `<t t-extend/>` a `t-jquery`
sub-directive (without `t-operation`) is available, we can have
broken javascript if a " is transformed into an &quot; at a unfortunate
location.

This commit favour node.data over XMLSerializer serializeToString to
avoid the possibility of this issue when a text node is processed.

opw-727283
2017-04-20 17:08:17 +02:00
Christophe Simonis 852940f1ba [FIX] hr_maintenance: fix search view domain about equipment availability
The fields `owner_user_id` used `maintenance` search view to filter on
assigned equipment is overwritten in `hr_maintenance` to be computed
based on employee or department manager linked user.
However employee may not have linked user, considering equipment
unassigned.
Use directly the presence of employee or department to
determine if an equipment is assigned or not.
2017-04-20 12:17:31 +02:00
Roberto Fichera 6382cd5598 [FIX] sale: remove duplicated key product_id
Closes #16499
2017-04-20 11:41:48 +02:00
Roberto Fichera 2ad7d4c531 [CLA] Corporate signature for levelprime srl
Done at #16499
2017-04-20 11:41:47 +02:00
Jeremy Kersten 8544b5ce82 [FIX] payment_paypal: unquote the paypal response
In some case (undefined), paypal return encoded params.
https://cloud.githubusercontent.com/assets/7766939/24752163/43d31634-1aff-11e7-91ab-1c7a5a3b3ef0.png

Since this fix don't break the case where there are no the +, if it could fix for others cases...

This commit closes #14727, opw-727899
2017-04-20 11:20:30 +02:00
Christophe Matthieu 6ecbbf8b96 [FIX] models.py, account, calendar, product: lang in context can be None
Different method use self._context.get('lang', 'en_US') to get the lang
value but, the lang in the context can be set to None (eg: copy method).
When the context is used with a lang=None, the method can have a
unexpected behavior or crashed (eg: if you try to format a datetime with a
locale=None)
2017-04-20 10:47:43 +02:00
xmo-odoo ed2bc6dbc3 [FIX] incorrect newapi migration in website_blog
Leads to the Duplicate link (when editing a blog post in website)
yielding a 500 Internal Error instead of duplicating the blog post.

OPW-740308

Fixes #16511
2017-04-20 09:38:50 +02:00
Nicolas Lempereur 5ed198294f [FIX] account: fixes reconciliation mode change
When reconciliating manually, it may be possible to filter between
`All`, `Customers`, `Suppliers`, `Others`.

When changing this mode, we could end up in a situation such as:

1)

- reconciliation widget X is available
- reconciliation widget line XB is being loaded
- mode is changed -> reconciliation widget X is removed
- reconciliation widget line XB loading finishes

-> error because the parent reconciliation widget exists no more.

2)

having no (or less than the expected) or too few results because
removing reconciliation items (when for example we switch from supplier
to customer mode) can be done asynchronically. But the code expected it
to be done synchronically. Also all elements displayed were removed
instead of only the ones of other types.

thus instead of displaying the expected number of reconciliation items:
 MIN({num of record to display}, 10)

the records displayed were:
 MIN({num of record to display}, 10 - {num records displayed before})

which could amount to 0 event if there was thousands available ones.

This commit solves these two issues:

1) by not adding line to a reconciliation item without error,
2) by counting and removing displayed items correctly

opw-725796
opw-728309
2017-04-20 08:23:27 +02:00
Sergio Teruel Albert cd1a0fcba9 [FIX] event: create default event emails
The group event.group_email_scheduling was removed in 10.0 at 274e94d7

Closes #16503
2017-04-19 17:41:00 +02:00
Goffin Simon 0ae30c5997 [FIX] base_partner_merge: deduplicate contacts in multi company
When deduplicating contacts, the function _process_query doesn't use
the orm to fetch the partners to merge according to the criteria.
So there were some access error in multi company when trying to merge
contacts from a not allowed company.

Now a check is made with the orm before merging the contacts.

opw:708457
2017-04-19 15:45:38 +02:00
Pierre Masereel 93714790c1 [FIX] stock,mrp: copy move when push rules
When you have push rules on move having a 'production_id', the
'production_id' is copied on the generated moves. So it generate a
traceback when we check the tracking method of 'product_id' on
produce_move.

This issue is caused because we get multiple produce_move instead of
one.

To fix this issue, we don't copy the production_id anymore on moves
generated by push rules.
2017-04-19 14:44:22 +02:00
Goffin Simon fbbe9b54d4 [FIX] stock: package with different products
In function _get_top_level_packages, when checking that all the products
have the same destination, the destinations must be stocked in a set
instead of a list because with different products it could return a list
with duplicated destinations.

opw:725720
2017-04-19 13:03:25 +02:00
Goffin Simon 3724d85904 [FIX]sale: action_invoice_create with client_order_ref
When a comma was written in the client_order_ref field of the SO,
the name of the invoice  was duplicated because by default the name
of the invoice is client_order_ref in function _create_invoice defined
in model "sale.advance.payment.inv".

opw:724846
2017-04-18 18:13:05 +02:00
Christophe Simonis 72b7eb7e6e [MERGE] forward port branch saas-11 up to 43bb85a501 2017-04-18 17:08:24 +02:00
Christophe Simonis 43bb85a501 [MERGE] forward port branch 9.0 up to 7591f59c5e 2017-04-18 17:02:13 +02:00