how to push document through Openbravo API with autogenerated document number

Openbravo document, such as sales order or sales invoice, come with auto generated document number, as per defined in document sequence. If you create such document through Openbravo web based user interface, it’s fine. But, what if you push a document through Openbravo public API? can we get this functionality as well?

Sure we can! Openbravo Document number not generated on client side (browser’s javascript UI), but processed on server side. This mechanism avoid duplicated document number when two or more user create same document at the same time. each user (a.k.a each document) will be assigned to separate document number.

In service oriented architecture (SOA) which is Openbravo not run as single application in the ecosystem, document may pushed from another application through Openbravo Public API. to do this, simply put <> on documentno property inside json/xml message that you push to Openbravo. This will tell Openbravo to run function that responsible for generating/calculating document number.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s