
Security News
AI Agent Lands PRs in Major OSS Projects, Targets Maintainers via Cold Outreach
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.
odoo-typescript
Advanced tools
Type declarations for odoo
With odoo-typescript you can use your favorite bundler to build your odoo modules.
Advantages of odoo-typescript:
npm install to add dependenciesDisadvantages:
Aside from the type declarations odoo-typescript also includes some methods:
Import an existing module
import * as ots from 'odoo-typescript/v18.0'
const owl = ots.require('@odoo/owl')
Define a module
import * as ots from 'odoo-typescript/v18.0'
import type { ORM } from 'odoo-typescript/v18.0/dist/addons/web/core/orm_service'
ots.define({
name: "@my_module/foo",
deps: {
hooks: "@web/core/utils/hooks",
owl: "@odoo/owl",
},
factory({hooks, owl}) {
const orm: ORM = hooks.useService("orm_service")
class MyComponent extends owl.Component {
// custom owl component
}
return {
MyComponent
}
},
})
Patch an object
import * as ots from 'odoo-typescript/v18.0'
ots.definePatch({
deps: { navbar: '@point_of_sale/app/navbar/navbar' },
objToPatch({navbar}) {
return navbar.Navbar.prototype
},
patch() {
return {
setup() {
super.setup()
console.log("Patching Navbar ...")
}
}
},
})
To enable auto-completion for custom modules you need to extend the interface Modules.
import * as ots from 'odoo-typescript/v18.0'
const foo = ots.define({
name: '@mymodule/foo'
deps: {},
factory() {
// ...
}
}
declare module 'odoo-typescript/18.0' {
export interface Modules {
'@mymodule/foo': Awaited<typeof foo>
}
}
FAQs
Type declarations for odoo modules
We found that odoo-typescript demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.

Research
/Security News
Chrome extension CL Suite by @CLMasters neutralizes 2FA for Facebook and Meta Business accounts while exfiltrating Business Manager contact and analytics data.

Security News
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.