Uploading CSV to populate timesheet

Hi,

I am using trytond-timesheet module, and I want user to be able to upload their offline produced timesheet file (excel or csv), from their browser. I plan to extend this module.

I already search in this forum for file upload (50 results) and csv upload (5 results).. but none really suit my requirements.

Is this possible in sao? If yes can anybody point me to any link?

I found a module called: trytond-web-shop-shopify .. and it says it can uploads product to shopify (I haven’t check its source code or try it). can this be use?

Regards,
Bromo

You can use Import Data from the record menu to import csv.
Do open the View for the Model you are interested in importing data for, and click on the downward facing arrow to the left of the View name. In your case I would guess you should do this from Timesheet / Lines. There you will find Import Data.
Have you had a look at Client Usage — Tryton desktop client?
You can select which fields to import from the file, you can save the import template for use next time, or you can put the field names in the header and use Auto-Detect so tryton selects the right fields to import.

The other option is to create a proteus script to read the data, instantiate the Model, create the record(s), assign the fields and then save.

1 Like

Oh.. I need to do file upload via web interface.. any sample link?

Bromo

The CSV import feature is generic for any model so you have to declare the order of the columns in the UI (and the format of the CSV).
This works only for simple flat structure (included One2Many).
You can experiment by exporting existing lines (but an export is not always valid for import).

Like Cedric said the functionality is generic for all models, thus also available from SAO (Web Interface).

See the Import item on the menu:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.