Tags down


Odoo - Custom template menu load

By : user2174755
Date : October 17 2020, 08:10 AM
seems to work fine After research of odoo source code - discussions with people which are more involved into odoo development - and in general - working more with odoo - i found the way how to do this.
Initially question have a wrong assumption - that this is possible to do by rendering using the controller. What is important to understand is that - odoo backend is rendered as "single js page", and any kind of customization on the dashboard side (which are not provided by default by odoo which you can define in views) - needs to be done by creating js widgets and altering dom objects directly with javascript.
code :
odoo.define("mymodule.customdashboard", function (require) {
    "use strict";

    var core = require("web.core");
    var AbstractAction = require("web.AbstractAction");
    var Widget = require("web.Widget");

    var qweb = core.qweb;
    var _t = core._t;


    var CustomDashboard = AbstractAction.extend({
        template: "custom_dashboard",
        events: {

        init: function(parent, action){
            this._super.apply(this, arguments);
            var options = action.params || {};
            this.params = options;

        start: function(){
            this.$(".dashboard-wrapper").append(qweb.render("campaign_dashboard_campaign_list", {"someArgData": "Test"}));

    core.action_registry.add("custom.dashboard", CustomDashboard);

    return {
        CustomDashboard: CustomDashboard

Share : facebook icon twitter icon

Odoo: How to select custom fields using menu id

By : JasonV
Date : March 29 2020, 07:55 AM
I wish this help you You can try to do the following way some things like this.
Add the Below code in your .py File from openerp.osv import fields, osv
code :
class purchase_order(osv.osv):
    _inherit ="purchase.order"
    _columns = {
        'custom_a': fields.char('Custom A'),
        'custom_b': fields.char('Custom B'),
        'custom_b': fields.char('Custom C'),
<record model="ir.ui.view" id="r3x_inherit_purchase_ord">
    <field name="name">Purchase Order Inherit Form</field>
    <field name="model">purchase.order</field>
    <field name="inherit_id" ref="purchase.purchase_order_form"/>
    <field name="arch" type="xml">

        <xpath expr="//field[@name='pricelist_id']" position="after">
            <field name="custom_a  attrs={'invisible':[('state','!=','draft')]}/>
            <field name="custom_b attrs={'invisible':[('state','=','draft')]} />
            <field name="custom_c attrs={'invisible':[('state','=','draft')]}/ />


Adding menu to Odoo 10 in custom module

By : rahmani.hatef
Date : March 29 2020, 07:55 AM
will help you You have to define the action in menuitem then only it is visible. menuitem without any action will became normal string for display purpose. So either add sub menu with action or directly assign any action to it.
code :
<menuitem name="Sale Order Custom Document" action="<your_action_id>" id="sale_order_custom_document" parent="base.menu_custom" sequence="20"/>

Odoo 11.0 load css/scripts or something else into <head> only when a template is rendered

By : Sakthi
Date : March 29 2020, 07:55 AM
I wish this help you I found the solution into addons/web/views/webclient_templates.xml
As you can see they define a and inside it a that call a template called assets_common, defined above.
code :
<template id="web.login_layout" name="Login Layout">
        <t t-call="web.layout">
            <t t-set="html_data" t-value="{'style': 'height: 100%;'}"/>
            <t t-set="head">
                <t t-call-assets="web.assets_common" t-js="false"/>
                <t t-call-assets="web.assets_frontend" t-js="false"/>
                <t t-call-assets="web.assets_common" t-css="false"/>
                <t t-call-assets="web.assets_frontend" t-css="false"/>
            <t t-set="body_classname" t-value="'container'"/>

            <div class="row">
                <div class="col-md-6 col-md-offset-3 o_database_list">
                    <div class="text-center">
                        <img t-attf-src="/web/binary/company_logo{{ '?dbname='+db if db else '' }}"/>
                    <t t-raw="0"/>
                    <div class="text-center" t-if="not disable_footer">
                        <t t-if="not disable_database_manager">
                            <a class="" href="/web/database/manager">Manage Databases</a> |
                        <a href="https://www.odoo.com" target="_blank">Powered by <span>Odoo</span></a>
<template id="web.assets_common" name="Common Assets (used in backend interface and website)">
        <t t-call="web.less_helpers"/>

        <link rel="stylesheet" type="text/css" href="/web/static/lib/jquery.ui/jquery-ui.css"/>
        <link rel="stylesheet" type="text/css" href="/web/static/lib/fontawesome/css/font-awesome.css"/>
        <link rel="stylesheet" type="text/less" href="/web/static/lib/bootstrap-datetimepicker/src/less/_bootstrap-datetimepicker.less"/>
        <link rel="stylesheet" type="text/css" href="/web/static/lib/select2/select2.css"/>
        <link rel="stylesheet" type="text/css" href="/web/static/lib/select2-bootstrap-css/select2-bootstrap.css"/>

        <link rel="stylesheet" type="text/less" href="/web/static/src/less/fonts.less"/>
        <link rel="stylesheet" type="text/less" href="/web/static/src/less/navbar.less"/>
        <link rel="stylesheet" type="text/less" href="/web/static/src/less/mimetypes.less"/>
        <link rel="stylesheet" type="text/less" href="/web/static/src/less/modal.less"/>
        <link rel="stylesheet" type="text/less" href="/web/static/src/less/animation.less"/>
        <link rel="stylesheet" type="text/less" href="/web/static/src/less/rainbow.less"/>
        <link rel="stylesheet" type="text/less" href="/web/static/src/less/datepicker.less"/>
<!-- And ore stuffs -->

odoo 12 custom module menu not showing

By : user2401715
Date : March 29 2020, 07:55 AM
should help you out Hello i am new with odoo and having problem with it's docs. i tried to ask in odoo help but can't seems to be able to so i put it here. i followed odoo docs to create a custom module and still stuck on action and menu steps. i followed the guide thoroughly and tried to use same var name. but the result still same and app menu button wont show up. but the guide said that user would be able to see and modify the records , You have to create access rights CSV in module like this
code :

Add menu in custom module odoo 9

By : Kattel Naresh
Date : March 29 2020, 07:55 AM
With these it helps I want to add in my custom module a menu link to CONTACT.
Related Posts Related Posts :
  • Get mongod rs.status() results from a python script
  • ImportError: C extension: No module named 'parsing' not built
  • python pandas update column values related to previous updated row during iteration over it
  • 3 nested loops: Optimizing a simple simulation for speed
  • Assign subset of values to pandas dataframe with MultiIndex
  • How to group two sets of buttons on each top corner of the screen using Tkinter?
  • django login using class based for custom user
  • MRJob sort reducer output
  • Python Pandas Counts using rolling time window
  • Getting or editing a string from a column in a csv file with pandas
  • Python - Delete row in matrix/array if row contains
  • Using dicom Images with OpenCV in Python
  • Odoo ghost record
  • Creating and assigning multiple variables in a tkinter application
  • Graph dictionary
  • No changes to original dataframe after applying loop
  • AUC of Random forest model is lower after tuning parameters using hypergrid search and CV with 10 folds
  • Python: Reading multiple CSV files, and assigning each to a different variable
  • How to identify empty rectangle using OpenCV
  • How to iterate multilevel dataframe in python
  • How to limit the contour plot with a line plot?
  • Why subclassing a str or int behaves differently from subclising a list or dict?
  • Python decode with translation table
  • i need to click unordered links in the below URL using selenium, python
  • How to join pandas dataframe with itself?
  • How to apply a color cast to a video frame in OpenCV Python?
  • Is there any existing library for median filtering with kernel size greater then 5 using OpenCL acceleration in python?
  • Changing the color of points in scatter plot for different dummy values
  • Calculate center for each polygon in a list efficiently
  • Loading modules in the same Python package
  • replacing pixels in an imagewith pixels from another image python
  • Suggestion on picking the best options of two lists (minimum and maximum )python
  • Resetting Index in a Dataframe drops the Indexed column by 1 row
  • Convert number which are str from readlines to digits - python
  • Unable to authenitcate with python minds api
  • Print variables from a query in python
  • Ipython does not see the installed library
  • Javascript-like array-method chaining in Python?
  • PyQT: Get contents CustFormWidgetIem inside QListWidgetItem
  • Bottle server: HTTPResponse vs bottle.response
  • pytorch vgg model test on one image
  • Runtime scope and `main` symbol is different inside or outside a function
  • Use anaconda in pycharm (Import libraries error, updating anaconda and virtual environment)
  • how to get the sum of a CSV column list to print
  • Python plot drop lines with repeating value in column
  • receive binary file from POST request with BaseHTTPRequestHandler
  • D-Bus - 'ServiceUnknown' exception encountered while calling a remote procedure
  • Pandas .min() method doesn't seem fastest
  • Pandas: How to reference columns of structure: ('Name', n) ('Name', n+1)
  • Read a text file and remove all characters except alphabets & spaces in Python
  • Compute all powerset intersections of two lists
  • Applying literal_eval on string of lists of POS tags gives ValueError
  • Modelling a logic puzzle
  • What is the meaning of Copy_X in sklearn linear models
  • selenium.common.exceptions.ElementNotInteractableException: Message: Element is not displayed
  • pydev debugger does not stop in breakpoint
  • Python windows path regex
  • Flask and selenium-hub are not communicating when dockerised
  • How to use groupby on a single column and perform comparisons for multiple columns in Pandas?
  • Locate a python script without absolute path
  • shadow
    Privacy Policy - Terms - Contact Us © voile276.org