We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There's nothing specific for on_change events in ERPpeek.
The way to mimic the OpenERP client (6.1) is:
# on_change with ERPpeek for invoice creation @step('this customer has {nb:d} invoices') def impl(ctx, nb): assert_true(ctx.data['partner']) partner = ctx.data['partner'] account_invoice_obj = model('account.invoice') for idx in xrange(1, nb + 1): # On change data = { 'name': "Invoice # %d" % idx, 'type': "out_invoice", 'address_invoice_id': partner.address[0].id, 'partner_id': partner.id, } rv = account_invoice_obj.onchange_partner_id([], 'out_invoice', partner.id, date.today(), False, False) data.update(rv['value']) inv = account_invoice_obj.create(data) if partner.contract_ids: inv.write({'contract_id': partner.contract_ids[0].id}) ctx.data['invoice'] = inv
To be added to the documentation.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
There's nothing specific for on_change events in ERPpeek.
The way to mimic the OpenERP client (6.1) is:
To be added to the documentation.
The text was updated successfully, but these errors were encountered: