pos: AttributeError: 'bool' object has no attribute 'id'

Bug #856501 reported by Open Tech
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Medium
OpenERP R&D Addons Team 3

Bug Description

Trying to install latest trunk version of the POS. Earlier i had installed POS 6.0 version which was working fine. But since the trunk version seems to have latest and more features so thought to upgrade to it. But when i install this one, get following error:

raise ValueError('No references to %s.%s' % (module, xml_id))
ValueError: No references to point_of_sale.group_pos_user

Looked the code:
view.xml has some 2 entries for group_pos_manager, group_pos_user.
But .py file doesn't have any reference to it.

Is it the reason of the error? How can we resolve it.

Related branches

Revision history for this message
Vishal Parmar(Open ERP) (vpa-openerp) wrote :

Hello amit sharma,

I have checked your issue with latest updated code with trunk and stable 6 both but I didn't face any problem at my end.

I have checked with following revision in trunk :

          server - 3643

          gtk-client - 1956

          addons - 5125

Would you please try again with latest updated code and informed us where you faced the problem.

Thanks and waiting for your reply.

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Open Tech (open.tech) wrote : Re: [Bug 856501] Re: ValueError: No references to point_of_sale.group_pos_user

Hello Vishal,

Thanks for looking into this matter. For some reason, it got installed at
later stage. I think what i did was as root deleted the point_of_sale
directory & pasted the trunk version and this resolved the installation
issue.

But it didnt resolve the issue completely. Now:

a) If I install the pos (trunk) version in the database "*with demo* data"
then I am not able to install the module & I get following error:
AttributeError: 'cursor' object has no attribute 'browse'

b) If I install the pos (trunk) version in the database "*with no demo data*"
then I am able to install the module. But when I go to sales order in POS
module & add sales lines then click on make payment button that time I get
following error:
AttributeError: 'cursor' object has no attribute 'browse'

I am not sure where i am doing wrong or how can I fix this bug.

Also, I am not sure how to check the revision of the gtk client, server &
addons. If you can guide me then I can provide you that data as well.

Thanks & appreciate your effort in supporting me :).
Amit

On Fri, Sep 23, 2011 at 3:42 AM, Vishal Parmar(Open ERP) <
<email address hidden>> wrote:

> Hello amit sharma,
>
> I have checked your issue with latest updated code with trunk and stable
> 6 both but I didn't face any problem at my end.
>
> I have checked with following revision in trunk :
>
> server - 3643
>
> gtk-client - 1956
>
> addons - 5125
>
> Would you please try again with latest updated code and informed us
> where you faced the problem.
>
> Thanks and waiting for your reply.
>
> ** Changed in: openobject-addons
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/856501
>
> Title:
> ValueError: No references to point_of_sale.group_pos_user
>
> Status in OpenERP Addons (modules):
> Incomplete
>
> Bug description:
> Trying to install latest trunk version of the POS. Earlier i had
> installed POS 6.0 version which was working fine. But since the trunk
> version seems to have latest and more features so thought to upgrade
> to it. But when i install this one, get following error:
>
> raise ValueError('No references to %s.%s' % (module, xml_id))
> ValueError: No references to point_of_sale.group_pos_user
>
> Looked the code:
> view.xml has some 2 entries for group_pos_manager, group_pos_user.
> But .py file doesn't have any reference to it.
>
> Is it the reason of the error? How can we resolve it.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openobject-addons/+bug/856501/+subscriptions
>

Revision history for this message
Vishal Parmar(Open ERP) (vpa-openerp) wrote : Re: ValueError: No references to point_of_sale.group_pos_user

Hello Amit Sharma,

I have checked again your issue with updated code and It is working fine at my end.

Our latest code is available on Launchpad and using bzr repository command you can download our latest code.

https://code.launchpad.net/~openerp

For bzr related command, you can get lot more help using bzr help command in terminal.

For more detail you can follow following link:

http://doc.bazaar.canonical.com/bzr-0.10/bzr_man.htm

Thanks and waiting for your reply.

Revision history for this message
Vishal Parmar(Open ERP) (vpa-openerp) wrote :

Hello Amit Sharma,

I have checked your issue with updated code but I didn't face any problem so currently I am closing this issue.

If you still face the problem then you can reopen this issue.

Thanks.

Changed in openobject-addons:
status: Incomplete → Invalid
Revision history for this message
Open Tech (open.tech) wrote : Re: [Bug 856501] Re: ValueError: No references to point_of_sale.group_pos_user

Hi Vishal,

I downloaded latest code via bazaar. But still issue remains the same.
 Since it is working at your end. I am not sure what is wrong going on at my
end. What I need to fix to make it running.

Any clue that you can provide or help me in analyzing the issue.

THanks
Amit

