如何在odoo中获取标准价格字段值?

时间:2018-08-17 13:01:15

标签: postgresql field odoo product odoo-10

我有问题。 standard_price是计算字段,不存储product_template和product_product表。如何在odoo xlsx报表中获取标准价格字段值? 错误是:

Record does not exist or has been deleted.: None

帮助,我需要任何解决方案和想法吗?

1 个答案:

答案 0 :(得分:0)

检查cost表的product_price_history字段。我认为这就是您想要的。该表通过字段product_productproduct_id表相关:

base=# \dS product_price_history
                                    Table "public.product_price_history"
Column    |            Type             |                             Modifiers                              
-------------+-----------------------------+--------------------------------------------------------------------
id          | integer                     | not null default nextval('product_price_history_id_seq'::regclass)
create_uid  | integer                     | 
product_id  | integer                     | not null
company_id  | integer                     | not null
datetime    | timestamp without time zone | 
cost        | numeric                     | 
write_date  | timestamp without time zone | 
create_date | timestamp without time zone | 
write_uid   | integer                     | 
Indexes:
    "product_price_history_pkey" PRIMARY KEY, btree (id)
Foreign-key constraints:
    "product_price_history_company_id_fkey" FOREIGN KEY (company_id) REFERENCES res_company(id) ON DELETE SET NULL
    "product_price_history_create_uid_fkey" FOREIGN KEY (create_uid) REFERENCES res_users(id) ON DELETE SET NULL
    "product_price_history_product_id_fkey" FOREIGN KEY (product_id) REFERENCES product_product(id) ON DELETE CASCADE
    "product_price_history_write_uid_fkey" FOREIGN KEY (write_uid) REFERENCES res_users(id) ON DELETE SET NULL