[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Health] migrating to gnu health
From: |
Luis Falcon |
Subject: |
Re: [Health] migrating to gnu health |
Date: |
Thu, 28 Aug 2014 18:08:29 +0100 |
Hi again
On Thu, 28 Aug 2014 17:58:46 +0100
Luis Falcon <address@hidden> wrote:
> Hi Islam Ezzat
> On Thu, 28 Aug 2014 19:27:37 +0300
> islam ezzat <address@hidden> wrote:
>
> > Hello Everyone
> >
> > I'm trying to import product templates into the system
> > but there is no column for the price or the cost in the
> > product_template table
> > so where should I import the price and cost
>
> Both list_price and cost_price fields in product.template are type
> fields.Property [1], and they - like Functional fields - don't have a
> corresponding entry at DB level.
Just for the sake of correctness, the fields.Property
differs from fields.Function in the sense that it keeps the record
value at the "ir_property" table, but you don't want to write directly
to that table.
Just use abstraction that Tryton provides and life will be easier :)
Best,
>
> Please check this example on how we use those fields on the WHO
> essential list of medicines module ("health_who_essential_medicines")
>
> You can do something similar using CSV or proteus.
>
> <record model="product.template" id="templ_em1"> <field
> name="name">halothane</field> <field name="category"
> model="product.category" ref="prod_medicament_WHO"/>
> <field name="default_uom" model="product.uom"
> ref="product.uom_unit"/>
> <field name="list_price" eval="0.0"/>
> <field name="cost_price" eval="0.0"/>
> </record>
>
>
> 1 .- http://doc.tryton.org/3.2/trytond/doc/ref/models/fields.html
>
> Best,
>
> >
> > Table
> > "public.product_template"
> >
> > Column | Type |
> > Modifiers
> >
> >
> > ------------------+--------------------------------+---------------------------------------------------------------
> >
> > id | integer | not null default
> > nextval('product_template_id_seq'::regclass)
> >
> > create_date | timestamp(6) without time zone |
> >
> > write_date | timestamp(6) without time zone |
> >
> > create_uid | integer |
> >
> > write_uid | integer |
> >
> > category | integer |
> >
> > name | character varying | not null
> >
> > default_uom | integer | not null
> >
> > active | boolean | default false
> >
> > consumable | boolean | default false
> >
> > type | character varying | not null
> >
> > taxes_category | boolean | default false
> > account_category | boolean | default false
> > thank you for your help
> >
> > Best regards
>
>
>