Commit Graph
102938 Commits
Author SHA1 Message Date
Zakaria Makrelouf b3cd386fca [FIX] l10n_be_invoice_bba: add translated label
Closes #15245
2017-01-27 12:41:29 +01:00
Nicolas Lempereur 0c76ff4846 [FIX] account: modal account.invoice.line form traceback
In some instances we could get a traceback in the form view of an
account.invoice.line object. This is because the `parent` field can be
undefined depending of the way the form view was opened.

For example there can be a account.invoice.line list in a
sale.order.line form and this lead to a product_id with a traceback
capable context.
2017-01-27 09:57:39 +01:00
Goffin Simon a8b1d30fca [FIX] hr: Bank account from employee not loaded on payment on expense
The bank account didn't appear when selecting SEPA credit transfer in ACCOUNTING>PURCHASE>PAYMENTS
to refund an employee. The bank account is taken from partner set  with the field home_address_id.
So the account holder have to be set on the bank_account_id of the employee with the home_address_id.

opw:702881
2017-01-26 17:04:45 +01:00
Aaron Bohy ff613d8763 [FIX] hr: correctly format mention partner suggestions
Rev. 36f6f26 changed the format of the returned list of employees.

Javascript is expecting an array containing the array of employees,
each employee being a dict with keys id, name, email. But from rev.
36f6f26, it returned an array of employees, themselves represented
by an array containing their id, name and email.

As the format changed, the Javascript mention mechanism never used
the prefetched employees, and always fallbacked on an RPC to fetch
suggestions amongs all partners.
2017-01-26 09:44:57 +01:00
Christophe Simonis 3e31dc0ba4 [MERGE] forward port branch saas-6 up to 09f7916f48 2017-01-25 13:04:50 +01:00
Christophe Simonis 09f7916f48 [MERGE] forward port branch 8.0 up to 9d535ee2c7 2017-01-25 12:56:42 +01:00
andreparames 1d089833b4 [FIX] init: enable evented based on socket
Don't enable evented mode unless gevent is enabled.
Previous code was activating evented mode as soon as gevent is imported which
may happen in different scenario but is not enough to assume the GeventServer
is actually running.

Closes #13463
2017-01-24 18:07:38 +01:00
Jairo Llopis 9d535ee2c7 [FIX] mail: check all parameters are set
Since `model` is not a required field, the invalidation may crash when one is
missing.
It should never happen than a mail.message has a res_id but not a model as it
makes no business sence.
However it is possible than a message temporarly misses one of the two, e.g:

```
self.model = False
self.res_id = False
```
will trigger two writes and will crash at the first.

Above code should probably be refactored to have only one write but this commit
fixes a regression introduced at 8f1c2bfc (the above code did not crash).

Closes #15199
2017-01-24 16:56:33 +01:00
sergio 28ec23e828 [FIX] account: fallback on missing template
template contains the mail template to render and is the result of the call to
`self.env.ref('account.email_template_edi_invoice', False)`

If the template does not exists (deleted), template is `None` and the action
rendering crashes.
While it is not recommended to delete master data, it is still possible to use
custom mail templates.

Closes #15204
2017-01-24 16:50:55 +01:00
sergio 333f012e25 [CLA] signature for sergiocorato
Done at #15204
2017-01-24 16:50:39 +01:00
Hoang, Diep Huu b4c3ac8d48 [CLA] signature for anothingguy
Backport of 2cf3381b to 9.0 as expressed in #13971
2017-01-24 16:15:36 +01:00
Stefan Rijnhart d0ea652221 [FIX] portal: set a company for portal without one
The field company_id is not required on the res.partner and is used when the
portal user is created for portal access.
If the partner as no comapny set, the creation crashes (required on the user).

Use system default company, with possibility for overwrite.

Closes #15030
2017-01-24 13:39:47 +01:00
Daniel Dico 94807753e7 [FIX] anonymization: escape table and field names
Same as 1b9d0fa481

Closes #15187
2017-01-24 10:32:03 +01:00
Joren Van Onder 5ce83b872c [FIX] point_of_sale: avoid scrollbar on main window
Scrollbar appeared in Firefox (at least 50.1.0 and up). Related to
depending on non-standard behavior when setting height on a table. For a
detailed explanation see f0eeed93dc.

