google recaptcha odoo banner sub

Hướng dẫn sử dụng Google reCaptcha Odoo

Google reCaptcha Odoo là gì?

Google reCaptcha Odoo là việc tích hợp google recaptcha vào website Odoo. Việc tích hợp Google recaptcha giúp giảm thiểu khả năng tấn công Ddos, tăng tính bảo mật cho thông tin.

Trong bài viết trước mình đã hướng dẫn sử dụng Google SearchGoogle Analytics cho Odoo. Bài viết này mình sẽ tiếp tục giới thiệu cách sử dụng Google reCaptcha.

Hướng dẫn thực hiện.

1. Đăng ký google recaptcha

Đăng nhập tài khoản Gmail và vào đường dẫn https://www.google.com/recaptcha/intro/

Bạn sẽ thấy giao diện như thế này

google captcha odoo image 1 sub
Giao diện đăng ký Google reCaptcha 

Bạn nhấn vào Get reCAPTCHA bạn sẽ được giao diện như thế này

google recatcha odoo image 2 sub
Giao diện đăng ký

Bạn nhập các thông tin Label, chọn reCAPTCHA V2, đánh tên domain và check vào ô accept.

Sau đó nhấn Register bạn sẽ được giao diện như thế này.

google recaptcha image 3 sub
Giao diện sau khi đăng ký

Vậy là bạn đã đăng ký thành công Google reCaptcha.

2. Thao tác trên Odoo.

Cài đặt Module website_recaptcha_reloaded, các bạn có thể download tại đây.

google recaptcha odoo image 4 sub
Cài đặt module

Bạn vào menu Website Admin để cấu hình (Odoo9), hoặc Setting->Website Setting (Odoo8)

google recaptcha odoo image 5 sub
Giao diện Website Admin

Bạn nhập vào:

Ô reCAPTCHA site Key là dòng Site Key khi đăng ký trên Google reCaptcha.
Ô reCAPTCHA Private Key là dòng Secret Key khi đăng ký trên Google reCaptcha.

3. Sử dụng.

Tạo một file XML để tạo một template cho Google reCaptcha.

Copy nội dung sau:

<openerp>
<data>
<template id="vi_recaptcha_form" name="Google reCAPTCHA" inherit_id="website.trial">
<xpath expr="//label[@id='before_recaptcha']" position="after">
<script src='https://www.google.com/recaptcha/api.js'></script>
<div class="g-recaptcha" t-att-data-sitekey="website.recaptcha_site_key" data-theme="dark"></div>
</xpath>
</template>
</data>
</openerp>

Khi bạn sử dụng trên trang nào chỉ việc gọi lại template này.

Để kiểm tra Google reCaptcha sau khi nhấn xác nhận một hành động nào đó.

Bạn sử dụng đoạn code sau:

if kw.has_key('g-recaptcha-response') and not request.website.is_captcha_valid(kw['g-recaptcha-response']):
#thông báo trả về khi captcha sai
else:
#thao tác khi catcha được xác thực

Kết luận:

Mình vừa giới thiệu đến các bạn cách cài đặt Google reCaptcha Odoo. Các bạn có thắc mắc gì có thể để lại comment chia sẽ bên dưới.
Cảm ơn các bạn theo dõi.

 

 

 

