I can't find my addons path (odoo 8) - odoo

I developed a new module and I want to add it to my odoo on the server but when I access to my files I don't find addons file in order to put the module. I tried a lot of paths but I didn't find it even my opt file is empty any suggestions or ideas please ? odoo is installed on ubuntu 14.0
I used to find my addons on opt/odoo/odoo
This code I added it just to be able to publish my question because I could not publish it without code
<record id="view_order_product_graph" model="ir.ui.view">
<field name="name">sale.report.graph</field>
<field name="model">sale.report</field>
<field name="arch" type="xml">
<graph string="Sales Analysis" type="pivot" stacked="True">
<field name="section_id" type="row"/>
<field name="date" interval="month" type="col"/>
<field name="price_total" type="measure"/>
</graph>
</field>
</record>

You can put your modules on the system where ever you want. What you have to know is, where to find the server config file. If you've installed Odoo by package installer, it should be in /etc/odoo/*.conf.
In this file you can add paths to the line addons_path=.... Save the config and restart the Odoo instance. Reload the Modules in Odoo and you will find the custom modules.

You can use Python interpreter:
>>> import openerp
>>> openerp.addons.__path__
['/usr/lib/python2.7/dist-packages/openerp/addons']
>>>

Related

Odoo 12 - New Theme - Arabic - Greys Out Site

I have created a new Theme for Odoo 12 (in EN and AR), the theme works fine on my Environment. But when the theme is copied to live environment, the EN site loads fine, but the AR site goes Grey completely. Can any suggest how to approach this problem. There is no evident error in console.
According to your question, it is possible CSS, qweb and js can't loads.
please add your CSS Js and qweb properly.
I add an example for css or js load
<odoo>
<template id="assets_backend" name="Demo project" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/module_name/static/src/css/custom.css"/>
<script type="text/javascript" src="/module_name/static/src/js/module_name.js"/>
</xpath>
</template>
</odoo>

Install custom module for Odoo Online with Base Import Module

I am using Odoo Online and trying to install a custom module that I have built. I installed the Base import module to allow for installing custom modules on an Odoo Online instance.
I then created a simple module consisting of the following:
mymodule/
__init__.py
__manifeset__.py
product.py
views/
product_product_tree.xml
Here is the content of the files:
__init__.py
from . import product
__manifest__.py
{
'name': "My Module",
'version': '1.0',
'depends': ['stock', 'sale', 'contacts', 'purchase'],
'description': """
Add custom functionality.
""",
# data files always loaded at installation
'data': [
'views/product_product_tree.xml',
],
}
product.py
from odoo import models, fields, api
class ProductProduct(models.Model):
_inherit = 'product.product'
x_reserved_qty = fields.Float(string='Reserved', readonly=True)
views/product_product_tree.xml
<odoo>
<data>
<record model="ir.ui.view" id="mymodule.product_product_tree">
<field name="name">x_product.product.tree</field>
<field name="model">product.product</field>
<field name="priority" eval="16"/>
<field name="inherit_id" ref="product.product_product_tree_view"/>
<field name="arch" type="xml">
<xpath expr="//tree" position="inside">
<field name="x_reserved_qty"/>
</xpath>
</field>
</record>
</data>
</odoo>
I then zip up the file and import it via the Base Import Module. Doing so results in an error and the module does not install. The error is occurring because the x_reserved_qty field does not exist on the model even though I have defined it in product.py. It seems that the python portion of the module is never getting executed.
I can confirm this by commenting out the <field name="x_reserved_qty"/> line, and reimporting the module. This time it imports successfully, but when I browse to Settings > Technical > Database Structure > Fields, I do not see my new field listed anywhere.
Does anybody know if python files are supported for custom modules imported via this Base Import Module method? The module description says:
This module allows authorized users to import a custom data module
(.xml files and static assests) for customization purpose.
It specifically mentions .xml and static assets, but not python files. So, I'm just wondering if I'm doing something wrong in my python files that is causing this not to work, or if it's actually designed not to support python files in modules.
It does not support Python files (probably for security purpuses). For the odoo server to compile your python files it has to be restarted. Something you can not do when you use runbot or Odoo hosts your instance.

Odoo Warning - Warning You are trying to install incompatible themes

Odoo Warning
Odoo Warning - Warning
You are trying to install incompatible themes:
- Add to css (To be installed)
- Default Theme (Installed)
Please uninstall your current theme before installing another one.
Warning: switching themes may significantly alter the look of your current website pages!
this code i am trying
<template id="styles_compiled" inherit_id="website.assets_frontend">
<xpath expr="link[last()]" position="after">
<link rel="stylesheet" href="/add_css_to_website/static/src/css/custom.css" />
</xpath>
</template>
</data>
I got Solution;
1. Please edit a file 'openerp.py' (main directory) and change the line:.
'category' : 'Theme/Backend', with 'category' : 'Website',
2. Next, run 'Update Apps List' from developer mode.
3. Now you can install the theme.
thanks this is working for me... thanks

