Commit Graph
114351 Commits
Author SHA1 Message Date
Andrea fe22a0f9ca [FIX] website_sale_management: Fix auto_install typo in manifest 2018-01-03 12:03:04 +01:00
Martin Trigaux cab7e0d204 [FIX] *: add missing space in multilines messages
Courtesy of @Yenthe666
2018-01-03 11:09:09 +01:00
Rémi Rahir 076821fed1 [IMP] doc: In-App Purchase
Added informations on packs and updated screenshots.
2018-01-03 09:44:29 +01:00
Nicolas Martinelli aa65a46fc5 [FIX] auth_signup, crm, project_timesheet_holidays, sales_team, website_sale: settings access error
The new settings model loads by default all settings. In the case of
non-admin user having the 'Settings' access rights this can lead to
access errors.

This commit deals with the multi-company issues on a standard
installation. If the admin is in Company A and the other user in Company
B, accessing the settings is pretty much impossible because of records
rules.

This fixes the master or demo data to avoid setting a company by
default. Note that it only fixes a standard installation: if the
settings are later customized, there is no guarantee that it will still
work.

Problematic fields:
`auth_signup_template_user_id`
`crm_default_team_id`
`leave_timesheet_task_id`

opw-801210
2018-01-03 08:49:32 +01:00
Adrian Torres 864ca5075f [FIX] authorize: add error-checking
Previous to this commit, if a user hadn't properly set up his
Authorize.net credentials, when getting a response from Authorize.net's
servers, we would expect some attributes to be in the response's body,
but this is not the case if the credentials are wrong, thus we would
have an unexpected error like "NoneType object has no attribute text"
which is only a sympton of the real error (bad credentials and no
error-checking).

This is fixed by checking if the response body contains an error
message, if it is the case we raise an UserError with the error code and
the error message (which is only shown if debug mode is activated).

OPW 788261
2018-01-03 08:39:28 +01:00
Christophe Simonis 3fe94628f6 [FIX] test_performance: bump query count for tracking fields (bis) 2018-01-02 18:31:02 +01:00
Martin Trigaux f8e38a6a0c [FIX] website_s{ale,lide}: no more Frenglish
Authentified is not proper English
Should be authenticated instead

