openerp-7

how to integrate Odoo with MySQL

随声附和 提交于 2019-12-05 15:52:15
I am trying to integrate Odoo(openerp-8) with MySQL on ubuntu server, to get the database access instead of postgresql. But I am unable to figure out the correct way to do that. I tried this link, but it didn't help me http://openerp-team.blogspot.de/2009/08/open-erp-server-with-mysql.html Any better ideas on configuring odoo with MySQL? In Odoo apps Store One Free module Available name is "External Database Sources" This module allows you to define connections to foreign databases using ODBC, Oracle Client or SQLAlchemy. Database sources can be configured in Settings > Configuration -> Data

how to set name of multiple textbox in openerp using qweb template engine?

夙愿已清 提交于 2019-12-04 22:25:52
Here is my code: <tr t-foreach="keyword" t-as="item"><td><t t-esc="item_value"/></td><td><input type="text" name=""/></td></tr> So here, Textbox are generated dynamically. Now I want to set textbox name to the value that is generated on <t t-esc="item_value"/> To set the text box name to item_value you need to use the t-att attribute: <input type="text" t-att-name="item_value"/> Hope this helps! 来源: https://stackoverflow.com/questions/21778744/how-to-set-name-of-multiple-textbox-in-openerp-using-qweb-template-engine

Related type field not showing value

亡梦爱人 提交于 2019-12-04 19:23:49
I have a related field 'region_id' that get the value from a many2one field in another class like this class activity_summary(osv.osv): _name = "budget.activity_summary" _rec_name = "activity_summarycode" _columns = { 'activity_summarycode' : fields.many2one("budget.activity_year", "Activity Summary Code", ondelete= "no action", required=True ), 'region_id' : fields.related("activity_summarycode", "mgmt_code", type="char", string = "Management Code", size=64, store = True), } But it's not giving the right value, instead when i save, it gives me this: browse_record(budget.org_table, 12). Why is

Inheritance in openERP (odoo)

天大地大妈咪最大 提交于 2019-12-03 08:51:57
问题 I am new in openERP and have an interview. Please explain the idea of different types of inheritance in openERP, i think it total 3 types. please explain it in very simple way from the perspective of interview. P.S: I am familiar with the concept of simple inheritance. 回答1: Inheritance : Inheritance mechanism is used to create idea of re usability.there re usability means that reuse the code of the parent class in any Object Oriented Programming. Advantages : Reduce code redundancy. Provides

Difference between _sql_constraints and _constraints on OpenERP/Odoo?

百般思念 提交于 2019-12-03 03:37:16
I noticed there are 2 kinds of constraints on Odoo ERP. But I want to know what is the difference between _sql_constraints vs _constraints? _sql_constraints = { ('email_uniq', 'unique(email)', ' Please enter Unique Email id.') } _constraints=[ (_check_qty_and_unitprice, u'Qty must be more than 0',['product_qty', 'cost_unit']), ] Bhavesh Odedra _sql_constraints means it will set constraint on postgresql database side. _sql_constraints = [ ('email_uniq', 'unique(email)', ' Please enter Unique Email id.'), ] Where: email_uniq means constraint name, unique(email) means unique is name of constraint

Inheritance in openERP (odoo)

放肆的年华 提交于 2019-12-02 21:28:12
I am new in openERP and have an interview. Please explain the idea of different types of inheritance in openERP, i think it total 3 types. please explain it in very simple way from the perspective of interview. P.S: I am familiar with the concept of simple inheritance. Inheritance : Inheritance mechanism is used to create idea of re usability.there re usability means that reuse the code of the parent class in any Object Oriented Programming. Advantages : Reduce code redundancy. Provides code reusability. Reduces source code size and improves code readability. Code is easy to manage and divided

How to get two _rec_names in odoo for two many2one fields in single class?

China☆狼群 提交于 2019-12-01 14:04:45
I have following code I want this two fields asset_catg_id and folio_num . These should be available for many2one two fields. How to write 2 _rec_name for a single class? class asset_asset(osv.osv): _inherit = "asset.asset" #_name = "asset_asset" _rec_name= "folio_num" #_rec_name = "assetmodelid_add" _columns = { 'name': fields.char('Asset Name', size=64), 'company_id1': fields.many2one('res.company', 'Substation', required=True), #'place1': fields.many2one('asset.parentlocation', 'Location'), 'asset_catg_id' : fields.many2one('asset.catg', 'Asset Catg Selection',select=True, required=True),

Odoo/OpenERP: hiding create button from treeview

强颜欢笑 提交于 2019-12-01 03:36:32
I have a situation here. I am using OpenERP 7. I am trying to hide Create button from tree view of my products. this can be done using <tree create="false" ..... but situation is like. i want to keep it when user opens the tree view directly from "Asset Management" Module. But hide it when i click on Reporting for treeview. I tried to use context like this from reporting button's function: context['prod1']='false' ctx = dict(context) print ctx['prod1'] return { 'type': 'ir.actions.act_window', 'res_model': 'product.product', 'view_type': 'form', 'view_mode': 'tree,form', 'target': 'current',

How does one use the store parameter of function fields?

自作多情 提交于 2019-11-27 09:23:05
I've tried reading the docs , but it's a bit confusing. Also, does store work with any other field types? To answer the second question first: The related and sparse fields are both subclasses of function so store may/should work with them, but I have not tried. The idea behind the store parameter is to tell OpenERP if it is okay to remember and save the results of calling the function in order to avoid calling it again. For how it works, let's look at the following example: 'order_status': fields.function( _order_status, type='char', method=True, store= . . . , string='Order Status', ), By

OpenERP 7 How to give users access to custom module in OpenERP 7?

穿精又带淫゛_ 提交于 2019-11-26 22:36:15
I have developed a custom Module in OpenERP 7, My administrator user can only see this module. 1-How can I give access to normal users to my custom modules? 2-What are the steps to solve this problem. Please give a detailed example. Create a one Security folder which has below two files. For example, test_security.xml and ir.model.access.csv security/test_security.xml file <?xml version="1.0" encoding="utf-8"?> <openerp> <data noupdate="0"> <record model="ir.module.category" id="module_category_name_test"> <field name="name">Management</field> <field name="sequence">7</field> </record> <record