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.
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
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.
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
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
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
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
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.
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-layoutFixes#11020
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).
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
to avoid postgresql reserved keywords.
fields like fetchmail_server.user or mail_mail.references uses reserves keywords and must be escaped
Closes#15177
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)
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
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
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
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
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
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
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
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
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
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.
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
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
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