Please refer below code.
_inherit = "account.voucher"
def default_get(self, cr, uid, fields, context=None):
data = super(account_voucher, self).default_get(cr, uid, fields, context=context)
acc_inv_obj = self.pool.get('account.invoice')
for acc_inv_data in acc_inv_obj.browse(cr, uid, context.get('active_ids'), context=context):
data['date_inv'] = acc_inv_data.date_invoice
Hope that code help for you.
Ankit H Gandhi.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 2/9/16, 6:12 AM|
|Seen: 260 times|
|Last updated: 2/10/16, 4:15 AM|