openerp-7

After inheriting CRM-Lead unable to hide or add fields to my Custom module in Openerp

时间秒杀一切 提交于 2019-12-24 13:23:02
问题 I have created a new custom module and inherited CRM-LEAD. I'm trying add new fields and hide existing fields.I couldn't do it.Can anyone please tell me how can I do it. My code is __init__.py : import lead __openerp__.py : { 'name': 'Lead Information', 'version': '0.1', 'category': 'Tools', 'description': """This module is Lead information.""", 'author': 'Nitesh', 'website': '', 'depends': ['crm'], 'init_xml': ['lead_view.xml'], 'update_xml': [], 'demo_xml': [], 'installable': True, 'active'

Domain Filter is not working on many2many field in OpenERP 7.0

被刻印的时光 ゝ 提交于 2019-12-24 04:30:05
问题 I have added new many2many fields into the wizard view and also put invoice filed of many2many fields Field on py file : 'sup_inv_entries':fields.many2many('account.invoice', 'sup_inv_rel', 'sup_inv_id1', 'sup_new_inv_id', 'Invoice Entries'), Field on XML view file: <field name="sup_inv_entries" nolabel="1" domain="['|',('period_id','in',period_ids),('&',('date_invoice','>',date_from),('date_invoice','<',date_to)),'&',('type','=','in_invoice'),('state','=','open')]"> I want to make the filter

how to add a field in res.partner in open erp

天大地大妈咪最大 提交于 2019-12-22 19:43:41
问题 I'm new to OpenErp. I want to Add a new field "mother_name" in res.partner.So i have added the following code to res.partner.py In column's i have add like this _columns = { 'name': fields.char('Name', size=128, required=True, select=True), 'date': fields.date('Date', select=1), 'title': fields.many2one('res.partner.title', 'Title'), 'parent_id': fields.many2one('res.partner', 'Related Company'), 'child_ids': fields.one2many('res.partner', 'parent_id', 'Contacts', domain=[('active','=',True)]

how to add a field in res.partner in open erp

五迷三道 提交于 2019-12-22 19:41:59
问题 I'm new to OpenErp. I want to Add a new field "mother_name" in res.partner.So i have added the following code to res.partner.py In column's i have add like this _columns = { 'name': fields.char('Name', size=128, required=True, select=True), 'date': fields.date('Date', select=1), 'title': fields.many2one('res.partner.title', 'Title'), 'parent_id': fields.many2one('res.partner', 'Related Company'), 'child_ids': fields.one2many('res.partner', 'parent_id', 'Contacts', domain=[('active','=',True)]

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

岁酱吖の 提交于 2019-12-17 06:14:31
问题 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. 回答1: 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

How to set a specific lines order in a one2many field in OpenERP7?

坚强是说给别人听的谎言 提交于 2019-12-13 20:14:17
问题 Is it possible to order lines in a one2many field by a specific column without modifying the original class order? Let's put an example: The model res.partner is ordered by the field name . So, if you open a res.partner view, the rows are going to be ordered by their name. Now, I'm in a view of other model. This model has a one2many field pointing to res.partner , this means that I'm seeing a list of partners, and they're ordered by name too. Can I always see this last list ordered by other

odoo - get value from many2one field

老子叫甜甜 提交于 2019-12-13 12:29:36
问题 My code: class SaleOrder(osv.Model): _inherit = 'sale.order' _columns = { 'xx_delivery_date': fields.date(string='Delivery date'), 'xx_payment_method': fields.many2one('xx.payment.method', string='Payment method'), 'xx_insurance_type': fields.many2one('xx.insurance.type', string='Insurance') } def _amount_insurance(self, cr, uid, val1, context=None): val = 0.0 insurance_chosen = self.pool.get('xx.insurance.type').browse(cr, uid, insurance_percentage.id,context=context) val = val1*insurance

How to convert numbers to words in odoo?

十年热恋 提交于 2019-12-13 04:37:06
问题 In the invoice, I want to convert total amount to words in Indian numbering system(hundreds, thousands, lakhs, crores). I cant use amount_to_text library module since it has been set in euro currency. So how to write function in python to achieve this? (dont worry abt indendation,its correct in my system) When i tried this code in my custom module, i get this error TypeError: _int2word() takes exactly 1 argument (7 given) class account_invoice(models.Model): _inherit = "account.invoice" print

How to hide an existing field in an OpenERP7 view?

心不动则不痛 提交于 2019-12-13 00:41:15
问题 I am trying to hide a field called street2 in an existing OpenERP7 view only if a field called is_company values True . I have to do this using inheritance, so I created a new view with a form called res.partner.extended.form , which inherits from the view I want to modify ( base.view_partner_form ). To make street2 invisible, I left my inherited form this way: <?xml version="1.0" encoding="utf-8"?> <openerp> <data> <record model="ir.ui.view" id="res_partner_extended_view"> <field name="name"

Hide lines on tree view - openerp 7

a 夏天 提交于 2019-12-12 07:05:45
问题 I want to hide all lines (not only there cointaner) in sequence tree view (the default view). I must hide all lines if code != 'foo' but the attrs atribute don't work on tree views, so how can i filter/hide this? I don't have any code already, because i'm newbie in openerp and i dont know what to change. The model is ir.sequence and is view (i think). 回答1: Attrs is to be used to hide columns / fields conditionally but not the record, to hide records domain must be used. If there is default