Merge lp:~vauxoo/helados-gilda/jose-invoice-refund into lp:helados-gilda

Status: Merged
Merged at revision: 538
Proposed branch: lp:~vauxoo/helados-gilda/jose-invoice-refund
Merge into: lp:helados-gilda
Diff against target: 23 lines (+13/-0)
1 file modified
extra_trunk_HG/small_improvements/stock.py (+13/-0)
To merge this branch: bzr merge lp:~vauxoo/helados-gilda/jose-invoice-refund
Reviewer Review Type Date Requested Status
Gabriela Quilarque Approve
Review via email: mp+94610@code.launchpad.net

Description of the change

Action_invoice_create overwritten the method to have the same price the bill for return of the original product that generated the movement

To post a comment you must log in.
Revision history for this message
Gabriela Quilarque (gabrielaquilarque97) wrote :

Merge Realizado.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'extra_trunk_HG/small_improvements/stock.py'
2--- extra_trunk_HG/small_improvements/stock.py 2012-02-16 17:32:30 +0000
3+++ extra_trunk_HG/small_improvements/stock.py 2012-02-24 19:34:17 +0000
4@@ -38,6 +38,19 @@
5 _defaults ={
6 'printed': False
7 }
8+
9+
10+ def action_invoice_create(self, cr, uid, ids, journal_id=False,group=False, type='out_invoice', context=None):
11+ if context is None:
12+ context = {}
13+ move_obj = self.pool.get('stock.move')
14+ if type == 'out_refund':
15+ for i in self.browse(cr,uid,ids,context=context):
16+ for g in i.move_lines:
17+ move_obj.write(cr,uid,g.id,{'price_unit':0.0},context=context)
18+ picking_ids = super(stock_picking, self).action_invoice_create( cr, uid, ids, journal_id=journal_id,
19+ group=group, type=type, context=context)
20+ return picking_ids
21 stock_picking()
22
23 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

Subscribers

People subscribed via source and target branches

to all changes: