Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
3 Răspunsuri
4796 Vizualizări

I am not able to find the addon created inspite of restarting the server and updating the module list. Here is my code

__init__.py

import lead_assign

__openerp__.py

{
    'name' : "Assigning Leads",
    'version' : "1.0",
    'author' : "Nupur",
    'category' : "Tools",
    'depends' : ['base','crm'],
    'update_xml' : [
        'lead_assign.xml'
    ],
    'data' : []
    'demo' : [

    ],
    'installable': True,
}

lead_assign.py

from openerp.osv import osv
from openerp.osv import fields
class idea_idea(osv.osv):
          _inherit = 'crm.lead'
          _columns = {
            'user_id' : fields.many2one('res.users','Salesperson')
          }
idea_idea()

lead_assign.xml

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="view_assign_lead1_form" model="ir.ui.view"/>
            <field name="name">salesperson_form</field>
            <field name="model">res.users</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Assign Leads">
                    <separator colspan="4" string="Do you really want to assign leads)?"/> 
                    <group>
                        <field name="user_id"/>
                    </group> 
                    <footer> 
                        <button name="assign_lead" string="Assign Leads" type="object" class="oe_highlight"/> or <button string="Cancel" class="oe_link" special="cancel"/> 
                    </footer> 
                </form>
            </field>
        </record>
        <record model="ir.actions.act_window" id="base.action_assign_lead_1">
            <field name="name">Assign Lead1</field>
            <field name="domain">[('id','in',active_ids)]</field>
            <field name="context">{"context dictionary (max 250 characters)"}</field>
            <field name="res_model">crm.lead</field>
            <field name="view_id">salesperson_form</field>
            <field name="view_type">form</field>
            <field name="view_mode">form,tree|tree,form|form|tree</field>
            <field name="target">new</field>
        </record>
        <record id="base.values_view_form_action" model="ir.values">
            <field name="name">Assign Lead1</field>
            <field name="action_id" ref="Assign Lead1"/>
            <field name="value_unpickle" eval="'ir.actions.act_window,' +ref('id_for_the_action"/>
            <field name="key">action</field>
            <field name="model_id" ref="crm.lead"/>
            <field name="model">crm.lead</field>
            <field name="key2">client_action_multi</field>
        </record>

    </data>
</openerp>
Imagine profil
Abandonează
Cel mai bun răspuns

step 1) Get Technical Features access right [from settings --> Users-->Select the logged in User check Technical Features check box]

step 2) restart openerp server

Step 3) update module list [settings --> Update Modules List]

Step 4) search by "not Installed tag" in installed Modules menu view

Imagine profil
Abandonează
Autor

How to get technical access right ?

Autor

Already have technical access right, logged in as administrator and followed the steps but cant find it

delete every thing from search box and the type not , you will see not installed is listing select it

then sure you will find it

Cel mai bun răspuns

Stupid question but, is your module in the addon_path ?

If it's the case. When you restart from a fresh database. Is your module accessible for installation?

Imagine profil
Abandonează
Autor

yay it is in the addon path, all other modules are accessible except this

and when you start from a fresh database, your module is not in the list too?

Related Posts Răspunsuri Vizualizări Activitate
3
iul. 25
2636
3
mai 25
4480
2
iun. 25
4995
0
iun. 21
2955
1
aug. 24
4257