Daily updates from Odoo
Navigate
Branch
Thursday, February 10, 2022
10 changes
Enhancements to existing features
The Referral app now supports multiple visual themes, allowing administrators to move away from the default superhero style. This helps companies choose a look that better fits their brand and workplace culture.
Original PR description
The current look of the Referral app is based around superheroes. Unfortunately, this atmosphere doesn't appeal to big companies. This commit introduces the notion of Referral Themes, and allow the admins to use a different theme easily. TaskID: 2687543
Subscription templates are now sorted when users create a new subscription, making it easier to find the right template in long lists. This improves day-to-day usability for teams managing many subscription templates.
Original PR description
- create lot of template - create a new subscription, try to select an template - --> it is not easy because template have no order. @simongoffin
Code cleanup and technical improvements
This update adapts Odoo Enterprise screens and spreadsheet features to the newer Owl interface framework. It keeps key business areas such as accounting, documents, approvals, and spreadsheets compatible with the platform upgrade, improving maintainability while preserving existing user workflows.
Original PR description
This PR updates the enterprise codebase to the update of owl done in https://github.com/odoo/odoo/pull/80156 Co-authored-by: Aaron Bohy [aab@odoo.com](mailto:aab@odoo.com) Co-authored-by: Bruno Boi [boi@odoo.com](mailto:boi@odoo.com) Co-authored-by: Géry Debongnie [ged@odoo.com](mailto:ged@odoo.com) Co-authored-by: Samuel Degueldre [sad@odoo.com](mailto:sad@odoo.com) Co-authored-by: Mathieu Duckerts-Antoine [dam@odoo.com](mailto:dam@odoo.com) Co-authored-by: Simon Genin (ges) [ges@odoo.com](mailto:ges@odoo.com) Co-authored-by: Francois (fge) [fge@odoo.com](mailto:fge@odoo.com) Co-authored-by: Michael Mattiello (mcm) [mcm@odoo.com](mailto:mcm@odoo.com) Co-authored-by: Julien Mougenot [jum@odoo.com](mailto:jum@odoo.com) Co-authored-by: luvi [luvi@odoo.com](mailto:luvi@odoo.com) Co-authored-by: Lucas Perais (lpe) [lpe@odoo.com](mailto:lpe@odoo.com) Co-authored-by: Jorge Pinna Puissant [jpp@odoo.com](mailto:jpp@odoo.com)
Miscellaneous changes
In large DB with million of account.move, you have a timeout when you try to extract. And it speedup the extract. @oco-odoo Forward-Port-Of: odoo/enterprise#22054
Original PR description
In large DB with million of account.move, you have a timeout when you try to extract. And it speedup the extract. @oco-odoo Forward-Port-Of: odoo/enterprise#22054
To reproduce: 1/ Set Monthly Subscription subscription template to "Create Invoice": "Send after successful payment" 2/ Enable the test payment acquirer 3/ Set "To renew" on the existing Monthly subscription 4/ Open the portal view without being logged in 5/ Pay This results in the traceback at the end of this commit message. It's caused by odoo/odoo@8ae1a43663687 which stopped sudo() from propagating to the records that the report renders. To solve it switch to the superuser
Original PR description
To reproduce: 1/ Set Monthly Subscription subscription template to "Create Invoice": "Send after successful payment" 2/ Enable the test payment acquirer 3/ Set "To renew" on the existing Monthly…
To reproduce:
1/ Set Monthly Subscription subscription template to
"Create Invoice": "Send after successful payment"
2/ Enable the test payment acquirer
3/ Set "To renew" on the existing Monthly subscription
4/ Open the portal view without being logged in
5/ Pay
This results in the traceback at the end of this commit message.
It's caused by odoo/odoo@8ae1a43663687 which stopped sudo() from
propagating to the records that the report renders. To solve it switch
to the superuser as far down the call stack as possible. To be safe
make sure a caller has sudo'd before switching. Normally this is done
by the payment.acquirers when calling _handle_feedback_data().
Similar to odoo/odoo@e6800845cd8, odoo/odoo@962919ec878b and others.
```
Traceback:
odoo.addons.base.models.ir_model: Access Denied by ACLs for operation: read, uid: 4, model: account.move
...
File "/home/jvo/odoo_versions/odoo_v15/odoo/http.py", line 536, in response_wrap
response = f(*args, **kw)
File "/home/jvo/odoo_versions/odoo_v15/addons/payment_stripe/controllers/main.py", line 45, in stripe_return_from_checkout
request.env['payment.transaction'].sudo()._handle_feedback_data('stripe', data)
File "/home/jvo/odoo_versions/odoo_v15/addons/payment/models/payment_transaction.py", line 617, in _handle_feedback_data
tx._execute_callback()
File "/home/jvo/odoo_versions/odoo_v15/addons/payment/models/payment_transaction.py", line 800, in _execute_callback
success = getattr(record, method)(tx) # Execute the callback
File "/home/jvo/odoo_versions/enterprise_v15/sale_subscription/models/sale_subscription.py", line 874, in _reconcile_and_assign_token
self._reconcile_and_send_mail(tx)
File "/home/jvo/odoo_versions/enterprise_v15/sale_subscription/models/sale_subscription.py", line 906, in _reconcile_and_send_mail
self.send_success_mail(tx, invoice)
File "/home/jvo/odoo_versions/enterprise_v15/sale_subscription/models/sale_subscription.py", line 1170, in send_success_mail
return template.with_context(email_context).send_mail(invoice.id)
File "/home/jvo/odoo_versions/odoo_v15/addons/mail/models/mail_template.py", line 269, in send_mail
values = self.generate_email(res_id, ['subject', 'body_html', 'email_from', 'email_to', 'partner_to', 'email_cc', 'reply_to', 'scheduled_date'])
File "/home/jvo/odoo_versions/odoo_v15/addons/account_edi/models/mail_template.py", line 21, in generate_email
res = super().generate_email(res_ids, fields)
File "/home/jvo/odoo_versions/odoo_v15/addons/mail/models/mail_template.py", line 221, in generate_email
result, format = report._render_qweb_pdf([res_id])
File "/home/jvo/odoo_versions/odoo_v15/addons/account/models/ir_actions_report.py", line 47, in _render_qweb_pdf
return super()._render_qweb_pdf(res_ids=res_ids, data=data)
File "/home/jvo/odoo_versions/odoo_v15/odoo/addons/base/models/ir_actions_report.py", line 819, in _render_qweb_pdf
html = self_sudo.with_context(context)._render_qweb_html(res_ids, data=data)[0]
File "/home/jvo/odoo_versions/odoo_v15/odoo/addons/base/models/ir_actions_report.py", line 863, in _render_qweb_html
return self._render_template(self.report_name, data), 'html'
File "/home/jvo/odoo_versions/odoo_v15/odoo/addons/base/models/ir_actions_report.py", line 600, in _render_template
return view_obj._render_template(template, values).encode()
File "/home/jvo/odoo_versions/odoo_v15/odoo/addons/base/models/ir_ui_view.py", line 1975, in _render_template
return self.browse(self.get_view_id(template))._render(values, engine)
File "/home/jvo/odoo_versions/odoo_v15/addons/web_editor/models/ir_ui_view.py", line 29, in _render
return super(IrUiView, self)._render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)
File "/home/jvo/odoo_versions/odoo_v15/odoo/addons/base/models/ir_ui_view.py", line 1983, in _render
return self.env[engine]._render(self.id, qcontext)
File "/home/jvo/odoo_versions/odoo_v15/odoo/tools/profiler.py", line 289, in _tracked_method_render
return method_render(self, template, values, **options)
File "/home/jvo/odoo_versions/odoo_v15/odoo/addons/base/models/ir_qweb.py", line 74, in _render
result = super()._render(template, values=values, **compile_options)
File "/home/jvo/odoo_versions/odoo_v15/odoo/addons/base/models/qweb.py", line 134, in _render
result = .join(rendering)''
File "/home/jvo/odoo_versions/odoo_v15/odoo/addons/base/models/qweb.py", line 221, in render_template
raise e
File "/home/jvo/odoo_versions/odoo_v15/odoo/addons/base/models/qweb.py", line 219, in render_template
yield from compiled_fn(self, values, log)
...
File "/home/jvo/odoo_versions/odoo_v15/odoo/tools/lru.py", line 34, in __getitem__
a = self.d[obj]
KeyError: ('ir.model.access', <function IrModelAccess.check at 0x7fa9f3bf8d30>, 4, False, 'account.move', 'read', True, ('en_US',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jvo/odoo_versions/odoo_v15/odoo/addons/base/models/qweb.py", line 219, in render_template
yield from compiled_fn(self, values, log)
File "<template_674>", line 1050, in template_674
File "<template_674>", line 335, in t_call_content
File "/home/jvo/odoo_versions/odoo_v15/odoo/fields.py", line 3389, in __get__
return super().__get__(records, owner)
File "/home/jvo/odoo_versions/odoo_v15/odoo/fields.py", line 2603, in __get__
return super().__get__(records, owner)
File "/home/jvo/odoo_versions/odoo_v15/odoo/fields.py", line 1085, in __get__
record._fetch_field(self)
File "/home/jvo/odoo_versions/odoo_v15/odoo/models.py", line 3276, in _fetch_field
self._read(fnames)
File "/home/jvo/odoo_versions/odoo_v15/odoo/models.py", line 3290, in _read
self.check_access_rights('read')
File "/home/jvo/odoo_versions/odoo_v15/odoo/models.py", line 3538, in check_access_rights
return self.env['ir.model.access'].check(self._name, operation, raise_exception)
File "<decorator-gen-33>", line 2, in check
File "/home/jvo/odoo_versions/odoo_v15/odoo/tools/cache.py", line 90, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/home/jvo/odoo_versions/odoo_v15/odoo/addons/base/models/ir_model.py", line 1812, in check
raise AccessError(msg)
odoo.exceptions.AccessError: You are not allowed to access 'Journal Entry' (account.move) records.
...
Error when render the template
AccessError: You are not allowed to access 'Journal Entry' (account.move) records.
This operation is allowed for the following groups:
- Invoicing/Billing
- Invoicing/Billing Administrator
- Sales/Administrator
- Sales/User: Own Documents Only
- Technical/Show Accounting Features - Readonly
- User types/Portal
Contact your administrator to request access if necessary.
Template: account.report_invoice_document
Path: /t/t/div/t
Node: <t t-set="display_discount" t-value="any(l.discount for l in o.invoice_line_ids)"/> - - -
```
opw-2705525, opw-2750550
Forward-Port-Of: odoo/enterprise#23952latam task 735 --- Fix traceback error raised when clicking the button in the VAT Book ### Steps to reproduce the error 1. Go to Sales VAT Book 2. Click on VAT BOOK (ZIP) Button ### Before this PR We get a traceback error ```sh Traceback (most recent call last): File "/data/build/enterprise/account_reports/controllers/main.py", line 86, in get_report content = report_obj._get_zip(options) AttributeError: 'l10n_ar.vat.book' object has no attribute '_get_zip' ```
Original PR description
latam task 735
---
Fix traceback error raised when clicking the button in the VAT Book
### Steps to reproduce the error
1. Go to Sales VAT Book
2. Click on VAT BOOK (ZIP) Button
### Before this PR
We get a traceback error
```sh
Traceback (most recent call last):
File "/data/build/enterprise/account_reports/controllers/main.py", line 86, in get_report
content = report_obj._get_zip(options)
AttributeError: 'l10n_ar.vat.book' object has no attribute '_get_zip'
```
[video](https://drive.google.com/file/d/1x9qcjRywUri4icpZBRP0AhdbF8QQj9H3/view) showing the error
### After this PR
We do not receive any error and we are able to download the zip file
[video](https://drive.google.com/file/d/1Vwn-Ic4T1l4nsCiOmfTQG4kvHbasPAJ0/view)
Forward-Port-Of: odoo/enterprise#24208Error when trying to open detailed analysis of Revenue KPIs in 'dev' mode Steps to reproduce: 1. Install Subscriptions app 2. Put yourself in debug (either 1 or assets) 3. Go to Subscriptions -> Reporting -> Revenue KPIs -> Monthly Reccuring Revenue (or Net Revenue, Non-Recurring Revenue) 4. Click on the button 'Detailed Analysis' 5. An error is thrown : Unknown prop 'additional_context' given to component 'PivotView' Solution: Move additional_context out of the props push_main_stat
Original PR description
Error when trying to open detailed analysis of Revenue KPIs in 'dev' mode Steps to reproduce: 1. Install Subscriptions app 2. Put yourself in debug (either 1 or assets) 3. Go to Subscriptions -> Reporting -> Revenue KPIs -> Monthly Reccuring Revenue (or Net Revenue, Non-Recurring Revenue) 4. Click on the button 'Detailed Analysis' 5. An error is thrown : Unknown prop 'additional_context' given to component 'PivotView' Solution: Move additional_context out of the props push_main_state has also been moved out of the props because it didn't belong there OPW-2716646 Forward-Port-Of: odoo/enterprise#23784
### **This PR fixes two linked bugs** **1) A bug which happens whenever one tries to generate a `.xml` report through the export wizard.**** Steps to reproduce: 1. Install accounting app + Norway localization (or any localization which uses SAFT) 2. Accounting > General Ledger > Save button 3. Choose `XML` in the dropdown list of the `Export to` field 4. Error By having SAFT installed, there is a new XML export format available (besides PDF and XLSX). Therefore when using the Save b
Original PR description
### **This PR fixes two linked bugs** **1) A bug which happens whenever one tries to generate a `.xml` report through the export wizard.**** Steps to reproduce: 1. Install accounting app + Norway…
### **This PR fixes two linked bugs** **1) A bug which happens whenever one tries to generate a `.xml` report through the export wizard.**** Steps to reproduce: 1. Install accounting app + Norway localization (or any localization which uses SAFT) 2. Accounting > General Ledger > Save button 3. Choose `XML` in the dropdown list of the `Export to` field 4. Error By having SAFT installed, there is a new XML export format available (besides PDF and XLSX). Therefore when using the Save button, a new option for XML appears. However, this wizard will call get_xml which actually returns a string, and not bytes like for PDF or XLSX. Fixed by commit ca9a39a687c42dbf94b25cff4f3922a732f833c3 **2) A bug where exported files did not have the right extension.** Steps to reproduce: 1. Install accounting app + Germany localization 2. Accounting > Tax report > Save button 3. Choose `XML` in the dropdown list of the `Export to` field 4. Download the file 5. Gives a `.sxw` file without 2b3204ca29926915662ece6aca3185a0548d5edb 6. Gives a `.xsl` file with 2b3204ca29926915662ece6aca3185a0548d5edb but without ca9a39a687c42dbf94b25cff4f3922a732f833c3 Forward-Port-Of: odoo/enterprise#24188 Forward-Port-Of: odoo/enterprise#23200
### Step to reproduce: - create and confirm a quotation, after generate an invoice for that quotation - go on the subscription for that quotation and make an upsell ### Current Behavior: The invoicing period from the upsell subscription will end one day later. ### Behavior after the PR: The invoicing period will be the same on both invoice. opw-2666333 Forward-Port-Of: odoo/enterprise#24199 Forward-Port-Of: odoo/enterprise#22823
Original PR description
### Step to reproduce: - create and confirm a quotation, after generate an invoice for that quotation - go on the subscription for that quotation and make an upsell ### Current Behavior: The invoicing period from the upsell subscription will end one day later. ### Behavior after the PR: The invoicing period will be the same on both invoice. opw-2666333 Forward-Port-Of: odoo/enterprise#24199 Forward-Port-Of: odoo/enterprise#22823
Currently, when creating a new mail and choosing the yellow solar template as a mail body, there is an option to view online it which does not contain a link. so this commit fixes the above issue. Task Id: 2739674 Forward-Port-Of: odoo/enterprise#24062
Original PR description
Currently, when creating a new mail and choosing the yellow solar template as a mail body, there is an option to view online it which does not contain a link. so this commit fixes the above issue. Task Id: 2739674 Forward-Port-Of: odoo/enterprise#24062