In this case we can simply ignore overflow on the main POS window since
the height difference introduced is only a couple of pixels.
2017-01-23 17:33:16 -08:00
Joren Van Onder f0eeed93dc [FIX] point_of_sale: scroll contact list in Firefox and Edge
The POS uses tables to do some of it's layout. It also sets 'height:
100%' on a lot of these tables in an attempt to restrict their
height. The CSS standard however defines the height property on a table
as follows:

"A value of 'auto' means that the height is the sum of the row heights
plus any cell spacing or borders. Any other value is treated as a
minimum height." [1]

Chrome and Safari seems to handle this height property in a way that it
does in fact restrict height. The behavior of Firefox and Edge however
is more in line with the spec, and in these browsers table height is not
restricted by this property.

Because of this the contact list was not scrolleable in those
browsers. To resolve this we stop relying on non-standard behavior by
displaying the relevant contact list elements as regular block
elements. Additionally, we now have to recompute the height of the
client list whenever we show/hide the client details, something that
wasn't necessary before.

[1] https://www.w3.org/TR/CSS21/tables.html#height-layout

Fixes #11020
2017-01-23 12:09:27 -08:00
Joren Van Onder cb597806ec [FIX] point_of_sale: force numpad to appear next to actionpad
The sizes of these UI elements are all fixed and non-responsive and
everything is supposed to fit. Currently however Firefox (at least
50.1.0 up to nightly 53.0a1) is computing the width of a <br> element to
be 0.0166626px, forcing the numpad to wrap to the next line. This forces
the numpad to be 216px wide (width of 4 buttons at 54px each).
2017-01-23 12:04:10 -08:00
Denis Ledoux de6c4f7037 [FIX] project: website live chat link in the planners
These links are links to the Website live chat app description,
not our actual livechat support.

Besides, we currently do not make support through the
livechat.

opw-705614
2017-01-23 17:32:44 +01:00
Daniel Dico 1b9d0fa481 [FIX] anonymization: escape table and field name
to avoid postgresql reserved keywords.
fields like fetchmail_server.user or mail_mail.references uses reserves keywords and must be escaped

Closes #15177
2017-01-23 17:28:16 +01:00
Odoo Translation Bot c9c9c1a755 [I18N] fetch missing terms in previous pull
Due to --the minimum-perc rule on tx
Fixes https://twitter.com/bealdav/status/822110096171954176
2017-01-23 15:58:56 +01:00
Christophe Simonis 0997a1cf6d [MERGE] forward port branch saas-6 up to 5065f4b3e8 2017-01-23 13:14:51 +01:00
Christophe Simonis 5065f4b3e8 [MERGE] forward port branch 8.0 up to 91f11f8bd6 2017-01-23 10:46:39 +01:00
Jeremy Kersten a307ab8076 [FIX] website_sale: partial revert of 6b87284f
This commit has been forward-ported by error in 9 and +.
Update website_sale.js to fix impacted databases.

Decimal precision in v8 = 0.01, and v9+ = 2

With fwd port, int(0.01) instead of int(2) because data-precision
appears 2x, first with 0.01 (v8), secondly with 2 (v9+).

Js fix uses the last decimal-precision (v9) instead of the first (v8)
2017-01-23 09:52:47 +01:00
Nicolas Martinelli 49f5aef548 [FIX] stock_account: inventory at date
The "Inventory at Date" has several issues:
- graph and pivot views are not available despite their existence
- the views are not linked to an action, thus it is impossible to save
  it on the dashboard.

opw-703649
2017-01-23 09:19:49 +01:00
Nicolas Martinelli 68dd9bdb0a [FIX] board: prevent crash if no action
If the user tries to save on the dashboard a view which was not open
through an existing action, the call to method `add_to_dashboard`
crashes because of incorrect arguments (`action_id` is undefined in JS).

This is for example the case when trying to save an "Inventory at Date"
in the dashboard (will be fixed in a subsequent commit).

