如何以编程方式创建客户? [英] How to create Customer programmatically?

查看:75
本文介绍了如何以编程方式创建客户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Odoo 13 并尝试在 res.partner 的帮助下以编程方式创建客户,但无法创建客户.联系正在创造,但作为个人而不是客户.但是在 Odoo 12 中有一个二进制字段 customer 可以将其他联系人与客户区分开来,但它在 Odoo 13 中不存在.任何建议或更好的想法和任何帮助?

I am using Odoo 13 and trying to create customer programmatically with the help of res.partner but unable to create customer. Contact is creating but as a individual not as a customer. But in Odoo 12 there is a binary field customer which differentiate other contacts from customer but it is not present in Odoo 13. Any suggestion or better idea and any help ?

推荐答案

这些字段在 V13 中被完全删除.使用模块/应用程序 account 将创建两个新字段:customer_ranksupplier_rank,它们将尝试表示两种情况下的排名.当从客户菜单或从供应商菜单创建supplier_rank 时,Odoo 将创建时的排名设置为 1customer_rank 上.

The fields were removed completely in V13. With module/app account two new fields will be created: customer_rank and supplier_rank, which will try to representate ranks for both situations. Odoo is setting the rank on creation to 1 on customer_rank when creating from customer menu or supplier_rank from supplier menu.

我建议接受这个巨大的变化,或者制作一个自定义模块,它可以返回 customersupplier 布尔字段.

I suggest to just live with this big change or make a custom module which is getting back customer and supplier boolean fields.

这篇关于如何以编程方式创建客户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