Merge lp:~openerp-dev/openobject-addons/trunk-opw-576964-port-mma into lp:openobject-addons

Proposed by Mayur Maheshwari(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-opw-576964-port-mma
Merge into: lp:openobject-addons
Diff against target: 24 lines (+2/-5)
1 file modified
account/account_invoice.py (+2/-5)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-opw-576964-port-mma
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Needs Resubmitting
Fabien (Open ERP) Disapprove
Review via email: mp+132867@code.launchpad.net

Description of the change

Hello,

Issue: -
Problem occurs for Supplier invoice line, when invoice line form has previously filled Unit Price
and we change product then Unit Price is not updated with the cost price. It remains same for
all the products. It works fine for customer invoice.

Steps to reproduce:
1. Create a Supplier invoice
2. Select any product , Unit Price will be 300(cost price of product)
3. Now, select another product, Unit Price should be different (like -500) but it remains same.

-Code is forward port from 6.1

Thanks,
Mayur

To post a comment you must log in.
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

I think the current behaviour is correct (s aupplier price is usually provided by the supplier and recorded manually, rather than coming from your own db)

review: Disapprove
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

The problem is not about inputting the unit price but the problem is when a user changes the product and the unit price doesn't change.

for eg:

I select a product say PC with unit price 500 Euro then I decided to change the product to keyboard so changing pc--> keyboard doent change the unit price to keyboards price(250 Euro) but keeps the old price i.e of the PC(500 Euro).

@ Fabien : can you please recheck this ?

Thanks,
Naresh

review: Needs Resubmitting

Unmerged revisions

7953. By Mayur Maheshwari(OpenERP)

[FIX]account:improved some code for price_unit

7952. By Rifakat (OpenERP)

[FIX]account:reverted Unit Price to 0.0 when we remove product from invoice line, reverted back to default value for Unit Price and domain

7951. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7950. By Fabien (Open ERP)

[MERGE] fix multi-company for pos

7949. By Fabien (Open ERP)

[FIX] bug pos

7948. By Fabien (Open ERP)

[FIX] POS close session without cash register

7947. By Fabien (Open ERP)

[MERGE] trunk

7946. By Fabien (Open ERP)

[FIX] POS

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account_invoice.py'
2--- account/account_invoice.py 2012-11-02 09:21:06 +0000
3+++ account/account_invoice.py 2012-11-05 11:41:50 +0000
4@@ -1417,10 +1417,7 @@
5 if not partner_id:
6 raise osv.except_osv(_('No Partner Defined !'),_("You must first select a partner !") )
7 if not product:
8- if type in ('in_invoice', 'in_refund'):
9- return {'value': {}, 'domain':{'product_uom':[]}}
10- else:
11- return {'value': {'price_unit': 0.0}, 'domain':{'product_uom':[]}}
12+ return {'value': {'price_unit': 0.0}, 'domain':{'product_uom':[]}}
13 part = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context)
14 fpos_obj = self.pool.get('account.fiscal.position')
15 fpos = fposition_id and fpos_obj.browse(cr, uid, fposition_id, context=context) or False
16@@ -1449,7 +1446,7 @@
17 tax_id = fpos_obj.map_tax(cr, uid, fpos, taxes)
18
19 if type in ('in_invoice', 'in_refund'):
20- result.update( {'price_unit': price_unit or res.standard_price,'invoice_line_tax_id': tax_id} )
21+ result.update( {'price_unit': res.standard_price,'invoice_line_tax_id': tax_id} )
22 else:
23 result.update({'price_unit': res.list_price, 'invoice_line_tax_id': tax_id})
24 result['name'] = res.partner_ref

Subscribers

People subscribed via source and target branches

to all changes: