summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authornie <nie@odoo.com>2020-09-09 10:04:41 +0000
committernie <nie@odoo.com>2020-09-10 10:25:26 +0000
commit691d1f087040f1ec7066e485d19ce3662dfc6501 (patch)
treeb1d16bfd66c70490fa9dea84d2ac4282c4ea8185 /addons/web/static/src/js/views/basic/basic_controller.js
parent60e9410e9aa3be4a9db50f6f7534ba31fea3bc29 (diff)
[FIX] account: Invoice in Documents not linked to the original invoice
Steps to reproduce the bug: - Install Accounting and Documents - Go to Documents configuration - Enable Files Centralization > Accounting and save - Still in Documents configuration, into "-> Journals", create a new Journal to Synchronize with: - Journal: Customer Invoices (USD) - Go to Accounting > Customers > Invoices - Create a new invoice with any customer and product and save - "Post" then "Send & Print" - On the dialog, "Send & Print" (confirm the report template if necessary) - Go to Documents Bug: The document is missing the "related resource" link shortcut Cause: The context key `default_res_id` is propagated up to: https://github.com/odoo/enterprise/blob/a6606f000e66e72b9f89d353552950652ab2045f/documents/models/document.py#L364 Consequently, the corresponding document is created with a `res_id`, but no `res_model` as `default_res_model` is not set. By adding the `default_res_model` context key, the document is created with the right `res_model`. Note that another solution would be to remove `default_res_id` from the context before creating the `documents.document` and leave the `_compute_res_record` do the job. However, this could have a larger impact since it would affect all document creations. opw:2332596 closes odoo/odoo#57409 X-original-commit: 82cb5066de1081886f1e6277159248bf0d0e4330 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com> Signed-off-by: backspac <backspac@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions