在Odoo 10

时间:2017-11-22 18:28:18

标签: openerp odoo-9 odoo-10

我们已准备好将我们的实例部署到生产环境中,并且我目前正在清理在此过程中生成的所有演示数据。

我通常按照以下步骤清理主要样本数据:

SSH到服务器

su postgres
psql abc_db_name

delete from stock_pack_operation;
delete from stock_picking;
delete from stock_move;
delete from account_invoice;
delete from account_partial_reconcile;
delete from account_move;
delete from sale_order;
delete from account_payment;

我现在面临的主要问题是将所有产品数量设置为0而不删除产品。我需要运行的查询设置此项以重置它们并从头开始盘点?

2 个答案:

答案 0 :(得分:2)

产品数量在型号中:

   stock.quant 

删除那些记录,产品应为零。

试试这个:

   delete from stock_quant;

因为odoo将模型的名称更改为有效的postgres名称 通过改变。到_

答案 1 :(得分:2)

您可以尝试:

UPDATE stock_quant SET qty=0;