On Wed, Sep 28, 2011 at 2:52 AM, Vishal Parmar(Open ERP) <
<email address hidden>> wrote:

> Hello Amit Sharma,
>
> I have checked your issue with updated code but I didn't face any
> problem so currently I am closing this issue.
>
> If you still face the problem then you can reopen this issue.
>
> Thanks.
>
>
> ** Changed in: openobject-addons
> Status: Incomplete => Invalid
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/856501
>
> Title:
> ValueError: No references to point_of_sale.group_pos_user
>
> Status in OpenERP Addons (modules):
> Invalid
>
> Bug description:
> Trying to install latest trunk version of the POS. Earlier i had
> installed POS 6.0 version which was working fine. But since the trunk
> version seems to have latest and more features so thought to upgrade
> to it. But when i install this one, get following error:
>
> raise ValueError('No references to %s.%s' % (module, xml_id))
> ValueError: No references to point_of_sale.group_pos_user
>
> Looked the code:
> view.xml has some 2 entries for group_pos_manager, group_pos_user.
> But .py file doesn't have any reference to it.
>
> Is it the reason of the error? How can we resolve it.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openobject-addons/+bug/856501/+subscriptions
>

Revision history for this message
Vishal Parmar(Open ERP) (vpa-openerp) wrote : Re: ValueError: No references to point_of_sale.group_pos_user

Hello Amit Sharma,

Would you please provide me your end trace back which you have faced.

Thanks.

Revision history for this message
Open Tech (open.tech) wrote : Re: [Bug 856501] Re: ValueError: No references to point_of_sale.group_pos_user
Download full text (5.4 KiB)

Hi Vishal,

Please see the trace back as below:
Environment Information :
System : Linux-2.6.38-11-generic-i686-with-Ubuntu-11.04-natty
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Release: 11.04
Codename: natty
Operating System Release : 2.6.38-11-generic
Operating System Version : #50-Ubuntu SMP Mon Sep 12 21:18:14 UTC 2011
Operating System Architecture : 32bit
Operating System Locale : en_US.UTF8
Python Version : 2.7.1+
OpenERP-Client Version : 6.0.3
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent
call last):
  File "/usr/local/lib/python2.7/dist-packages/openerp-server/netsvc.py",
line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth,
params)
  File
"/usr/local/lib/python2.7/dist-packages/openerp-server/service/web_services.py",
line 599, in dispatch
    res = fn(db, uid, *params)
  File "/usr/local/lib/python2.7/dist-packages/openerp-server/osv/osv.py",
line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/openerp-server/osv/osv.py",
line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/openerp-server/osv/osv.py",
line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File
"/usr/local/lib/python2.7/dist-packages/openerp-server/addons/base/module/wizard/base_module_upgrade.py",
line 98, in upgrade_module
    _db, pool = pooler.restart_pool(cr.dbname, update_module=True)
  File "/usr/local/lib/python2.7/dist-packages/openerp-server/pooler.py",
line 60, in restart_pool
    return get_db_and_pool(db_name, force_demo, status,
update_module=update_module)
  File "/usr/local/lib/python2.7/dist-packages/openerp-server/pooler.py",
line 39, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File
"/usr/local/lib/python2.7/dist-packages/openerp-server/addons/__init__.py",
line 883, in load_modules
    processed_modules.extend(load_module_graph(cr, graph, status,
report=report, skip_modules=processed_modules))
  File
"/usr/local/lib/python2.7/dist-packages/openerp-server/addons/__init__.py",
line 752, in load_module_graph
    load_demo_xml(cr, m, idref, mode)
  File
"/usr/local/lib/python2.7/dist-packages/openerp-server/addons/__init__.py",
line 656, in load_demo_xml
    tools.convert_xml_import(cr, m, fp, idref, mode=mode, noupdate=True,
**kwargs)
  File
"/usr/local/lib/python2.7/dist-packages/openerp-server/tools/convert.py",
line 975, in convert_xml_import
    obj.parse(doc.getroot())
  File
