Open ERP Forum
   IndexIndex   SearchSearch     RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   RSSRSS   Mailing ListMailing List   Log inLog in 

Error after installing module
 
Post new topic   Reply to topic    Open Object Forum Index -> General discussion
View previous topic :: View next topic  
Author Message
lleto



Joined: 28 Nov 2007
Posts: 106

PostPosted: Tue Jul 21, 2009 6:50 pm    Post subject: Error after installing module Reply with quote

Hi,

did not use TinyERP for a year since I killed my invoicing capabilities on my last server. Decided to give it a go again. Installed base system, config and started adding products. All is well so far. Then added 'product_extended' to get cost prices based on BOM's.

After the module I now get an error in the web_client:
------------------------------
malformed view for: product.product
duplicate field: qty_available
------------------------------

And on the server after starting it with -d <db> -u base:
[2009-07-21 18:47:37,678] ERROR:init:[02]: There should be some relation that points to this resource
[2009-07-21 18:47:37,678] ERROR:init:[03]: You should manually fix this and restart --update=module
[2009-07-21 18:47:37,679] INFO:init:Deleting 115@ir.module.module
[2009-07-21 18:47:37,681] ERROR:init:[01]: Could not delete id: 115 of model ir.module.module
[2009-07-21 18:47:37,682] ERROR:init:[02]: There should be some relation that points to this resource
[2009-07-21 18:47:37,682] ERROR:init:[03]: You should manually fix this and restart --update=module
[2009-07-21 18:47:37,682] INFO:init:Deleting 113@ir.module.module
[2009-07-21 18:47:37,685] ERROR:init:[01]: Could not delete id: 113 of model ir.module.module
[2009-07-21 18:47:37,685] ERROR:init:[02]: There should be some relation that points to this resource
[2009-07-21 18:47:37,685] ERROR:init:[03]: You should manually fix this and restart --update=module
[2009-07-21 18:47:37,687] WARNING:init:object tinythunderbird.partner (Thunderbid mails) has no access rules!
[2009-07-21 18:47:37,843] INFO:init:[01]: Assertions report:
[2009-07-21 18:47:37,843] INFO:init:[02]: Level success failed
[2009-07-21 18:47:37,844] INFO:init:[03]: error 1 0
[2009-07-21 18:47:37,844] INFO:init:[04]: total 1 0
[2009-07-21 18:47:37,844] INFO:init:[05]: end of report (1 assertion(s) checked)
Traceback (most recent call last):
File "./openerp-server.py", line 108, in <module>
pooler.get_db_and_pool(db, update_module=tools.config['init'] or tools.config['update'])
File "/usr/lib/python2.5/site-packages/openerp-server/pooler.py", line 40, in get_db_and_pool
addons.load_modules(db, force_demo, status, update_module)
File "/usr/lib/python2.5/site-packages/openerp-server/addons/__init__.py", line 745, in load_modules
pool.get(rmod).unlink(cr, uid, [rid])
File "/usr/lib/python2.5/site-packages/openerp-server/addons/base/module/module.py", line 203, in unlink
_('You try to remove a module that is installed or will be installed'))
osv.orm.except_orm: ('Error', 'You try to remove a module that is installed or will be installed')

I'm guessing I have to manually update/alter something in the db but have no clue what....

Thanks for the help.

Arnold.
Back to top
View user's profile Send private message
lleto



Joined: 28 Nov 2007
Posts: 106

PostPosted: Tue Jul 21, 2009 7:34 pm    Post subject: Reply with quote

I don't understand this... how is anyone able to work with openerp?

Decided to drop the entire db. Created a new db. Went through initial setup. Added modules 'product_extended', 'thunderbird', 'l10_nl'. All went fine.

Now I go to the product list want to add a new product:
Invalid view, duplicate field: qty_available


on an empty database... did an -u base -d <dbname>

Still the same error... The application looks very nice but is seems you cannot run this in a normal way and most certainly not in a way that I would base my entire company on...

Arnold.
Back to top
View user's profile Send private message
hda



Joined: 03 Dec 2007
Posts: 1376
Location: Belgium

