Merge lp:~vauxoo/addons-vauxoo/7.0-HER-zero_aml-hbto into lp:addons-vauxoo/7.0

Proposed by hbto [Vauxoo] http://www.vauxoo.com
Status: Merged
Approved by: hbto [Vauxoo] http://www.vauxoo.com
Approved revision: 1094
Merged at revision: 1095
Proposed branch: lp:~vauxoo/addons-vauxoo/7.0-HER-zero_aml-hbto
Merge into: lp:addons-vauxoo/7.0
Diff against target: 27 lines (+17/-0)
1 file modified
hr_expense_replenishment/model/hr_expense.py (+17/-0)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/7.0-HER-zero_aml-hbto
Reviewer Review Type Date Requested Status
Gabriela Quilarque Approve
hbto [Vauxoo] http://www.vauxoo.com Approve
Julio Serna-http://www.vauxoo.com Approve
Review via email: mp+227925@code.launchpad.net

Description of the change

Getting Rid of Journal Entry Lines in Zero Both debit and credit.

To post a comment you must log in.
Revision history for this message
Julio Serna-http://www.vauxoo.com (hearthebreaker) :
review: Approve
Revision history for this message
Gabriela Quilarque (gabrielaquilarque97) wrote :

Hi Humberto,

I did functional test, and still make the journal entries in Zero.

View the screenshot before the pay.
http://awesomescreenshot.com/07c376vo01

View the screenshot after the pay.
http://awesomescreenshot.com/0be376x6aa

This success for partial pay, and complete pay.

Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) wrote :

It seem only one of the move has been deleted there are still some missing.

Could please tell at which steps are these Entries being generated,

so that it could be easily pointed,

thanks a lot.

2014-07-23 11:16 GMT-04:30 Gabriela Quilarque (Vauxoo) <email address hidden>
:

> Hi Humberto,
>
> I did functional test, and still make the journal entries in Zero.
>
> View the screenshot before the pay.
> http://awesomescreenshot.com/07c376vo01
>
> View the screenshot after the pay.
> http://awesomescreenshot.com/0be376x6aa
>
>
> This success for partial pay, and complete pay.
> --
>
> https://code.launchpad.net/~vauxoo/addons-vauxoo/7.0-HER-zero_aml-hbto/+merge/227925
> You proposed lp:~vauxoo/addons-vauxoo/7.0-HER-zero_aml-hbto for merging.
>

Revision history for this message
Gabriela Quilarque (gabrielaquilarque97) wrote :

I just made a video, where I show the journal entries in Zero, when is partial pay and full pay.

http://youtu.be/ByfQi9XQVHQ

Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) wrote :

I have tested at my end and it seems to me it is working fine,

In runbot this MP has gone green,

https://docs.google.com/a/vauxoo.com/file/d/0B1w9gokcJL9hV2QyTkVJazJYRVE/edit?usp=drivesdk

I will wait for Gaby's comment to finally merge this branch onto addons-vauxoo/7.0

review: Approve
Revision history for this message
Gabriela Quilarque (gabrielaquilarque97) wrote :

I test again, and everything work perfect.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr_expense_replenishment/model/hr_expense.py'
2--- hr_expense_replenishment/model/hr_expense.py 2014-05-14 00:27:08 +0000
3+++ hr_expense_replenishment/model/hr_expense.py 2014-07-23 14:32:58 +0000
4@@ -1016,6 +1016,23 @@
5 'datas': datas
6 }
7
8+ def action_receipt_create(self, cr, uid, ids, context=None):
9+ '''
10+ main function that is called when trying to create the accounting entries related to an expense
11+ then this super tries to get rid of the Journal Entry Lines in zero
12+ '''
13+ super(hr_expense_expense, self).action_receipt_create(cr, uid, ids, context=context)
14+ aml_obj = self.pool.get('account.move.line')
15+ res = []
16+ for exp in self.browse(cr, uid, ids, context=context):
17+ if not exp.account_move_id.journal_id.entry_posted:
18+ for aml_brw in exp.account_move_id.line_id:
19+ if not aml_brw.debit and not aml_brw.credit:
20+ res.append(aml_brw.id)
21+ if res:
22+ aml_obj.unlink(cr, uid, res, context=context)
23+ return True
24+
25 class account_voucher(osv.Model):
26 _inherit = 'account.voucher'
27 def create(self, cr, uid, vals, context=None):