问题标签 [odoo-11]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
1397 浏览

python - 向 Odoo 11.0 帐户发票添加额外字段

我想在继承自的销售发票中添加一个额外的字段account.invoice。更具体地说,我想为delivery_date每个发票行项目添加一个字段。

和 XML 是:

0 投票
1 回答
1578 浏览

treeview - odoo v11 - 如何将动作/视图添加到“动作下拉”菜单

在以前版本的 odoo 中,您可以通过创建 ir.values 记录将项目添加到“更多”下拉菜单。

然后,这个新选项在树视图和记录中变得可见。

这在 V11 中似乎不起作用。

如何将项目添加到现在称为“操作”的下拉菜单中。

0 投票
1 回答
244 浏览

google-cloud-platform - 部署到谷歌云后,我可以在 odoo 应用中自定义吗

我是 google Cloud 和 Odoo ERP 的新手,我需要在 2 个 odoo 应用程序 Fleet 和 CRM 中进行自定义,我可以在通过 Bitnami Lunchpad 将 odoo 部署到 Google Cloud 后进行自定义,或者我需要在本地虚拟机中自定义,我可以上传吗本地虚拟机到谷歌云或只能通过 Bitnami 午餐板将 odoo 部署到谷歌。

Google端点可以访问odoo服务器的postgreSQL吗

欢迎任何帮助,谢谢。

0 投票
0 回答
302 浏览

notifications - 如何在 odoo 11.0 中自定义叶子的通知/弹出窗口

如果员工在我们有聊天通知和活动通知的系统托盘中申请休假,如何获取/发送通知给用户(人力资源经理)。我已上传图片请检查图片

0 投票
0 回答
239 浏览

python - 始终在 CentOS7 vps 中运行 Odoo11 服务器

我在 CentOS7 上成功地从源代码(Github)安装了 Odoo11,它工作正常

我每次都通过以下命令运行 Odoo 服务器,并且我希望在服务器重新启动时让它永远运行。

请再次确认我不是由软件包安装程序安装的。

我相信应该有一个聪明的方法,我期待着你的帮助。

0 投票
1 回答
1723 浏览

python - Odoo 不在 xpath 中显示字段标签

我正在向 Odoo 企业 11 中的“product.supplierinfo”模块添加一个自定义字符串字段 (stock_value),但我无法让它正确显示标签。

我继承了模块,然后向模块和通过 xpath 的视图添加了一个新字段。

问题:与新字段相关的字符串未显示。

模块:

看法:

结果:如您所见,价格值下方为零,但未显示字符串标签“库存”。

在此处输入图像描述

尝试了其他事情:

添加下一个代码:

给我

在此处输入图像描述

将字段放入组中给了我

在此处输入图像描述

我还尝试在最后一个视图中将位置更改为“之前”,但我无法让它看起来像它应该的那样。我尝试使用@string,但它不再有效。

感谢您的帮助。

0 投票
1 回答
985 浏览

openerp - odoo 在服务器端过滤 Many2one

您好,我想为 odoo 11 中的每个客户公司创建一个特权联系人。我成功地返回了视图列表中的所有联系人,因为我无法按所选公司对其进行过滤。这是我的代码:

看法:

模型或获取所有联系人(公司 A、公司 B、...):

我的失败代码仅针对当前公司进行过滤:

0 投票
1 回答
2463 浏览

python-3.x - Odoo 11 重写复制功能以添加额外字段

我制作了自定义模块,将字段添加到 product.template 表单视图(库存、销售、仓库中的产品),当我尝试这样做时,这些字段不会与产品重复。因此,我试图继承和重写该模块的函数副本

我的代码:

这些给了我错误:

我还尝试了不同的名称和类型,例如 product.template、product_template、'product.template'、[product.template]。

我尝试将类的名称更改为 ProductTemplate,但出现错误:

我不确定该错误是来自复制功能还是其他原因。无论哪种方式,我都需要一些帮助来弄清楚我做错了什么。这是 Odoo 11 企业。谢谢你。

0 投票
1 回答
1187 浏览

python - Duplicate record missing many2one field issue

I have my products with extra fields that come from a custom module. I'm trying to rewrite the copy function because otherwise when I try to duplicate the product some values don't duplicate.

So, in this copy function I manage to add those fields but if I try to just add the ids from the original product field, that one loses the values after the product is duplicated. I guess that makes sense.

Code:

View: the field at hand is attribute_line_ids shown in the bottom of the image.

enter image description here

Problem: I could create new records based on the original ones but the problem is that one of these values depends on a many2one that needs a value 'product_tmpl_id' which is the id of the product. So, how can I create these value if I don't have the id of the new product yet because it hasn't been duplicated at the moment.

Previously in a different feature I created the record and then using its id I update theses values. Now its not possible.

Is there a way to solve this? Is there a .copy() function that allows me to duplicate all this records without the need of creating then manually?

Thank you in advantage.

This is odoo 11 enterprise.

0 投票
2 回答
4174 浏览

python-3.x - with_context() 究竟能做什么?当我通过 with_context 时它调用哪个方法?

谁能告诉我 with_context 在 odoo 中究竟做了什么?如果假设我想从价目表中获取价格,我会做这样的代码。

那么到底product = self.product_id.with_context()该怎么做才能让我付出代价。它调用哪种方法来获取价格?