Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
4781 Lượt xem

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>
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

How to get technical access right ?

Tác giả

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

Câu trả lời hay nhất

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?

Ảnh đại diện
Huỷ bỏ
Tác giả

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?

Câu trả lời hay nhất

Try this:

try to create module but it is not show in openerp

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 7 25
2631
3
thg 5 25
4470
2
thg 6 25
4975
0
thg 6 21
2951
1
thg 8 24
4251