Hi everyone!
I'm doing a test to create a new widget, but doesn't work...
I added follow lines in
"tryton/gui/window/view_form/view/form_gtk/parser.py":
...
from richtextbox import RichTextBox
WIDGETS_TYPE = {
...
'richtext': (RichTextBox, 1, True, True),
}
After i created the file richtextbox.py with some content of textbox.py,
changing where the name of class was 'TextBox' to 'RichTextBox'.
So, in the file "trytond/modules/product/product.xml" i changed the line:
<field name="description" colspan="4"/>
to
<field name="description" widget="richtext" colspan="4"/>
When I update the module product gives the following error: Invalid XML for
view!
Traceback error:
[Sun Jun 19 12:24:20 2011] ERROR:ir:Invalid xml view:
<string>:17:0:ERROR:RELAXNGV:RELAXNG_ERR_INVALIDATTR: Invalid attribute
widget for element field
<data>
<xpath
expr="/form"
position="replace_attributes">
<form string="Products"/>
</xpath>
<xpath
expr="/form/notebook/page[@id="general"]/label[@name="type"]"
position="before">
<label name="code"/>
<field name="code"/>
</xpath>
<xpath
expr="/form/notebook/page[@id="general"]"
position="inside">
<separator name="description" colspan="4"/>
<field name="description" widget="richtext"
colspan="4"/>
</xpath>
</data>
[Sun Jun 19 12:24:20 2011] ERROR:convert:Error while parsing xml file:
In tag record: model ir.ui.view with id product_view_form.
Can anyone help me with this?
Rodrigo Hübner
--
[email protected] mailing list