Monday 28 November 2016

Unable to git clone , Failed to connect to github.com port 443: Network is unreachable

Recently, I have encountered following problem. Might be useful for others who face same error.

I have two different Internet service provider. With one ISP, it works fine but with others it fails.

For example:

git clone https://github.com/odoo/odoo.git

It throws me following error:

fatal: unable to access 'https://github.com/odoo/odoo.git': Failed to connect to github.com port 443: Network is unreachable

I have solved with following trick.

ping github.com
PING github.com (192.30.253.112) 56(84) bytes of data.


Add  192.30.253.112 github.com in /etc/hosts file.


Saturday 12 November 2016

How to create server actions in Odoo 10?

Below is example of server actions in Odoo 8.

<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <data>
        <record id="action" model="ir.actions.server">
            <field name="name">My Action</field>
            <field name="model_id" ref="model_module_model"/>
            <field name="code">self.action(cr, uid, context=context)</field>
       </record>
    </data>
</odoo>

Following is example for Server actions in Odoo 10.

<?xml version="1.0" encoding="utf-8" ?>
<odoo>

    <data>
        <record id="action" model="ir.actions.server">
            <field name="name">My Action</field>
            <field name="model_id" ref="model_module_model"/>
            <field name="code">
           
            if context.get('active_model') == 'your.module.model' and context.get('active_ids'):
                    action = env['module.model'].browse(context['active_ids']).action()
          
            </field>
       </record>
    </data>
</odoo>


There is no need of self variable to declare server action in Odoo 10.

Tuesday 8 November 2016

How to activate the developer mode in Odoo version 10?

Developer mode has moved from the user screen to Settings.

Click on link "Active the developer mode" or "Active the developer mode (with assets)"


Active Developer mode


What is different between "Active the developer mode" or "Active the developer mode (with assets)" ?

Active the developer mode :- Used by Administrator User to enables Menus, Fields, kind of security access rights.


Active the developer mode (with assets) :- Used by Odoo developers to track js, css, files, which will helpful to improve further performance.





ImportError: cannot import name 'utils' from 'PyPDF2'

Odoo 15: Traceback (most recent call last):   File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner     self...