PostPosted: Wed Jul 22, 2009 7:28 am    Post subject: Reply with quote

Hello Arnold,

Problem fixed in product_extended module you can checkout latest revision from launchpad.

https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-extra-addons
_________________
OpenERP=Easier, Adaptable, Affordable, Modular
Back to top
View user's profile Send private message
lleto



Joined: 28 Nov 2007
Posts: 106

PostPosted: Wed Jul 22, 2009 9:56 am    Post subject: Reply with quote

Hi HDA,

that did the trick. Is there any wise policy with regards to updates from launchpad? I've now created a folder under /usr/src where I update the repository.

What is the best way to go about updating or installing modules? One of my main problems with openerp so far has been that I find it very hard to keep it's integrety during upgrades or installing extra modules.

Probably the best way is:
1. copy entire directory '/usr/lib/python2.5/site-packages/openerp-server/addons/' as backup.
2. make a dump of the database 'pg_dump dbname | gzip > filename.gz'
3. do I need to copy/backup other directories?
4. install/update module
5. restart server
6. restart web client

If something does not work restore by:
1. stop server and client
2. copy backup files to '/usr/lib/python2.5/site-packages/openerp-server/addons/'
3. restore database 'gunzip -c filename.gz | psql dbname'
4. start server with -u base -d dbname
5. start client

Would this be a safe way to go about upgrades/changes to the system?

Arnold.
Back to top
View user's profile Send private message
hda



Joined: 03 Dec 2007
Posts: 1376
Location: Belgium

PostPosted: Wed Jul 22, 2009 10:31 am    Post subject: Reply with quote

No need to copy addons every time.
you can run server like this.
./openerp-server.py --addons-path=addons_path
If you want to use module from extra addons then make a link of that module and copy it into addons.
so whenever you update addons It will point to that updated source and no need to copy and backup addons everytime.
_________________
OpenERP=Easier, Adaptable, Affordable, Modular
Back to top
View user's profile Send private message
numerigraphe



Joined: 21 Oct 2008
Posts: 104

PostPosted: Fri Jul 24, 2009 9:28 am    Post subject: Reply with quote

One of the nice things about Launchpad is that you can revert all the changes you make.
Maybe the simplest way to be safe is to use bzr merge each time you upgrade, then bzr revert if you have problems, or bzr commit if it's OK. You can also bzr uncommit and revert if you see problems later on.

Now if you're just evaluating OpenERP, getting the stable files from openerp.com yould spare you the upgrade trouble.

IMHO you should consider consider the 5.0 branches from Launchpad only for production systems. That will let you get numerous bugfixes (and sometimes a few regressions, alas), but it takes time.
The trunk is the developer's domain and is often unusable, please don't bother.
Back to top
View user's profile Send private message
lleto



Joined: 28 Nov 2007
Posts: 106

PostPosted: Fri Jul 24, 2009 10:54 am    Post subject: Reply with quote

Hi,

thanks for the tips. My main 'gripe' with Tiny in the past was that it seems very possible to upset the entire system by installing or upgrading a module. I have not used Tiny in the last 1 year, beacuse of that.

Right now I use bzr to pull files into a directory outside of openerp and just copy the dirs I need. This seems to obstruct 'your' method of reverting and comitting, but gives me the control over which modules are upgraded and which not.

My main fear is that installing new modules will disrupt the database (or could potentially) which makes it very difficult to revert. Am I correct in believing that?

Arnold.
Back to top
View user's profile Send private message
numerigraphe



Joined: 21 Oct 2008
Posts: 104

PostPosted: Fri Jul 24, 2009 11:22 am    Post subject: Reply with quote

For me I never really broke a setup by just installing a module.
It's true I'm very cautious when I install a module, of only because it can't be uninstalled in most cases.
My humble advise is to never mix addons made different versions. For example, I use v5.0 and Launchapad has all the modules for this version (the branches have 5.0 in their name).
Installing a module from a zip file or the trunk is asking for trouble IMHO.

Anyway you can revert if you backup the database before you instal a module. Just restore from the backup if it goes wrong.

Lionel.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Open Object Forum Index -> General discussion All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum