Commit Graph
111906 Commits
Author SHA1 Message Date
Yannick Tivisse 1276ca9dbf [FIX] l10n_be_hr_payroll: Reset transport information on mode change 2018-01-05 13:02:52 +01:00
Nicolas Lempereur bc8f7a44d6 [FIX] mail,web: adapt email in m2m tags b92aaf1
Adapt commit b92aaf1 for framework changes in saas-16.

That commit made Many2ManyTagsEmail widget display name_get gotten
dynamically. This allow to have 'show_email' context key working and
having the email displayed.

This commit use the new views (as of saas-16) to do the same change.

opw-801558
fixes #21812 fixes #21523
closes #21969
2018-01-04 18:09:56 +01:00
Yannick Tivisse dd0453e610 [MERGE] Update belgian fiscal rules up to the 1rst of January 2018
See :
https://www.ucm.be/Secretariat-social-Employeur/Tout-savoir-sur-le-tax-shift/Toutes-les-infos-qui-me-concernent/Employeur-PME/Tax-shift-Renforcement-du-bonus-a-l-emploi
http://www.emploi.belgique.be/defaultTab.aspx?id=45436
https://www.securex.eu/be/lex-go.nsf/vwAllDocsRead/0A26E522E378CCD6C12572730034B4A0?OpenDocument#.Wk4QDbynFhF
https://financien.belgium.be/nl/node/1540
2018-01-04 14:54:22 +01:00
Yannick Tivisse cfb2d81273 [IMP] l10n_be_hr_payroll: Update reduction for disabled spouse to 2018 2018-01-04 14:54:06 +01:00
Yannick Tivisse 27ca82efc9 [FIX] l10n_be_hr_payroll: Remove unapplicable rule
This corresponds to:

Réduction pour personnes physique à bas revenu dans le secteur public
Réduction du précompte professionnel de 5,83 € (après application des réductions précédentes)
pour les rémunérations imposables comprises entre 565,02 € et 2 027,86 € maximum aux personnes
à bas revenus qui sont occupées comme statutaires, stagiaires ou temporaires au service
4 Net = brut − ONSS − 20 %
précompte professionnel 2017 • 7
de l’Etat, des Communautés, des Régions, provinces, établissements subordonnés aux provinces,
communes et établissements subordonnés aux communes, qui ne sont pas engagées en vertu
d’un contrat de travail.
2018-01-04 14:54:06 +01:00
Yannick Tivisse 6b7b194824 [IMP] l10n_be_hr_payroll: Update Withholding taxes to 2018
See https://finances.belgium.be/fr/entreprises/personnel_et_remuneration/precompte_professionnel/calcul
2018-01-04 14:54:06 +01:00
Yannick Tivisse 6f7bfbdc06 [IMP] l10n_be_hr_payroll: Update employment bonus up to june 2017
Purpose
=======

https://www.ucm.be/Secretariat-social-Employeur/Tout-savoir-sur-le-tax-shift/Toutes-les-infos-qui-me-concernent/Employeur-PME/Tax-shift-Renforcement-du-bonus-a-l-emploi
2018-01-04 14:54:06 +01:00
Yannick Tivisse e6562f20b6 [IMP] l10n_be_hr_payroll: Update reduction for low spouse revenue to 2018 2018-01-04 14:54:06 +01:00
Yannick Tivisse 73480ac516 [IMP] l10n_be_hr_payroll: Update reduction for dependent juniors to 2018 2018-01-04 14:54:06 +01:00
Yannick Tivisse 70ddadbf35 [IMP] l10n_be_hr_payroll: Update reduction for dependent seniors to 2018 2018-01-04 14:54:06 +01:00
Yannick Tivisse a9aa27eb3a [IMP] l10n_be_hr_payroll: Update disabled employee deduction to 2018 2018-01-04 14:54:06 +01:00
Yannick Tivisse ecd22362e9 [IMP] l10n_be_hr_payroll: Update isolated parent deduction to 2018
Purpose
=======

Le bénéficiaire des revenus est un veuf (une veuve) non remarié(e) ou un
père (une mère) célibataire, avec un ou plusieurs enfants à charge

35 -> 36 euros
2018-01-04 14:54:06 +01:00
Yannick Tivisse 6750b9edef [IMP] l10n_be_hr_payroll: Update Child Allowance deduction to 2018 2018-01-04 14:54:06 +01:00
Stéphane Bidoul (ACSONE) bb10cd50c2 [FIX] web: issue with id field in x2m form
When the 'id' field is present in a x2m form, the x2m actions generated
on create of the parent object are incorrect.
2018-01-03 13:22:09 +01:00
Yannick Tivisse 29af3c0610 [FIX] l10n_be_hr_payroll: Consider widows/divorced as isolated people
Purpose
=======

Currently, only single people are considered as isolated people.

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

Widows and divorced people should also be considered as isolated people.
2018-01-03 11:39:51 +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
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 43487b73d6 [I18N] Update translation terms from Transifex 2017-12-31 00:42:46 +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
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) 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 a19c462902 [I18N] Update translation terms from Transifex 2017-12-24 00:42:06 +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 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
Alexandre Kühn 262bec6af5 [FIX] l10n_fr_pos_cert: datetime.timedelta
When a user was closing a POS to go into the backend, and click on "Reprendre",
there was an error which prevent him to reopen the POS.

