~openerp-community/openobject-addons/trunk-addons-community

« back to all changes in this revision

Viewing changes to product_loan/sale.py

  • Committer: Alexis de Lattre
  • Date: 2014-04-24 07:58:34 UTC
  • Revision ID: alexis@via.ecp.fr-20140424075834-qb01ehtul9okocw0
[FIX] Small bug.

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
        move_vals = super(sale_order, self)._prepare_order_line_move(
181
181
            cr, uid, order, line, picking_id, date_planned, context=context)
182
182
        if order.is_loan:
 
183
            move_dest_id = False
183
184
            if context.get('loan_in'):
184
185
                location_id = order.shop_id.warehouse_id.loan_out_location_id.id
185
186
                location_dest_id = order.shop_id.warehouse_id.loan_in_location_id.id
186
187
                date = order.loan_end_date
187
 
                move_dest_id = False
188
188
            else:
189
189
                location_id = order.shop_id.warehouse_id.loan_in_location_id.id
190
190
                location_dest_id = order.shop_id.warehouse_id.loan_out_location_id.id