bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def _total_contrib(self, cr, uid, ids, field_names, arg, context={}): line_pool = self.pool.get('hr.contibution.register.line') period_id = self.pool.get('account.period').search(cr,uid,[('date_start','<=',time.strftime('%Y-%m-%d')),('date_stop','>=',time.strftime('%Y-%m-%d'))])[0] fiscalyear_id = self.pool.get('accoun...
def _total_contrib(self, cr, uid, ids, field_names, arg, context={}): line_pool = self.pool.get('hr.contibution.register.line') period_id = self.pool.get('account.period').search(cr,uid,[('date_start','<=',time.strftime('%Y-%m-%d')),('date_stop','>=',time.strftime('%Y-%m-%d'))])[0] fiscalyear_id = self.pool.get('accoun...
471,100
def _total(self, cr, uid, ids, field_names, arg, context): res={} for line in self.browse(cr, uid, ids, context): res[line.id] = line.emp_deduction + line.comp_deduction return res
def _total(self, cr, uid, ids, field_names, arg, context): res={} for line in self.browse(cr, uid, ids, context): res[line.id] = line.emp_deduction + line.comp_deduction return res
471,101
def _total(self, cr, uid, ids, field_names, arg, context): res={} for line in self.browse(cr, uid, ids, context): res[line.id] = line.emp_deduction + line.comp_deduction return res
def _total(self, cr, uid, ids, field_names, arg, context): res={} for line in self.browse(cr, uid, ids, context): res[line.id] = line.emp_deduction + line.comp_deduction return res
471,102
def execute_function(self, cr, uid, id, value, context): """ self: pointer to self object cr: cursor to database uid: user id of current executer """
def execute_function(self, cr, uid, id, value, context): """ self: pointer to self object cr: cursor to database uid: user id of current executer """
471,103
def execute_function(self, cr, uid, id, value, context): """ self: pointer to self object cr: cursor to database uid: user id of current executer """
def execute_function(self, cr, uid, id, value, context): """ self: pointer to self object cr: cursor to database uid: user id of current executer """
471,104
def _calculate(self, cr, uid, ids, field_names, arg, context): res = {} for rs in self.browse(cr, uid, ids, context): allow = 0.0 deduct = 0.0 others = 0.0
def _calculate(self, cr, uid, ids, field_names, arg, context): res = {} for rs in self.browse(cr, uid, ids, context): allow = 0.0 deduct = 0.0 others = 0.0
471,105
def onchange_amount(self, cr, uid, ids, amount, typ): amt = amount if typ and typ == 'per': if int(amt) > 0: amt = amt / 100 return {'value':{'amount':amt}}
def onchange_amount(self, cr, uid, ids, amount, typ): amt = amount if typ and typ == 'per': if int(amt) > 0: amt = amt / 100 return {'value':{'amount':amt}}
471,106
def onchange_amount(self, cr, uid, ids, amount, typ): amt = amount if typ and typ == 'per': if int(amt) > 0: amt = amt / 100 return {'value':{'amount':amt}}
def onchange_amount(self, cr, uid, ids, amount, typ): amt = amount if typ and typ == 'per': if int(amt) > 0: amt = amt / 100 return {'value':{'amount':amt}}
471,107
def execute_function(self, cr, uid, id, value, context): line_pool = self.pool.get('hr.payslip.line.line') res = 0 ids = line_pool.search(cr, uid, [('slipline_id','=',id), ('from_val','<=',value), ('to_val','>=',value)])
def execute_function(self, cr, uid, id, value, context): line_pool = self.pool.get('hr.payslip.line.line') res = 0 ids = line_pool.search(cr, uid, [('slipline_id','=',id), ('from_val','<=',value), ('to_val','>=',value)])
471,108
def execute_function(self, cr, uid, id, value, context): line_pool = self.pool.get('hr.payslip.line.line') res = 0 ids = line_pool.search(cr, uid, [('slipline_id','=',id), ('from_val','<=',value), ('to_val','>=',value)])
def execute_function(self, cr, uid, id, value, context): line_pool = self.pool.get('hr.payslip.line.line') res = 0 ids = line_pool.search(cr, uid, [('slipline_id','=',id), ('from_val','<=',value), ('to_val','>=',value)])
471,109
def _makeOrder(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) mod_obj = pool.get('ir.model.data') result = mod_obj._get_id(cr, uid, 'sale', 'view_sales_order_filter') id = mod_obj.read(cr, uid, result, ['res_id']) case_obj = pool.get('crm.opportunity') sale_obj = pool.get('sale.order') partner_obj = p...
def _makeOrder(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) mod_obj = pool.get('ir.model.data') result = mod_obj._get_id(cr, uid, 'sale', 'view_sales_order_filter') id = mod_obj.read(cr, uid, result, ['res_id']) case_obj = pool.get('crm.opportunity') sale_obj = pool.get('sale.order') partner_obj = p...
471,110
def mkdir(self, node, basename): """Create the specified directory.""" cr = False if not node: raise OSError(1, 'Operation not permited.') cr, uid = self.get_node_cr(node) try: basename =_to_unicode(basename) cdir = node.create_child_collection(cr, basename) self._log.debug("Created child dir: %r", cdir) except Except...
def mkdir(self, node, basename): """Create the specified directory.""" cr = False if not node: raise OSError(1, 'Operation not permited.') cr = self.get_node_cr(node) try: basename =_to_unicode(basename) cdir = node.create_child_collection(cr, basename) self._log.debug("Created child dir: %r", cdir) except Exception,e...
471,111
def _compute_day(self, cr, uid, ids, fields, args, context={}): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Openday’s IDs @return: difference between current date and log date @param context: A standard dictionary for contextual va...
def _compute_day(self, cr, uid, ids, fields, args, context={}): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Openday’s IDs @return: difference between current date and log date @param context: A standard dictionary for contextual va...
471,112
def _compute_day(self, cr, uid, ids, fields, args, context={}): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Openday’s IDs @return: difference between current date and log date @param context: A standard dictionary for contextual va...
def _compute_day(self, cr, uid, ids, fields, args, context={}): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Openday’s IDs @return: difference between current date and log date @param context: A standard dictionary for contextual va...
471,113
def __init__(self,server='localhost',port=8069,uri='http://localhost:8069'): self._server=server self._port=port self._uri=uri self._obj_list=[] self._dbname='' self._uname='admin' self._pwd='a' self._login=False self._running=False self._uid=False self._iscrm=True self.partner_id_list=None self.protocol=None
def __init__(self,server='localhost',port=8069,uri='http://localhost:8069'): self._server=server self._port=port self._uri=uri self._obj_list=[] self._dbname='' self._uname='admin' self._pwd='a' self._login=False self._running=False self._uid=False self._iscrm=True self.partner_id_list=None self.protocol=None
471,114
def getitem(self, attrib): v=self.__getattribute__(attrib) return str(v)
def getitem(self, attrib): v=self.__getattribute__(attrib) return str(v)
471,115
def setitem(self, attrib, value): return self.__setattr__(attrib, value)
def setitem(self, attrib, value): return self.__setattr__(attrib, value)
471,116
def GetDBList(self): conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/db') try: db_list = execute(conn, 'list') if db_list == False: self._running=False return [] else: self._running=True except: db_list=-1 self._running=True return db_list
def GetDBList(self): conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/db') try: db_list = execute(conn, 'list') if db_list == False: self._running=False return [] else: self._running=True except: db_list=-1 self._running=True return db_list
471,117
def login(self,dbname, user, pwd): self._dbname = dbname self._uname = user self._pwd = pwd conn = xmlrpclib.ServerProxy(str(self._uri) + '/xmlrpc/common') uid = execute(conn,'login',dbname, ustr(user), ustr(pwd)) return uid
def login(self,dbname, user, pwd): self._dbname = dbname self._uname = user self._pwd = pwd conn = xmlrpclib.ServerProxy(str(self._uri) + '/xmlrpc/common') uid = execute(conn,'login',dbname, ustr(user), ustr(pwd)) return uid
471,118
def GetAllObjects(self): conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[]) objects = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','read',ids,['model']) obj_list = [item['model'] for item in obje...
def GetAllObjects(self): conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[]) objects = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','read',ids,['model']) obj_list = [item['model'] for item in obje...
471,119
def GetObjList(self): self._obj_list=list(self._obj_list) self._obj_list.sort(reverse=True) return self._obj_list
def GetObjList(self): self._obj_list=list(self._obj_list) self._obj_list.sort(reverse=True) return self._obj_list
471,120
def InsertObj(self, obj_title,obj_name,image_path): self._obj_list=list(self._obj_list) self._obj_list.append((obj_title,obj_name,ustr(image_path))) self._obj_list.sort(reverse=True)
def InsertObj(self, obj_title,obj_name,image_path): self._obj_list=list(self._obj_list) self._obj_list.append((obj_title,obj_name,ustr(image_path))) self._obj_list.sort(reverse=True)
471,121
def DeleteObject(self,sel_text): self._obj_list=list(self._obj_list) for obj in self._obj_list: if obj[0] == sel_text: self._obj_list.remove(obj) break
def DeleteObject(self,sel_text): self._obj_list=list(self._obj_list) for obj in self._obj_list: if obj[0] == sel_text: self._obj_list.remove(obj) break
471,122
def ArchiveToOpenERP(self, recs, mail): import win32con conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/object') flag = False new_msg = ext_msg ="" message_id = referances = None try: session = win32com.client.Dispatch("MAPI.session") session.Logon('Outlook') objMessage = session.GetMessage(mail.EntryID, mail.Pare...
def ArchiveToOpenERP(self, recs, mail): import win32con conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/object') flag = False new_msg = ext_msg ="" message_id = referances = None try: session = win32com.client.Dispatch("MAPI.session") session.Logon('Outlook') objMessage = session.GetMessage(mail.EntryID, mail.Pare...
471,123
def ArchiveToOpenERP(self, recs, mail): import win32con conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/object') flag = False new_msg = ext_msg ="" message_id = referances = None try: session = win32com.client.Dispatch("MAPI.session") session.Logon('Outlook') objMessage = session.GetMessage(mail.EntryID, mail.Pare...
def ArchiveToOpenERP(self, recs, mail): import win32con conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/object') flag = False new_msg = ext_msg ="" message_id = referances = None try: session = win32com.client.Dispatch("MAPI.session") session.Logon('Outlook') objMessage = session.GetMessage(mail.EntryID, mail.Pare...
471,124
def ArchiveToOpenERP(self, recs, mail): import win32con conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/object') flag = False new_msg = ext_msg ="" message_id = referances = None try: session = win32com.client.Dispatch("MAPI.session") session.Logon('Outlook') objMessage = session.GetMessage(mail.EntryID, mail.Pare...
def ArchiveToOpenERP(self, recs, mail): import win32con conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/object') flag = False new_msg = ext_msg ="" message_id = referances = None try: session = win32com.client.Dispatch("MAPI.session") session.Logon('Outlook') objMessage = session.GetMessage(mail.EntryID, mail.Pare...
471,125
def ArchiveToOpenERP(self, recs, mail): import win32con conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/object') flag = False new_msg = ext_msg ="" message_id = referances = None try: session = win32com.client.Dispatch("MAPI.session") session.Logon('Outlook') objMessage = session.GetMessage(mail.EntryID, mail.Pare...
def ArchiveToOpenERP(self, recs, mail): import win32con conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/object') flag = False new_msg = ext_msg ="" message_id = referances = None try: session = win32com.client.Dispatch("MAPI.session") session.Logon('Outlook') objMessage = session.GetMessage(mail.EntryID, mail.Pare...
471,126
def ArchiveToOpenERP(self, recs, mail): import win32con conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/object') flag = False new_msg = ext_msg ="" message_id = referances = None try: session = win32com.client.Dispatch("MAPI.session") session.Logon('Outlook') objMessage = session.GetMessage(mail.EntryID, mail.Pare...
def ArchiveToOpenERP(self, recs, mail): import win32con conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/object') flag = False new_msg = ext_msg ="" message_id = referances = None try: session = win32com.client.Dispatch("MAPI.session") session.Logon('Outlook') objMessage = session.GetMessage(mail.EntryID, mail.Pare...
471,127
def ArchiveToOpenERP(self, recs, mail): import win32con conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/object') flag = False new_msg = ext_msg ="" message_id = referances = None try: session = win32com.client.Dispatch("MAPI.session") session.Logon('Outlook') objMessage = session.GetMessage(mail.EntryID, mail.Pare...
def ArchiveToOpenERP(self, recs, mail): import win32con conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/object') flag = False new_msg = ext_msg ="" message_id = referances = None try: session = win32com.client.Dispatch("MAPI.session") session.Logon('Outlook') objMessage = session.GetMessage(mail.EntryID, mail.Pare...
471,128
def IsCRMInstalled(self): conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[('model','=','crm.lead')]) return id
def IsCRMInstalled(self): conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[('model','=','crm.lead')]) return id
471,129
def GetCSList(self): conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') ids = execute(conn,'execute',self._dbname,int(int(self._uid)),self._pwd,'crm.case.section','search',[]) objects = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'crm.case.section','read',ids,['name']) obj_list = [ustr(item['nam...
def GetCSList(self): conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') ids = execute(conn,'execute',self._dbname,int(int(self._uid)),self._pwd,'crm.case.section','search',[]) objects = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'crm.case.section','read',ids,['name']) obj_list = [ustr(item['nam...
471,130
def GetPartners(self, search_partner=''): conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') ids=[] obj_list=[] domain = [] if not search_partner.strip() == '': domain.append(('name','ilike',ustr(search_partner))) ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','search',domain) i...
def GetPartners(self, search_partner=''): conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') ids=[] obj_list=[] domain = [] if not search_partner.strip() == '': domain.append(('name','ilike',ustr(search_partner))) ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','search',domain) i...
471,131
def GetObjectItems(self, search_list=[], search_text=''): res = [] conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') for obj in search_list: object_ids = execute ( conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[('model','=',obj)]) object_name = execute( conn,'execute',self._dbname,int...
def GetObjectItems(self, search_list=[], search_text=''): res = [] conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') for obj in search_list: object_ids = execute ( conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[('model','=',obj)]) object_name = execute( conn,'execute',self._dbname,int...
471,132
def CreateCase(self, section, mail, partner_ids, with_attachments=True): import eml flag = False id = -1 try: conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') email=eml.generateEML(mail) message_id = None session = win32com.client.Dispatch("MAPI.session") session.Logon('Outlook') objMessage = session.GetMess...
def CreateCase(self, section, mail, partner_ids, with_attachments=True): import eml flag = False id = -1 try: conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') email=eml.generateEML(mail) message_id = None session = win32com.client.Dispatch("MAPI.session") session.Logon('Outlook') objMessage = session.GetMess...
471,133
def MakeAttachment(self, recs, mail): attachments = mail.Attachments result = {} conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') att_folder_path = os.path.abspath(os.path.dirname("%temp%\\")) if not os.path.exists(att_folder_path): os.makedirs(att_folder_path) for rec in recs: #[('res.partner', 3, 'Agrolait')...
def MakeAttachment(self, recs, mail): attachments = mail.Attachments result = {} conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') att_folder_path = os.path.abspath(os.path.dirname("%temp%\\")) if not os.path.exists(att_folder_path): os.makedirs(att_folder_path) for rec in recs: #[('res.partner', 3, 'Agrolait')...
471,134
def CreateContact(self, res=None): res=eval(str(res)) partner = res['partner_id'] state = res['state_id'] country = res['country_id'] conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') if not partner.strip() == '': partner_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner', 'se...
def CreateContact(self, res=None): res=eval(str(res)) partner = res['partner_id'] state = res['state_id'] country = res['country_id'] conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') if not partner.strip() == '': partner_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner', 'se...
471,135
def CreatePartner(self, res): res=eval(str(res)) conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','search',[('name','=',res['name'])]) if ids: return False id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.par...
def CreatePartner(self, res): res=eval(str(res)) conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','search',[('name','=',res['name'])]) if ids: return False id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.par...
471,136
def SearchPartnerDetail(self, search_email_id): res_vals = [] conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') address_id = execute(conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'search', [('email','ilike',ustr(search_email_id))]) if not address_id : return address = execute(...
def SearchPartnerDetail(self, search_email_id): res_vals = [] conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') address_id = execute(conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'search', [('email','ilike',ustr(search_email_id))]) if not address_id : return address = execute(...
471,137
def WritePartnerValues(self, new_vals): flag = -1 new_dict = dict(new_vals) email=new_dict['email'] partner = new_dict['partner'] country_val = new_dict['country'] state_val = new_dict['state'] conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') partner_id = execute( conn, 'execute', self._dbname, int(self._uid),...
def WritePartnerValues(self, new_vals): flag = -1 new_dict = dict(new_vals) email=new_dict['email'] partner = new_dict['partner'] country_val = new_dict['country'] state_val = new_dict['state'] conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') partner_id = execute( conn, 'execute', self._dbname, int(self._uid),...
471,138
def GetAllState(self): state_list = [] state_ids = [] conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') state_ids = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country.state', 'search', []) for state_id in state_ids: obj = execute( conn, 'execute', self._dbname, int(self._uid), self....
def GetAllState(self): state_list = [] state_ids = [] conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') state_ids = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country.state', 'search', []) for state_id in state_ids: obj = execute( conn, 'execute', self._dbname, int(self._uid), self....
471,139
def GetAllCountry(self): country_list = [] country_ids = [] conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') country_ids = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country', 'search', []) for country_id in country_ids: obj = execute( conn, 'execute', self._dbname, int(self._uid),...
def GetAllCountry(self): country_list = [] country_ids = [] conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') country_ids = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country', 'search', []) for country_id in country_ids: obj = execute( conn, 'execute', self._dbname, int(self._uid),...
471,140
def SearchPartner(self, mail_id = ""): conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') address = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'search', [('email','=',ustr(mail_id))]) if not address: return None else: add_rec = execute( conn, 'execute', self._dbname...
def SearchPartner(self, mail_id = ""): conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') address = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'search', [('email','=',ustr(mail_id))]) if not address: return None else: add_rec = execute( conn, 'execute', self._dbname...
471,141
def SearchEmailResources(self, message_id): conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') res_vals = [] mail_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'mailgate.message', 'search', [('message_id','=',message_id)]) if not mail_id: return None address = execute( conn, 'execute', ...
def SearchEmailResources(self, message_id): conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') res_vals = [] mail_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'mailgate.message', 'search', [('message_id','=',message_id)]) if not mail_id: return None address = execute( conn, 'execute', ...
471,142
def GetCountry(self, country_search=''): conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') ids=[] obj_list=[] domain = [] if not country_search.strip() == '': domain.append(('name','ilike',ustr(country_search))) ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.country','search',domain) if...
def GetCountry(self, country_search=''): conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') ids=[] obj_list=[] domain = [] if not country_search.strip() == '': domain.append(('name','ilike',ustr(country_search))) ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.country','search',domain) if...
471,143
def GetStates(self, state_search='', country=None): conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') ids = [] c_id = [] obj_list = [] domain = [] if not state_search.strip() == '': domain.append(('name','ilike',ustr(state_search)))
def GetStates(self, state_search='', country=None): conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') ids = [] c_id = [] obj_list = [] domain = [] if not state_search.strip() == '': domain.append(('name','ilike',ustr(state_search)))
471,144
def FindCountryForState(self, state_search=''): conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.country.state','search',[('name','=',ustr(state_search))]) if not ids: return None object = execute(conn,'execute',self._dbname,int(self._uid)...
def FindCountryForState(self, state_search=''): conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object') ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.country.state','search',[('name','=',ustr(state_search))]) if not ids: return None object = execute(conn,'execute',self._dbname,int(self._uid)...
471,145
def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res
def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res
471,146
def init_logger(): import os from tools.translate import resetlocale resetlocale() # create a format for log messages and dates format = '[%(asctime)s][%(dbname)s] %(levelname)s:%(name)s:%(message)s' if tools.config['syslog']: # SysLog Handler if os.name == 'nt': handler = logging.handlers.NTEventLogHandler("%s %s" %...
def init_logger(): import os from tools.translate import resetlocale resetlocale() # create a format for log messages and dates format = '[%(asctime)s][%(dbname)s] %(levelname)s:%(name)s:%(message)s' if tools.config['syslog']: # SysLog Handler if os.name == 'nt': handler = logging.handlers.NTEventLogHandler("%s %s" %...
471,147
def notifyChannel(self, name, level, msg): warnings.warn("notifyChannel API shouldn't be used anymore, please use " "the standard `logging` module instead", PendingDeprecationWarning, stacklevel=2) from service.web_services import common
def notifyChannel(self, name, level, msg): warnings.warn("notifyChannel API shouldn't be used anymore, please use " "the standard `logging` module instead", PendingDeprecationWarning, stacklevel=2) from service.web_services import common
471,148
def notifyChannel(self, name, level, msg): warnings.warn("notifyChannel API shouldn't be used anymore, please use " "the standard `logging` module instead", PendingDeprecationWarning, stacklevel=2) from service.web_services import common
def notifyChannel(self, name, level, msg): warnings.warn("notifyChannel API shouldn't be used anymore, please use " "the standard `logging` module instead", PendingDeprecationWarning, stacklevel=2) from service.web_services import common
471,149
def dispatch(self, service_name, method, params): try: self.log('service', service_name) self.log('method', method) self.log('params', params) auth = getattr(self, 'auth_provider', None) result = ExportService.getService(service_name).dispatch(method, auth, params) logger = logging.getLogger('result') self.log('result'...
def dispatch(self, service_name, method, params): try: self.log('service', service_name) self.log('method', method) self.log('params', params, depth=(logger.isEnabledFor(logging.DEBUG_RPC_ANSWER) and 3 or 1)) auth = getattr(self, 'auth_provider', None) result = ExportService.getService(service_name).dispatch(method, au...
471,150
def dispatch(self, service_name, method, params): try: self.log('service', service_name) self.log('method', method) self.log('params', params) auth = getattr(self, 'auth_provider', None) result = ExportService.getService(service_name).dispatch(method, auth, params) logger = logging.getLogger('result') self.log('result'...
def dispatch(self, service_name, method, params): try: self.log('service', service_name) self.log('method', method) self.log('params', params) auth = getattr(self, 'auth_provider', None) result = ExportService.getService(service_name).dispatch(method, auth, params) self.log('result', result, channel=logging.DEBUG_RPC_A...
471,151
def html2plaintext(html, body_id=None, encoding='utf-8'): ## (c) Fry-IT, www.fry-it.com, 2007 ## <peter@fry-it.com> ## download here: http://www.peterbe.com/plog/html2plaintext """ from an HTML text, convert the HTML to plain text. If @body_id is provided then this is the tag where the body (not necessarily <body>) s...
def html2plaintext(html, body_id=None, encoding='utf-8'): ## (c) Fry-IT, www.fry-it.com, 2007 ## <peter@fry-it.com> ## download here: http://www.peterbe.com/plog/html2plaintext """ from an HTML text, convert the HTML to plain text. If @body_id is provided then this is the tag where the body (not necessarily <body>) s...
471,152
def html2plaintext(html, body_id=None, encoding='utf-8'): ## (c) Fry-IT, www.fry-it.com, 2007 ## <peter@fry-it.com> ## download here: http://www.peterbe.com/plog/html2plaintext """ from an HTML text, convert the HTML to plain text. If @body_id is provided then this is the tag where the body (not necessarily <body>) s...
def html2plaintext(html, body_id=None, encoding='utf-8'): ## (c) Fry-IT, www.fry-it.com, 2007 ## <peter@fry-it.com> ## download here: http://www.peterbe.com/plog/html2plaintext """ from an HTML text, convert the HTML to plain text. If @body_id is provided then this is the tag where the body (not necessarily <body>) s...
471,153
def _to_decode(self, s, charsets): for charset in charsets: if charset: try: return s.decode(charset) except UnicodeError: pass try: return s.decode('ascii') except UnicodeError: return s
def _to_decode(self, s, charsets): for charset in charsets: if charset: try: return s.decode(charset) except UnicodeError: pass try: return s.decode('ascii') except UnicodeError: return s
471,154
def launch_wizard(self, cr, uid, ids, context=None): """ Search for a wizard to launch according to the type. If type is manual. just confirm the order. """ obj_payment_order = self.pool.get('payment.order')
def launch_wizard(self, cr, uid, ids, context=None): """ Search for a wizard to launch according to the type. If type is manual. just confirm the order. """ obj_payment_order = self.pool.get('payment.order')
471,155
def __str__(self): if self.val: if getattr(self,'name', None): datetime = datetime.strptime(self.name, DHM_FORMAT) return datetime.strftime(self.lang_obj.date_format+ " " + self.lang_obj.time_format) return self.val
def __str__(self): if self.val: if getattr(self,'name', None): return datetime.strptime(self.name, DHM_FORMAT)\ .strftime("%s %s"%(self.lang_obj.date_format, self.lang_obj.time_format)) return self.val
471,156
def onchange_journal_voucher(self, cr, uid, ids, partner_id=False, journal_id=False, context={}): """price Returns a dict that contains new values and context @param partner_id: latest value from user input for field partner_id @param args: other arguments @param context: context arguments, like lang, time zone @retu...
def onchange_journal_voucher(self, cr, uid, ids, partner_id=False, journal_id=False, context={}): """price Returns a dict that contains new values and context @param partner_id: latest value from user input for field partner_id @param args: other arguments @param context: context arguments, like lang, time zone @retu...
471,157
def onchange_journal_voucher(self, cr, uid, ids, partner_id=False, journal_id=False, context={}): """price Returns a dict that contains new values and context @param partner_id: latest value from user input for field partner_id @param args: other arguments @param context: context arguments, like lang, time zone @retu...
def onchange_journal_voucher(self, cr, uid, ids, partner_id=False, journal_id=False, context={}): """price Returns a dict that contains new values and context @param partner_id: latest value from user input for field partner_id @param args: other arguments @param context: context arguments, like lang, time zone @retu...
471,158
def msg_update(self, cr, uid, ids, msg, data={}, default_act='pending'): mailgate_obj = self.pool.get('mail.gateway') msg_actions, body_data = mailgate_obj.msg_act_get(msg) data.update({ 'description': body_data, 'history_line': [(0, 0, {'description': body_data, 'email': msg['From']})], }) act = 'case_'+default_act if...
def msg_update(self, cr, uid, ids, msg, data={}, default_act='pending'): mailgate_obj = self.pool.get('mail.gateway') msg_actions, body_data = mailgate_obj.msg_act_get(msg) data.update({ 'description': body_data, }) act = 'case_'+default_act if 'state' in msg_actions: if msg_actions['state'] in ['draft','close','cancel...
471,159
def msg_update(self, cr, uid, ids, msg, data={}, default_act='pending'): mailgate_obj = self.pool.get('mail.gateway') msg_actions, body_data = mailgate_obj.msg_act_get(msg) data.update({ 'description': body_data, 'history_line': [(0, 0, {'description': body_data, 'email': msg['From']})], }) act = 'case_'+default_act if...
def msg_update(self, cr, uid, ids, msg, data={}, default_act='pending'): mailgate_obj = self.pool.get('mail.gateway') msg_actions, body_data = mailgate_obj.msg_act_get(msg) data.update({ 'description': body_data, 'history_line': [(0, 0, {'description': body_data, 'email': msg['From']})], }) act = 'case_'+default_act if...
471,160
def onchange_filter(self, cr, uid, ids, filter='filter_no', fiscalyear_id=False, context=None): res = {} if filter == 'filter_no': res['value'] = {'period_from': False, 'period_to': False, 'date_from': False ,'date_to': False} if filter == 'filter_date': res['value'] = {'period_from': False, 'period_to': False, 'date_f...
def onchange_filter(self, cr, uid, ids, filter='filter_no', fiscalyear_id=False, context=None): res = {} if filter == 'filter_no': res['value'] = {'period_from': False, 'period_to': False, 'date_from': False ,'date_to': False} if filter == 'filter_date': res['value'] = {'period_from': False, 'period_to': False, 'date_f...
471,161
def onchange_filter(self, cr, uid, ids, filter='filter_no', fiscalyear_id=False, context=None): res = {} if filter == 'filter_no': res['value'] = {'period_from': False, 'period_to': False, 'date_from': False ,'date_to': False} if filter == 'filter_date': res['value'] = {'period_from': False, 'period_to': False, 'date_f...
def onchange_filter(self, cr, uid, ids, filter='filter_no', fiscalyear_id=False, context=None): res = {} if filter == 'filter_no': res['value'] = {'period_from': False, 'period_to': False, 'date_from': False ,'date_to': False} if filter == 'filter_date': res['value'] = {'period_from': False, 'period_to': False, 'date_f...
471,162
def onchange_company_id(self, cr, uid, ids, company_id, context=None): res = {} if context is None: context = {} if company_id: company = self.pool.get('res.company').browse(cr, uid, company_id, context=context) res.update({'bank': company.partner_id.bank_ids[0].bank.name}) return { 'value':res }
def onchange_company_id(self, cr, uid, ids, company_id=False, context=None): res = {} if context is None: context = {} if company_id: company = self.pool.get('res.company').browse(cr, uid, company_id, context=context) res.update({'bank': company.partner_id.bank_ids[0].bank.name}) return { 'value':res }
471,163
def onchange_company_id(self, cr, uid, ids, company_id, context=None): res = {} if context is None: context = {} if company_id: company = self.pool.get('res.company').browse(cr, uid, company_id, context=context) res.update({'bank': company.partner_id.bank_ids[0].bank.name}) return { 'value':res }
def onchange_company_id(self, cr, uid, ids, company_id, context=None): res = {} if context is None: context = {} if company_id: company = self.pool.get('res.company').browse(cr, uid, company_id, context=context) if company.partner_id.bank_ids: res.update({'bank': company.partner_id.bank_ids[0].bank.name}) return { 'val...
471,164
def _total_cost(self, cr, uid, ids, field_name, arg, context={}): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of case and section Data’s IDs @param context: A standard dictionary for contextual values """ result = {} for ca_obj in sel...
def _total_cost(self, cr, uid, ids, field_name, arg, context={}): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of case and section Data’s IDs @param context: A standard dictionary for contextual values """ result = {} for ca_obj in sel...
471,165
def __compute(self, cr, uid, ids, field_names, arg=None, context=None, query='', query_params=()): """ compute the balance, debit and/or credit for the provided account ids Arguments: `ids`: account ids `field_names`: the fields to compute (a list of any of 'balance', 'debit' and 'credit') `arg`: unused fields.function...
def __compute(self, cr, uid, ids, field_names, arg=None, context=None, query='', query_params=()): """ compute the balance, debit and/or credit for the provided account ids Arguments: `ids`: account ids `field_names`: the fields to compute (a list of any of 'balance', 'debit' and 'credit') `arg`: unused fields.function...
471,166
def compute_total(self, cr, uid, ids, yr_st_date, yr_end_date, st_date, end_date, field_names, context={}): if not (st_date >= yr_st_date and end_date <= yr_end_date): return {} query = "l.date >= '%s' AND l.date <= '%s'" (st_date, end_date) return self.__compute(cr, uid, ids, field_names, context=context, query=query)...
def compute_total(self, cr, uid, ids, yr_st_date, yr_end_date, st_date, end_date, field_names, context={}): if not (st_date >= yr_st_date and end_date <= yr_end_date): return {} query = "l.date >= '%s' AND l.date <= '%s'" % (st_date, end_date) return self.__compute(cr, uid, ids, field_names, context=context, query=quer...
471,167
def install_lang(self, cr, uid, **args): self.load_lang(cr, uid, tools.config.get('lang')) return True
def install_lang(self, cr, uid, **args): avil_ids = self.search(cr, uid, [('code','=', tools.config.get('lang'))]) if not avil_ids: self.load_lang(cr, uid, tools.config.get('lang')) return True
471,168
def survey_cancel(self, cr, uid, ids, arg): self.write(cr, uid, ids, {'state': 'cancel' }) return True
def survey_cancel(self, cr, uid, ids, arg): self.write(cr, uid, ids, {'state': 'cancel' }) return True
471,169
def copy(self, cr, uid, id, default=None, context={}): raise osv.except_osv(_('Warning !'),_('You cannot duplicate the resource!'))
def copy(self, cr, uid, id, default=None, context={}): raise osv.except_osv(_('Warning !'),_('You cannot duplicate the resource!'))
471,170
def set_context(self, objects, data, ids, report_type=None): super(pos_invoice, self).set_context(objects, data, ids, report_type) iids = [] nids = []
def set_context(self, order, data, ids, report_type=None): super(pos_invoice, self).set_context(order, data, ids, report_type) iids = [] nids = []
471,171
def set_context(self, objects, data, ids, report_type=None): super(pos_invoice, self).set_context(objects, data, ids, report_type) iids = [] nids = []
def set_context(self, objects, data, ids, report_type=None): super(pos_invoice, self).set_context(objects, data, ids, report_type) iids = [] nids = []
471,172
def set_context(self, objects, data, ids, report_type=None): super(pos_invoice, self).set_context(objects, data, ids, report_type) iids = [] nids = []
def set_context(self, objects, data, ids, report_type=None): super(pos_invoice, self).set_context(objects, data, ids, report_type) iids = [] nids = []
471,173
def interval_get(self, cr, uid, id, dt_from, hours, resource=False, byday=True): resource_cal_leaves = self.pool.get('resource.calendar.leaves') dt_leave = [] if not id: return [(dt_from,dt_from + mx.DateTime.RelativeDateTime(hours=int(hours)*3))] resource_leave_ids = resource_cal_leaves.search(cr, uid, [('calendar_id'...
def interval_get(self, cr, uid, id, dt_from, hours, resource=False, byday=True): resource_cal_leaves = self.pool.get('resource.calendar.leaves') dt_leave = [] if not id: return [(dt_from,dt_from + mx.DateTime.RelativeDateTime(hours=int(hours)*3))] resource_leave_ids = resource_cal_leaves.search(cr, uid, [('calendar_id'...
471,174
def do_alarm_create(self, cr, uid, ids, context={}): alarm_obj = self.pool.get('calendar.alarm') model_obj = self.pool.get('ir.model') model_id = model_obj.search(cr, uid, [('model','=',self._name)])[0] for meeting in self.browse(cr, uid, ids): self.do_alarm_unlink(cr, uid, [meeting.id]) basic_alarm = meeting.alarm_id...
def do_alarm_create(self, cr, uid, ids, context={}): alarm_obj = self.pool.get('calendar.alarm') model_obj = self.pool.get('ir.model') model_id = model_obj.search(cr, uid, [('model','=',self._name)])[0] for meeting in self.browse(cr, uid, ids): self.do_alarm_unlink(cr, uid, [meeting.id]) basic_alarm = meeting.alarm_id...
471,175
def import_cal(self, cr, uid, data, context={}): file_content = base64.decodestring(data) event_obj = self.pool.get('basic.calendar.event') event_obj.__attribute__.update(self.__attribute__)
defimport_cal(self,cr,uid,data,context={}):file_content=base64.decodestring(data)event_obj=self.pool.get('basic.calendar.event')event_obj.__attribute__.update(self.__attribute__)
471,176
def import_cal(self, cr, uid, data, context={}): file_content = base64.decodestring(data) event_obj = self.pool.get('basic.calendar.event') event_obj.__attribute__.update(self.__attribute__)
def import_cal(self, cr, uid, data, context={}): file_content = base64.decodestring(data) event_obj = self.pool.get('basic.calendar.event') event_obj.__attribute__.update(self.__attribute__)
471,177
def import_cal(self, cr, uid, data, context={}): file_content = base64.decodestring(data) event_obj = self.pool.get('basic.calendar.event') event_obj.__attribute__.update(self.__attribute__)
def import_cal(self, cr, uid, data, context={}): file_content = base64.decodestring(data) event_obj = self.pool.get('basic.calendar.event') event_obj.__attribute__.update(self.__attribute__)
471,178
def _coerce_bool(self, value, default=False): if isinstance(value, types.BooleanType): b = value if isinstance(value, types.StringTypes): b = value.strip().lower() not in ('0', 'false', 'off', 'no') elif isinstance(value, types.IntType): b = bool(value) else: b = default return b
def _coerce_bool(self, value, default=False): if isinstance(value, types.BooleanType): b = value if isinstance(value, types.StringTypes): b = value.strip().lower() not in ('0', 'false', 'off', 'no') elif isinstance(value, types.IntType): b = bool(value) else: b = default return b
471,179
def create_osv_memory_record(self, record, fields): model = self.get_model(record.model) record_dict = self._create_record(model, fields) id_new=model.create(self.cr, self.uid, record_dict, context=self.context) self.id_map[record.id] = int(id_new) return record_dict
def create_osv_memory_record(self, record, fields): model = self.get_model(record.model) record_dict = self._create_record(model, fields) id_new=model.create(self.cr, self.uid, record_dict, context=self.context) self.id_map[record.id] = int(id_new) return record_dict
471,180
def process_record(self, node): import osv record, fields = node.items()[0] model = self.get_model(record.model) model_bases = model.__class__.__bases__ if osv.osv.osv_memory in model_bases: record_dict=self.create_osv_memory_record(record, fields) else: self.validate_xml_id(record.id) if self.isnoupdate(record) and se...
def process_record(self, node): import osv record, fields = node.items()[0] model = self.get_model(record.model) if isinstance(model, osv.osv.osv_memory): record_dict=self.create_osv_memory_record(record, fields) else: self.validate_xml_id(record.id) if self.isnoupdate(record) and self.mode != 'init': id = self.pool.ge...
471,181
def process_record(self, node): import osv record, fields = node.items()[0] model = self.get_model(record.model) model_bases = model.__class__.__bases__ if osv.osv.osv_memory in model_bases: record_dict=self.create_osv_memory_record(record, fields) else: self.validate_xml_id(record.id) if self.isnoupdate(record) and se...
def process_record(self, node): import osv record, fields = node.items()[0] model_bases = model.__class__.__bases__ if osv.osv.osv_memory in model_bases: record_dict=self.create_osv_memory_record(record, fields) else: self.validate_xml_id(record.id) if self.isnoupdate(record) and self.mode != 'init': id = self.pool.get...
471,182
def process_record(self, node): import osv record, fields = node.items()[0] model = self.get_model(record.model) model_bases = model.__class__.__bases__ if osv.osv.osv_memory in model_bases: record_dict=self.create_osv_memory_record(record, fields) else: self.validate_xml_id(record.id) if self.isnoupdate(record) and se...
def process_record(self, node): import osv record, fields = node.items()[0] model = self.get_model(record.model) model_bases = model.__class__.__bases__ if osv.osv.osv_memory in model_bases: record_dict=self.create_osv_memory_record(record, fields) else: self.validate_xml_id(record.id) if self.isnoupdate(record) and se...
471,183
def _create_record(self, model, fields): record_dict = {} for field_name, expression in fields.items(): field_value = self._eval_field(model, field_name, expression) record_dict[field_name] = field_value return record_dict
def _create_record(self, model, fields): record_dict = {} for field_name, expression in fields.items(): field_value = self._eval_field(model, field_name, expression) record_dict[field_name] = field_value return record_dict
471,184
def process_ref(self, node, column=None): if node.search: if node.model: model_name = node.model elif column: model_name = column._obj else: raise YamlImportException('You need to give a model for the search, or a column to infer it.') model = self.get_model(model_name) q = eval(node.search, self.eval_context) ids = mo...
def process_ref(self, node, column=None): if node.search: if node.model: model_name = node.model elif column: model_name = column._obj else: raise YamlImportException('You need to give a model for the search, or a column to infer it.') model = self.get_model(model_name) q = eval(node.search, self.eval_context) ids = mo...
471,185
def process_eval(self, node): return eval(node.expression, self.eval_context)
def process_eval(self, node): return eval(node.expression, self.eval_context)
471,186
def setActive(self, cr, uid, ids, value=True, context=None): task_obj = self.pool.get('project.task') for proj in self.browse(cr, uid, ids, context=None): self.write(cr, uid, [proj.id], {'state': value and 'open' or 'template'}, context) cr.execute('select id from project_task where project_id=%s', (proj.id,)) tasks_id...
def setActive(self, cr, uid, ids, value=True, context=None): task_obj = self.pool.get('project.task') for proj in self.browse(cr, uid, ids, context=None): self.write(cr, uid, [proj.id], {'state': value and 'open' or 'template'}, context) cr.execute('select id from project_task where project_id=%s', (proj.id,)) tasks_id...
471,187
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): for domain in args: if domain[0] == 'project_id' and (not isinstance(domain[2], str)): id = isinstance(domain[2], list) and int(domain[2][0]) or int(domain[2]) if id: if self.pool.get('project.project').read(cr, user, id, ['s...
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): for domain in args: if domain[0] == 'project_id' and (not isinstance(domain[2], str)): id = isinstance(domain[2], list) and domain[2][0] or domain[2] if id and isinstance(id, (long, int)): if obj_project.read(cr, user, id, ['...
471,188
def _str_get(self, task, level=0, border='***', context=None): return border+' '+(task.user_id and task.user_id.name.upper() or '')+(level and (': L'+str(level)) or '')+(' - %.1fh / %.1fh'%(task.effective_hours or 0.0,task.planned_hours))+' '+border+'\n'+ \ border[0]+' '+(task.name or '')+'\n'+ \ (task.description or '...
def _str_get(self, task, level=0, border='***', context=None): return border+' '+(task.user_id and task.user_id.name.upper() or '')+(level and (': L'+str(level)) or '')+(' - %.1fh / %.1fh'%(task.effective_hours or 0.0,task.planned_hours))+' '+border+'\n'+ \ border[0]+' '+(task.name or '')+'\n'+ \ (task.description or '...
471,189
def _hours_get(self, cr, uid, ids, field_names, args, context=None): project_obj = self.pool.get('project.project') res = {} cr.execute("SELECT task_id, COALESCE(SUM(hours),0) FROM project_task_work WHERE task_id IN %s GROUP BY task_id",(tuple(ids),)) hours = dict(cr.fetchall()) uom_obj = self.pool.get('product.uom') ...
def _hours_get(self, cr, uid, ids, field_names, args, context=None): project_obj = self.pool.get('project.project') res = {} cr.execute("SELECT task_id, COALESCE(SUM(hours),0) FROM project_task_work WHERE task_id IN %s GROUP BY task_id",(tuple(ids),)) hours = dict(cr.fetchall()) uom_obj = self.pool.get('product.uom') ...
471,190
def create_picking(self, cr, uid, ids, context={}): """Create a picking for each order and validate it.""" picking_obj = self.pool.get('stock.picking')
defpick_name=self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.out') create_picking(self,pick_name=self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.out') cr,pick_name=self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.out') uid,pick_name=self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.out'...
471,191
def _main_job(self, cr, uid, ids, fields, arg, context=None): """ @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of partner contact’s IDs @fields: Get Fields @param context: A standard dictionary for contextua...
def _main_job(self, cr, uid, ids, fields, arg, context=None): """ @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of partner contact’s IDs @fields: Get Fields @param context: A standard dictionary for contextua...
471,192
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ search parnter job @param self: The object pointer @param cr: the current row, from the database cursor, @param user: the current user @param args: list of tuples of form [(‘name_of_the_field’, ‘operator’, value), ...]. @...
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ search parnter job @param self: The object pointer @param cr: the current row, from the database cursor, @param user: the current user @param args: list of tuples of form [(‘name_of_the_field’, ‘operator’, value), ...]. @...
471,193
def price_get(self, cr, uid, ids, prod_id, qty, partner=None, context=None): ''' context = { 'uom': Unit of Measure (int), 'partner': Partner ID (int), 'date': Date of the pricelist (%Y-%m-%d), } ''' context = context or {} currency_obj = self.pool.get('res.currency') product_obj = self.pool.get('product.product') supp...
def price_get(self, cr, uid, ids, prod_id, qty, partner=None, context=None): ''' context = { 'uom': Unit of Measure (int), 'partner': Partner ID (int), 'date': Date of the pricelist (%Y-%m-%d), } ''' context = context or {} currency_obj = self.pool.get('res.currency') product_obj = self.pool.get('product.product') supp...
471,194
def get_objects(self, cr, uid, module): # This function returns all object of the given module.. pool = pooler.get_pool(cr.dbname) ids2 = pool.get('ir.model.data').search(cr, uid, [('module', '=', module), ('model', '=', 'ir.model')]) model_list = [] model_data = pool.get('ir.model.data').browse(cr, uid, ids2) for mode...
def get_objects(self, cr, uid, module): # This function returns all object of the given module.. pool = pooler.get_pool(cr.dbname) ids2 = pool.get('ir.model.data').search(cr, uid, [('module', '=', module), ('model', '=', 'ir.model')]) model_list = [] model_data = pool.get('ir.model.data').browse(cr, uid, ids2) for mode...
471,195
def check_quality(self, cr, uid, module_name, module_state=None): ''' This function will calculate score of openerp module It will return data in below format: Format: {'final_score':'80.50', 'name': 'sale', 'check_detail_ids': [(0,0,{'name':'workflow_test', 'score':'100', 'ponderation':'0', 'summary': text_wiki format...
def check_quality(self, cr, uid, module_name, module_state=None): ''' This function will calculate score of openerp module It will return data in below format: Format: {'final_score':'80.50', 'name': 'sale', 'check_detail_ids': [(0,0,{'name':'workflow_test', 'score':'100', 'ponderation':'0', 'summary': text_wiki format...
471,196
def get(self, cr, uid, key, key2, models, meta=False, context={}, res_id_req=False, without_user=True, key2_req=True): result = [] for m in models: if type(m)==type([]) or type(m)==type(()): m,res_id = m else: res_id=False
def get(self, cr, uid, key, key2, models, meta=False, context={}, res_id_req=False, without_user=True, key2_req=True): result = [] for m in models: if type(m)==type([]) or type(m)==type(()): m,res_id = m else: res_id=False
471,197
def create_shortcut(self, cr, uid, values, context={}): dataobj = self.pool.get('ir.model.data') new_context = context.copy() for key in context: if key.startswith('default_'): del new_context[key]
def create_shortcut(self, cr, uid, values, context=None): dataobj = self.pool.get('ir.model.data') new_context = context.copy() for key in context: if key.startswith('default_'): del new_context[key]
471,198
def _rec_message(self, cr, uid, ids, context=None): return _('Error ! You can not create recursive Menu.')
def _rec_message(self, cr, uid, ids, context=None): return _('Error ! You can not create recursive Menu.')
471,199