[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Populate parts



Hi Brian,

On Thu, Jul 19, 2012 at 3:09 PM, Brian Wolf <..hidden..> wrote:
What is the best way to insert an associated photo in the file_part table? Meaning, is there a way of duplicating the upload feature?Â
Looks like there are three account numbers that should be supplied. How are these determined?

 inventory_accno_id integer,
 income_accno_id integer,
 expense_accno_id integer,

Am I correct to read at least two questions here?

1. How can I upload multiple parts (or maybe: how can I create an initially seeded parts table)?
2. Once I have a parts table filled, how can I insert the pictures belonging to these parts into the file_part table?


In order to be able to do (1) you indeed need to identify the accounts to book inventory, income and COGS on. These IDs correspond to the ID column from the 'account' table. If you intend to set up services, you don't need to fill the 'inventory_accno_id' column.


As far as the upload of pictures goes: that's a bit tough, because the data is encoded before it's sent to the database. You'd need to duplicate the encoding (I think it's base64, but not sure) and do the upload yourself... But maybe it's more practical that we write the upload script together to allow you to write a script to drive a web based upload to achieve the same purpose, much like the CSV uploads for gl accounts and some other items that I wrote for 1.4?


Bye,

Erik.