sale_margin error, cannot add products to sales order

Bug #800721 reported by Mihai Satmarean
8
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

Hi

Lately I wanted to give every client its own price list
My company has Currency RON (romanian lei)
Some of the clients have currency EUR

So I have a pricelist - sale pricelist - in eur, with setting Public price of the product

Create a new sales order, added first product, after that saved the sale order.

I assigned the price list newly created this to a the client in the sales order client and go to add new product.

Now, no matter what pricelist I select, the error is this:

Environment Information :
System : Linux-2.6.38-020638rc6-generic-i686-with-LinuxMint-10-julia
OS Name : posix
Distributor ID: LinuxMint
Description: Linux Mint 10 Julia
Release: 10
Codename: julia
Operating System Release : 2.6.38-020638rc6-generic
Operating System Version : #201102220910 SMP Tue Feb 22 10:23:10 UTC 2011
Operating System Architecture : 32bit
Operating System Locale : ro_RO.UTF8
Python Version : 2.6.6
OpenERP-Client Version : 6.0.2
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/lib/openerp-server-6.0.1/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/usr/lib/openerp-server-6.0.1/service/web_services.py", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/usr/lib/openerp-server-6.0.1/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/openerp-server-6.0.1/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/openerp-server-6.0.1/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/openerp-server-6.0.1/addons/sale_margin/sale_margin.py", line 33, in product_id_change
    to_cur = self.pool.get('res.partner').browse(cr, uid, partner_id).property_product_pricelist.currency_id.id
AttributeError: 'NoneType' object has no attribute 'id'

Thanks

Related branches

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello,

I have faced the same problem at my end So I am confirming this issue.
This bug is simply reproducible.
1) Install the sale_margin module.
2) Remove the pricelist in to partner form and then create a SO.

For more information I have attached a video.

Thanks.

Revision history for this message
Amit Parik (amit-parik) wrote :
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
Meera Trambadia (OpenERP) (mtr-openerp) wrote :

Hello Mihai Boiciuc,

Its fixed in https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-800721-mtr branch.
Revision ID: mtr@mtr-20110701085324-2t30i3x1d0yoh6vi
Revision no: 4821

It will be merged soon with main addons.

Thanks,
mtr

Changed in openobject-addons:
status: In Progress → Fix Committed
Changed in openobject-addons:
milestone: none → 6.1
Changed in openobject-addons:
status: Fix Committed → Fix Released
Revision history for this message
qdp (OpenERP) (qdp) wrote :

released in revision 5074

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.