1
# -*- coding: utf-8 -*-
2
from osv import osv, fields
4
class payment_order_create(osv.osv_memory):
6
_inherit = 'payment.order.create'
8
def default_get(self, cr, uid, fields_list, context=None):
10
Automatically add the candidate move lines to
11
the payment order, instead of only applying them
14
We make use of the fact that the search_entries
15
method passes an action without a res_id so that a
16
new instance is created. Inject the line_ids, which have
17
been placed in the context at object
20
res = super(payment_order_create, self).default_get(
21
cr, uid, fields_list, context=context)
23
if (fields_list and 'entries' in fields_list
24
and 'entries' not in res
25
and context and context.get('line_ids', False)
27
res['entries'] = context['line_ids']
31
payment_order_create()