Salve a tutti,
sto provando a creare un nuovo modulo da zero su un DB vuoto allo scopo di aggiungere una nuova tabella.
Ho seguito i tutorials ed ho guardato come sono fatti i moduli esistenti per capire come creare i files necessari; ma al termine provando ad aggiungere il modulo alla procedura (dopo che il modulo viene correttamente rilevato con l'aggiornamento) mi appare il seguente errore :
File "/home/oeadmin/lp/openerp/trunk/server/bin/addons/base/ir/ir_model.py", line 602, in _get_id
raise ValueError('No references to %s.%s' % (module, xml_id))
ValueError: No references to GO_marketing_data_building.model_GO_marketing_data_building
mi sembra di aver capito che il problema si riferisce a quanto presente nei files :
security/ir.model.access.csv
GO_marketing_data_building_view.xml
in quanto nel primo vengono specificate le informaioni sui modelli, e nel secondo vengono richiati i modelli stessi sia per le viste che per le azioni.
Riguardando i files in questione e paragonandoli con altri di altri moduli funzionanti non vedo errori formali quindi immagino che il problema sia da qualche altra parte.
Per favore potreste darmi un suggerimento ? Grazie.
<?xml version="1.0"?>
<openerp>
<data>
<!-- Marketing Data Building Form View-->
<record model="ir.ui.view" id="view_GO_marketing_data_building_form">
<field name="name">GO.marketing.data.building.form</field>
<field name="model">GO.marketing.data.building</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Informazioni di marketing - Edilizia">
<field name="company_name" select="1" required="1"/>
<field name="resource_id" select="1" required="1" widget="selection"/>
<field name="type_id" select="1" required="1" widget="selection"/>
<newline/>
<separator colspan="4" string="Informazioni economiche"/>
<field name="sales_production"/>
<field name="backlog"/>
<field name="secured_contracts"/>
<field name="net_income"/>
<newline/>
<field name="business_type_0"/>
<field name="business_type_1"/>
<field name="business_type_2"/>
<field name="business_type_3"/>
<newline/>
<field name="business_type_4"/>
<field name="business_type_5"/>
<field name="business_type_6"/>
<field name="business_type_7"/>
<newline/>
<field name="business_type_8"/>
<field name="business_type_9"/>
<newline/>
<separator colspan="4" string="Dati anagrafici azienda"/>
<field name="vat"/>
<field name="fiscalcode"/>
<newline/>
<field name="address" colspan="4"/>
<newline/>
<field name="city"/>
<field name="zip"/>
<field name="province"/>
<field name="region"/>
<newline/>
<field name="phone"/>
<field name="email"/>
<field name="website"/>
<newline/>
<separator colspan="4" string="Dati contatto"/>
<field name="contact_name"/>
<field name="contact_phone"/>
<field name="contact_email"/>
<separator colspan="4" string="Note"/>
<field name="note" nolabel="1" colspan="4"/>
<separator colspan="4" string="Informazioni aggiuntive"/>
<field name="info" nolabel="1" colspan="4"/>
</form>
</field>
</record>
<!-- Marketing Data Building Search View-->
<record model="ir.ui.view" id="view_GO_marketing_data_building_search">
<field name="name">GO.marketing.data.building.search</field>
<field name="model">GO.marketing.data.building</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Informazioni di marketing - Edilizia">
<group col="10" colspan="4">
<field name="company_name"/>
<field name="resource_id" widget="selection"/>
<field name="type_id" widget="selection"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="14">
<filter string="Commerciale" icon="terp-personal" domain="[]" context="{'group_by':'resource_id'}"/>
</group>
</search>
</field>
</record>
<!-- Marketing Data Building Tree View -->
<record model="ir.ui.view" id="view_GO_marketing_data_building_tree">
<field name="name">GO.marketing.data.building.tree</field>
<field name="model">GO.marketing.data.building</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Informazioni di marketing - Edilizia">
<field name="company_name"/>
<field name="resource_id"/>
<field name="city"/>
<field name="type_id" invisible="1"/>
<field name="sales_production"/>
<field name="backlog"/>
<field name="secured_contracts"/>
<field name="net_income"/>
</tree>
</field>
</record>
<!-- Marketing Data Building Action -->
<record model="ir.actions.act_window" id="action_GO_marketing_data_building">
<field name="name">GO Marketing Data Building</field>
<field name="res_model">GO.marketing.data.building</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_GO_marketing_data_building_search"/>
</record>
<menuitem name="Ricerche di mercato" parent="base.menu_sales" id="menu_GO_marketing_research"/>
<menuitem
name="Edilizia"
parent="menu_GO_marketing_research"
id="GO_marketing_building"
action="action_GO_marketing_data_building"
groups="base.group_sale_salesman,base.group_sale_manager"/>
</data>
</openerp>
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_GO_marketing_data_building_user","GO.marketing.data.building user","model_GO_marketing_data_building","base.group_sale_salesman",1,1,0,0
"access_GO_marketing_data_building_manager","GO.marketing.data.building manager","model_GO_marketing_data_building","base.group_sale_manager",1,1,1,1