opw-703649
2017-01-23 09:19:49 +01:00
Odoo Translation Bot 91f11f8bd6 [I18N] Update translation terms from Transifex 2017-01-22 03:25:31 +01:00
Odoo Translation Bot 4169049263 [I18N] Update translation terms from Transifex 2017-01-22 00:39:31 +01:00
Odoo Translation Bot c150838bb5 [I18N] Update translation terms from Transifex 2017-01-19 17:28:33 +01:00
Martin Trigaux 3c9937388d [FIX] website_customer: filter on correct field
The field tag_ids has been removed at df2bed3c but not changed in the controller
2017-01-19 17:17:42 +01:00
Nicolas Lempereur b9db65aa73 [FIX] web: display warning message for o2m modal
Be a little less strict when not showing o2m list view warning so if the
o2m is not editable (a modal is open instead of editing inline) we still
show warnings.

Also have warnings over modal overlays so they can be used for modals.

opw-702333
2017-01-19 16:46:33 +01:00
Nicolas Martinelli 586496338b [FIX] account: crash when unlink taxes
If `get_default` returns an empty value (`None`), the `set` instruction
crashes.

Backport of 26d1a3884b

Closes #15116
opw-702597
2017-01-19 10:51:05 +01:00
Zakaria Makrelouf 050c06188b [CLA] Signature for zakiuu 2017-01-19 10:49:23 +01:00
Martin Trigaux 254afc6c9d [FIX] tools: colorize image with pillow 4.0
Introduced by python-pillow/Pillow@c3fe5d43 and integrated into pillow 4.0
The size of the image is ignored and must be set using an image or a mask.

This patch is retrocompatible with the previous versions as the changed code was
in the box size computation. With this patch a 4 points box size is given so the
modified code is not executed.

Fixes #14927
2017-01-19 10:36:21 +01:00
Nicolas Martinelli 94f7f6aa22 [FIX] web: date < 01-01-1900
The Python method `strftime` raises an error when the date is older than
01-01-1900 ("The datetime strftime() methods require year >= 1900"). If
the user mistyped the date (or was expecting 01-01-16 to be converted
into 01-01-2016), this can lead errors since the ORM uses this method
frequently.

opw-702313
2017-01-19 09:52:44 +01:00
Jiri Zatloukal da3e6e36e6 [CLA] signature for jirizatloukal
Done at #15117
2017-01-18 15:29:50 +01:00
dansanti bbdf9605e4 [FIX] openerp: Field One2many child propagation on NewId dict
If exist an one2many field as child of another field, this one2many get only
empty lines and Javascript dataset set wrong referid, causing a bad query with
False values and 'one2many_v_id'$ as inverse_id.

This PR adetect on convert_to_change if field is one2many and fnames = None,
in case True, set fnames with one2many model's fields

This commit closes #12249, closes #11236

Courtsey of @rco-odoo for review
2017-01-18 15:27:20 +01:00
Jeremy Kersten 16349661e3 [CLA] signature for dansanti 2017-01-18 15:01:00 +01:00
Nicolas Martinelli 23b2bba925 [FIX] calendar: private events
By default, an event can be modified by any employee. This is also the
case for private events, displayed as "Busy" to other users. However,
since any user can modify an event, nothing prevents him to change the
privacy setting in order to be able to see the content.

This commit introduces a global record rule which only allows the
followers of an event to modify it.

opw-705079
2017-01-18 14:49:22 +01:00
Goffin Simon f98a4d45af [FIX] account_asset_invoice: setting account_id on an invoice line with an asset
Thanks to this commit: 342dad44cd

(1) Asset Account
(2) Depreciation Entries: Asset Account
(3) Depreciation Entries: Expense Account

Now it's possible in 9.0 to set the account_income_recognition_id.
So in the case of a vendor bill if the account_income_recognition_id(3) is set,
it means that the depreciation entries are debited on this account(3).
Then the asset account can be used on the invoice line.

NB: When the account_income_recognition_id(3) is not set, it means that

The Asset Account(1) is used to debit the depreciation entries so it cannot be used as an asset account.
In this case, (1) is used as (3)
And the Depreciation Entries: Asset Account(2) is used as (1) and (2) because the all assets are first debited
on this account and progressively the depreciation entries are credited on this account too.

This is why in 10.0, there is an onchange on account_asset_id on model "account.asset.category" which sets
the same value for (1) and (2).

