Skip to content

Instantly share code, notes, and snippets.

View ged-odoo's full-sized avatar
💭
I may be slow to respond.

Géry Debongnie ged-odoo

💭
I may be slow to respond.
View GitHub Profile
{
'name': 'Custom Settings for Odoo',
'category': 'Custom',
'description': """
Custom Settings for Odoo
""",
'version': '1.0',
'data' : [
'view.xml',
]
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="assets_backend" name="custom assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/custom_stuff/custom.css"/>
</xpath>
</template>
</data>
</openerp>
<?xml version="1.0"?>
<tree string="Product Variants" order="name desc,price asc">
<field name="default_code"/>
<field name="name" order="1"/>
<field name="attribute_value_ids" widget="many2many_tags"/>
<field name="lst_price"/>
<field name="price" invisible="not context.get('pricelist',False)"/>
<field name="uom_id"/>
<field name="ean13"/>
<field name="state" invisible="1"/>
@ged-odoo
ged-odoo / note_on_t_widget.js
Last active May 17, 2019 08:28
Notes on t-widget
// This is a detailed explanation on the compiled code generated by the
// t-widget directive for a given template:
// <div><t t-widget="child" t-key="'somestring'" t-props="{flag:state.flag}"/></div>
//
// Hopefully, this may help someday some poor developer that has to maintain
// this code! Good luck, my friend...
// This is the virtual node representing the parent div
let c1 = [],
@ged-odoo
ged-odoo / odoo-javascript-modules.md
Last active November 22, 2021 07:50
Odoo Javascript Modules

Odoo Javascript Modules

This gist describes our current work at using native JS modules in Odoo, and what it implies for the source code and for the developer experience.

PR: odoo/odoo#63177 (still work in progress)

Very brief summary

The current PR allows us to use native JS modules in odoo. It works. It is

@ged-odoo
ged-odoo / list_view_from_scratch.js
Last active October 6, 2023 13:02
toy list view made in owl and the new odoo js framework
/** @odoo-module **/
import { registry } from "@web/core/registry";
import { KeepLast } from "@web/core/utils/concurrency";
import { useService } from "@web/core/utils/hooks";
import { XMLParser } from "@web/core/utils/xml";
import { Model, useModel } from "@web/views/helpers/model";
import { ViewLayout } from "@web/views/view_layout";
// -----------------------------------------------------------------------------
@ged-odoo
ged-odoo / owl_2_breaking_changes.md
Last active November 15, 2021 12:40
owl 2 breaking changes

OWL 2 Breaking changes

Components

  • lifecycle methods are removed (details)
  • can no longer be mounted on detached DOM (details)

Slots