I try to make module medical. This is error i found. Can anybody help
me to resolve this module.
Traceback (most recent call last):
File "/trytond/protocols/netrpc.py", line 51, in run
res = dispatch(host, port, 'NetRPC', *msg)
File "/trytond/protocols/dispatcher.py", line 145, in dispatch
res = getattr(obj, method)(*args, **kargs)
File "/trytond/wizard/wizard.py", line 119, in execute
action_res = getattr(self, action)(data)
File "/trytond/ir/module/module.py", line 519, in _upgrade_module
pool.init(update=True, lang=lang)
File "/trytond/pool.py", line 127, in init
lang=lang)
File "/trytond/modules/__init__.py", line 435, in load_modules
load_module_graph(graph, pool, lang)
File "/trytond/modules/__init__.py", line 253, in load_module_graph
tryton_parser.parse_xmlstream(fp)
File "/trytond/convert.py", line 432, in parse_xmlstream
self.sax_parser.parse(source)
File "/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "/xml/sax/expatreader.py", line 301, in start_element
self._cont_handler.startElement(name, AttributesImpl(attrs))
File "/trytond/convert.py", line 450, in startElement
self.taghandler.startElement(name, attributes)
File "/trytond/convert.py", line 61, in startElement
action_id = self.mh.get_id(values['action'])
File "/trytond/convert.py", line 496, in get_id
".".join([module,xml_id]))
Exception: Reference to medicaled.act_medical_world_form not found
This is my coding.
medicaled.xml
<?xml version="1.0"?>
<tryton>
<data>
<menuitem name="Emerging Diseases" id="menu_medical_world_form"
action="act_medical_world_form"/>
<record model="ir.ui.view" id="medical_world_view_tree">
<field name="model">medicaled.medicaled</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Physician Information">
<field name="disease"/>
<field name="transmission"/>
<field name="highly_contagious"/>
<field name="organism"/>
</tree>
]]>
</field>
</record>
<record model="ir.ui.view" id="medical_world_view_form">
<field name="model">medicaled.medicaled</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Emerging Diseases">
<group string="Disease">
<label name="disease"/>
<field name="disease"
required="1"/>
</group>
<newline/>
<group string="Misc">
<label name="patient"/>
<field name="patient"/>
<label
name="transmission"/>
<field
name="transmission"/>
<label
name="highly_contagious"/>
<field
name="highly_contagious"/>
<label name="organism"/>
<field name="organism"/>
<newline/>
<separator
string="Notes" colspan="4"></separator>
<newline/>
<label name="notes"/>
<field name="notes"
colspan="4" nolabel="1"/>
</group>
</form>
]]>
</field>
</record>
<record model="ir.action.act_window"
id="act_medical_world_form">
<field name="name">Emerging Diseases</field>
<field name="res_model">medicaled.medicaled</field>
</record>
<record model="ir.action.act_window.view"
id="act_medicaled_world_form_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="medicaled_world_view_tree"/>
<field name="act_window" ref="act_medical_world_form">
</record>
<record model="ir.action.act_window.view"
id="act_medicaled_form_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="medicaled_world_view_form"/>
<field name="act_window" ref="act_medical_world_form"/>
<menuitem parent="menu_medical_world" sequence="1"
id="menu_medical_world_form" icon="tryton-list"
action="act_medical_world_form"/>
</data>
</tryton>
__init__.py
from medicaled import *
medicaled.py
from trytond.model import ModelView, ModelSQL, fields
class emerging_disease(ModelSQL, ModelView):
'EmergingDisease'
_name = 'medicaled.medicaled'
_description = __doc__
_columns = {
'patient' : fields.Char ('First Case',help="First identified and
confirmed case"),
'disease' : fields.Char ('Disease'),
'region' : fields.Char ('Region'),
'transmission' : fields.Selection([
('water', 'Water'),
('soil', 'Soil'),
('fluids', 'Body Fluids'),
],'Transmission',required=True) ,
'organism' : fields.Selection([
('bacteria', 'bacteria'),
('virus', 'virus'),
('parasite', 'parasite'),
],'Organism',required=True),
'highly_contagious' : fields.Boolean ('Highly Contagious'),
'brief_info' : fields.Char ('Brief description', size=256),
'notes' : fields.Text ('Notes'),
}
_defaults = {
'highly_contagious': lambda * a : True
}
emerging_disease ()
__tryton__.py
{
'name' : 'GNU Health : Emerging Diseases DEMO module',
'version' : '1.0',
'author' : 'GNU Solidario',
'category' : 'Generic Modules/Others',
'website' : 'http://medical.sourceforge.net',
'description' : 'Hello',
'depends' : [
'ir',
],
'xml' : [
'medicaled.xml',
],
'translation': [
],
}
--
[email protected] mailing list