Courtesy of Ray Carnes, #18995
2018-01-02 18:24:18 +01:00
Christophe Simonis 82c3d92971 [FIX] test_performance: bump query count for tracking fields 2018-01-02 18:11:25 +01:00
Martin Trigaux abf0e35522 [FIX] base_address_city: bad label name
Fixes  #21870
2018-01-02 17:48:25 +01:00
Christophe Simonis f1bdb459b8 [FIX] mail: use defined variable
Oversight of previous forward-port
2018-01-02 17:41:25 +01:00
Christophe Simonis 715fda1239 [FIX] web_editor: define variable before use
Oversight of previous forward-port
2018-01-02 17:24:11 +01:00
Christophe Simonis f02ed9ab9a [MERGE] forward port branch saas-16 up to 0af13af5de 2018-01-02 16:54:38 +01:00
Sanjay Jamod a8527a16b6 [FIX] web: Fix column_invisible issue (#21693)
[FIX] web: Fix column_invisible issue

This commit fixes an issue with the column_invisible attribute.

When we choose product variant for BOM for any particular product, 
at that time from the BOM Lines column "Apply on Variants" is hidden,
but when we unset product variant from BOM Form, 
at that time the column 'Variants" set to visible. but in this case, it is set to hidden always.

PR 21693, OPW 779555
2018-01-02 16:37:35 +01:00
Christophe Simonis 0af13af5de [MERGE] forward port branch saas-15 up to ddd293065e 2018-01-02 15:36:25 +01:00
Christophe Simonis ddd293065e [MERGE] forward port branch saas-14 up to ba2a83ddfa 2018-01-02 15:02:26 +01:00
Wolfgang Taferner 211226a725 [FIX] purchase: test rounding issue 2018-01-02 14:54:34 +01:00
Christophe Simonis ba2a83ddfa [MERGE] forward port branch 10.0 up to e336dc38ca 2018-01-02 13:56:49 +01:00
Christophe Simonis e336dc38ca [MERGE] forward port branch 9.0 up to 62aa3be24c 2018-01-02 13:20:04 +01:00
Lucas Perais (lpe) cd5dcb8f98 [FIX] mail: notify 'inbox' partners
When
- a user A had set 'notifications handled by Odoo'
- a user B sent a @userA message

Before this commit, the user wasn't notified in the inbox needaction

After this commit, he is

OPW 801315
2018-01-02 09:20:50 +01:00
Odoo Translation Bot 62aa3be24c [I18N] Update translation terms from Transifex 2018-01-01 02:40:01 +01:00
Odoo Translation Bot f60948d55c [I18N] Update translation terms from Transifex 2017-12-31 04:14:26 +01:00
Odoo Translation Bot 43487b73d6 [I18N] Update translation terms from Transifex 2017-12-31 00:42:46 +01:00
Simon Lejeune 652f8746d6 [FIX] stock: state of DO for an MTO product
When confirming a quotation for an MTO product, the state of the
delivery order goes from draft to waiting another operation to waiting
while it should stays in waiting another operation.

If procurement_jit is enabled, confirming a sale order line will
unreserve and rereserve the pickings associated (see
`action_launch_procurement_rule` override). Unreserving a picking will
always set its state to "confirmed", which is wrong if it should be in
"waiting another operation". Not writing on state (which is a computed
field) and let the depends call _compute_state fixes the issue.

The unreserve/rereserve thing is probably useless and is a remain of the
previous stock implementation where it was not possible to complete the
reservation of a move without wiping all its current reservation.
Another commit will improve this part of the code.

opw-801588
2017-12-29 15:56:30 +01:00
Nicolas Martinelli 88afd055cf [FIX] web: currency digits
- Set the currency rounding to 0.001 (3 digits)
- Create an account move
- Add an account move line, set an account

When switching from edit/read-only mode, the rounding switches from 2 to
3 digits.

This is because, in edit mode, the format method is the method of the
float widget. Therefore, in this case, the formatting doesn't take into
account the currency rounding.

To avoid this, we simply use a `noSymbol` flag to avoid adding the
currency symbol, while keeping the monetary rounding.

opw-800279
2017-12-29 09:20:18 +01:00
Simon Lejeune 0126823f98 [FIX] mrp: don't copy locked state
When copying a done MO that is unlocked, the new MO is also unlocked and
the buttons to produce/check availability aren't displayed and it is
confusing to the user.

Fixes #20119
2017-12-28 15:31:55 +01:00
Simon Lejeune 7862ce4d5d [FIX] mrp: mo: state and optional bom line
Optional bom line havea default `product_qty` of 0. As the "check
availability" button is displayed if the MO is not available and
the `_compute_availability` method considers all move of 0 `product_qty`
as unassiged, the "check availability" button was always displayed and
it was confusing.

Do not consider move with a 0 product_qty in the `_compute_availability`
method to fix the display of the button.
2017-12-28 15:30:13 +01:00
Christophe Matthieu 091c86c21b [FIX] web: unselect row before resequencing in editable list
If a row is being edited, this row will be refocused when performing changes
(i.e. resequencing records). It can cause an issue if an onchange modifies the
record being focused.

To avoid this issue, the row is unselected before resequencing records. The row
isn't selected anymore but this behaviour wasn't expected anyway.
2017-12-28 12:08:12 +01:00
Christophe Matthieu 1c7e0df5a5 [FIX] web: deal with same sequence in editable list
Resequencing records with the same sequence wasn't correctly working in the
editable list because we only care about the range between the swapped ids. In
some cases, this isn't good enough.

For example, if we have the records 1,2,3 with sequence field = 10,10,10, then,
swapping records 1 and 2 should lead to resequencing 3 with the sequence values
11,10,12 (to guarantee that the third item is after the previous 2).

Resequence now checks if the list increases or decreases without interruption
to create the subset that must be changed ; otherwise the whole list is changed.
2017-12-28 12:05:25 +01:00
Lucas Perais (lpe) cad10e6b78 [FIX] website_slides: typo in route definition pager
Before this commit, the route to the pager couldn't be resolved
because the <model("xxx.xxx") was having a typo

Now it doesn't, no traceback nor 500 error

OPW 801651
2017-12-27 16:34:44 +01:00
Nicolas Martinelli 3a79d2cf2e [FIX] hr_payroll: salary structure
- Create payslip
- Add a contract with any structure
- Add a structure in payslip, different from the one defined in step 2
- Confirm or compute sheet

Payslip is computed using the contract structure, while it should be
computed using the payslip structure.

Closes #21567
opw-787671
2017-12-27 14:48:25 +01:00
Nicolas Martinelli d12bbb0933 [FIX] account_budget: make analytic account mandatory
If no analytic account is set, the practical amount is always zero.

opw-802807
2017-12-27 14:15:17 +01:00
Nicolas Martinelli 4e2ce33f87 [FIX] hr_expense: set to paid
Filter out expenses which are already paid when set to paid.

opw-787874
2017-12-27 13:55:49 +01:00
Yannick Tivisse 9d25f63c9b [FIX] account_budget: Make the analytic account mandatory on budget form
Purpose
=======

When you create a budget, the field analytic account on the budget line is not mandatory but if you don't set one, it doesn't work, the practical amount always stays at 0 even if there are journal items in the accounts defined in the budgetary positions
2017-12-27 13:47:42 +01:00
Nicolas Martinelli 52773d95f2 [FIX] account: conversion rate date
Complement of 8b69b2f732
2017-12-27 10:33:22 +01:00
Wolfgang Taferner ec520b871c [FIX] account: bank statement line order should be by natural date first 2017-12-27 10:18:57 +01:00
Nicolas Martinelli 8aa1a493a0 [FIX] account: exchange rate of price_subtotal_signed
The field `price_subtotal_signed` contains the price converted in the
company currency. However, we should make sure to use the exchange rate
of the invoice date for its computation.

An use problematic use case is the creation of a deferred revenue from
an invoice (commit 7fe89d08b3).

opw-702352
2017-12-27 10:00:46 +01:00
Yannick Tivisse 0fdcf2e5c3 [FIX] website_portal_purchase: Fix access right error when loading my/home/
Purpose
=======

Tested on test.odoo.com and wrongly reproduced in saas-16 at b25ce0a3d8b8c3b5294f47b2d6a11fede479a622
2017-12-26 13:05:31 +01:00
Yannick Tivisse 7cc14b15f8 [FIX] website_portal_purchase: Fix access right error when loading my/home/
Purpose
=======

Currently, loading my/home without purchase manager access rights returns a 403

Traceback (most recent call last):
  File "/home/accounts/src/odoo/saas-16/addons/website/models/ir_http.py", line 273, in _handle_exception
    response = super(Http, cls)._handle_exception(exception)
  File "/home/accounts/src/odoo/saas-16/odoo/addons/base/ir/ir_http.py", line 168, in _handle_exception
    return request._handle_exception(exception)
  File "/home/accounts/src/odoo/saas-16/odoo/http.py", line 763, in _handle_exception
    return super(HttpRequest, self)._handle_exception(exception)
  File "/home/accounts/src/odoo/saas-16/odoo/addons/base/ir/ir_http.py", line 194, in _dispatch
    result = request.dispatch()
  File "/home/accounts/src/odoo/saas-16/odoo/http.py", line 822, in dispatch
    r = self._call_function(**self.params)
  File "/home/accounts/src/odoo/saas-16/odoo/http.py", line 341, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/accounts/src/odoo/saas-16/odoo/service/model.py", line 102, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/accounts/src/odoo/saas-16/odoo/http.py", line 334, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/accounts/src/odoo/saas-16/odoo/http.py", line 930, in __call__
    return self.method(*args, **kw)
  File "/home/accounts/src/odoo/saas-16/odoo/http.py", line 514, in response_wrap
    response = f(*args, **kw)
  File "/home/accounts/src/custom/private/openerp_enterprise/controllers/main.py", line 1673, in account
    response = super(website_account, self).account(**kw)
  File "/home/accounts/src/odoo/saas-16/odoo/http.py", line 514, in response_wrap
    response = f(*args, **kw)
  File "/home/accounts/src/odoo/saas-16/addons/website_portal/controllers/main.py", line 67, in account
    values = self._prepare_portal_layout_values()
  File "/home/accounts/src/enterprise/saas-16/website_contract/controllers/main.py", line 24, in _prepare_portal_layout_values
    values = super(website_account, self)._prepare_portal_layout_values()
  File "/home/accounts/src/odoo/saas-16/addons/website_portal_purchase/controllers/website_portal.py", line 23, in _prepare_portal_layout_values
    ('state', 'in', ['purchase', 'done', 'cancel'])
  File "/home/accounts/src/odoo/saas-16/odoo/models.py", line 1390, in search_count
    res = self.search(args, count=True)
  File "/home/accounts/src/odoo/saas-16/odoo/models.py", line 1413, in search
    res = self._search(args, offset=offset, limit=limit, order=order, count=count)
  File "/home/accounts/src/odoo/saas-16/odoo/models.py", line 3676, in _search
    self.sudo(access_rights_uid or self._uid).check_access_rights('read')
  File "/home/accounts/src/odoo/saas-16/odoo/models.py", line 2793, in check_access_rights
    return self.env['ir.model.access'].check(self._name, operation, raise_exception)
  File "<string>", line 2, in check
  File "/home/accounts/src/odoo/saas-16/odoo/tools/cache.py", line 87, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/home/accounts/src/odoo/saas-16/odoo/addons/base/ir/ir_model.py", line 1175, in check
    raise AccessError(msg % msg_params)
AccessError: (u'Sorry, you are not allowed to access this document. Only users with the following access level are currently allowed to do that:\n- Purchases/User\n\t- Purchases/Manager\n\t- Inventory/User\n\t- Accounting & Finance/Billing\n\t- Technical Settings/Billing Read-Only\n\t- Other Extra Rights/Portal\n\n(Document model: purchase.order)', None)

Specification
=============

Count the number of purchase orders as a superuser.
2017-12-26 12:59:11 +01:00
Lucas Perais (lpe) ab65a02f5a [FIX] crm: allow a user assigned to activity to see lead
Before this commit, when the sales person (user A) of a lead assigned another user (user B) to an activity
user B couldn't see the lead in his pipeline

After this commit, he can

OPW 787935
2017-12-26 10:43:15 +01:00
Lucas Perais (lpe) 6216e6e25b [FIX] crm: A closed lead doesn't mean there is nothing more to do
Before this commit, because of 9d2f48d and abea8d3 and 4ebb5efac4
closed crm.lead with late activities wouldn't show.

Aware that this is essentially a choice of non-crucial behavior, there are some precautionary arguments.
- The three commits above make the choice of having a "clean" backlog:
late activities are not polluted by crm leads that are already won
- The choice of this commit is to count activities as late regardless of the state of the lead:
The use case: Close a deal with a partner > lead is won and closed
But it doesn't mean you don't have to call the partner back in a few days to actually sign a paper, organize some sort of meeting

The argument: it is better to not miss deadlines eventhough they might accumulate, rather than forgetting about them altogether
(but you don't script something to put all your emails as read when they arrive, do you ?)

OPW 744940
2017-12-26 10:41:08 +01:00
Goffin Simon 381d7f2357 [FIX] crm: Button "Convert to opportunity" for an existing opportuniy
When opening an opportunity from a notification, it always opens the default view
which is the lead view and then the button "Button "Convert to opportunity" was visible.

opw:792931
2017-12-26 10:21:26 +01:00
Lucas Perais (lpe) 49cbeabe10 [FIX] point_of_sale: prevent taxes of another company to be loaded
As admin every tax is loaded, which is wrong anyway.
When the admin opens a session a change the cashier in the POS interface,
every order is made with every tax ever (on the product)
which could lead to major faulty records

See the case on OPW 786803 which is critical
2017-12-26 09:10:04 +01:00
Adrian Torres 14f80bfae6 [FIX] mail: delete leftover followers
[FIX] mail: delete leftover followers

Previous to this commit, if during the unlink of a model which inherits
from mail.thread an exception is raised before mail.thread's unlink() is
called, followers for such model won't be properly deleted from the
database.

This commit changes this by overriding ir_model's unlink and deleting any
followers whose res_model is not installed.

Partial back-port of 3614193
Fixes #21462
OPW 786790
2017-12-26 07:27:25 +00:00
Odoo Translation Bot 9d9ca960ae [I18N] Update translation terms from Transifex 2017-12-24 04:16:18 +01:00
Odoo Translation Bot a19c462902 [I18N] Update translation terms from Transifex 2017-12-24 00:42:06 +01:00
Martin Trigaux 6cb12273e2 [FIX[ web_tour: simplify docstring
Changed at 08d48b0ff but was crashing when building the documentation as not
complient for sphinx

Temporary fix that should be restored when our doc engine will be smarter
2017-12-22 17:01:10 +01:00
Denis Ledoux 2946d78dd7 [FIX] mail: set user_id to an inactive user partner sends a mail to the object partner_id
Before this revision,
Assigning a user for which its partner is inactive
was sending the assignation notification email to the `partner_id`
of the object.

e.g. Assigning a task to a user for which its partner is disabled
sent the assignation notification email to the customer of the task.

opw-787659
2017-12-22 16:53:33 +01:00
Nicolas Lempereur 4843839b24 [FIX] web: upload file widget keep metadata fresh
When modifying files the a widget FieldMany2ManyBinaryMultiFiles would
not keep its metadata (currently associating attachment to [url,
allowUnlink]) up with current value.

So with an attachment added after init:

- clicking on it would error (because link is wrong)
- deleting it would unlink attachment originating from from onchange

The expected behavior is:

- being able to download attachments
- not unlinking attachment originating from onchange

and this is what this commit fixes.

opw-787746
closes #21813
2017-12-22 16:49:56 +01:00
Nicolas Lempereur 1ce4f15c39 [FIX] web: discarding a new record in a modal closes the modal
Discarding a new record triggers the 'history_back' action.  This makes
sense if the record was discarded from a normal form view, but not so
much when in a modal, where the expected behaviour is to close the
dialog.

This commit overrides the function in the action manager which handles
the switch to the previous view. It checks whether a dialog window is
open, in which case it simply closes it.

note: 10.0 backport from 11.0 33aa89ed
closes #20405
opw-786866
closes #21792
2017-12-22 16:34:06 +01:00
Yannick Tivisse db54e0df79 [FIX] l10n_be_hr_payroll: Count spouse deductions if revenue 2017-12-22 16:28:12 +01:00