Hi, Am Sonntag, den 27.02.2011, 22:14 +0530 schrieb Kishan Bhat: > 1. How can I create invoice item record from values in po item record.
Basically, you can create a new record with:
my_block.new_record()
my_block.field_1.value = 'foo'
my_block.field_2.value = 17
my_block.field_3.value = other_block.some_field.value
You can commit the transaction with
form.commit()
> 2. Instead of a per field trigger based action, how can I do a button
> based trigger and loop over the items in the displayed gridline and
> programmatically create new invoice item record one-by-one.
data_available = my_block.first_record()
while data_available:
process_whatever_you_want()
data_available = my_block.next_record()
This iterates through the block, also visible on the screen. If you
don't want this, you can create a second block and a second datasource
for the same table, but if you do that, don't forget to form.commit()
things first and do a second_block.set_filter() so the second block has
up to date data.
Thanks,
Reinhard
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
_______________________________________________ gnue mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnue
