openerp

OpenERP customizing Journal Voucher view

纵然是瞬间 提交于 2019-12-24 07:14:20
问题 I'm trying to do a simple customization that is not working for some odd reason: init .py: import account_voucher_hash openerp .py { "name" : "Hash Voucher", "version" : "1.1", "depends" : [ 'base', 'account_voucher', ], "author" : "me", "description": """The Module customizes Vouchers""", 'website': 'http://abc.com', 'init_xml': [], 'update_xml': [ 'account_voucher_view_hash.xml', ], 'demo_xml': [], 'installable': True, 'active': False, } account_voucher_hash.py from osv import fields, osv

Python asynchronous processing in existing loop

天涯浪子 提交于 2019-12-24 06:45:26
问题 I'm creating a module for OpenERP in which I have to launch an ongoing process. OpenERP runs in a continuous loop. My process has to be launched when I click on a button, and it has to keep running without holding up OpenERP's execution. To simplify it, I have this code: #!/usr/bin/python import multiprocessing import time def f(name): while True: try: print 'hello', name time.sleep(1) except KeyboardInterrupt: return if __name__ == "__main__": count = 0 while True: count += 1 print "Pass %d"

Odoo : inputing employee based on department_id, one2many domain

99封情书 提交于 2019-12-24 06:37:39
问题 from this picture here when i click on the add new item, i want employee list that show up is only employees from the selected department, in the pict case is "IT" department. iam using odoo v8 ive tried this in my o2m field : class overtime(models.Model): _name = 'overtime.overtime' department_id = fields.Many2one('hr.department', string='Department', readonly=True, states={'draft': [('readonly', False)]}) employee_ids = fields.One2many('overtime.overtime_details', 'overtime_id', string=

Odoo API web service doesn't return anything

蓝咒 提交于 2019-12-24 06:34:45
问题 I am beginner for knowing API web service in Odoo for Android. I follow this documentation https://www.odoo.com/documentation/8.0/api_integration.html. , so I make this code: <?php require_once('ripcord-master/ripcord.php'); $url = "http://100.100.1.148:8069"; //local IP $db = "UAT_DISTRICT"; $username = "openpg"; $password = "serving"; $info = ripcord::client('https://demo.odoo.com/start')->start(); $common = ripcord::client("$url/xmlrpc/2/common"); $common->version(); //Authenticate the

openerp when in view mode fields lose context

大城市里の小女人 提交于 2019-12-24 05:33:14
问题 From a form "A" I want to open a specific form "B" when I click on a Many2One field. I placed into the context of this field the usual 'form_view_ref': 'model.form_id' but this works only when "A" is in edit mode. If it is in view mode it opens instead the "C" form. I noticed that JSON request just "lose" the context i set and send the standard empty one (with just timezone/uid etc.) I never realized this before. Is it some kind of bug? 回答1: @Alessandro Ruffolo, context is variable between

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 remove Save Button from form view

心不动则不痛 提交于 2019-12-24 03:51:18
问题 I used openerp version 7 & i created a form view.but its only used to display data .not to add / edit data.above 2 selection boxes for query records. my requirement is need to remove save button from top left corner EDITED : Code added for relevant to that area <record model="ir.actions.act_window" id="bpl_worker_summary_action"> <field name="name">Worker Summary</field> <field name="res_model">bpl.worker.summary</field> <field name="view_type">form</field> <field name="view_mode">form</field

Show to be deleted items in popup window

柔情痞子 提交于 2019-12-24 03:19:23
问题 I am using Odoo 10e. I want a simple functionality that whenever i wanted to delete one or more then one item from a list view or from a specific list view only. I want to show all of the items which are selected for deleted to show their name in popup window so that user can have a quick review what's he is going to delete. I know user can see details in list view but i want to give a glimpse to user in shape of model window that this is going to be deleted. Are you sure to delete ? If user

Odoo 10: Open a form view in an editable tree view

耗尽温柔 提交于 2019-12-24 02:58:11
问题 I am creating a new model in Odoo 10. This model is accessed through a menu item which launches tree view. Tree view is editable but I would like to be able to launch form view for the specific record user is editing if user wants to. Is there any option to either put a button in the tree view to launch the form view or something? Could someone highlight the steps required or point to a similar code example? Thanks, 回答1: using a buttons : in tree view: <tree editable="top"> ... ... <button

openerp Message_post error..NameError: global name '_' is not defined

主宰稳场 提交于 2019-12-24 02:17:28
问题 I have created a custom module with chatter in the form. I want to post a custom message. but I am getting following error. File "/opt/openerp/my_modules/forum/forum.py", line 22, in function_which_post_msg self.message_post(cr, uid, ids, body=_("New Question has been <b>created</b>"), context=context) NameError: global name '_' is not defined my .py file is import datetime import time import openerp from openerp.osv import osv, fields class Course(osv.osv): _name = "forum.course" _inherit =