230 thoughts to “Hướng dẫn sử dụng Google reCaptcha Odoo”

  1. I have been exploring for a little for any high quality articles or blog posts in this sort of space . Exploring in Yahoo I at last stumbled upon this site. Reading this information So i am satisfied to convey that I’ve an incredibly excellent uncanny feeling I found out exactly what I needed. I such a lot surely will make sure to don?t overlook this website and provides it a look on a constant basis.|

  2. Having read this I believed it was rather informative. I appreciate you finding the time and energy to put this content together. I once again find myself personally spending a lot of time both reading and posting comments. But so what, it was still worth it!|

  3. Hello there! This post couldn’t be written any better! Looking at this post reminds me of my previous roommate! He continually kept preaching about this. I am going to forward this post to him. Fairly certain he’ll have a good read. Many thanks for sharing!

  4. Hey! Quick question that’s completely off topic. Do you know how to make your site mobile friendly? My website looks weird when browsing from my iphone 4. I’m trying to find a template or plugin that might be able to resolve this issue. If you have any suggestions, please share. Appreciate it!|

  5. I have learned some points through your site post. One other thing I would like to state is that there are many games available on the market designed in particular for toddler age children. They include pattern acceptance, colors, creatures, and designs. These typically focus on familiarization instead of memorization. This keeps little ones occupied without experiencing like they are learning. Thanks

  6. Good – I should definitely pronounce, impressed with your site. I had no trouble navigating through all tabs as well as related info ended up being truly simple to do to access. I recently found what I hoped for before you know it at all. Reasonably unusual. Is likely to appreciate it for those who add forums or something, web site theme . a tones way for your customer to communicate. Excellent task.

  7. Undeniably imagine that that you said. Your favorite justification seemed to be at the net the simplest factor to bear in mind of. I say to you, I definitely get annoyed while people think about concerns that they just do not recognize about. You controlled to hit the nail upon the top and defined out the whole thing without having side effect , folks can take a signal. Will probably be again to get more. Thanks

  8. Thanks for sharing excellent informations. Your web-site is so cool. I am impressed by the details that you have on this site. It reveals how nicely you perceive this subject. Bookmarked this website page, will come back for more articles. You, my pal, ROCK! I found just the information I already searched all over the place and simply couldn’t come across. What a perfect site.

  9. Undeniably believe that which you stated. Your favorite justification seemed to be on the net the simplest thing to be aware of. I say to you, I definitely get annoyed while people consider worries that they just don’t know about. You managed to hit the nail upon the top and also defined out the whole thing without having side-effects , people could take a signal. Will likely be back to get more. Thanks|

  10. Thanks a lot for the helpful article. It is also my opinion that mesothelioma has an really long latency time, which means that signs and symptoms of the disease might not exactly emerge until eventually 30 to 50 years after the 1st exposure to asbestos. Pleural mesothelioma, that is the most common type and has effects on the area across the lungs, might cause shortness of breath, breasts pains, and also a persistent coughing, which may bring on coughing up our blood.

  11. Thanks for your article. I also believe laptop computers have gotten more and more popular these days, and now are usually the only sort of computer found in a household. This is because at the same time that they’re becoming more and more reasonably priced, their working power keeps growing to the point where they’re as powerful as desktop from just a few in years past.

  12. Hi, There’s no doubt that your website might be having internet browser compatibility problems. Whenever I look at your website in Safari, it looks fine however, if opening in I.E., it has some overlapping issues. I merely wanted to give you a quick heads up! Besides that, great website!|

  13. Good ¡V I should certainly pronounce, impressed with your website. I had no trouble navigating through all tabs and related info ended up being truly easy to do to access. I recently found what I hoped for before you know it in the least. Quite unusual. Is likely to appreciate it for those who add forums or something, web site theme . a tones way for your client to communicate. Nice task..

  14. Today, with all the fast chosen lifestyle that everyone is having, credit cards have a huge demand throughout the market. Persons coming from every area are using credit card and people who are not using the credit card have made up their minds to apply for 1. Thanks for expressing your ideas in credit cards.

  15. One more thing. I do believe that there are numerous travel insurance web pages of respected companies that allow you to enter a trip details and have you the rates. You can also purchase the international travel insurance policy on internet by using your own credit card. All you need to do is always to enter your own travel details and you can understand the plans side-by-side. Just find the program that suits your allowance and needs and after that use your credit card to buy the idea. Travel insurance on the web is a good way to do investigation for a reputable company pertaining to international holiday insurance. Thanks for revealing your ideas.

  16. Superb website you have here but I was wanting to know if you knew of any forums that cover the same topics discussed here? I’d really love to be a part of group where I can get suggestions from other experienced individuals that share the same interest. If you have any recommendations, please let me know. Cheers!

  17. Hey, I think your blog might be having browser compatibility issues. When I look at your blog in Firefox, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, great blog!

  18. Woah! I’m really enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s difficult to get that “perfect balance” between usability and visual appearance. I must say you’ve done a great job with this. Also, the blog loads very quick for me on Firefox. Exceptional Blog!|

  19. Having read this I thought it was very informative. I appreciate you finding the time and energy to put this content together. I once again find myself spending a lot of time both reading and posting comments. But so what, it was still worth it.

  20. I have seen many useful factors on your website about computers. However, I have got the view that laptops are still more or less not powerful sufficiently to be a good option if you normally do jobs that require loads of power, such as video touch-ups. But for world-wide-web surfing, statement processing, and many other popular computer work they are just fine, provided you don’t mind the little screen size. Thanks for sharing your ideas.

  21. Thanks for expressing your ideas. A very important factor is that scholars have a selection between federal student loan and also a private education loan where it can be easier to opt for student loan debt consolidation loan than in the federal student loan.

  22. You really make it seem really easy together with your presentation however I to find this topic to be actually one thing that I believe I would never understand. It seems too complicated and very huge for me. I am taking a look forward in your subsequent publish, I’ll try to get the hold of it!

  23. Thanks for your article. My partner and i have constantly seen that almost all people are desperate to lose weight when they wish to appear slim in addition to looking attractive. Nevertheless, they do not usually realize that there are more benefits to losing weight additionally. Doctors say that fat people experience a variety of ailments that can be instantly attributed to their own excess weight. Thankfully that people who’re overweight in addition to suffering from a variety of diseases can help to eliminate the severity of their illnesses by means of losing weight. It is possible to see a continuous but noticeable improvement with health as soon as even a minor amount of fat reduction is achieved.

  24. We absolutely love your blog and find nearly all of your post’s to be just what I’m looking for. Does one offer guest writers to write content to suit your needs? I wouldn’t mind creating a post or elaborating on a few of the subjects you write about here. Again, awesome site!

  25. There are certainly numerous details like that to take into consideration. That may be a great point to carry up. I provide the ideas above as basic inspiration but clearly there are questions just like the one you deliver up where a very powerful thing might be working in sincere good faith. I don?t know if best practices have emerged around issues like that, however I’m sure that your job is clearly recognized as a good game. Each boys and girls really feel the influence of just a second’s pleasure, for the remainder of their lives.

  26. Good day I am so grateful I found your webpage, I really found you by accident, while I was researching on Bing for something else, Regardless I am here now and would just like to say cheers for a fantastic post and a all round interesting blog (I also love the theme/design), I don’t have time to browse it all at the minute but I have saved it and also added in your RSS feeds, so when I have time I will be back to read much more, Please do keep up the fantastic work.|

  27. An impressive share! I’ve just forwarded this onto a coworker who was conducting a little research on this. And he in fact ordered me lunch because I stumbled upon it for him… lol. So let me reword this…. Thanks for the meal!! But yeah, thanks for spending time to discuss this matter here on your site.

  28. I was just searching for this info for some time. After 6 hours of continuous Googleing, at last I got it in your web site. I wonder what’s the lack of Google strategy that do not rank this kind of informative sites in top of the list. Usually the top sites are full of garbage.

  29. I would like to thnkx for the efforts you have put in writing this blog. I’m hoping the same high-grade web site post from you in the upcoming as well. Actually your creative writing abilities has encouraged me to get my own web site now. Really the blogging is spreading its wings rapidly. Your write up is a great example of it.

  30. I have witnessed that expenses for on-line degree experts tend to be a fantastic value. For example a full 4-year college Degree in Communication with the University of Phoenix Online consists of 60 credits at $515/credit or $30,900. Also American Intercontinental University Online offers a Bachelors of Business Administration with a total education course feature of 180 units and a worth of $30,560. Online learning has made taking your certification much simpler because you could earn your degree from the comfort of your dwelling place and when you finish working. Thanks for all your other tips I have certainly learned through your blog.

  31. In these days of austerity in addition to relative stress about having debt, lots of people balk contrary to the idea of having a credit card to make acquisition of merchandise or maybe pay for a holiday, preferring, instead to rely on the actual tried as well as trusted procedure for making repayment – hard cash. However, in case you have the cash there to make the purchase in full, then, paradoxically, this is the best time to use the card for several causes.

  32. Excellent site you have here but I was curious if you knew of any user discussion forums that cover the same topics discussed in this article? I’d really like to be a part of group where I can get feedback from other experienced individuals that share the same interest. If you have any recommendations, please let me know. Thank you!

  33. You’re so awesome! I don’t think I’ve read through anything like this before. So nice to find someone with a few original thoughts on this subject. Really.. many thanks for starting this up. This web site is one thing that’s needed on the internet, someone with a bit of originality.

  34. Hi there, i read your blog occasionally and i own a similar one and i was just curious if you get a lot of spam responses? If so how do you protect against it, any plugin or anything you can recommend? I get so much lately it’s driving me mad so any support is very much appreciated.|

  35. I’m impressed, I have to admit. Rarely do I encounter a blog that’s both educative and amusing, and let me tell you, you’ve hit the nail on the head. The problem is something that too few folks are speaking intelligently about. I’m very happy that I came across this in my hunt for something concerning this.

  36. I am only commenting to make you understand of the fantastic discovery my cousin’s child experienced reading your web page. She came to understand several details, with the inclusion of what it’s like to possess an excellent giving nature to get the others really easily gain knowledge of a number of extremely tough subject areas. You really surpassed my expectations. Thank you for offering those important, trustworthy, educational and also easy tips on this topic to Sandra.

  37. Howdy, i read your blog from time to time and i own a similar one and i was just curious if you get a lot of spam responses? If so how do you protect against it, any plugin or anything you can suggest? I get so much lately it’s driving me crazy so any help is very much appreciated.|

Trả lời

Thư điện tử của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

10 − four =