Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to make working relation in ir.property 'value' ?

By
M
on 8/6/13, 12:02 PM 2,332 views

Hi! I have installed report_webkit module for 7.0.9 v6apps.openerp.com/addon/621 , and installing it on 7.1 gives me some trouble, but after few changes i made it working, except one big error: ...

  File "C:\Program Files (x86)\OpenERP 7.0-20130708-231042\Server\server\.\openerp\osv\orm.py", line 2818, in _check_selection_field_value
except_orm: (u'ValidateError', u'The value "ir.webkit_header,6" for the field "ir_property.value_reference" is not in the selection')

..nothing interesting in trackback, some standard server orm track. in data.xml, the following record causes error(i've already modified it in many ways, but no effect, same error) :

    <record id="ir_property_webkitheaderdefault0" model="ir.property">
        <!--field name="fields_id" ref="field_ir_act_report_xml_webkit_header"/-->
        <field name="fields_id" search="[('model','=','ir.actions.report.xml'),('name','=','webkit_header')]"/>
        <field name="name">ir_property_webkitheaderdefault0<field/>
        <!--field eval=""""ir.header_webkit,0"""" name="value"/-->
        <field eval="'ir.header_webkit,'+str(ref('ir_header_webkit_basesample0'))" model="ir.header_webkit" name="value" />
    </record>

of course, i have ir_header_webkit_basesample0 record in ir_header_webkit table, defined before,in the same xml as above.

my ir_report.py in short:

class ir_actions_report_xml(orm.Model):
    _inherit = 'ir.actions.report.xml'
    _columns = {
        'webkit_header': fields.property( 'ir.header_webkit',
            type='many2one', relation='ir.header_webkit',
            string='Webkit Header', help="The header linked to the report",
            required=True),
        'webkit_debug': fields.boolean('Webkit debug',
            help="Enable the webkit engine debugger"),
        'report_webkit_data': fields.text('Webkit Template',
            help="This template will be used if the main report file is not found"),
        'precise_mode': fields.boolean('Precise Mode',
            help="This mode allow more precise element position as each object"
            " is printed on a separate HTML but memory and disk usage are wider.")
    }

i hope You can give me clue how to fix this, im struggling for few days now... i dont really know how to manage this ir_properties, even having example base modules... I appreciate any help :)

PS comments in xml are default module's author values, which didnt work anyway.

0
M
On 8/7/13, 6:25 AM

ok i make it working, by changing webkit_header to header_webkit in one place, but still i get new error: Unknown report type: webkit

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 8/6/13, 12:02 PM
Seen: 2332 times
Last updated: 3/16/15, 8:10 AM