There was a confusion between object <datetime> and <datetime.datetime>, as
the previous code was trying to use the function timedelta() from datetime.datetime
instead of datetime. As a result, the error states that datetime.datetime has no
function timedelta.

opw-801523
2017-12-22 15:48:15 +01:00
Nicolas Martinelli fbaee8b267 [FIX] mrp: WO report
- Activate Work Orders
- Go in MRP > Reporting > Work Orders

The status filters ('Ready', 'Pending'...) do not work.

This is because the action forces the domain to `[('state','=','done')]`
instead of using one of the available filters.

opw-788043
2017-12-22 15:44:59 +01:00
Nicolas Martinelli 2aa3132d09 [FIX] base: prevent App Switcher as home action
This reverts commit 1ffe85f1cb and replaces the domain with a
constrain.
2017-12-21 13:47:24 +01:00
Nicolas Lempereur f771a9d945 [FIX] stock_account: stock_history slow read_group
The stock_history view is generated from by grouping of move from
sources and move to destinations which depending on the request and
number of request can be rather slow.

This fix replace a possibly high number of request by a slower number.

On a production instance, doing an inventory at a choosen date:

- with 300 stock moves, went from 4 minutes to 4 seconds,
- with 130 000 stock moves, went from 66 minutes to 10 minutes

opw-765793
closes #19594
2017-12-21 09:59:51 +01:00
Nicolas Lempereur be5950e429 [FIX] web_planner: use user language on frontend
The web planner specified no language for frontend so the website
planner on the frontend was never translated.

This commit add a specialized fallback for this use case so the planner
on the website is in the language of the current user.

The code is the same that get_context from web_editor.base but requiring
that would possibly adds delays (for dom_ready) that we don't want.

note: this is for 9.0 up to not including 11.0, in 11.0 another solution
is used and in master a bigger change is being worked on.

opw-781727
fixes #20829
closes #21004
2017-12-20 18:01:09 +01:00
Lucas Perais (lpe) 1ffe85f1cb [FIX] base: prevent App Switcher action to be selected as home action on user
Before this commit, one could choose the App Switcher as his Home action.
and arriving on /web would trigger an infinite loop at startup

After this commit it is not possible to choose the App Switcher as Home action anymore

OPW 800323
2017-12-20 15:08:53 +01:00
Nicolas Martinelli 8b69b2f732 [REF] account: hook for currency rate
Commit 74e4130f5f makes sure to make the accounting date prevail on
the invoice date when it comes to currency conversion.

However, the choice of date is not universally recognized. Softwares
(and accountants) might use either the accounting date or the invoice
date.

Therefore, we provide a hook se the behavior of the software can easily
be changed if necessary.

opw-783372
2017-12-20 13:35:43 +01:00
qsm-odoo 16065f3ee2 [FIX] website_sale: hide checkout btn on emptied cart in all languages
When an user goes to its cart and removes all the items, the checkout
button is hidden so that the user cannot start an order with no product.
This behavior was not working in languages which are not the default
language of the website, as the button was found in JS relying on the
fact it started by "/shop/checkout", while it can be something like
"/fr_FR/shop/checkout".

Closes https://github.com/odoo/odoo/issues/21722
2017-12-20 12:25:53 +01:00
Guillaume Masson d8846e8e64 [FIX] l10n_fr_pos_cert: bad import
Closes #21735
2017-12-20 10:57:42 +01:00
Guillaume Masson 5651f28cd7 [CLA] add metaminux to TecLib CCLA
Done at #21735
2017-12-20 10:56:49 +01:00
Florent de Labarre 06ccccdb75 [FIX] account: check ACL and ir.rules upon account.move cancellation
Was PR #21732. Was OPW 800611. Courtesy of Florent de Labarre
2017-12-19 17:52:18 +01:00
Stéphane Bidoul (ACSONE) a8e444bea8 [FIX] l10n_lu: bad line breaks in CSV data
This was causing the creation of weird records when installing this module
2017-12-19 16:48:35 +01:00
Pierre Masereel f1fdb97eed [FIX] mrp_sale: compute unit price of kit
When the unit price of a kit is computed in anglo saxon accounting, the
average price of kit parts is not multiplied by the quantity of this
parts in the bom.

E.g.: a kit of 2 prod1 and 1 prod2, when the price is computed, it only
take into account the cost of 1 prod1 and 1 prod2 to compute the kit
cost instead of 2 prod1 and 1 prod2

opw-786268
2017-12-19 16:27:44 +01:00
Olivier Colson 3415a8712f [FIX] l10n_ch: the ISR number was missing a mod10r check character in its last position 2017-12-19 15:06:42 +01:00
Nicolas Martinelli e5f61fa10c [FIX] mrp: real duration
- Create a MO which generates WOs
- User 1 starts working on it
- User 2 starts working on it

The field 'Real Duration' only displays the time spent by the user
connected. It means that there will be an inconsistency between the
field 'Real Duration' and the list of durations shown in the `time_ids`
field.

We want to keep 'Real Duration' limited to the current user, because it
should represent the duration updated in real time (done in widget
`mrp_time_counter`). However, we also want to see the total real
drations for all users. Thereofe, we simply update the view to show the
total in the list view.

opw-784456
2017-12-19 13:38:11 +01:00