update tracking of journal entry

conv_bal
watcha.h@almacom.co.th 2015-08-04 18:24:37 +07:00
parent b6eaefa8af
commit 5a04479129
1 changed files with 20 additions and 0 deletions

View File

@ -17,11 +17,21 @@ class Migration(migration.Migration):
line.write({ line.write({
'track_id': track_id, 'track_id': track_id,
}) })
if payment.move_id:
for line in payment.move_id.lines:
line.write({
'track_id': track_id,
})
for invoice in hdcase.invoices: for invoice in hdcase.invoices:
for line in invoice.lines: for line in invoice.lines:
line.write({ line.write({
'track_id': track_id, 'track_id': track_id,
}) })
if invoice.move_id:
for line in invoice.move_id.lines:
line.write({
'track_id': track_id,
})
for shop in get_model('clinic.shop').search_browse([]): for shop in get_model('clinic.shop').search_browse([]):
track_id=shop.branch_id.track_id.id track_id=shop.branch_id.track_id.id
for payment in hdcase.payments: for payment in hdcase.payments:
@ -29,10 +39,20 @@ class Migration(migration.Migration):
line.write({ line.write({
'track_id': track_id, 'track_id': track_id,
}) })
if payment.move_id:
for line in payment.move_id.lines:
line.write({
'track_id': track_id,
})
for invoice in hdcase.invoices: for invoice in hdcase.invoices:
for line in invoice.lines: for line in invoice.lines:
line.write({ line.write({
'track_id': track_id, 'track_id': track_id,
}) })
if invoice.move_id:
for line in invoice.move_id.lines:
line.write({
'track_id': track_id,
})
Migration.register() Migration.register()