openerp-7

How to achieve the following scenario in Odoo?

为君一笑 提交于 2019-12-11 13:39:07
问题 Trying to create an calendar event on the click of a button in my custom module. python code is as follows: class mom_meeting(osv.Model): _name = "mom.meeting" _rec_name = 'meet_ref' _inherit = 'mail.thread' STATUS_SELECTION=[ ('Block A - Board Room', 'Block A - Board Room'), ('Block B - Board Room', 'Block B - Board Room'), ('Block B - Discussion Room - 1', 'Block B - Discussion Room - 1'), ('Block B - Discussion Room - 2', 'Block B - Discussion Room - 2'), ] _columns = { 'ch_prsn': fields

Populate DropDown List dynamically

时光总嘲笑我的痴心妄想 提交于 2019-12-11 12:59:04
问题 I am trying to populate my DDL(selection) from value of another DDL in OpenERP. Here is the code, that i have tried. Here is my View XML: <h1> <label for="categ1" string="Parent category"/> <field name="categ1" on_change="Product_Category_OnChange(categ1)" /> </h1> <newline/> <h1> <label for="my_products" string="Products" /> <field name="my_products" /> </h1> My _columns for this view is like: _columns = { 'categ1':fields.many2one('product.category','Parent Category',required=True), 'my

keyError, When import data in openerp

為{幸葍}努か 提交于 2019-12-11 11:43:10
问题 File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20140112_001021-py2.7.egg/openerp/osv/osv.py", line 199, in execute res = self.execute_cr(cr, uid, obj, method, *args, **kw) File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20140112_001021-py2.7.egg/openerp/osv/osv.py", line 187, in execute_cr return getattr(object, method)(cr, uid, *args, **kw) File "/usr/local/lib/python2.7/dist-packages/openerp-7.0_20140112_001021-py2.7.egg/openerp/addons/base_import/models.py", line 219, in

In OpenERP, Import and Export menu not shown

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 11:41:50
问题 I'm learning OpenERP . I created a new Database but I want to import csv file but not seeing it's menu. Can Any one help me where from I get? Thanks in Advance, Cheers 回答1: Following step try it. Setting Menu => Configuration => General Settings You See the Import / Export menu . Now mark it True and than go your place where you want to import or Export file. Hope you will see the what you desire. ;-) 来源: https://stackoverflow.com/questions/21727723/in-openerp-import-and-export-menu-not-shown

Onclick of Lead couldn't get the details of Lead in custom Module in openerp

对着背影说爱祢 提交于 2019-12-11 10:46:52
问题 I'm creating a custom module and trying to convert the Lead to Opportunity.Now i'm fetching all the leads and showing like in img1. But actually i want to display like img2 and on click of any lead it should take me to simlar scrren like img3 where i can have option to converting a lead to Opportunity. My problem is on click of any lead in img1 ,there is no response.Thanks in advance. My Code is lead.py from osv import osv from osv import fields class crm_lead(osv.osv): _name = 'crm.lead'

How to get the sum of field in a column?

风流意气都作罢 提交于 2019-12-11 10:36:32
问题 I have this table student_resources and here are data that it hold: p_id p_name res_code tax base_amt date 2300 |A student |WC158 - EWT 1% |133.93 |13392.86 |2015-07-01 2300 |A student |WC158 - EWT 1% |62.50 |6250.00 |2015-07-01 901 |B student |WC158 - EWT 1% |8.31 |830.58 |2015-06-09 2831 |C student |WC160 - EWT 2% |2736.84 |136842.11 |2015-06-04 905 |D student |WC158 - EWT 1% |31.25 |3125.00 |2015-06-16 905 |D student |WC158 - EWT 1% |31.25 |3125.00 |2015-06-29 905 |D student |WC158 - EWT 1

OpenERP : Multiple module overriding onchange function

徘徊边缘 提交于 2019-12-11 09:53:51
问题 I need to override onchange_partner_id function present in sale.order but I'm working on a system that already have a module overriding this function. I tried to write my own onchange_partner_id with similar code : def onchange_partner_id(self, cr, uid, ids, part): res = super(sale_order, self).onchange_partner_id(cr, uid, ids, part) // doing some stuff and adding it to res['value']['myfield'] return res But my function isn't read by OpenERP. So my question is, is it possible to have multiple

How can override write method without executing the super write?

谁说我不能喝 提交于 2019-12-11 09:08:35
问题 in membership.py file the class account_invoice_line wich inherits 'account.invoice.line' and override the write method wich will create a new member line when a new line of invoice is created in an existed invoice. For me its not correct when a a new line of invoice is created in an existing invoice it must be related to the existed member line and not create a new member line so i must override the write methode, but the problem that the write method in member.py file is always executed .

Difference between _sql_constraints and _constraints on OpenERP/Odoo?

非 Y 不嫁゛ 提交于 2019-12-09 04:52:07
问题 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']), ] 回答1: _sql_constraints means it will set constraint on postgresql database side. _sql_constraints = [ ('email_uniq', 'unique(email)', ' Please enter Unique Email id.')

Create custom field at delivery order (stock.picking.out) which gets its value from sales order

放肆的年华 提交于 2019-12-08 09:01:46
问题 I have a sales order form which contains a custom delivery date field. Now I want to pass the value from delivery date field in sales order to the commitment date field in delivery order (stock.picking.out). Did we make two columns in both stock.picking and stock.picking.out? And also how can I take the delivery date field value from sales order during the automatic creation of delivery order(at the click of confirm order button). I am using v7. Thanks in advance 回答1: I got the answer from