Skip to Content
Menu
This question has been flagged
3 Replies
3393 Views

Hello, I'm using Openerp 7, I copied a wizard and tried to adapt it, but i had parse error on xml.

This is the architecture of my module :

My module 
 | wizard 
 | | __init__.py
 | | wizard.xml
 | __init__.py
 | __openerp__.py
 | analytic_account.py


account_analytic.py :

from osv import osv
from osv import fields

class AdquatWizard(osv.osv_memory):
_name = 'eggs.jasper.location.valo.wizard'
_description = 'adquat.valo.wizard'

_columns = {
'end_date': fields.date('End date'),
'sav': fields.boolean('SAV'),
'of': fields.boolean('OF'),
}

AdquatWizard()


wizard.xml :

      <record id="view_eggs_jasper_location_valo_wizard" model="ir.ui.view">
<field name="name">eggs.jasper.location.valo.wizard.form</field>
<field name="model">adquat.valo.new.wizard</field>
<field name="arch" type="xml">
<form string="Parametres pour valorisation du stock">
<field name="end_date"/>
<group colspan="4" col="6">
<button icon="terp-gtk-go-back-rtl" string="Lancer" name="launch" type="object"/>
<button icon="gtk-cancel" special="cancel" String="Annuler"/>
</group>
</form>
</field>
</record>


<!--action-->
<record id="action_valo_mensuelle" model="ir.actions.act_window">
<field name="name">Valo mensuelle</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<!-- <field name="view_id" ref="adquat_valo_mensuelle.view_adquat_valo_mensuelle_wizard"/>-->
<field name="view_id" ref="adquat_valo_mensuelle.view_eggs_jasper_location_valo_wizard"/>
<field name="target">new</field>
</record>

<!--Menu-->
<menuitem action="action_valo_mensuelle" id="action_valo_mensuelle"
parent="account.menu_analytic_accounting"
groups="analytic.group_analytic_accounting"/>


And i have AttributeError: 'nonetype' object has no attribute 'fields_view_get'

 , and parse error in the wizard near  <record id="view_eggs_jasper_location_valo_wizard" model="ir.ui.view">

  

I have doubts on the architecture, but less for the code itself because i copied it form an existant and working.

Thank you for your help !


Avatar
Discard

it's batter to provide traceback along with code

Author

Sorry i can't paste screenshots pictures :/

Best Answer

Hi Thomas:

Move the following line that has been commented out and place it outside the <record></record> tag.

<!--            <field name="view_id" ref="adquat_valo_mensuelle.view_adquat_valo_mensuelle_wizard"/>-->

Avatar
Discard
Related Posts Replies Views Activity
1
Dec 22
1646
1
Jun 24
956
0
May 17
4498
2
Dec 23
3849
0
Nov 16
4265