Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
如何在 index.js 里面 使用do_action 或者其他odoo原生 动作
odoo11里面使用rpc调用后台方法 _read_sale: function (id) { var self = this; return this._rpc({ model: 'sale.order', method: 'read', args: [id], }).then(function (result) { self._renderBody(result[0]) }) },
model: 'sale.order' model名称 method:方法
@winbo 在 在自己写的js里面如何使用 do_action 加载原生表单或者tree 中说:
this._rpc(
rpc 使用的还是ajax 是封装好的 但新建的js 里面没有rpc 这累 方法 问题是如何在自定义的 js里面使用原生的 比如 new Model 或者do_action 之类的操作
这个有坑的。。。do_action 里面的view type list 表示xml里面的tree。 也就是js中视图的类型和xml 或者python中的叫法不一样。这个写的时候注意下。
谢谢 这个我知道 现在我想在 不是系统定义js 文件里面用 new Model 或者do_action之类的 怎么实现 (自己的js 不是 odoo.define 定义出来的 ,就是普通js文件但跟系统一起引入)
你好!看起来您对这段对话很感兴趣,但您还没有一个账号。
厌倦了每次访问都刷到同样的帖子?您注册账号后,您每次返回时都能精准定位到您上次浏览的位置,并可选择接收新回复通知(通过邮件或推送通知)。您还能收藏书签、为帖子顶,向社区成员表达您的欣赏。
有了你的建议,这篇帖子会更精彩哦 💗