First of all, thank you for this incredibly helpful book and for all the effort you’ve put into making complex concepts easier to understand. The content has been a tremendous resource for my work with Odoo, and I’ve learned so much along the way!
Issue: In Chapter 14, Section 04 (Dynamic Snippets), there is a small issue in the provided snippet.js code.
https://github.com/PacktPublishing/Odoo-17-Development-Cookbook-Fifth-Edition/blob/9717c757a5312c2206fb7d822ec48d3ba8feee40/Chapter14/04_dynamic_snippets/my_hostel/static/src/js/snippets.js#L15
The code attempts to use this.orm within the HostelSnippet widget’s start function. However the following error appears:

To Reproduce:
- Follow the steps in Chapter 14, Section 04 to implement the HostelSnippet widget.
- Add the code from snippet.js as written.
- When the widget loads in the browser, it throws the above error.
First of all, thank you for this incredibly helpful book and for all the effort you’ve put into making complex concepts easier to understand. The content has been a tremendous resource for my work with Odoo, and I’ve learned so much along the way!
Issue: In Chapter 14, Section 04 (Dynamic Snippets), there is a small issue in the provided snippet.js code.
https://github.com/PacktPublishing/Odoo-17-Development-Cookbook-Fifth-Edition/blob/9717c757a5312c2206fb7d822ec48d3ba8feee40/Chapter14/04_dynamic_snippets/my_hostel/static/src/js/snippets.js#L15
The code attempts to use this.orm within the HostelSnippet widget’s start function. However the following error appears:
To Reproduce: