Merge lp:~openerp-dev/openobject-addons/7.0-opw-589880-jam into lp:openobject-addons/7.0

Proposed by Jigar A.
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 8894
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-589880-jam
Merge into: lp:openobject-addons/7.0
Diff against target: 25 lines (+2/-2)
2 files modified
account_anglo_saxon/invoice.py (+1/-1)
account_anglo_saxon/purchase.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-589880-jam
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Jigar A. (community) Needs Resubmitting
Csaba TOTH (community) Disapprove
Review via email: mp+154298@code.launchpad.net

Description of the change

Improved inconsistent condition checking on module account_anglo_saxon not to generate accounting entries for products with type service and real time stock valuation.

Thank You

To post a comment you must log in.
Revision history for this message
Csaba TOTH (tsabi) wrote :

In the patch at line 9 there is no "order_line" variable defined, it should be "i_line":

and not order_line.product_id.type == 'service'
=>
and not i_line.product_id.type == 'service'

I don't know how you tested this code, because it throws a NameError (undefined variable).

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

please make the changes and resubmit.

Thanks,
Naresh Soni
OpenERP Enterprise Services !

Revision history for this message
Jigar A. (ifixthat) wrote :

Hello Csaba,
Thank for pointing the mistake, it was due to multiple version fixed done at a time. Anyway I have corrected it, Thank you again.

Kindly re-review it.
Thank You

review: Needs Resubmitting
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve

Unmerged revisions

8894. By Jigar A.

[FIX] added the missing condition reverted in merge

8893. By Jigar A.

[FIX] remove conflicts

8892. By Jigar A.

[FIX] typo: Wrong variable name

8891. By Jigar A.

[FIX] Inconsistant condition chekcing for account_anglo_saxon proce varince entry recording for real time stock valuation

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_anglo_saxon/invoice.py'
2--- account_anglo_saxon/invoice.py 2013-01-25 06:32:13 +0000
3+++ account_anglo_saxon/invoice.py 2013-08-01 05:31:28 +0000
4@@ -40,7 +40,7 @@
5
6 if inv.type in ('out_invoice','out_refund'):
7 for i_line in inv.invoice_line:
8- if i_line.product_id and i_line.product_id.valuation == 'real_time':
9+ if i_line.product_id and i_line.product_id.valuation == 'real_time' and not i_line.product_id.type == 'service':
10 if inv.type == 'out_invoice':
11 # debit account dacc will be the output account
12 # first check the product, if empty check the category
13
14=== modified file 'account_anglo_saxon/purchase.py'
15--- account_anglo_saxon/purchase.py 2013-07-10 21:56:55 +0000
16+++ account_anglo_saxon/purchase.py 2013-08-01 05:31:28 +0000
17@@ -28,7 +28,7 @@
18
19 def _choose_account_from_po_line(self, cr, uid, order_line, context=None):
20 account_id = super(purchase_order, self)._choose_account_from_po_line(cr, uid, order_line, context=context)
21- if order_line.product_id and not order_line.product_id.type == 'service':
22+ if order_line.product_id and order_line.product_id.valuation == 'real_time' and not order_line.product_id.type == 'service':
23 acc_id = order_line.product_id.property_stock_account_input and order_line.product_id.property_stock_account_input.id
24 if not acc_id:
25 acc_id = order_line.product_id.categ_id.property_stock_account_input_categ and order_line.product_id.categ_id.property_stock_account_input_categ.id