Example with account_income_recognition_id set: Purchase of 100k with a 5 years depreciation:

on (1) debit=100k and credit=0

on (2) each year debit=0 and credit=20k

on (3) each year debit=20k and credit=0

Example without account_income_recognition_id set: Purchase of 100k with a 5 years depreciation:

on (2) debit=100k and credit=0

on (2) each year debit=0 and credit=20k

on (1) each year debit=20k and credit=0

This behavior can be analysed in function create_move on model "account.asset.depreciation.line"

opw:702265
2017-01-18 14:44:53 +01:00
Nicolas Martinelli 2e5b58a3da [FIX] project_issue: traceback when group by 'Date of Closing'
Oversight of commit f57787e

Fixes #15110
2017-01-18 10:33:29 +01:00
Christophe Simonis 16fa61b34f [MERGE] forward port branch saas-6 up to 7cb977fc3c 2017-01-17 16:11:05 +01:00
Christophe Simonis 94410c83e1 [FIX] calendar: also reset res_id when sending mail to attendees 2017-01-17 14:48:35 +01:00
Christophe Simonis 7cb977fc3c [FIX] calendar: also reset res_id when sending mail to attendees 2017-01-17 14:44:50 +01:00
Christophe Simonis ecd03bec8a [MERGE] forward port branch 8.0 up to 8f1c2bfc91 2017-01-17 14:17:56 +01:00
Christophe Simonis 8f1c2bfc91 [FIX] mail: force mail.message linked record invalidation 2017-01-17 14:14:16 +01:00
Nicolas Martinelli bbbf317fd3 [FIX] l10n_be: VAT Declaration
The VAT declaration produces an error when uploaded to the official
website. Although the structure is correct, the "Representative" and the
"Declarant" contain the same information, which is not consistent.

opw-702066
2017-01-17 11:51:02 +01:00
qdp-odoo 1e8d9e1c64 [REV] account: revert fix made on ea1eca2.
When an account.move.reconcile was unlinked, the reconcile_ref on the related move lines was no longer cleared.
2017-01-17 11:21:17 +01:00
Pedro M. Baeza ea1eca22d3 [FIX] account: Don't trigger twice the reconcile_ref compute method. Was PR #14892
Both store triggers on reconcile_ref are triggered by the same condition,
but seen on 2 tables different, but they always happen together, so no
need for both.

On regular Odoo, the only problem is the performance: the write operation
is performed twice, but on a system with connector or other parallelization
technology, this provokes lot of concurrency problems.
2017-01-17 10:48:56 +01:00
Goffin Simon 342dad44cd [FIX] account_asset: To ensure the migration compatibility with 9.0
This fix allow to keep the same behavior of 8.0 and 10.0 to manage the assets.

In 9.0, the field account_income_recognition_id(oldname='account_expense_depreciation_id') has been
deleted from the account.asset.category.form view with 6120babb45 and
then it was not possible to manage the assets like in 8.0 and 10.0

But as this fix is in a stable version, it must be compatible with instances without any upgrade
of the view account.asset.category.form.

This issue has been solved in saas-11 with this commit: eb8d4aaa59

opw:703860,702265
2017-01-17 09:53:58 +01:00
Pierre Masereel 77767801c6 [FIX] bus: do not suggest company users to portal users
When you are connected as a portal user, you can access to the list of
company users when you try to create a channel of type "Direct Message".

This is caused by a SQL request that doesn't check the access rights of
the user before returning the list of users.

To fix this, we check that the user can create a mail channel, before
returning partners information.

opw-704127
2017-01-16 17:54:12 +01:00
Pierre Masereel 36f6f2647d [FIX] hr: do not show employee users to portal users
When you are connected as a portal user, you can connect to the
backend of Odoo and if you go to your discuss app through the '@' icon,
you can list the employees of the company by mention a employee

This is caused by a SQL request that store in cache the employee
list to minimize requests when mention. The problem
is that those requests don't take into account the rights of a user
to read employees information.

To fix this, we are taking the group 'base.group_user' and read the
information of its users, the 'read' is respecting, the access rights of
the users, and so the employees names, are ont shown anymore to portal
users.

opw-704127
2017-01-16 16:42:18 +01:00