{"action":"created","issue":{"url":"https://api.github.com/repos/odoo/odoo/issues/15555","repository_url":"https://api.github.com/repos/odoo/odoo","labels_url":"https://api.github.com/repos/odoo/odoo/issues/15555/labels{/name}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/15555/comments","events_url":"https://api.github.com/repos/odoo/odoo/issues/15555/events","html_url":"https://github.com/odoo/odoo/issues/15555","id":208727014,"number":15555,"title":"[Odoo 10] Is Documentation up to date?","user":{"login":"franckysolo","id":2419646,"avatar_url":"https://avatars.githubusercontent.com/u/2419646?v=3","gravatar_id":"","url":"https://api.github.com/users/franckysolo","html_url":"https://github.com/franckysolo","followers_url":"https://api.github.com/users/franckysolo/followers","following_url":"https://api.github.com/users/franckysolo/following{/other_user}","gists_url":"https://api.github.com/users/franckysolo/gists{/gist_id}","starred_url":"https://api.github.com/users/franckysolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franckysolo/subscriptions","organizations_url":"https://api.github.com/users/franckysolo/orgs","repos_url":"https://api.github.com/users/franckysolo/repos","events_url":"https://api.github.com/users/franckysolo/events{/privacy}","received_events_url":"https://api.github.com/users/franckysolo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ged-odoo","id":7579538,"avatar_url":"https://avatars.githubusercontent.com/u/7579538?v=3","gravatar_id":"","url":"https://api.github.com/users/ged-odoo","html_url":"https://github.com/ged-odoo","followers_url":"https://api.github.com/users/ged-odoo/followers","following_url":"https://api.github.com/users/ged-odoo/following{/other_user}","gists_url":"https://api.github.com/users/ged-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/ged-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ged-odoo/subscriptions","organizations_url":"https://api.github.com/users/ged-odoo/orgs","repos_url":"https://api.github.com/users/ged-odoo/repos","events_url":"https://api.github.com/users/ged-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/ged-odoo/received_events","type":"User","site_admin":false},"assignees":[{"login":"ged-odoo","id":7579538,"avatar_url":"https://avatars.githubusercontent.com/u/7579538?v=3","gravatar_id":"","url":"https://api.github.com/users/ged-odoo","html_url":"https://github.com/ged-odoo","followers_url":"https://api.github.com/users/ged-odoo/followers","following_url":"https://api.github.com/users/ged-odoo/following{/other_user}","gists_url":"https://api.github.com/users/ged-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/ged-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ged-odoo/subscriptions","organizations_url":"https://api.github.com/users/ged-odoo/orgs","repos_url":"https://api.github.com/users/ged-odoo/repos","events_url":"https://api.github.com/users/ged-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/ged-odoo/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2017-02-19T16:16:04Z","updated_at":"2017-02-20T13:12:34Z","closed_at":null,"body":"Hello,\r\ni'm trying to create a JavaScript interface extension but the documentation seems to be not up to date\r\nI had tested two implementation :\r\n```js\r\nopenerp.my_custom_module = function(instance, local) {\r\nlocal.CustomWidget = instance.Widget.extend({}) ///...\r\n})\r\n```\r\nthis version work!\r\nif i take a look at default module implementation, the module is just define but where can we require it\r\n```js\r\nodoo.define('my_custom_module', function (require) {\r\n  var CustomWidget = require('web.Widget'); //...\r\n})\r\n```\r\nThis one don't work!\r\nThe documentation is very confused, what the good implementation, can you clarify that?\r\nThanks\r\n \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/odoo/odoo/issues/comments/281075771","html_url":"https://github.com/odoo/odoo/issues/15555#issuecomment-281075771","issue_url":"https://api.github.com/repos/odoo/odoo/issues/15555","id":281075771,"user":{"login":"franckysolo","id":2419646,"avatar_url":"https://avatars.githubusercontent.com/u/2419646?v=3","gravatar_id":"","url":"https://api.github.com/users/franckysolo","html_url":"https://github.com/franckysolo","followers_url":"https://api.github.com/users/franckysolo/followers","following_url":"https://api.github.com/users/franckysolo/following{/other_user}","gists_url":"https://api.github.com/users/franckysolo/gists{/gist_id}","starred_url":"https://api.github.com/users/franckysolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franckysolo/subscriptions","organizations_url":"https://api.github.com/users/franckysolo/orgs","repos_url":"https://api.github.com/users/franckysolo/repos","events_url":"https://api.github.com/users/franckysolo/events{/privacy}","received_events_url":"https://api.github.com/users/franckysolo/received_events","type":"User","site_admin":false},"created_at":"2017-02-20T13:12:34Z","updated_at":"2017-02-20T13:12:34Z","body":"hello,\r\nI'm using the last version 10.0\r\nSo i managed to make it work with define like this : \r\n```js\r\nodoo.define('my_custom_module', function (require) {\r\n  var Widget = require('web.Widget'); //...\r\n  require('website.website'); // for jquery ready to use\r\n  var CustomWidget = Widget.exend({ // ... });\r\n  // then make an instance \r\n  var widget = new CustomWigdet();\r\n  widget.start();\r\n  return widget;\r\n});\r\n```\r\nIf i don't create an instance and don't start the custom widget, the module is never loaded\r\nIs is the good way to implement module js?\r\n or is there an another way to achieve this?\r\n\r\n"}}
{"actor":{"display_login":"franckysolo"}}