How To Write Controllers And Render WebPage Using Controllers in Odoo

  Рет қаралды 42,686

Odoo Mates

Odoo Mates

Күн бұрын

How to write controllers in Odoo and Render a web page using the Controller in Odoo. Create controllers in Odoo. Create a new template and render the template/web page using the controller. Fetch the data from database tables and display it in webpage using the controllers.
Email: odoomates@gmail.com

Пікірлер: 92
@enricosaccheggiani3192
@enricosaccheggiani3192 4 жыл бұрын
I'd like to know in which cases it is more useful to prepare a controller instead of putting a simple menu option. thanks for a eventually answer
@smartdentalvn7606
@smartdentalvn7606 Жыл бұрын
very great video. can you make a quick video about getting information from webhook (ex. facebook) via controller?
@lenninlawliett
@lenninlawliett 3 жыл бұрын
HELP! Is it necessary to do this step 11:32 to obtain the list of data on the page? (I didn't understand that part very well, I don't speak English)
@OdooMates
@OdooMates 3 жыл бұрын
is the entered time frame correct ? 11:32
@andyanjordan507
@andyanjordan507 3 жыл бұрын
hey what a nice video , I have a question i tried to use other file rather than tempaltes.xml with exactly same code you have on your video but it show me some error , but it work if i use the template.xml , how we use other xml file for render webpage using controller ?
@OdooMates
@OdooMates 3 жыл бұрын
can i see the error message you get
@tronganhnguyenthanh1157
@tronganhnguyenthanh1157 3 жыл бұрын
Hi. I have a question for you: Where is the website.layout located ?
@OdooMates
@OdooMates 3 жыл бұрын
in website module
@zelalembiru3298
@zelalembiru3298 4 жыл бұрын
@odoo mates you are doing great tutorials. I wanna ask you something can you demonstrate how the publish to the website is working please kindly looking you
@OdooMates
@OdooMates 4 жыл бұрын
you mean, how to host odoo website in odoo server or?
@zelalembiru3298
@zelalembiru3298 4 жыл бұрын
@@OdooMates thanks for your replay, am saying about the smart button "on website" which is used for publishing or unpublish the content
@OdooMates
@OdooMates 4 жыл бұрын
@@zelalembiru3298 the smart buttons is available for the web pages right ? if this is not set to True, public users will not be able to see this page
@zelalembiru3298
@zelalembiru3298 4 жыл бұрын
@@OdooMates once again I would like to say thank you for the reply and attention, but am saying that can you demonstrate how it is working on the backend, if i need to add this smart button how can i did it?I know what it is working on the front side
@ammaralmoalmi3769
@ammaralmoalmi3769 2 жыл бұрын
I just want to tell you that your videos are supper useful , thank you. However, the voice is so low or maybe the quality
@OdooMates
@OdooMates 2 жыл бұрын
Yes we do understand the issue and in the latest videos we have tried our best to keep the voice quality better
@ammaralmoalmi3769
@ammaralmoalmi3769 2 жыл бұрын
@@OdooMates Thank you so much, please continue your videos, they are supper useful. Thank you again
@OdooMates
@OdooMates 2 жыл бұрын
@@ammaralmoalmi3769 thanks for the support and feedback
@jairuscalvin9769
@jairuscalvin9769 11 ай бұрын
Thanks sir, it's so helpful for me. But How to render template view like this
@HoangTuKim-v3s
@HoangTuKim-v3s 10 ай бұрын
Where is the text block in the Odoo website coded in the website module?
@NMNaufaldo
@NMNaufaldo 2 жыл бұрын
I'm wondering if we can render js framework (react or vue). If we can do that, it will be amazing
@OdooMates
@OdooMates 2 жыл бұрын
www.odoo.com/documentation/15.0/developer/reference/frontend/owl_components.html
@ashokmythi
@ashokmythi 2 жыл бұрын
hi nice explanation. May i know how to create a new view type in odoo 10?
@OdooMates
@OdooMates 2 жыл бұрын
will this module help as a reference? apps.odoo.com/apps/modules/10.0/web_timeline/
@syamaas9621
@syamaas9621 4 жыл бұрын
Thank you... I can create template easily
@OdooMates
@OdooMates 4 жыл бұрын
Welcome :)
@jatinkant1711
@jatinkant1711 Жыл бұрын
how can we use custom controller to Create Lead from external application with Odoo APIs
@OdooMates
@OdooMates Жыл бұрын
an example is shown in this video: kzbin.info/www/bejne/rXjZpoWYeN6sqs0
@tronganhnguyenthanh1157
@tronganhnguyenthanh1157 3 жыл бұрын
Can you show me the way to fix the error External ID not found in the system: website.layout, please?
@OdooMates
@OdooMates 3 жыл бұрын
Can you upgrade website module and see
@gunahawk6893
@gunahawk6893 3 жыл бұрын
hi can you put separate playlist for this webcontroller please
@OdooMates
@OdooMates 3 жыл бұрын
brother, see: kzbin.info/www/bejne/bqa8qYqIod1_lbc
@gunahawk6893
@gunahawk6893 3 жыл бұрын
@@OdooMates thanks
@NMNaufaldo
@NMNaufaldo 2 жыл бұрын
If you get `External ID not found in the system: website.layout` error, you need to install website module first
@OdooMates
@OdooMates 2 жыл бұрын
yes, forget to specify this, better we set website module as a dependent module of our module
@alejandrobrun
@alejandrobrun 4 жыл бұрын
Excelente tutorial. Gracias por compartir su conocimiento
@OdooMates
@OdooMates 4 жыл бұрын
Thanks. Please refer the channel and videos to your friends :)
@ibrahimkhan-vc9mp
@ibrahimkhan-vc9mp 3 жыл бұрын
i want to show image field in website how i can do this..my image field is "image = fields.Binary(string='Image', max_width=5, max_height=5)"
@techahmed4645
@techahmed4645 3 жыл бұрын
Just try to write it in record
@chaotixsniper
@chaotixsniper 2 жыл бұрын
i get this error : Error message: load could not load template ValueError: View 'website.layout' in website 1 not found Template: 2131 The error occurred while rendering the template 2131
@OdooMates
@OdooMates 2 жыл бұрын
is it resolved ?
@chaotixsniper
@chaotixsniper 2 жыл бұрын
@@OdooMates yes, i had to inherit the website module
@OdooMates
@OdooMates 2 жыл бұрын
So you missed to add it in the depends right....
@chaotixsniper
@chaotixsniper 2 жыл бұрын
I added _inherit:"website.layout" in the python file
@relaxbox1575
@relaxbox1575 3 жыл бұрын
hi! i would like to ask, how i host my website for public?
@OdooMates
@OdooMates 3 жыл бұрын
just we need to install the odoo in some servers(which can be accessed by public) and set a domain name for it.
@ucMinh-tt4pz
@ucMinh-tt4pz Жыл бұрын
in request.env[].search, how can i filter only active id of record i was created ?
@OdooMates
@OdooMates Жыл бұрын
in the domain, you can add necessary condtions like, request.env['res.partner'].search([('create_uid, '=', MY_ID)])
@S1eth
@S1eth Жыл бұрын
I am on Odoo 16. After adding the "controllers" folder with __init__.py and main.py, and imported controllers into the main __init__.py, I got an error. I tried to undo all the steps, deleting "controllers" and the new line in __init__py, but the error persisted. Running odoo booted me to the database selector, and upon choosing "odoo16-dev", I got an error. I created a new database, and it works again. But how do I fix my old database? The error: 2023-05-31 06:23:26,865 4076 ERROR odoo16-dev odoo.modules.registry: Failed to load registry 2023-05-31 06:23:26,867 4076 ERROR odoo16-dev odoo.http: Exception during request handling. Traceback (most recent call last): File "C:\Projects\Odoo16-Dev\odoo\odoo\modules egistry.py", line 64, in __new__ return cls.registries[db_name] File "", line 2, in __getitem__ File "C:\Projects\Odoo16-Dev\odoo\odoo\tools\func.py", line 87, in locked return func(inst, *args, **kwargs) File "C:\Projects\Odoo16-Dev\odoo\odoo\tools\lru.py", line 34, in __getitem__ a = self.d[obj] KeyError: 'odoo16-dev' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Projects\Odoo16-Dev\odoo\odoo\http.py", line 1987, in __call__ response = request._serve_db() File "C:\Projects\Odoo16-Dev\odoo\odoo\http.py", line 1562, in _serve_db self.registry = Registry(self.db).check_signaling() File "C:\Projects\Odoo16-Dev\odoo\odoo\modules egistry.py", line 66, in __new__ return cls.new(db_name) File "", line 2, in new File "C:\Projects\Odoo16-Dev\odoo\odoo\tools\func.py", line 87, in locked return func(inst, *args, **kwargs) File "C:\Projects\Odoo16-Dev\odoo\odoo\modules egistry.py", line 90, in new odoo.modules.load_modules(registry, force_demo, status, update_module) File "C:\Projects\Odoo16-Dev\odoo\odoo\modules\loading.py", line 485, in load_modules force, status, report, loaded_modules, update_module, models_to_check) File "C:\Projects\Odoo16-Dev\odoo\odoo\modules\loading.py", line 373, in load_marked_modules perform_checks=perform_checks, models_to_check=models_to_check File "C:\Projects\Odoo16-Dev\odoo\odoo\modules\loading.py", line 303, in load_module_graph module.write({'state': 'installed', 'latest_version': ver}) File "C:\Projects\Odoo16-Dev\odoo\addons\website\models\ir_module_module.py", line 78, in write if request and request.db and request.context.get('apply_new_theme'): File "C:\Projects\Odoo16-Dev\venv\lib\site-packages\werkzeug\local.py", line 348, in __getattr__ return getattr(self._get_current_object(), name) File "C:\Projects\Odoo16-Dev\odoo\odoo\http.py", line 1215, in context return self.env.context AttributeError: 'NoneType' object has no attribute 'context'
@OdooMates
@OdooMates Жыл бұрын
is this resolved ?
@S1eth
@S1eth Жыл бұрын
@@OdooMates the old database is still unusable, and I continued the tutorials on a new database. I did not attempt to brick my new database again.
@gunahawk6893
@gunahawk6893 3 жыл бұрын
can u do a comparison video od 12,13,14,15 and its changes
@OdooMates
@OdooMates 2 жыл бұрын
all the versions ? from v12, the coding are almost same only with minor changes here and there
@nikitaagrawal1260
@nikitaagrawal1260 2 жыл бұрын
Sir can you please make more videos on odoo website module...like how to show model records in website
@OdooMates
@OdooMates 2 жыл бұрын
Sure, we will keep in mind and try to add in upcoming days
@nikitaagrawal1260
@nikitaagrawal1260 2 жыл бұрын
@@OdooMates thank u
@OdooMates
@OdooMates 2 жыл бұрын
Welcome
@programmingtopics
@programmingtopics 7 ай бұрын
Very much thanks!
@OdooMates
@OdooMates 7 ай бұрын
You're welcome!
@oulaikenny2494
@oulaikenny2494 4 жыл бұрын
that's great,but how to call controller action in view?
@OdooMates
@OdooMates 4 жыл бұрын
By default its seems not possible, haven't checked its possibilities yet
@ammaralmoalmi3769
@ammaralmoalmi3769 2 жыл бұрын
I want to make a controller which should some field for my customer to fill in and confirm, then it creates a record in the backend
@OdooMates
@OdooMates 2 жыл бұрын
what issue you face in achieving this ?
@ammaralmoalmi3769
@ammaralmoalmi3769 2 жыл бұрын
@@OdooMates I have already found some of your videos and I have already achieved it , thank you so much.
@OdooMates
@OdooMates 2 жыл бұрын
@@ammaralmoalmi3769 glad to hear it
@gunahawk6893
@gunahawk6893 3 жыл бұрын
excellent
@OdooMates
@OdooMates 3 жыл бұрын
thanks
@tronganhnguyenthanh1157
@tronganhnguyenthanh1157 3 жыл бұрын
I already upgrade my modules but it doesn't work
@OdooMates
@OdooMates 3 жыл бұрын
then can you duplicate the db and try upgrading the base module itself and see
@tiennamduong7856
@tiennamduong7856 3 жыл бұрын
excuse me. how to show "find in path" window???
@OdooMates
@OdooMates 3 жыл бұрын
did you installed pycharm ?
@quyofitxo7991
@quyofitxo7991 2 жыл бұрын
how to set parameter ppg=xxx for page?
@umerfarooq4026
@umerfarooq4026 4 жыл бұрын
Thankz and can you give me one more favour by giving the link of repo
@OdooMates
@OdooMates 4 жыл бұрын
sure: github.com/odoomates/Development-Tutorials
@umerfarooq4026
@umerfarooq4026 4 жыл бұрын
@@OdooMates kindly make videos on gateway integration and third party etc.
@umerfarooq4026
@umerfarooq4026 4 жыл бұрын
@@OdooMates thankz
@sasindrans6059
@sasindrans6059 Жыл бұрын
How to create edit form to edit created record using controller
@thanshidhap.p4743
@thanshidhap.p4743 3 жыл бұрын
Do you know, How to create a user in controllers?
@OdooMates
@OdooMates 3 жыл бұрын
By calling create method of res.users model
@thanshidhap.p4743
@thanshidhap.p4743 3 жыл бұрын
@@OdooMates Thanks for your reply. But I didn't get that. I am learning about controllers. Is there any link regarding that?
@OdooMates
@OdooMates 3 жыл бұрын
We have a playlist named Odoo website tutorials, in that there is video about controllers
@thanshidhap.p4743
@thanshidhap.p4743 3 жыл бұрын
@@OdooMates I checked that also.
@OdooMates
@OdooMates 3 жыл бұрын
@@thanshidhap.p4743 then ...
@vaishusiva7063
@vaishusiva7063 4 жыл бұрын
please check the audio its too low
@OdooMates
@OdooMates 4 жыл бұрын
Sorry for it, hope you can adjust it by your system volume
@ShideShugo
@ShideShugo 4 жыл бұрын
Stop the Pycharm instance of Odoo in order to update from console command
@OdooMates
@OdooMates 2 жыл бұрын
myself get familiar in using the pycharm
@charoliyamujahid526
@charoliyamujahid526 4 жыл бұрын
Please Make vedio theme tutorial
@beautysinha6758
@beautysinha6758 4 жыл бұрын
how to store session in controller?
@OdooMates
@OdooMates 4 жыл бұрын
Using request.session you can store in session
@beautysinha6758
@beautysinha6758 4 жыл бұрын
@@OdooMates one more question.. I am getting values from controller. How to place values in XML file. I had write t-esc= "values" But I am not getting anything
Odoo Web Controllers Auth Public and Auth User Difference
3:24
How to Write Controllers And Render WebPage in Odoo
29:39
Odoo Mates
Рет қаралды 16 М.
VAMPIRE DESTROYED GIRL???? 😱
00:56
INO
Рет қаралды 6 МЛН
Who’s the Real Dad Doll Squid? Can You Guess in 60 Seconds? | Roblox 3D
00:34
小蚂蚁会选到什么呢!#火影忍者 #佐助 #家庭
00:47
火影忍者一家
Рет қаралды 77 МЛН
小路飞嫁祸姐姐搞破坏 #路飞#海贼王
00:45
路飞与唐舞桐
Рет қаралды 28 МЛН
Dynamic Web Controllers in Odoo
16:12
Greg Moss
Рет қаралды 4,4 М.
Créer un controller Web dans Odoo®
11:17
Informatique Sans Complexe
Рет қаралды 722
Think Fast, Talk Smart: Communication Techniques
58:20
Stanford Graduate School of Business
Рет қаралды 41 МЛН
How To Inherit Existing Controller in Odoo - Part 1
6:52
Odoo Mates
Рет қаралды 12 М.
Odoo Dashboard Using Chart JS
32:37
AJScript Media
Рет қаралды 7 М.
This is why webhooks are important
7:59
Web Dev Cody
Рет қаралды 35 М.
How to display Model data on website in Odoo?
12:57
Odoo Discussions
Рет қаралды 4,5 М.
Multi-Website | Odoo Website
5:25
Odoo
Рет қаралды 3,7 М.
VAMPIRE DESTROYED GIRL???? 😱
00:56
INO
Рет қаралды 6 МЛН