This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<openerp> | |
<data> | |
<!-- Add the report to the XML file responsible for reports --> | |
<report id="report_unique_xml_id" | |
model="your.model.name" | |
string="Report Name" | |
name="module_name.report_name" | |
file="module_name.report_unique_xml_id" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openerp.my_custom_module = function (instance){ | |
instance.web.form.MyCustomWidget = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeFieldMixin, | |
{ | |
init: function(field_manager, node) { | |
this._super.apply(this, arguments); | |
}, | |
start: function() { | |
var self = this; | |
this._super.apply(this, arguments); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
function disableselect(e){ | |
return false | |
} | |
function reEnable(){ | |
return true | |
} | |
//if IE4+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from odoo import models, fields, api | |
class ModelA(models.Model): | |
_name = 'model.a' | |
name = fields.Char(string="Name") | |
age = fields.Integer(string="Age") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<odoo> | |
<data> | |
<record model="ir.actions.act_window" id="action_lo_student_info"> | |
<field name="name">Student Info</field> | |
<field name="res_model">lo.student.info</field> | |
<field name="view_mode">tree,form</field> | |
<!--<field name="view_ids" eval="[(5, 0, 0),(0, 0, {'view_mode': 'tree', 'view_id': ref('view_test_model_tree')}),(0, 0, {'view_mode': 'form', 'view_id': ref('view_test_model_form')})]"/>--> | |
<!--<field name="context">{}</field>--> | |
<!--<field name="domain">[()]</field>--> | |
<!--<field name="target">new</field>--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<odoo> | |
<data> | |
<record model="ir.ui.view" id="view_lo_student_info_form"> | |
<field name="name">lo.student.info.form</field> | |
<field name="model">lo.student.info</field> | |
<field name="type">form</field> | |
<field name="arch" type="xml"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<record id="unique_sequence_id" model="ir.sequence"> | |
<field name="name">Sequence Name Goes Here</field> | |
<field name="code">your.sequence.code</field> | |
<field name="active">TRUE</field> | |
<field name="prefix">OR</field> | |
<field name="padding">5</field> | |
<field name="number_next">1</field> | |
<field name="number_increment">1</field> | |
</record> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from openerp import http | |
from openerp.http import Controller, route, request | |
import json | |
import requests | |
class Google_Recaptcha(http.Controller): | |
@http.route('/google_recaptcha_in_odoo/', type='http', auth='public', website=True) | |
def google_recaptcha(self, redirect=None, **kw): |