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

AttributeError: 'module' object has no attribute 'model'

By
charlesraj
on 5/30/13, 10:02 AM 2,688 views

i created a new module while installing it the following error will be shown. Client Traceback (most recent call last): File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\openerp\addons\web\http.py", line 204, in dispatch File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\openerp\addons\web\controllers\main.py", line 1133, in call_button File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\openerp\addons\web\controllers\main.py", line 1121, in _call_kw File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\openerp\addons\web\session.py", line 43, in proxy File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\openerp\addons\web\session.py", line 31, in proxy_method File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\openerp\addons\web\session.py", line 104, in send

Server Traceback (most recent call last): File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\openerp\addons\web\session.py", line 90, in send File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server.\openerp\netsvc.py", line 293, in dispatch_rpc File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server.\openerp\service\web_services.py", line 626, in dispatch File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server.\openerp\osv\osv.py", line 188, in execute_kw File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server.\openerp\osv\osv.py", line 131, in wrapper File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server.\openerp\osv\osv.py", line 197, in execute File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server.\openerp\osv\osv.py", line 185, in execute_cr File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\openerp\addons\base\module\module.py", line 424, in button_immediate_install File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\openerp\addons\base\module\module.py", line 475, in _button_immediate_function File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server.\openerp\pooler.py", line 39, in restart_pool File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server.\openerp\modules\registry.py", line 218, in new File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server.\openerp\modules\loading.py", line 345, in load_modules File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server.\openerp\modules\loading.py", line 256, in load_marked_modules File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server.\openerp\modules\loading.py", line 188, in load_module_graph File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server.\openerp\modules\loading.py", line 76, in <lambda> File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server.\openerp\modules\loading.py", line 124, in _load_data File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server.\openerp\tools\convert.py", line 954, in convert_xml_import File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server.\openerp\tools\convert.py", line 847, in parse File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server.\openerp\tools\convert.py", line 814, in _tag_record File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\openerp\addons\base\ir\ir_model.py", line 963, in _update File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\openerp\addons\base\ir\ir_ui_view.py", line 101, in create KeyError: 'arch' ... in the eclipse IDE i tried to run the code there should displayed the error like this. .Traceback (most recent call last): File "C:\Users\Jyothish\workspace\new\src\price\price.py", line 1, in <module> from osv import fields,osv ImportError: No module named osv

Please post the code of file price.py

Borni DHIFI
on 5/30/13, 10:05 AM

from openerp.osv import fields,osv

class price(osv.model): _name = "x_product" _description ="productlist" _coloum = { 'x_product': fields.many2one('Product.product','product'), 'x_price':fields.float('price',required="false"), } price() def onchange_pricelist_id(self, cr, uid, ids, pricelist_id, order_lines, context=None): context = context or {} if not pricelist_id: return {} value = { 'currency_id': self.pool.get('product.pricelist').browse(cr, uid, pricelist_id, context=context).curren

charlesraj
on 5/30/13, 10:07 AM

ncy_id.id } if not order_lines: return {'value': value} warning = { 'title': _('Pricelist Warning!'), 'message' : _('If you change the pricelist of this order (and eventually the currency), prices of existing order lines will not be updated.') } return {'warning': warning, 'value': value}

charlesraj
on 5/30/13, 10:09 AM
0

Borni DHIFI

--Borni DHIFI--
5102
| 6 8 9
Tunis, Tunisia
--Borni DHIFI--

Techno Functional Consultant Odoo(OpenERP) 

http://www.linkedin.com/in/borni

Skype : dhifi.borni

Borni DHIFI
On 5/30/13, 10:17 AM

ok now a new error occured .....AssertionError: The ID "customerorder.form" refers to an uninstalled module..

charlesraj
on 5/30/13, 10:38 AM
0

Ghanshyam Prajapati

--Ghanshyam Prajapati--
1377
| 4 4 8
Pune, India
--Ghanshyam Prajapati--
OpenERP Developer
Ghanshyam Prajapati
On 5/30/13, 10:24 AM

replace class price(osv.model): with class price(osv.Model):

replace _coloum with _columns

Hope it work for you.

New error while try to install the module.AssertionError: The ID "customerorder.form" refers to an uninstalled module

charlesraj
on 5/30/13, 10:44 AM

that problem is ok. but another more error will displayed while installing the module. like this.

charlesraj
on 5/31/13, 3:30 AM

File "C:\Program Files\OpenERP 7.0-20130509-231040\Server\server\openerp\addons\base\ir\ir_ui_view.py", line 101, in create KeyError: 'arch'

charlesraj
on 5/31/13, 3:30 AM

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

0 follower(s)

Stats

Asked: 5/30/13, 10:02 AM
Seen: 2688 times
Last updated: 3/16/15, 8:10 AM