"/usr/local/lib/python2.7/dist-packages/openerp-server/tools/convert.py",
line 865, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File
"/usr/local/lib/python2.7/dist-packages/openerp-server/tools/convert.py",
line 832, in _tag_record
    id = self.pool.get('ir.model.data')._update(cr, self.uid, rec_model,
self.module, res, rec_id or False, not self.isnoupdate(data_node),
noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
  File
"/usr/local/lib/python2.7/dist-packages/openerp-server/addons/base/ir/ir_model.py",
line 691, in _update
    res_id =...

Read more...

Revision history for this message
Amit Parik (amit-parik) wrote : Re: AttributeError: 'bool' object has no attribute 'id'

Hello,

When I have make the payment from POS without demo data I have faced the following traceback.

Traceback (most recent call last):
  File "/home/amp/workspace/trunk6/server/openerp/wsgi.py", line 71, in xmlrpc_return
    result = openerp.netsvc.dispatch_rpc(service, method, params)
  File "/home/amp/workspace/trunk6/server/openerp/netsvc.py", line 328, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/amp/workspace/trunk6/server/openerp/service/web_services.py", line 568, in dispatch
    res = fn(db, uid, *params)
  File "/home/amp/workspace/trunk6/server/openerp/osv/osv.py", line 116, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/amp/workspace/trunk6/server/openerp/osv/osv.py", line 170, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/amp/workspace/trunk6/server/openerp/osv/osv.py", line 161, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/amp/workspace/trunk6/addons/point_of_sale/wizard/pos_payment.py", line 49, in check
    order_obj.add_payment(cr, uid, active_id, data, context=context)
  File "/home/amp/workspace/trunk6/addons/point_of_sale/point_of_sale.py", line 263, in add_payment
    and order.partner_id.property_account_receivable.id or account_def.id or curr_c.account_receivable.id
AttributeError: 'bool' object has no attribute 'id'

I am confirming this bug for this traceback.

Thanks.

summary: - ValueError: No references to point_of_sale.group_pos_user
+ AttributeError: 'bool' object has no attribute 'id'
Changed in openobject-addons:
status: Invalid → New
Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Medium
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Ujjvala Collins (uco-openerp) wrote :

Hello,

The fix for "AttributeError" mentioned in the last comment has been fixed on lp:~openerp-dev/openobject-addons/trunk-bug-856501-uco with revision : 5236 <email address hidden>.

It will be merged into trunk-addons soon.

We also have not encountered other errors mentioned by Amit Sharma.

Thanks for reporting.
Ujjvala

Changed in openobject-addons:
status: In Progress → Fix Committed
Changed in openobject-addons:
milestone: none → 6.1
summary: - AttributeError: 'bool' object has no attribute 'id'
+ pos: AttributeError: 'bool' object has no attribute 'id'
Revision history for this message
Open Tech (open.tech) wrote : Re: [Bug 856501] Re: AttributeError: 'bool' object has no attribute 'id'

Hi,

I changed the point_of_sale.py as per the revisions 5236, 5237, 5238. My
observations are as below:
situation 1
1. Created fresh database with demo data - done
2. Install Point of sale - Received error "AttributeError: 'cursor' object
has no attribute 'pool'"
3. Tried reinstall Point of sale - Received error "ValueError: No references
to point_of_sale.group_pos_user"
4. Tried for third time reinstall Point of sale - Received error
"ValueError: No references to point_of_sale.group_pos_user"

situation2
1. Created fresh database with no demo data - done
2. Install Point of sale - installed properly
3. Tried to add daily operations sales order & make the payment. It is
asking for Journal

So it seems like working for no demo data database but not with demo data.
Since it is working at your end, I am wondering where & what I am doing
wrong.
My tracebacks for situation 1 are as enclosed.

Thanks
Amit

On Fri, Sep 30, 2011 at 1:15 AM, Mustufa Rangwala (Open ERP) <
<email address hidden>> wrote:

> ** Changed in: openobject-addons
> Milestone: None => 6.1
>
> ** Summary changed:
>
> - AttributeError: 'bool' object has no attribute 'id'
> + pos: AttributeError: 'bool' object has no attribute 'id'
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/856501
>
> Title:
> pos: AttributeError: 'bool' object has no attribute 'id'
>
> Status in OpenERP Addons (modules):
> Fix Committed
>
> Bug description:
> Trying to install latest trunk version of the POS. Earlier i had
> installed POS 6.0 version which was working fine. But since the trunk
> version seems to have latest and more features so thought to upgrade
> to it. But when i install this one, get following error:
>
> raise ValueError('No references to %s.%s' % (module, xml_id))
> ValueError: No references to point_of_sale.group_pos_user
>
> Looked the code:
> view.xml has some 2 entries for group_pos_manager, group_pos_user.
> But .py file doesn't have any reference to it.
>
> Is it the reason of the error? How can we resolve it.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openobject-addons/+bug/856501/+subscriptions
>

Revision history for this message
Ujjvala Collins (uco-openerp) wrote :

Hello Amit,

I have checked your problem, and I could reproduce the said error which you've mentioned when installing POS with demo data.

Actually the problem is you are using stable 6.0 (server and addons) and if I am not mistaken you have only replaced the point_of_sale module which is not correct. If you want to use the latest trunk version of point_of_sale then you must use all the trunk series for server, client and addons. It will solve your problem.

Can you please check with latest code and let us know?

Thanks,
Ujjvala

Revision history for this message
Open Tech (open.tech) wrote : Re: [Bug 856501] Re: pos: AttributeError: 'bool' object has no attribute 'id'
Download full text (3.5 KiB)

Hi Ujjvala,

You are right I am using 6.0.3 stable version. As from the download section
that was the latest one.
Now I downloaded server, client & addons from
http://nightly.openerp.com/6.1-dev/
I just have few questions may be trivial ones:

1. Is http://nightly.openerp.com/6.1-dev/ the right location to download &
use?
2. In the current & latest installation using latest dev build server is
using the addons folder at the following location:

/usr/local/lib/python2.7/dist-packages/openerp_server-6.1_dev-py2.7.egg/openerp/addons
    how do I connect the server to the downloaded trunk version of the
addons (lp:~openerp/openobject-addons/trunk)?
3. Location
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-856501-ucoshows
the revision history as:
    Recent Revisions
    5238. By Ujjvala Collins (OpenERP) 4 hours ago
        [IMP] point_of_sale: Small improvements.
    5237. By Ujjvala Collins (OpenERP) 4 hours ago
        [IMP] point_of_sale: Improved string.
    5236. By Ujjvala Collins (OpenERP) 6 hours ago
        [FIX] point_of_sale: Fixed AttributeError on Make Payment wizard
when no demo data loaded.

   While if I download the same by using Bazaar Explorer then same revisions
for the addons are as below:
   5238. By Launchpad Translations on behalf of openerp
       Launchpad automatic translations update.

   5237. By Antony Lesuisse
      [IMP] audittrail cleanup and speedup
      - test for auditrail before anything else
      - dont allocate a different cursor

   5236. By niv-openerp
     [fix] obvious bug, field used in a on_change but not declared in the
view Antony Lesuisse

and Point of sale downloaded by bazaar doesnt have the changes made by
Ujjavla.

4. Suppose after 1 month I want use the latest dev version with latest
revisions of client, server, web. Then what will be the procedure to upgrade
the latest dev version over older dev version?

Please help.

Thanks
Amit

On Fri, Sep 30, 2011 at 4:04 AM, Ujjvala Collins (OpenERP)
<email address hidden>wrote:

> Hello Amit,
>
> I have checked your problem, and I could reproduce the said error which
> you've mentioned when installing POS with demo data.
>
> Actually the problem is you are using stable 6.0 (server and addons) and
> if I am not mistaken you have only replaced the point_of_sale module
> which is not correct. If you want to use the latest trunk version of
> point_of_sale then you must use all the trunk series for server, client
> and addons. It will solve your problem.
>
> Can you please check with latest code and let us know?
>
> Thanks,
> Ujjvala
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/856501
>
> Title:
> pos: AttributeError: 'bool' object has no attribute 'id'
>
> Status in OpenERP Addons (modules):
> Fix Committed
>
> Bug description:
> Trying to install latest trunk version of the POS. Earlier i had
> installed POS 6.0 version which was working fine. But since the trunk
> version seems to have latest and more features so thought to upgrade
> to it. But when i install this one, get following error:
>
> raise ValueError('No references to %s.%s' % (module, x...

Read more...

Revision history for this message
Ujjvala Collins (uco-openerp) wrote :

Hello Amit,

We are sorry but we cannot entertain your queries here as it is not related to the bug.

But you can post all queries on : https://answers.launchpad.net/openobject-addons.

Hope it helps.

Thanks,
Ujjvala

Revision history for this message
Open Tech (open.tech) wrote :

Hi Ujjvala,

Sure I will post these queries on: https://answers.launchpad.net.

But I think query no. 3 is directly related to the bug. The reason I asked
here is just for the little faster response.

Thanks again for the fast support you provided on the bug.

Thanks
Amit

On Sun, Oct 2, 2011 at 10:54 PM, Ujjvala Collins (OpenERP)
<email address hidden>wrote:

> Hello Amit,
>
> We are sorry but we cannot entertain your queries here as it is not
> related to the bug.
>
> But you can post all queries on : https://answers.launchpad.net
> /openobject-addons.
>
> Hope it helps.
>
> Thanks,
> Ujjvala
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/856501
>
> Title:
> pos: AttributeError: 'bool' object has no attribute 'id'
>
> Status in OpenERP Addons (modules):
> Fix Committed
>
> Bug description:
> Trying to install latest trunk version of the POS. Earlier i had
> installed POS 6.0 version which was working fine. But since the trunk
> version seems to have latest and more features so thought to upgrade
> to it. But when i install this one, get following error:
>
> raise ValueError('No references to %s.%s' % (module, xml_id))
> ValueError: No references to point_of_sale.group_pos_user
>
> Looked the code:
> view.xml has some 2 entries for group_pos_manager, group_pos_user.
> But .py file doesn't have any reference to it.
>
> Is it the reason of the error? How can we resolve it.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openobject-addons/+bug/856501/+subscriptions
>

Changed in openobject-addons:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.