Decorators and Its Utility in Odoo?

Decorators and Its Utility in Odoo?

A decorator is a function that takes a function as input and returns a function. The anatomy of the decorator is: @decorator-expression Function-definition Decorator-expression is an expression that returns a callable thing. The callable thing has to take a single argument. Function definition is a function definition (it, therefore, must begin with def). In older version of odoo, we use a cursor, uid, context and ids […]

Read More

How To Inherit JS In Xml?

How To Inherit JS In Xml?

Add custom css and javascript files in odoo.   Topic-1:Adding static resources (CSS and JavaScript) to Odoo Example : Creating the XML   The first step is to create a new XML file in your custom module. Create a new XML file under yourModuleName/views, like this: New XML file Now the first thing to do is to tell __openerp__.py that you’ve added this new XML […]

Read More

Decoding & Setting Up Image Display in Template

Decoding & Setting Up Image Display in Template

Subject : Display Images in Email (send using Templates). Related : Send Email using Templates via applications. Descriptions: We can send email using email template to the custom. That time suppose we have company logo then we would like to image display  logo in email. Sometimes image will not show in email or display in broken format. For that, we have to use python base64 […]

Read More