diff options
| author | Denis Ledoux <dle@odoo.com> | 2015-09-30 15:21:32 +0200 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2015-09-30 15:59:54 +0200 |
| commit | 4c901f8ac6438333f994d39dec1558d837a123e4 (patch) | |
| tree | efd0a7b2acfafad79d587cff0d3e1586d602f9e1 /addons/web/static/src/js/framework/session_instance.js | |
| parent | 9a3b71198918c9438c1daa8b472392b86246ab8c (diff) | |
[FIX] sale: use default_get to define the invoice journal
When creating the invoice of a sales order, from the sales order
(`Create invoice` button on the sale order),
the journal used for the invoice was forced
with a specific domain. Besides, the only reason the journal
is forced is to check there is a sale journal for the
quotation company, and raise a warning if not.
This check was added in 1578c2858df1ca398bcdd07cc0c3e6a83ff23b9c.
This prevented to use the user defined defaults,
(`Set defaults` in the `debug` menu)
to set a different default journal per user.
Using the `default_get` instead solves this issue,
as it uses first the user defined defaults. Besides,
if no user defined defaults are set, it then uses
the default value set in the field definition, which
in this case returns the same journal then the forced
domain mentioned above, the domain used being the same.
There is therefore no change of behavior, while giving
the possibility to use the user defined defaults.
Fixes #8786
Diffstat (limited to 'addons/web/static/src/js/framework/session_instance.js')
0 files changed, 0 insertions, 0 deletions
