openerp

OpenERP 7 Reports Error

无人久伴 提交于 2019-12-25 07:29:49
问题 report.bpl.daily.transaction (<type 'exceptions.KeyError'>, KeyError(u'report.bpl.daily.transaction',), <traceback object at 0xb1911f04>) now I'm going to report generating part.i refer more modules in openerp & created my own code.but above error comes when i clicked print button. my requirement is get all data in bpl.daily.transaction.master table & view them. please advice me to implement this here is my bpl_report.py class class bpl_daily_transaction_report(osv.osv_memory): _name = 'bpl

Debug sales order workflow in OpenERP 6.1 web client

我与影子孤独终老i 提交于 2019-12-25 05:00:53
问题 I'm testing out the OpenERP 6.1 web client, and I sometimes have a sales order or other kind of document that gets stuck for some reason. I want to be able to look at the workflow diagram for this document to see exactly where it is stuck. One example that happened to me was a sales order that had shipped and the invoice was paid, but the sales order still wasn't done. After some digging, I found that one of the procurements was still running. I can still print the workflow from the GTK

Selectively display or hide button in the tree view in OpenERP

有些话、适合烂在心里 提交于 2019-12-25 04:09:07
问题 I have placed the buttons (icon is green arrow) in the treeview. I want to show a button only if the record has a Bill of Material (BOM). I do have logic how to find out that, but don't know how to selectively display or hide a button. Also, the display or hide button action should be triggered when the view is loaded. How I can do that since there is no view_on_load event like in Visual Basic for instance? Here is the tree view: Here is how the buttons are defined in XML file: <!-- mrp_bom -

How to prevent duplicated records and only update it?

妖精的绣舞 提交于 2019-12-25 03:11:48
问题 i want to add some records to another table model without duplicated it i create a function to check the table data and return specific values to add it in another table here is my code def lol_hah(self,cr,uid,ids,context=None): noobs_data=[] cr.execute("select DISTINCT ON (subject_id)subject_id from fci_attendance_line") noobs1 = cr.dictfetchall() ages = [li['subject_id'] for li in noobs1] print (ages) for k in ages: cr.execute( "select DISTINCT ON (student_id)student_id, count(present) AS

Many to one relation not working in fields.selection() in openerp

雨燕双飞 提交于 2019-12-25 02:04:40
问题 I need to create a selection field in openerp , it's values should load from a function and also this field needs many2one relation with another table.I have created the selection field and values are loaded from the function but many2one relation not working in it.below given is my code. def _sel_proj(self, cr, uid, context=None): cr.execute("""SELECT project.id,account.name FROM project_project project LEFT JOIN account_analytic_account account ON account.id = project.analytic_account_id

In OpenERP my timezone aware datetimes are still being treated as UTC — why?

安稳与你 提交于 2019-12-25 01:56:42
问题 I understand that OpenERP since 6.1 decided to exclusively use the UTC timezone for storage of datetimes, but why does it ignore the timezone of my tz-aware datetimes? 回答1: This is a bug in OpenERP probably since 6.1. This patch (against 7.0) fixes it. For the curious, the heart of the fix is a few lines to the .../openerp/osv/fields.py module: UTC = pytz.timezone('UTC') . . . class datetime(_column): ... _symbol_c = '%s' def _symbol_f(symb): if symb is None or symb == False: return None elif

How to bypass ODOO security rules given by administrator?

六眼飞鱼酱① 提交于 2019-12-25 01:52:59
问题 how to view settings which is not allowed to view for users in ODOO, for studying purpose only i.e., how to bypass the access rights 回答1: Simply you cannot this is a framework develloped with qualified community. If you can do that why use it at all!!!? The security in odoo is one of the things that make odoo, in the top framewoK league. 来源: https://stackoverflow.com/questions/47193832/how-to-bypass-odoo-security-rules-given-by-administrator

Change a field value within an If statement in Odoo 8

微笑、不失礼 提交于 2019-12-25 01:33:18
问题 I have been using Odoo 8 with Ubuntu 14.04. I have an onchange function and under that an If statement in which I am trying to change a field value but it does not get change . All I need is to assign the null value or 0.0 to the field but failed. My Python code is below: def _proposed_total(self): print self.emp_propose_allowance self.emp_propose_total = self.emp_propose_basic + self.emp_propose_allowance cr=self._cr uid=self._uid ids=self._ids val=int(self.employee_name) if(val): cr.execute

Create Record Error

此生再无相见时 提交于 2019-12-24 19:26:43
问题 HI any help please I have this code odoo 10 ,I try to create a one2many relation history_line the first class class db_backup_ept(models.Model): _name = 'db.autobackup.ept' name = fields.Char('Database', size=100, required='True',help='Database you want to schedule backups for') host = fields.Char('Host', size=100, required='True', default='localhost') port = fields.Char('Port', size=10, required='True', default='8069') history_line = fields.One2many('db.backup.line', 'backup_id', 'History',

How to get domain filter for following situation in odoo?

落爺英雄遲暮 提交于 2019-12-24 17:19:00
问题 The following code is for inspection.py file in configuration module(Own module). class asset1_inspection(osv.Model): _name = "asset1.inspection" _rec_name="inspection_name" MAINTENANCE_SELECTION=[ ('0','Daily'), ('1','Weekly'), ('2','Fortnight'), ('3','Bi-Monthly'), ('4','Quarterly'), ('5','Half-Yearly'), ('6','Yearly'), ('7','Bi-Yearly'), ] MAINTENANCE_TYPE=[ ('0', 'Corrective'), ('1', 'Preventive'), ('2', 'Predictive'), ] SHOUTDOWN_SELECTION=[ ('0','Yes'), ('1','No'), ] _columns = { 'asset