bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def _set_data(self, cr, uid, meeting_id, name, value, arg, context): if not value: return attendee_obj = self.pool.get('calendar.attendee') model_obj = self.pool.get('ir.model') alarm_obj = self.pool.get('calendar.alarm') eventdata = self.read(cr, uid, meeting_id, [name], context=context) if name == "attendees": attend... | def _set_data(self, cr, uid, meeting_id, name, value, arg, context): if not value: return attendee_obj = self.pool.get('calendar.attendee') model_obj = self.pool.get('ir.model') alarm_obj = self.pool.get('calendar.alarm') eventdata = self.read(cr, uid, meeting_id, [name], context=context) if name == "attendees": attend... | 470,300 |
def _set_data(self, cr, uid, meeting_id, name, value, arg, context): if not value: return attendee_obj = self.pool.get('calendar.attendee') model_obj = self.pool.get('ir.model') alarm_obj = self.pool.get('calendar.alarm') eventdata = self.read(cr, uid, meeting_id, [name], context=context) if name == "attendees": attend... | def _set_data(self, cr, uid, meeting_id, name, value, arg, context): if not value: return attendee_obj = self.pool.get('calendar.attendee') model_obj = self.pool.get('ir.model') alarm_obj = self.pool.get('calendar.alarm') eventdata = self.read(cr, uid, meeting_id, [name], context=context) if name == "attendees": attend... | 470,301 |
def _set_data(self, cr, uid, meeting_id, name, value, arg, context): if not value: return attendee_obj = self.pool.get('calendar.attendee') model_obj = self.pool.get('ir.model') alarm_obj = self.pool.get('calendar.alarm') eventdata = self.read(cr, uid, meeting_id, [name], context=context) if name == "attendees": attend... | def _set_data(self, cr, uid, meeting_id, name, value, arg, context): if not value: return attendee_obj = self.pool.get('calendar.attendee') model_obj = self.pool.get('ir.model') alarm_obj = self.pool.get('calendar.alarm') eventdata = self.read(cr, uid, meeting_id, [name], context=context) if name == "attendees": attend... | 470,302 |
def _set_data(self, cr, uid, meeting_id, name, value, arg, context): if not value: return attendee_obj = self.pool.get('calendar.attendee') model_obj = self.pool.get('ir.model') alarm_obj = self.pool.get('calendar.alarm') eventdata = self.read(cr, uid, meeting_id, [name], context=context) if name == "attendees": attend... | def _set_data(self, cr, uid, meeting_id, name, value, arg, context): if not value: return attendee_obj = self.pool.get('calendar.attendee') model_obj = self.pool.get('ir.model') alarm_obj = self.pool.get('calendar.alarm') eventdata = self.read(cr, uid, meeting_id, [name], context=context) if name == "attendees": attend... | 470,303 |
def _set_data(self, cr, uid, meeting_id, name, value, arg, context): if not value: return attendee_obj = self.pool.get('calendar.attendee') model_obj = self.pool.get('ir.model') alarm_obj = self.pool.get('calendar.alarm') eventdata = self.read(cr, uid, meeting_id, [name], context=context) if name == "attendees": attend... | def _set_data(self, cr, uid, meeting_id, name, value, arg, context): if not value: return attendee_obj = self.pool.get('calendar.attendee') model_obj = self.pool.get('ir.model') alarm_obj = self.pool.get('calendar.alarm') eventdata = self.read(cr, uid, meeting_id, [name], context=context) if name == "attendees": attend... | 470,304 |
def _set_data(self, cr, uid, meeting_id, name, value, arg, context): if not value: return attendee_obj = self.pool.get('calendar.attendee') model_obj = self.pool.get('ir.model') alarm_obj = self.pool.get('calendar.alarm') eventdata = self.read(cr, uid, meeting_id, [name], context=context) if name == "attendees": attend... | def _set_data(self, cr, uid, meeting_id, name, value, arg, context): if not value: return attendee_obj = self.pool.get('calendar.attendee') model_obj = self.pool.get('ir.model') alarm_obj = self.pool.get('calendar.alarm') eventdata = self.read(cr, uid, meeting_id, [name], context=context) if name == "attendees": attend... | 470,305 |
def do_alarm_create(self, cr, uid, ids, context={}): alarm_obj = self.pool.get('calendar.alarm') model_obj = self.pool.get('ir.model') attendee_obj = self.pool.get('calendar.attendee') model_id = model_obj.search(cr, uid, [('model','=',self._name)])[0] | def do_alarm_create(self, cr, uid, ids, context={}): alarm_obj = self.pool.get('calendar.alarm') model_obj = self.pool.get('ir.model') attendee_obj = self.pool.get('calendar.attendee') model_id = model_obj.search(cr, uid, [('model','=',self._name)])[0] | 470,306 |
def do_alarm_create(self, cr, uid, ids, context={}): alarm_obj = self.pool.get('calendar.alarm') model_obj = self.pool.get('ir.model') attendee_obj = self.pool.get('calendar.attendee') model_id = model_obj.search(cr, uid, [('model','=',self._name)])[0] | def do_alarm_create(self, cr, uid, ids, context={}): alarm_obj = self.pool.get('calendar.alarm') model_obj = self.pool.get('ir.model') attendee_obj = self.pool.get('calendar.attendee') model_id = model_obj.search(cr, uid, [('model','=',self._name)])[0] | 470,307 |
def do_alarm_create(self, cr, uid, ids, context={}): alarm_obj = self.pool.get('calendar.alarm') model_obj = self.pool.get('ir.model') attendee_obj = self.pool.get('calendar.attendee') model_id = model_obj.search(cr, uid, [('model','=',self._name)])[0] | def do_alarm_create(self, cr, uid, ids, context={}): alarm_obj = self.pool.get('calendar.alarm') model_obj = self.pool.get('ir.model') attendee_obj = self.pool.get('calendar.attendee') model_id = model_obj.search(cr, uid, [('model','=',self._name)])[0] | 470,308 |
def do_alarm_create(self, cr, uid, ids, context={}): alarm_obj = self.pool.get('calendar.alarm') model_obj = self.pool.get('ir.model') attendee_obj = self.pool.get('calendar.attendee') model_id = model_obj.search(cr, uid, [('model','=',self._name)])[0] | def do_alarm_create(self, cr, uid, ids, context={}): alarm_obj = self.pool.get('calendar.alarm') model_obj = self.pool.get('ir.model') attendee_obj = self.pool.get('calendar.attendee') model_id = model_obj.search(cr, uid, [('model','=',self._name)])[0] | 470,309 |
def do_alarm_unlink(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): alarm_ids = alarm_obj.search(cr, uid, [('model_id','=',model_id), ('res_id'... | def do_alarm_unlink(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): alarm_ids = alarm_obj.search(cr, uid, [('model_id','=',model_id), ('res_id'... | 470,310 |
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__) vals = event_obj.import_ical(cr, uid, file_content) ids = [] for val in vals: is_exists = common.uid2openobjectid(cr, val['id'],... | 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__) vals = event_obj.import_ical(cr, uid, file_content) ids = [] for val in vals: is_exists = common.uid2openobjectid(cr, val['id'],... | 470,311 |
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__) vals = event_obj.import_ical(cr, uid, file_content) ids = [] for val in vals: is_exists = common.uid2openobjectid(cr, val['id'],... | 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__) vals = event_obj.import_ical(cr, uid, file_content) ids = [] for val in vals: is_exists = common.uid2openobjectid(cr, val['id'],... | 470,312 |
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__) vals = event_obj.import_ical(cr, uid, file_content) ids = [] for val in vals: is_exists = common.uid2openobjectid(cr, val['id'],... | 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__) vals = event_obj.import_ical(cr, uid, file_content) ids = [] for val in vals: is_exists = common.uid2openobjectid(cr, val['id'],... | 470,313 |
def get_recurrent_ids(self, cr, uid, ids, base_start_date, base_until_date, limit=100): if not limit: limit = 100 if ids and (base_start_date or base_until_date): cr.execute("select m.id, m.rrule, c.date, m.exdate from crm_meeting m\ join crm_case c on (c.id=m.inherit_case_id) \ where m.id in ("+ ','.join(map(lambda x:... | def get_recurrent_ids(self, cr, uid, ids, base_start_date, base_until_date, limit=100): if not limit: limit = 100 if ids and (base_start_date or base_until_date): cr.execute("select m.id, m.rrule, c.date, m.exdate from crm_meeting m\ join crm_case c on (c.id=m.inherit_case_id) \ where m.id in ("+ ','.join(map(lambda x:... | 470,314 |
def get_recurrent_ids(self, cr, uid, ids, base_start_date, base_until_date, limit=100): if not limit: limit = 100 if ids and (base_start_date or base_until_date): cr.execute("select m.id, m.rrule, c.date, m.exdate from crm_meeting m\ join crm_case c on (c.id=m.inherit_case_id) \ where m.id in ("+ ','.join(map(lambda x:... | def get_recurrent_ids(self, cr, uid, ids, base_start_date, base_until_date, limit=100): if not limit: limit = 100 if ids and (base_start_date or base_until_date): cr.execute("select m.id, m.rrule, c.date, m.exdate from crm_meeting m\ join crm_case c on (c.id=m.inherit_case_id) \ where m.id in ("+ ','.join(map(lambda x:... | 470,315 |
def get_recurrent_ids(self, cr, uid, ids, base_start_date, base_until_date, limit=100): if not limit: limit = 100 if ids and (base_start_date or base_until_date): cr.execute("select m.id, m.rrule, c.date, m.exdate from crm_meeting m\ join crm_case c on (c.id=m.inherit_case_id) \ where m.id in ("+ ','.join(map(lambda x:... | def get_recurrent_ids(self, cr, uid, ids, base_start_date, base_until_date, limit=100): if not limit: limit = 100 if ids and (base_start_date or base_until_date): cr.execute("select m.id, m.rrule, c.date, m.exdate from crm_meeting m\ join crm_case c on (c.id=m.inherit_case_id) \ where m.id in ("+ ','.join(map(lambda x:... | 470,316 |
def get_recurrent_ids(self, cr, uid, ids, base_start_date, base_until_date, limit=100): if not limit: limit = 100 if ids and (base_start_date or base_until_date): cr.execute("select m.id, m.rrule, c.date, m.exdate from crm_meeting m\ join crm_case c on (c.id=m.inherit_case_id) \ where m.id in ("+ ','.join(map(lambda x:... | def get_recurrent_ids(self, cr, uid, ids, base_start_date, base_until_date, limit=100): if not limit: limit = 100 if ids and (base_start_date or base_until_date): cr.execute("select m.id, m.rrule, c.date, m.exdate from crm_meeting m\ join crm_case c on (c.id=m.inherit_case_id) \ where m.id in ("+ ','.join(map(lambda x:... | 470,317 |
def search(self, cr, uid, args, offset=0, limit=100, order=None, context=None, count=False): args_without_date = [] start_date = False until_date = False for arg in args: if arg[0] not in ('date', unicode('date')): args_without_date.append(arg) else: if arg[1] in ('>', '>='): start_date = arg[2] elif arg[1] in ('<', '<... | def search(self, cr, uid, args, offset=0, limit=100, order=None, context=None, count=False): args_without_date = [] start_date = False until_date = False for arg in args: if arg[0] not in ('date', unicode('date')): args_without_date.append(arg) else: if arg[1] in ('>', '>='): start_date = arg[2] elif arg[1] in ('<', '<... | 470,318 |
def search(self, cr, uid, args, offset=0, limit=100, order=None, context=None, count=False): args_without_date = [] start_date = False until_date = False for arg in args: if arg[0] not in ('date', unicode('date')): args_without_date.append(arg) else: if arg[1] in ('>', '>='): start_date = arg[2] elif arg[1] in ('<', '<... | def search(self, cr, uid, args, offset=0, limit=100, order=None, context=None, count=False): args_without_date = [] start_date = False until_date = False for arg in args: if arg[0] not in ('date', unicode('date')): args_without_date.append(arg) else: if arg[1] in ('>', '>='): start_date = arg[2] elif arg[1] in ('<', '<... | 470,319 |
def _get_user_avail(self, cr, uid, ids, context=None): current_datetime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') res = super(res_users, self)._get_user_avail(cr, uid, ids, context) cr.execute("SELECT crm_case.user_id, 'busy' as status \ FROM crm_meeting meeting, crm_case \ WHERE meeting.inherit_case_id =... | def _get_user_avail(self, cr, uid, ids, context=None): current_datetime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') res = super(res_users, self)._get_user_avail(cr, uid, ids, context) cr.execute("SELECT crm_case.user_id, 'busy' as status \ FROM crm_meeting meeting, crm_case \ WHERE meeting.inherit_case_id =... | 470,320 |
def _get_user_avail(self, cr, uid, ids, context=None): current_datetime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') res = super(res_users, self)._get_user_avail(cr, uid, ids, context) cr.execute("SELECT crm_case.user_id, 'busy' as status \ FROM crm_meeting meeting, crm_case \ WHERE meeting.inherit_case_id =... | def _get_user_avail(self, cr, uid, ids, context=None): current_datetime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') res = super(res_users, self)._get_user_avail(cr, uid, ids, context) cr.execute("SELECT crm_case.user_id, 'busy' as status \ FROM crm_meeting meeting, crm_case \ WHERE meeting.inherit_case_id =... | 470,321 |
def match_dav_eprop(self, cr, match, ns, prop): if ns == "DAV:" and prop == "getetag": dirobj = self.context._dirobj uid = self.context.uid ctx = self.context.context.copy() tem, dav_time = tuple(match.split(':')) model, res_id = tuple(tem.split('_')) model_obj = dirobj.pool.get(model) model = model_obj.browse(cr, uid,... | def match_dav_eprop(self, cr, match, ns, prop): if ns == "DAV:" and prop == "getetag": dirobj = self.context._dirobj uid = self.context.uid ctx = self.context.context.copy() tem, dav_time = tuple(match.split(':')) model, res_id = tuple(tem.split('_')) model_obj = dirobj.pool.get(model) model = model_obj.browse(cr, uid,... | 470,322 |
def upgrade_module(self, cr, uid, ids, context): pool = pooler.get_pool(cr.dbname) mod_obj = self.pool.get('ir.module.module') data_obj = self.pool.get('ir.model.data') ids = mod_obj.search(cr, uid, [('state', 'in', ['to upgrade', 'to remove', 'to install'])]) unmet_packages = [] mod_dep_obj = pool.get('ir.module.modul... | def upgrade_module(self, cr, uid, ids, context): pool = pooler.get_pool(cr.dbname) mod_obj = self.pool.get('ir.module.module') data_obj = self.pool.get('ir.model.data') ids = mod_obj.search(cr, uid, [('state', 'in', ['to upgrade', 'to remove', 'to install'])]) unmet_packages = [] mod_dep_obj = pool.get('ir.module.modul... | 470,323 |
def _check_product_lot(self, cr, uid, ids): """ Checks whether move is done or not and production lot is assigned to that move. @return: True or False """ for move in self.browse(cr, uid, ids): if move.prodlot_id and move.state == 'done' and (move.prodlot_id.product_id.id != move.product_id.id): return False return Tru... | def _check_product_lot(self, cr, uid, ids): """ Checks whether move is done or not and production lot is assigned to that move. @return: True or False """ for move in self.browse(cr, uid, ids): if move.prodlot_id and move.state == 'done' and (move.prodlot_id.product_id.id != move.product_id.id): return False return Tru... | 470,324 |
def _check_product_lot(self, cr, uid, ids): """ Checks whether move is done or not and production lot is assigned to that move. @return: True or False """ for move in self.browse(cr, uid, ids): if move.prodlot_id and move.state == 'done' and (move.prodlot_id.product_id.id != move.product_id.id): return False return Tru... | def _check_product_lot(self, cr, uid, ids): """ Checks whether move is done or not and production lot is assigned to that move. @return: True or False """ for move in self.browse(cr, uid, ids): if move.prodlot_id and move.state == 'done' and (move.prodlot_id.product_id.id != move.product_id.id): return False return Tru... | 470,325 |
def _check_product_lot(self, cr, uid, ids): """ Checks whether move is done or not and production lot is assigned to that move. @return: True or False """ for move in self.browse(cr, uid, ids): if move.prodlot_id and move.state == 'done' and (move.prodlot_id.product_id.id != move.product_id.id): return False return Tru... | def _check_product_lot(self, cr, uid, ids): """ Checks whether move is done or not and production lot is assigned to that move. @return: True or False """ for move in self.browse(cr, uid, ids): if move.prodlot_id and move.state == 'done' and (move.prodlot_id.product_id.id != move.product_id.id): return False return Tru... | 470,326 |
def _get_company(self, cr, uid, ids, context={}): user_pool = self.pool.get('res.users') company_pool = self.pool.get('res.company') user = user_pool.browse(cr, uid, uid, uid) company_id = user.company_id and user.company_id.id if not company_id: company_id = company_pool.search(cr, uid, [])[0] | def _get_company(self, cr, uid, context={}): user_pool = self.pool.get('res.users') company_pool = self.pool.get('res.company') user = user_pool.browse(cr, uid, uid, uid) company_id = user.company_id and user.company_id.id if not company_id: company_id = company_pool.search(cr, uid, [])[0] | 470,327 |
def _get_company(self, cr, uid, ids, context={}): user_pool = self.pool.get('res.users') company_pool = self.pool.get('res.company') user = user_pool.browse(cr, uid, uid, uid) company_id = user.company_id and user.company_id.id if not company_id: company_id = company_pool.search(cr, uid, [])[0] | def _get_company(self, cr, uid, ids, context={}): user_pool = self.pool.get('res.users') company_pool = self.pool.get('res.company') user = user_pool.browse(cr, uid, uid, context) company_id = user.company_id and user.company_id.id if not company_id: company_id = company_pool.search(cr, uid, [])[0] | 470,328 |
def _get_cash_open_box_lines(self, cr, uid, ids, context={}): res = [] curr = [1, 2, 5, 10, 20, 50, 100, 500] for rs in curr: dct = { 'pieces':rs, 'number':0 } res.append(dct) return res | def _get_cash_open_box_lines(self, cr, uid, context={}): res = [] curr = [1, 2, 5, 10, 20, 50, 100, 500] for rs in curr: dct = { 'pieces':rs, 'number':0 } res.append(dct) return res | 470,329 |
def _get_cash_open_box_lines(self, cr, uid, ids, context={}): res = [] curr = [1, 2, 5, 10, 20, 50, 100, 500] for rs in curr: dct = { 'pieces':rs, 'number':0 } res.append(dct) return res | def _get_cash_open_box_lines(self, cr, uid, ids, context={}): res = [] curr = [1, 2, 5, 10, 20, 50, 100, 500] for rs in curr: dct = { 'pieces':rs, 'number':0 } res.append(dct) return res | 470,330 |
def _get_cash_close_box_lines(self, cr, uid, ids, context={}): res = [] curr = [1, 2, 5, 10, 20, 50, 100, 500] for rs in curr: dct = { 'pieces':rs, 'number':0 } res.append((0, 0, dct)) return res | def _get_cash_close_box_lines(self, cr, uid, ids, context={}): res = [] curr = [1, 2, 5, 10, 20, 50, 100, 500] for rs in curr: dct = { 'pieces':rs, 'number':0 } res.append(dct) return res def _get_cash_close_box_lines(self, cr, ids, uid, context={}): res = [] curr = [1, 2, 5, 10, 20, 50, 100, 500] for rs in curr: dct ... | 470,331 |
def _get_cash_close_box_lines(self, cr, uid, ids, context={}): res = [] curr = [1, 2, 5, 10, 20, 50, 100, 500] for rs in curr: dct = { 'pieces':rs, 'number':0 } res.append((0, 0, dct)) return res | def _get_cash_close_box_lines(self, cr, uid, ids, context={}): res = [] curr = [1, 2, 5, 10, 20, 50, 100, 500] for rs in curr: dct = { 'pieces':rs, 'number':0 } res.append((0, 0, dct)) return res | 470,332 |
def button_open(self, cr, uid, ids, context=None): | def button_open(self, cr, uid, ids, context=None): | 470,333 |
def _create_result_lines(self, cr, uid, wizard_data, context=None): user_obj = self.pool.get('res.users') result_obj = self.pool.get('share.wizard.result.line') share_root_url = wizard_data.share_root_url format_url = '%(login)s' in share_root_url\ and '%(password)s' in share_root_url\ and '%(dbname)s' in share_root_ur... | def _create_result_lines(self, cr, uid, wizard_data, context=None): user_obj = self.pool.get('res.users') result_obj = self.pool.get('share.wizard.result.line') share_root_url = wizard_data.share_root_url format_url = '%(login)s' in share_root_url\ and '%(password)s' in share_root_url\ and '%(dbname)s' in share_root_ur... | 470,334 |
def _create_result_lines(self, cr, uid, wizard_data, context=None): user_obj = self.pool.get('res.users') result_obj = self.pool.get('share.wizard.result.line') share_root_url = wizard_data.share_root_url format_url = '%(login)s' in share_root_url\ and '%(password)s' in share_root_url\ and '%(dbname)s' in share_root_ur... | def _create_result_lines(self, cr, uid, wizard_data, context=None): user_obj = self.pool.get('res.users') result_obj = self.pool.get('share.wizard.result.line') share_root_url = wizard_data.share_root_url format_url = '%(login)s' in share_root_url\ and '%(password)s' in share_root_url\ and '%(dbname)s' in share_root_ur... | 470,335 |
def _check_duration(self,cr,uid,ids): obj_fy=self.browse(cr,uid,ids[0]) if obj_fy.date_stop < obj_fy.date_start: return False return True | def _check_duration(self,cr,uid,ids): obj_fy = self.browse(cr,uid,ids[0]) if obj_fy.date_stop < obj_fy.date_start: return False return True | 470,336 |
def _check_duration(self,cr,uid,ids): obj_fy=self.browse(cr,uid,ids[0]) if obj_fy.date_stop < obj_fy.date_start: return False return True | def _check_duration(self,cr,uid,ids): obj_fy=self.browse(cr,uid,ids[0]) if obj_fy.date_stop < obj_fy.date_start: return False return True | 470,337 |
def createInstance(cls, pool, module, cr): parent_names = getattr(cls, '_inherit', None) if parent_names: for parent_name in ((type(parent_names)==list) and parent_names or [parent_names]): parent_class = pool.get(parent_name).__class__ assert pool.get(parent_name), "parent class %s does not exist in module %s !" % (pa... | def createInstance(cls, pool, module, cr): parent_names = getattr(cls, '_inherit', None) if parent_names: for parent_name in ((type(parent_names)==list) and parent_names or [parent_names]): parent_class = pool.get(parent_name).__class__ assert pool.get(parent_name), "parent class %s does not exist in module %s !" % (pa... | 470,338 |
def createInstance(cls, pool, module, cr): parent_names = getattr(cls, '_inherit', None) if parent_names: for parent_name in ((type(parent_names)==list) and parent_names or [parent_names]): parent_class = pool.get(parent_name).__class__ assert pool.get(parent_name), "parent class %s does not exist in module %s !" % (pa... | def createInstance(cls, pool, module, cr): parent_names = getattr(cls, '_inherit', None) if parent_names: for parent_name in ((type(parent_names)==list) and parent_names or [parent_names]): parent_class = pool.get(parent_name).__class__ assert pool.get(parent_name), "parent class %s does not exist in module %s !" % (pa... | 470,339 |
def action_move_create(self, cr, uid, ids, *args): """Creates invoice related analytics and financial move lines""" ait_obj = self.pool.get('account.invoice.tax') cur_obj = self.pool.get('res.currency') context = {} for inv in self.browse(cr, uid, ids): if inv.move_id: continue | def action_move_create(self, cr, uid, ids, *args): """Creates invoice related analytics and financial move lines""" ait_obj = self.pool.get('account.invoice.tax') cur_obj = self.pool.get('res.currency') context = {} for inv in self.browse(cr, uid, ids): if inv.move_id: continue | 470,340 |
def create(self, cr, user, vals, context=None): """ Create new record with specified value | def create(self, cr, user, vals, context=None): """ Create new record with specified value | 470,341 |
def login(self, db, login, password): | def login(self, db, login, password): | 470,342 |
def _login(self, db, login, password): if not password: return False if db is False: raise RuntimeError("Cannot authenticate to False db!") | def _login(self, db, login, password): if not password: return False if db is False: raise RuntimeError("Cannot authenticate to False db!") | 470,343 |
def _process_wi_paper(self, cr, uid, activity, workitem, context=None): service = netsvc.LocalService('report.%s'%activity.report_id.report_name) (report_data, format) = service.create(cr, uid, [], {}, {}) attach_vals = { 'name': '%s_%s_%s'%(activity.report_id.report_name, activity.name,workitem.partner_id.name), 'data... | def _process_wi_report(self, cr, uid, activity, workitem, context=None): service = netsvc.LocalService('report.%s'%activity.report_id.report_name) (report_data, format) = service.create(cr, uid, [], {}, {}) attach_vals = { 'name': '%s_%s_%s'%(activity.report_id.report_name, activity.name,workitem.partner_id.name), 'dat... | 470,344 |
def _build_context(self, cr, uid, ids, data, context=None): if context is None: context = {} result = {} period_obj = self.pool.get('account.period') result['fiscalyear'] = data['form']['fiscalyear_id'] and data['form']['fiscalyear_id'] or False if data['form']['filter'] == 'filter_date': result['date_from'] = data['fo... | def _build_context(self, cr, uid, ids, data, context=None): if context is None: context = {} result = {} period_obj = self.pool.get('account.period') result['fiscalyear'] = data['form']['fiscalyear_id'] and data['form']['fiscalyear_id'] or False if data['form']['filter'] == 'filter_date': result['date_from'] = data['fo... | 470,345 |
def _product_price(self, cr, uid, ids, name, arg, context={}): res = {} quantity = context.get('quantity', 1) pricelist = context.get('pricelist', False) if pricelist: for id in ids: try: price = self.pool.get('product.pricelist').price_get(cr,uid,[pricelist], id, quantity, context=context)[pricelist] except: price = 0... | def _product_price(self, cr, uid, ids, name, arg, context={}): res = {} quantity = context.get('quantity') or 1.0 pricelist = context.get('pricelist', False) if pricelist: for id in ids: try: price = self.pool.get('product.pricelist').price_get(cr,uid,[pricelist], id, quantity, context=context)[pricelist] except: price... | 470,346 |
def _email_set(self, cr, uid, ids, name, value, arg, context=None): if not isinstance(ids,list): ids = [ids] address_obj = self.pool.get('res.partner.address') for user in self.browse(cr, uid, ids, context=context): if user.address_id: address_obj.write(cr, uid, user.address_id.id, {'email': value or None}, context=con... | def _email_set(self, cr, uid, ids, name, value, arg, context=None): if not isinstance(ids,list): ids = [ids] address_obj = self.pool.get('res.partner.address') for user in self.browse(cr, uid, ids, context=context): if user.address_id: address_obj.write(cr, 1, user.address_id.id, {'email': value or None}) else: address... | 470,347 |
def _email_set(self, cr, uid, ids, name, value, arg, context=None): if not isinstance(ids,list): ids = [ids] address_obj = self.pool.get('res.partner.address') for user in self.browse(cr, uid, ids, context=context): if user.address_id: address_obj.write(cr, uid, user.address_id.id, {'email': value or None}, context=con... | def _email_set(self, cr, uid, ids, name, value, arg, context=None): if not isinstance(ids,list): ids = [ids] address_obj = self.pool.get('res.partner.address') for user in self.browse(cr, uid, ids, context=context): if user.address_id: address_obj.write(cr, uid, user.address_id.id, {'email': value or None}, context=con... | 470,348 |
def button_open(self, cr, uid, ids, context=None): """ Changes statement state to Running. @return: True """ if context is None: context = {} statement_pool = self.pool.get('account.bank.statement') for statement in statement_pool.browse(cr, uid, ids, context=context): vals = {} | def button_open(self, cr, uid, ids, context=None): """ Changes statement state to Running. @return: True """ if context is None: context = {} statement_pool = self.pool.get('account.bank.statement') for statement in statement_pool.browse(cr, uid, ids, context=context): vals = {} | 470,349 |
def onchange_partner_id(self, cr, uid, ids, part): if not part: return {'value': {'partner_invoice_id': False, 'partner_shipping_id': False, 'partner_order_id': False, 'payment_term': False, 'fiscal_position': False}} addr = self.pool.get('res.partner').address_get(cr, uid, [part], ['delivery', 'invoice', 'contact']) p... | def onchange_partner_id(self, cr, uid, ids, part): if not part: return {'value': {'partner_invoice_id': False, 'partner_shipping_id': False, 'partner_order_id': False, 'payment_term': False, 'fiscal_position': False}} addr = self.pool.get('res.partner').address_get(cr, uid, [part], ['delivery', 'invoice', 'contact']) p... | 470,350 |
def _result_get(x, keys): if x[1] in keys: return False keys.append(x[1]) if x[3]: model,id = x[2].split(',') id = int(id) fields = self.pool.get(model).fields_get_keys(cr, uid) pos = 0 while pos<len(fields): if fields[pos] in ('report_sxw_content', 'report_rml_content', 'report_sxw', 'report_rml', 'report_sxw_content_... | def _result_get(x, keys): if x[1] in keys: return False keys.append(x[1]) if x[3]: model,id = x[2].split(',') id = int(id) fields = self.pool.get(model).fields_get_keys(cr, uid) pos = 0 while pos<len(fields): if fields[pos] in ('report_sxw_content', 'report_rml_content', 'report_sxw', 'report_rml', 'report_sxw_content_... | 470,351 |
def _result_get(x, keys): if x[1] in keys: return False keys.append(x[1]) if x[3]: model,id = x[2].split(',') id = int(id) fields = self.pool.get(model).fields_get_keys(cr, uid) pos = 0 while pos<len(fields): if fields[pos] in ('report_sxw_content', 'report_rml_content', 'report_sxw', 'report_rml', 'report_sxw_content_... | def _result_get(x, keys): if x[1] in keys: return False keys.append(x[1]) if x[3]: model,id = x[2].split(',') id = int(id) fields = self.pool.get(model).fields_get_keys(cr, uid) pos = 0 while pos<len(fields): if fields[pos] in ('report_sxw_content', 'report_rml_content', 'report_sxw', 'report_rml', 'report_sxw_content_... | 470,352 |
def state_running_set(self, cr, uid, ids, *args): campaign = self.browse(cr, uid, ids[0]) if not campaign.activity_ids : raise osv.except_osv("Error", "There is no associate activitity for the campaign") act_ids = [ act_id.id for act_id in campaign.activity_ids] act_ids = self.pool.get('marketing.campaign.activity').s... | def state_running_set(self, cr, uid, ids, *args): campaign = self.browse(cr, uid, ids[0]) if not campaign.activity_ids : raise osv.except_osv("Error", "There is no activitity in the campaign") act_ids = [ act_id.id for act_id in campaign.activity_ids] act_ids = self.pool.get('marketing.campaign.activity').search(cr, u... | 470,353 |
def state_running_set(self, cr, uid, ids, *args): campaign = self.browse(cr, uid, ids[0]) if not campaign.activity_ids : raise osv.except_osv("Error", "There is no associate activitity for the campaign") act_ids = [ act_id.id for act_id in campaign.activity_ids] act_ids = self.pool.get('marketing.campaign.activity').s... | def state_running_set(self, cr, uid, ids, *args): campaign = self.browse(cr, uid, ids[0]) if not campaign.activity_ids : raise osv.except_osv("Error", "There is no associate activitity for the campaign") act_ids = [ act_id.id for act_id in campaign.activity_ids] act_ids = self.pool.get('marketing.campaign.activity').s... | 470,354 |
def state_done_set(self, cr, uid, ids, *args): segment_ids = self.pool.get('marketing.campaign.segment').search(cr, uid, [('campaign_id', 'in', ids), ('state', '=', 'running')]) if segment_ids : raise osv.except_osv("Error", "Camapign cannot be done before all segments are done") self.write(cr, uid, ids, {'state': 'don... | def state_done_set(self, cr, uid, ids, *args): segment_ids = self.pool.get('marketing.campaign.segment').search(cr, uid, [('campaign_id', 'in', ids), ('state', '=', 'running')]) if segment_ids : raise osv.except_osv("Error", "Campaign cannot be marked as done before all segments are done") self.write(cr, uid, ids, {'st... | 470,355 |
def state_cancel_set(self, cr, uid, ids, *args): self.write(cr, uid, ids, {'state': 'cancelled'}) return True | def state_cancel_set(self, cr, uid, ids, *args): self.write(cr, uid, ids, {'state': 'cancelled'}) return True | 470,356 |
def state_running_set(self, cr, uid, ids, *args): segment = self.browse(cr, uid, ids[0]) curr_date = time.strftime('%Y-%m-%d %H:%M:%S') vals = {'state': 'running'} if not segment.date_run: vals['date_run'] = time.strftime('%Y-%m-%d %H:%M:%S') | def state_running_set(self, cr, uid, ids, *args): segment = self.browse(cr, uid, ids[0]) curr_date = time.strftime('%Y-%m-%d %H:%M:%S') vals = {'state': 'running'} if not segment.date_run: vals['date_run'] = time.strftime('%Y-%m-%d %H:%M:%S') | 470,357 |
def state_done_set(self, cr, uid, ids, *args): date_done = self.browse(cr, uid, ids[0]).date_done if (date_done > time.strftime('%Y-%m-%d %H:%M:%S')): raise osv.except_osv("Error", "Segment cannot be closed before end date") | def state_done_set(self, cr, uid, ids, *args): date_done = self.browse(cr, uid, ids[0]).date_done if (date_done > time.strftime('%Y-%m-%d %H:%M:%S')): raise osv.except_osv("Error", "Segment cannot be closed before end date") | 470,358 |
def state_done_set(self, cr, uid, ids, *args): date_done = self.browse(cr, uid, ids[0]).date_done if (date_done > time.strftime('%Y-%m-%d %H:%M:%S')): raise osv.except_osv("Error", "Segment cannot be closed before end date") | def state_done_set(self, cr, uid, ids, *args): date_done = self.browse(cr, uid, ids[0]).date_done if (date_done > time.strftime('%Y-%m-%d %H:%M:%S')): raise osv.except_osv("Error", "Segment cannot be closed before end date") | 470,359 |
def state_cancel_set(self, cr, uid, ids, *args): self.write(cr, uid, ids, {'state': 'cancelled'}) return True | def state_cancel_set(self, cr, uid, ids, *args): self.write(cr, uid, ids, {'state': 'cancelled'}) return True | 470,360 |
def synchroniz(self, cr, uid, ids, *args): self.process_segment(cr, uid, {'segment_ids' : ids}) return True | def synchroniz(self, cr, uid, ids, *args): self.process_segment(cr, uid, ids) return True | 470,361 |
def process_segment(self, cr, uid, context={}): last_action_date = '' if 'segment_ids' in context: segment_ids = context['segment_ids'] last_action_date = (datetime.now() + _intervalTypes['days'](-1) \ ).strftime('%Y-%m-%d %H:%M:%S') | def process_segment(self, cr, uid, context={}): last_action_date = '' if 'segment_ids' in context: segment_ids = context['segment_ids'] last_action_date = (datetime.now() + _intervalTypes['days'](-1) \ ).strftime('%Y-%m-%d %H:%M:%S') | 470,362 |
def process_segment(self, cr, uid, context={}): last_action_date = '' if 'segment_ids' in context: segment_ids = context['segment_ids'] last_action_date = (datetime.now() + _intervalTypes['days'](-1) \ ).strftime('%Y-%m-%d %H:%M:%S') | def process_segment(self, cr, uid, context={}): last_action_date = '' if 'segment_ids' in context: segment_ids = context['segment_ids'] last_action_date = (datetime.now() + _intervalTypes['days'](-1) \ ).strftime('%Y-%m-%d %H:%M:%S') | 470,363 |
def process_segment(self, cr, uid, context={}): last_action_date = '' if 'segment_ids' in context: segment_ids = context['segment_ids'] last_action_date = (datetime.now() + _intervalTypes['days'](-1) \ ).strftime('%Y-%m-%d %H:%M:%S') | def process_segment(self, cr, uid, context={}): last_action_date = '' if 'segment_ids' in context: segment_ids = context['segment_ids'] last_action_date = (datetime.now() + _intervalTypes['days'](-1) \ ).strftime('%Y-%m-%d %H:%M:%S') | 470,364 |
def process_segment(self, cr, uid, context={}): last_action_date = '' if 'segment_ids' in context: segment_ids = context['segment_ids'] last_action_date = (datetime.now() + _intervalTypes['days'](-1) \ ).strftime('%Y-%m-%d %H:%M:%S') | defprocess_segment(self,cr,uid,context={}):last_action_date=''if'segment_ids'incontext:segment_ids=context['segment_ids']last_action_date=(datetime.now()+_intervalTypes['days'](-1)\).strftime('%Y-%m-%d%H:%M:%S') | 470,365 |
def process_segment(self, cr, uid, context={}): last_action_date = '' if 'segment_ids' in context: segment_ids = context['segment_ids'] last_action_date = (datetime.now() + _intervalTypes['days'](-1) \ ).strftime('%Y-%m-%d %H:%M:%S') | def process_segment(self, cr, uid, context={}): last_action_date = '' if 'segment_ids' in context: segment_ids = context['segment_ids'] last_action_date = (datetime.now() + _intervalTypes['days'](-1) \ ).strftime('%Y-%m-%d %H:%M:%S') | 470,366 |
def process_segment(self, cr, uid, context={}): last_action_date = '' if 'segment_ids' in context: segment_ids = context['segment_ids'] last_action_date = (datetime.now() + _intervalTypes['days'](-1) \ ).strftime('%Y-%m-%d %H:%M:%S') | def process_segment(self, cr, uid, context={}): last_action_date = '' if 'segment_ids' in context: segment_ids = context['segment_ids'] last_action_date = (datetime.now() + _intervalTypes['days'](-1) \ ).strftime('%Y-%m-%d %H:%M:%S') | 470,367 |
def process_segment(self, cr, uid, context={}): last_action_date = '' if 'segment_ids' in context: segment_ids = context['segment_ids'] last_action_date = (datetime.now() + _intervalTypes['days'](-1) \ ).strftime('%Y-%m-%d %H:%M:%S') | def process_segment(self, cr, uid, context={}): last_action_date = '' if 'segment_ids' in context: segment_ids = context['segment_ids'] last_action_date = (datetime.now() + _intervalTypes['days'](-1) \ ).strftime('%Y-%m-%d %H:%M:%S') | 470,368 |
def process_segment(self, cr, uid, context={}): last_action_date = '' if 'segment_ids' in context: segment_ids = context['segment_ids'] last_action_date = (datetime.now() + _intervalTypes['days'](-1) \ ).strftime('%Y-%m-%d %H:%M:%S') | def process_segment(self, cr, uid, context={}): last_action_date = '' if 'segment_ids' in context: segment_ids = context['segment_ids'] last_action_date = (datetime.now() + _intervalTypes['days'](-1) \ ).strftime('%Y-%m-%d %H:%M:%S') | 470,369 |
def __init__(self, *args): self._actions = {'paper' : self.process_wi_report, 'email' : self.process_wi_email, 'server_action' : self.process_wi_action, } return super(marketing_campaign_activity, self).__init__(*args) | def__init__(self,*args):self._actions={'paper':self.process_wi_report,'email':self.process_wi_email,'server_action':self.process_wi_action,}returnsuper(marketing_campaign_activity,self).__init__(*args) | 470,370 |
def process(self, cr, uid, act_id, wi_id, context={}): activity = self.browse(cr, uid, act_id) workitem_obj = self.pool.get('marketing.campaign.workitem') workitem = workitem_obj.browse(cr, uid, wi_id) self._actions[activity.type](cr, uid, activity, workitem) return True | def process(self, cr, uid, act_id, wi_id, context={}): activity = self.browse(cr, uid, act_id) workitem_obj = self.pool.get('marketing.campaign.workitem') workitem = workitem_obj.browse(cr, uid, wi_id) self._actions[activity.type](cr, uid, activity, workitem) return True | 470,371 |
def default_get(self, cr, uid, fields, context={}): value = super(marketing_campaign_transition, self).default_get(cr, uid, fields, context) if context.has_key('type_id'): value[context['type_id']] = context['activity_id'] return value | def default_get(self, cr, uid, fields, context={}): value = super(marketing_campaign_transition, self).default_get(cr, uid, fields, context) if context.has_key('type_id'): value[context['type_id']] = context['activity_id'] return value | 470,372 |
def process_chain(self, cr, uid, workitem_id, context={}): workitem = self.browse(cr, uid, workitem_id) mct_obj = self.pool.get('marketing.campaign.transition') process_to_id = mct_obj.search(cr,uid, [ ('activity_from_id','=', workitem.activity_id.id)]) for mct_id in mct_obj.browse(cr, uid, process_to_id): if mct_id.in... | def process_chain(self, cr, uid, workitem_id, context={}): workitem = self.browse(cr, uid, workitem_id) for mct_id in workitem.activity_id.to_ids: launch_date = time.strftime('%Y-%m-%d %H:%M:%S') if mct_id.interval_type and mct_id.interval_nbr : launch_date = (datetime.now() + _intervalTypes[ \ mct_id.interval_type](mc... | 470,373 |
def process_chain(self, cr, uid, workitem_id, context={}): workitem = self.browse(cr, uid, workitem_id) mct_obj = self.pool.get('marketing.campaign.transition') process_to_id = mct_obj.search(cr,uid, [ ('activity_from_id','=', workitem.activity_id.id)]) for mct_id in mct_obj.browse(cr, uid, process_to_id): if mct_id.in... | def process_chain(self, cr, uid, workitem_id, context={}): workitem = self.browse(cr, uid, workitem_id) mct_obj = self.pool.get('marketing.campaign.transition') process_to_id = mct_obj.search(cr,uid, [ ('activity_from_id','=', workitem.activity_id.id)]) for mct_id in mct_obj.browse(cr, uid, process_to_id): if mct_id.in... | 470,374 |
def button_cancel(self, cr, uid, workitem_ids, context={}): for wi in self.browse(cr, uid, workitem_ids): if wi.state in ('todo','exception'): self.write(cr, uid, [wi.id], {'state':'cancelled'}, context=context) return True | def button_cancel(self, cr, uid, workitem_ids, context={}): for wi in self.browse(cr, uid, workitem_ids): if wi.state in ('todo','exception'): self.write(cr, uid, [wi.id], {'state':'cancelled'}, context=context) return True | 470,375 |
def process(self, cr, uid, workitem_ids, context={}): for wi in self.browse(cr, uid, workitem_ids): if wi.state == 'todo':# we searched the wi which are in todo state #then y v keep this filter again eval_context = { 'pool': self.pool, 'cr': cr, 'uid': uid, 'wi': wi, 'object': wi.activity_id, 'transition': wi.activity_... | def process(self, cr, uid, workitem_ids, context={}): for wi in self.browse(cr, uid, workitem_ids): if wi.state == 'todo':# we searched the wi which are in todo state #then y v keep this filter again eval_context = { 'pool': self.pool, 'cr': cr, 'uid': uid, 'wi': wi, 'object': wi.activity_id, 'transition': wi.activity_... | 470,376 |
def process(self, cr, uid, workitem_ids, context={}): for wi in self.browse(cr, uid, workitem_ids): if wi.state == 'todo':# we searched the wi which are in todo state #then y v keep this filter again eval_context = { 'pool': self.pool, 'cr': cr, 'uid': uid, 'wi': wi, 'object': wi.activity_id, 'transition': wi.activity_... | def process(self, cr, uid, workitem_ids, context={}): for wi in self.browse(cr, uid, workitem_ids): if wi.state == 'todo':# we searched the wi which are in todo state #then y v keep this filter again eval_context = { 'pool': self.pool, 'cr': cr, 'uid': uid, 'wi': wi, 'object': wi.activity_id, 'transition': wi.activity_... | 470,377 |
def process_all(self, cr, uid, context={}): workitem_ids = self.search(cr, uid, [('state', '=', 'todo'), ('date','<=', time.strftime('%Y-%m-%d %H:%M:%S'))]) if workitem_ids: self.process(cr, uid, workitem_ids, context) | def process_all(self, cr, uid, context={}): camp_obj = self.pool.get('marketing.campaign') camp_ids = camp_obj.search(cr, uid, [('state','=','running')], context=context) for camp in camp_obj.browse(cr, uid, camp_ids, context=context): if camp.mode in ('test_realtime','active'): workitem_ids = self.search(cr, uid, [('s... | 470,378 |
def process_all(self, cr, uid, context={}): workitem_ids = self.search(cr, uid, [('state', '=', 'todo'), ('date','<=', time.strftime('%Y-%m-%d %H:%M:%S'))]) if workitem_ids: self.process(cr, uid, workitem_ids, context) | def process_all(self, cr, uid, context={}): workitem_ids = self.search(cr, uid, [('state', '=', 'todo'), ('date','<=', time.strftime('%Y-%m-%d %H:%M:%S'))]) if workitem_ids: self.process(cr, uid, workitem_ids, context) | 470,379 |
def process_all(self, cr, uid, context={}): workitem_ids = self.search(cr, uid, [('state', '=', 'todo'), ('date','<=', time.strftime('%Y-%m-%d %H:%M:%S'))]) if workitem_ids: self.process(cr, uid, workitem_ids, context) | defprocess_all(self,cr,uid,context={}):workitem_ids=self.search(cr,uid,[('state','=','todo'),('date','<=',time.strftime('%Y-%m-%d%H:%M:%S'))])ifworkitem_ids:self.process(cr,uid,workitem_ids,context) | 470,380 |
def process_all(self, cr, uid, context={}): workitem_ids = self.search(cr, uid, [('state', '=', 'todo'), ('date','<=', time.strftime('%Y-%m-%d %H:%M:%S'))]) if workitem_ids: self.process(cr, uid, workitem_ids, context) | defprocess_all(self,cr,uid,context={}):workitem_ids=self.search(cr,uid,[('state','=','todo'),('date','<=',time.strftime('%Y-%m-%d%H:%M:%S'))])ifworkitem_ids:self.process(cr,uid,workitem_ids,context) | 470,381 |
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): if not context: context = {} if context and 'object_id' in context and context['object_id']: model = self.pool.get('ir.model').browse(cr, uid, context['object_id']).model args.append(('model', '=', model)) return super(report_... | def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): if not context: context = {} if context and 'object_id' in context and context['object_id']: model = self.pool.get('ir.model').browse(cr, uid, context['object_id']).model args.append(('model', '=', model)) return super(report_... | 470,382 |
def __init__(self, pool, dbname, serialized=False): self.sql_from_log = {} self.sql_into_log = {} | def __init__(self, pool, dbname, serialized=False): self.sql_from_log = {} self.sql_into_log = {} | 470,383 |
def __del__(self): if not self.__closed: # Oops. 'self' has not been closed explicitly. # The cursor will be deleted by the garbage collector, # but the database connection is not put back into the connection # pool, preventing some operation on the database like dropping it. # This can also lead to a server overload. ... | def __del__(self): if not self.__closed: # Oops. 'self' has not been closed explicitly. # The cursor will be deleted by the garbage collector, # but the database connection is not put back into the connection # pool, preventing some operation on the database like dropping it. # This can also lead to a server overload. ... | 470,384 |
def create(self, cr, uid, vals, context=None): if context is None: context = {} id = super(hr_employee, self).create(cr, uid, vals, context=context) if vals.get('evaluation_plan_id', False): self.pool.get('hr_evaluation.evaluation').create(cr, uid, {'employee_id' : id, 'plan_id': vals['evaluation_plan_id']}, context=co... | def create(self, cr, uid, vals, context=None): if context is None: context = {} id = super(hr_employee, self).create(cr, uid, vals, context=context) if vals.get('evaluation_plan_id', False): self.pool.get('hr_evaluation.evaluation').create(cr, uid, {'employee_id' : id, 'plan_id': vals['evaluation_plan_id']}, context=co... | 470,385 |
def button_plan_in_progress(self, cr, uid, ids, context=None): hr_eval_inter_obj = self.pool.get('hr.evaluation.interview') if context is None: context = {} apprai_id = [] for evaluation in self.browse(cr, uid, ids, context=context): wait = False for phase in evaluation.plan_id.phase_ids: childs = [] if phase.action ==... | def button_plan_in_progress(self, cr, uid, ids, context=None): hr_eval_inter_obj = self.pool.get('hr.evaluation.interview') if context is None: context = {} apprai_id = [] for evaluation in self.browse(cr, uid, ids, context=context): wait = False for phase in evaluation.plan_id.phase_ids: childs = [] if phase.action ==... | 470,386 |
def view_init(self, cr, uid, fields_list, context=None): if context is None: context = {} res= super(stock_invoice_onshipping, self).view_init(cr, uid, fields_list, context=context) pick_obj=self.pool.get('stock.picking') count=0 for pick in pick_obj.browse(cr, uid,context.get('active_ids', False)): if pick.invoice_sta... | def view_init(self, cr, uid, fields_list, context=None): if context is None: context = {} res = super(stock_invoice_onshipping, self).view_init(cr, uid, fields_list, context=context) pick_obj = self.pool.get('stock.picking') count = 0 active_ids = context.get('active_ids',[]) for pick in pick_obj.browse(cr, uid, active... | 470,387 |
def view_init(self, cr, uid, fields_list, context=None): if context is None: context = {} res= super(stock_invoice_onshipping, self).view_init(cr, uid, fields_list, context=context) pick_obj=self.pool.get('stock.picking') count=0 for pick in pick_obj.browse(cr, uid,context.get('active_ids', False)): if pick.invoice_sta... | def view_init(self, cr, uid, fields_list, context=None): if context is None: context = {} res= super(stock_invoice_onshipping, self).view_init(cr, uid, fields_list, context=context) pick_obj=self.pool.get('stock.picking') count=0 for pick in pick_obj.browse(cr, uid,context.get('active_ids', False)): if pick.invoice_sta... | 470,388 |
def view_init(self, cr, uid, fields_list, context=None): if context is None: context = {} res= super(stock_invoice_onshipping, self).view_init(cr, uid, fields_list, context=context) pick_obj=self.pool.get('stock.picking') count=0 for pick in pick_obj.browse(cr, uid,context.get('active_ids', False)): if pick.invoice_sta... | def view_init(self, cr, uid, fields_list, context=None): if context is None: context = {} res= super(stock_invoice_onshipping, self).view_init(cr, uid, fields_list, context=context) pick_obj=self.pool.get('stock.picking') count=0 for pick in pick_obj.browse(cr, uid,context.get('active_ids', False)): if pick.invoice_sta... | 470,389 |
def _get_type(self, cr, uid, context=None): """ To get invoice type. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: The ID or list of IDs if we want more than one @param context: A standard dictionary @return: Invoice type """ if context is None:... | def _get_type(self, cr, uid, context=None): """ To get invoice type. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: The ID or list of IDs if we want more than one @param context: A standard dictionary @return: Invoice type """ if context is None:... | 470,390 |
def create_invoice(self, cr, uid, ids, context): """ To create invoice @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID or list of IDs if we want more than one @param context: A standard dictionary @return: Invoice ids """ result = [] pickin... | def create_invoice(self, cr, uid, ids, context): """ To create invoice @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID or list of IDs if we want more than one @param context: A standard dictionary @return: Invoice ids """ result = [] pickin... | 470,391 |
def create_invoice(self, cr, uid, ids, context): """ To create invoice @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID or list of IDs if we want more than one @param context: A standard dictionary @return: Invoice ids """ result = [] pickin... | def create_invoice(self, cr, uid, ids, context): """ To create invoice @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID or list of IDs if we want more than one @param context: A standard dictionary @return: Invoice ids """ result = [] pickin... | 470,392 |
def create_invoice(self, cr, uid, ids, context): """ To create invoice @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID or list of IDs if we want more than one @param context: A standard dictionary @return: Invoice ids """ result = [] pickin... | def create_invoice(self, cr, uid, ids, context): """ To create invoice @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID or list of IDs if we want more than one @param context: A standard dictionary @return: Invoice ids """ result = [] pickin... | 470,393 |
def _theorical_margin_calc(self, cr, uid, ids, name, arg, context=None): res = {} for account in self.browse(cr, uid, ids, context=context): res[account.id] = account.ca_theorical + account.total_cost for id in ids: res[id] = round(res.get(id, 0.0),2) return res | def _theorical_margin_calc(self, cr, uid, ids, name, arg, context=None): res = {} for account in self.browse(cr, uid, ids, context=context): res[account.id] = account.ca_theorical + account.total_cost for id in ids: res[id] = round(res.get(id, 0.0),2) return res | 470,394 |
def _theorical_margin_calc(self, cr, uid, ids, name, arg, context=None): res = {} for account in self.browse(cr, uid, ids, context=context): res[account.id] = account.ca_theorical + account.total_cost for id in ids: res[id] = round(res.get(id, 0.0),2) return res | def _theorical_margin_calc(self, cr, uid, ids, name, arg, context=None): res = {} for account in self.browse(cr, uid, ids, context=context): res[account.id] = account.ca_theorical + account.total_cost for id in ids: res[id] = round(res.get(id, 0.0),2) return res | 470,395 |
def sign_out_result(self, cr, uid, ids, context=None): if context is None: context = {} emp_obj = self.pool.get('hr.employee') for data in self.browse(cr, uid, ids, context=context): emp_id = data.emp_id.id emp_obj.attendance_action_change(cr, uid, [emp_id], type='action', dt=data.date) self._write(cr, uid, data, emp_i... | def sign_out_result(self, cr, uid, ids, context=None): if context is None: context = {} emp_obj = self.pool.get('hr.employee') for data in self.browse(cr, uid, ids, context=context): emp_id = data.emp_id.id emp_obj.attendance_action_change(cr, uid, [emp_id], type='action', dt=data.date) self._write(cr, uid, data, emp_i... | 470,396 |
def sign_out_result(self, cr, uid, ids, context=None): if context is None: context = {} emp_obj = self.pool.get('hr.employee') for data in self.browse(cr, uid, ids, context=context): emp_id = data.emp_id.id emp_obj.attendance_action_change(cr, uid, [emp_id], type='action', dt=data.date) self._write(cr, uid, data, emp_i... | defsign_out_result(self,cr,uid,ids,context=None):ifcontextisNone:context={}emp_obj=self.pool.get('hr.employee')fordatainself.browse(cr,uid,ids,context=context):emp_id=data.emp_id.idemp_obj.attendance_action_change(cr,uid,[emp_id],type='action',dt=data.date)self._write(cr,uid,data,emp_id,context=context)return{} | 470,397 |
def check_state(self, cr, uid, ids, context=None): obj_model = self.pool.get('ir.model.data') if context is None: context = {} emp_id = self.default_get(cr, uid, context)['emp_id'] # get the latest action (sign_in or out) for this employee cr.execute('select action from hr_attendance where employee_id=%s and action in ... | def check_state(self, cr, uid, ids, context=None): obj_model = self.pool.get('ir.model.data') if context is None: context = {} emp_id = self.default_get(cr, uid, context)['emp_id'] # get the latest action (sign_in or out) for this employee cr.execute('select action from hr_attendance where employee_id=%s and action in ... | 470,398 |
def attendance_action_change(self, cr, uid, ids, type='action', context={}, dt=False, *args): id = False warning_sign = 'sign' if type == 'sign_in': warning_sign = "Sign In" elif type == 'sign_out': warning_sign = "Sign Out" for emp in self.read(cr, uid, ids, ['id'], context=context): if not self._action_check(cr, ui... | def if isinstance(type,dict): type = type.get('type','action') attendance_action_change(self, if isinstance(type,dict): type = type.get('type','action') cr, if isinstance(type,dict): type = type.get('type','action') uid, if isinstance(type,dict): type = type.get('type','action') ids, if isinstance(type,dict): ... | 470,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.