Commit Graph
107781 Commits
Author SHA1 Message Date
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
Christophe Simonis 2b68f4341f [FIX] point_of_sale: compute total with taxes in tests 2017-04-18 16:55:02 +02:00
Ankit Joshi 7591f59c5e [ADD] stock: add the field 'description_picking' in picking report
The field is defined but never user. It could be useful to indicate
to the delivery guy that the product is 'fragile' or whatever.

opw-728874
2017-04-18 14:36:32 +02:00
Nicolas Martinelli fe42206369 [FIX] purchase: seller in multicompany
- Create 2 companies (A & B)
- Create a product shared between companies
- Add a reordering rule in each company
- Add a supplier for each company
- Run the scheduler (from the cron)

The supplier selected is always the supplier with the smallest sequence,
since it is run in sudo mode.

opw-728346
2017-04-18 13:45:15 +02:00
Adrien Peiffer (ACSONE) f160bba4d1 [IMP] hr_holidays: improve inheritance
Improve inheritance on allocation creation by employee's tag.

opw-728620
Closes #16402
2017-04-18 12:52:46 +02:00
Nicolas Martinelli b4193cd35b [FIX] sale: set timesheet line to zero
- Create a SO with a product that is a service and will be invoiced
  based in delivery quantities and will be tracked on timesheets and
  contract.
- Confirm
- Use a simple user that only has for rights: "Employee"
- Create a timesheet as the employee for the contract created by the sale
- Log some time
- Save it
- Check the SO: ok the number of hours should be "to be invoiced"
- Edit the timesheet and set one day to 0 hours => Access Error

In case of a zero value, the timesheet widget sends an unlink command
for the corresponding entry. In this case, the `sudo` is not set at the
appropropriate moment since the context key `force_so_lines` will resue
lines which are not defined in the `sudo` environment.

opw-728453
2017-04-18 11:55:16 +02:00
Odoo Translation Bot c043db5e3b [I18N] Update translation terms from Transifex 2017-04-16 04:29:59 +02:00
Odoo Translation Bot 5d5bd2c404 [I18N] Update translation terms from Transifex 2017-04-16 02:54:21 +02:00
Odoo Translation Bot 2c75ad396f [I18N] Update translation terms from Transifex 2017-04-16 00:30:18 +02:00
Ronald Portier e479828025 [FIX] account_voucher: add missing context
Fixes #16420
Closes #16421
2017-04-14 15:11:30 +02:00
Christophe Simonis ea2faefe0d [FIX] odoo-bin shell: force rollback on exit
Each REPL python shell behave differently depending on the exit method.
Force a rollback at the end to avoid inconsitent behavior.

Thanks to Harry Jollenbeck for the report: https://www.odoo.com/groups/59/26318707
2017-04-14 12:38:51 +02:00
Nicolas Martinelli 31dc6b888e [FIX] payment, website_sale: SIPS adaptation
SIPS payment has two limitations:
- A payment reference can only be used once, even if the payment was not
  proceeded
- A payment reference can only contain alphanumerical characters

These limitations do not fit the payment process which:
- Reuses existing transactions
- Introduces a `-` character when creating a new transaction for the
  same order.

First issue is solved by an ugly hack since there is no link module
between `website_sale` and `payment_sips` in order to override the
behavior of `sale_get_transaction`.

Second issue is solved by modifying the character to `x`. In this case,
we could consider overriding the method `get_next_reference` in
`payment_sips`. However, this method is called before the creation of
the transaction, and we should do a crappy workaround using the context
to get the `acquier_id`.

opw-728209
2017-04-13 16:18:09 +02:00
Pierre Masereel c913398dab [FIX] web_kanban: has_active_field not always in view
When you do a group by on field that is not present in the view,
this.fields contains all the model's fields, not only the ones present
in the view.

As we use the method 'has_active_field' to check if the field active is
available in the view, the value is not always correct.

To fix this we take the fields_view fields instead of fields.

This bug has been introduced in rev: https://github.com/odoo/odoo/commit/5b4f7c13f32f36d86805eb7865d8a077746181d8
2017-04-13 13:57:43 +02:00