How do I set favicon in Odoo / OpenERP?

How do I set a favicon for the web/e-commerce frontend of Odoo 8?
Ideally without changing Odoo core files, i.e. I do not simply want to overwrite addons/web/static/src/img/favicon.ico.
(This is Odoo 8, August 2014. It's likely that it will be easier to change the favicon in future versions.)
You have to override the web module with your own module. You can add a line like
'data': [ 'views/website_templates.xml' ]
in your __openerp__.py.
Put your favicon at static/src/img/favicon.ico and add a template to views/website_templates:
<template id="MYSITE_layout" inherit_id="website.layout" name="MYSITE layout" priority="17">
<xpath expr="//head//link" position="after">
<link rel="shortcut icon" href="/MYSITE_web/static/src/img/favicon.ico" type="image/x-icon"/>
</xpath>
</template>
Favicon is set in <head> html section, that is stored in template, and link there is hardcoded to point to /web/static/src/img/favicon.ico (see here), so if you want to change it you have to change either icon file itself or change proper template to point to icon file you want.

ASP.NET Project Build Script For SVN and Cruise Control

I have a project in ASP.NET MVC 3, the solution file contains 28 projects in total. This all is in a directory which is configured with tortoise SVN to always get the latest updates from SVN.
I have also installed curisecontrol on my VPS box, where these whole solution exist. I have also created a website in my IIS and everything is in order now.
Can anyone guide me into some tutorials for the following:
How to setup curise control web dashboard, so my clients can have look on the builds and its reports
How to use MSBuild with Cruise Control in some step by step tuts
Any sample build script with following features
Email notification on build fail or successful build
stop the deployment if build is not successfull and create a build report
Thanks in advance
How to use MSBuild with Cruise Control in some step by step tuts
http://www.codeproject.com/Articles/12985/Practical-NET2-and-C-2-An-introduction-to-MSBuild
By default, the web dashboard of ccnet displays the result of build without exact error messages. To display the error in web dashboard, go to “C:\Program Files\CruiseControl.NET\webdashboard” and open file “dashboard.config”.
There, you will find the below code:
Collapse | Copy Code
xsl\header.xsl
xsl\modifications.xsl
xsl\unittests.xsl
xsl\MsTestSummary.xsl
xsl\fxcop-summary.xsl
xsl\NCoverSummary.xsl
xsl\SimianSummary.xsl
xsl\fitnesse.xsl
Now add this line in the above code:
Collapse | Copy Code
xsl\compile-msbuild.xsl
Therefore the code will become:
<buildReportBuildPlugin>
<xslFileNames>
<xslFile>xsl\header.xsl</xslFile>
<xslFile>xsl\modifications.xsl</xslFile>
<xslFile>xsl\compile-msbuild.xsl</xslFile>
<xslFile>xsl\unittests.xsl</xslFile>
<xslFile>xsl\MsTestSummary.xsl</xslFile>
<xslFile>xsl\fxcop-summary.xsl</xslFile>
<xslFile>xsl\NCoverSummary.xsl</xslFile>
<xslFile>xsl\SimianSummary.xsl</xslFile>
<xslFile>xsl\fitnesse.xsl</xslFile>
</xslFileNames>
</buildReportBuildPlugin>
We can also send the email to the user groups if the build fails.
<workingDirectory>D:\Projects\TheWorks\Applications\ProjectFolder</workingDirectory>
<buildArgs>ProjectName.msbuild /p:Configuration=Debug</buildArgs>
<timeout>1800</timeout>
<!-- 30 minutes -->
<logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MSBuild.dll
</logger>
</msbuild>
</tasks>
<publishers>
<statistics />
<xmllogger />
<email from="EMAIL ADDRESS" mailhost="HOSTNAME"
mailhostPassword="PASSWORD" mailhostUsername="USERNAME"
includeDetails="true">
<users>
<user name="Jitendra Zaa"
address=ilovenagpur#gmail.com
group="AdminGroup" />
<user name="Santosh Karemore"
address=santosh.karemore#gmail.com
group="AdminGroup" />
<user name="Manoranjan sahoo"
address=manoranjan.sahoo#gmail.com
group="AdminGroup" />
<user name="Minal Shirsikar"
address="admin#shivasoft.in" group="Emul" />
</users>
<groups>
<group name="Emul" notification="failed" />
<group name="AdminGroup"
notification="failed" />
</groups>
</email>
</publishers>
</project>
The tags are self explanatory.
There may be following types of notification:
Failed
Fixed
Always
How to setup curise control web dashboard, so my clients can have look on the builds and its reports
-> you have to set a pwd in dashboard config file first and in web page, after set pwd you will be able to add plugin to make report like build report project report unit test report nant report check this url http://www.codeproject.com/Articles/70955/Set-up-the-Web-Dashboard-of-CCNet-to-Display-the-C
in ccnet documentation you will see all samples and step:
http://confluence.public.thoughtworks.org/display/CCNET/Documentation