0

I have problem. The standard_price is computed field and not stored product_template, product_product table. How to get the standard price field value in odoo xlsx report? The error is:

Record does not exist or has been deleted.: None

Help, I need any solution and idea?

ChesuCR
  • 9,352
  • 5
  • 51
  • 114

1 Answers1

0

Check the cost field of the product_price_history table. I think that is what you are looking for. This table is related with the product_product table through the field product_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
ChesuCR
  • 9,352
  • 5
  • 51
  • 114