bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def _sum_credit_partner(self, partner, data): result_tmp = 0.0 if data['form']['reconcil'] : RECONCILE_TAG = " " else: RECONCILE_TAG = "AND reconcile_id IS NULL" if self.date_lst and data['form']['initial_balance'] : self.cr.execute( "SELECT sum(credit) " \ "FROM account_move_line " \ "WHERE partner_id=%s " \ "AND acco...
def _sum_credit_partner(self, partner, data): result_tmp = 0.0 if data['form']['reconcil'] : RECONCILE_TAG = " " else: RECONCILE_TAG = "AND reconcile_id IS NULL" if self.date_lst and data['form']['initial_balance'] : self.cr.execute( "SELECT sum(credit) " \ "FROM account_move_line " \ "WHERE partner_id=%s " \ "AND acco...
469,700
def _sum_debit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 if data['form']['reconcil'] : RECONCILE_TAG = " " else: RECONCILE_TAG = "AND reconcile_id IS NULL" if self.date_lst and data['form']['initial_balance'] : self.cr.execute( "SELECT sum(debit) " \ "FROM account_move_line " \ "WHERE partner_id IN %s" ...
def _sum_debit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 if data['form']['reconcil'] : RECONCILE_TAG = " " else: RECONCILE_TAG = "AND reconcile_id IS NULL" if self.date_lst and data['form']['initial_balance'] : self.cr.execute( "SELECT sum(debit) " \ "FROM account_move_line " \ "WHERE partner_id IN %s" ...
469,701
def _sum_credit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 if data['form']['reconcil'] : RECONCILE_TAG = " " else: RECONCILE_TAG = "AND reconcile_id IS NULL" if self.date_lst and data['form']['initial_balance'] : self.cr.execute( "SELECT sum(credit) " \ "FROM account_move_line " \ "WHERE partner_id IN %s...
def _sum_credit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 if data['form']['reconcil'] : RECONCILE_TAG = " " else: RECONCILE_TAG = "AND reconcile_id IS NULL" if self.date_lst and data['form']['initial_balance'] : self.cr.execute( "SELECT sum(credit) " \ "FROM account_move_line " \ "WHERE partner_id IN %s...
469,702
def _get_partners(self, data): if data['form']['result_selection']=='customer': return 'Receivable Accounts' elif data['form']['result_selection']=='supplier': return 'Payable Accounts' elif data['form']['result_selection']=='customer_supplier': return 'Receivable and Payable Accounts' return ''
def _get_partners(self, data): if data['form']['result_selection'] == 'customer': return 'Receivable Accounts' elif data['form']['result_selection']=='supplier': return 'Payable Accounts' elif data['form']['result_selection']=='customer_supplier': return 'Receivable and Payable Accounts' return ''
469,703
def _get_partners(self, data): if data['form']['result_selection']=='customer': return 'Receivable Accounts' elif data['form']['result_selection']=='supplier': return 'Payable Accounts' elif data['form']['result_selection']=='customer_supplier': return 'Receivable and Payable Accounts' return ''
def _get_partners(self, data): if data['form']['result_selection']=='customer': return 'Receivable Accounts' elif data['form']['result_selection'] == 'supplier': return 'Payable Accounts' elif data['form']['result_selection']=='customer_supplier': return 'Receivable and Payable Accounts' return ''
469,704
def _get_partners(self, data): if data['form']['result_selection']=='customer': return 'Receivable Accounts' elif data['form']['result_selection']=='supplier': return 'Payable Accounts' elif data['form']['result_selection']=='customer_supplier': return 'Receivable and Payable Accounts' return ''
def _get_partners(self, data): if data['form']['result_selection']=='customer': return 'Receivable Accounts' elif data['form']['result_selection']=='supplier': return 'Payable Accounts' elif data['form']['result_selection'] == 'customer_supplier': return 'Receivable and Payable Accounts' return ''
469,705
def _field_create(self, cr, context={}): cr.execute("SELECT id FROM ir_model WHERE model=%s", (self._name,)) if not cr.rowcount: cr.execute('SELECT nextval(%s)', ('ir_model_id_seq',)) model_id = cr.fetchone()[0] cr.execute("INSERT INTO ir_model (id,model, name, info,state) VALUES (%s, %s, %s, %s, %s)", (model_id, self....
def _field_create(self, cr, context={}): cr.execute("SELECT id FROM ir_model WHERE model=%s", (self._name,)) if not cr.rowcount: cr.execute('SELECT nextval(%s)', ('ir_model_id_seq',)) model_id = cr.fetchone()[0] cr.execute("INSERT INTO ir_model (id,model, name, info,state) VALUES (%s, %s, %s, %s, %s)", (model_id, self....
469,706
def init(self, cr): cr.execute(""" create or replace view report_timesheet_task_user as ( select ((r.id*12)+to_number(months.m_id,'99'))::integer as id, months.name as name, r.id as user_id, to_char(to_date(months.name, 'YYYY/MM/DD'),'YYYY') as year, to_char(to_date(months.name, 'YYYY/MM/DD'),'MM') as month from res_us...
def init(self, cr): tools.drop_view_if_exists(cr, 'report_timesheet_task_user') cr.execute(""" create or replace view report_timesheet_task_user as ( select ((r.id*12)+to_number(months.m_id,'99'))::integer as id, months.name as name, r.id as user_id, to_char(to_date(months.name, 'YYYY/MM/DD'),'YYYY') as year, to_char(t...
469,707
def do_print(self, cr, uid, ids, context=None): if context is None: context = {} data = self.read(cr, uid, ids, [])[0] res = self._get_partners_followp(cr, uid, ids, context)['to_update'] to_update = res data['followup_id'] = 'followup_id' in context and context['followup_id'] or False date = 'date' in context and cont...
defdata.update({'date': context['date']}) do_print(self,data.update({'date': context['date']}) cr,data.update({'date': context['date']}) uid,data.update({'date': context['date']}) ids,data.update({'date': context['date']}) context=None):data.update({'date': context['date']}) ifdata.update({'date': context['date']}) con...
469,708
def do_print(self, cr, uid, ids, context=None): if context is None: context = {} data = self.read(cr, uid, ids, [])[0] res = self._get_partners_followp(cr, uid, ids, context)['to_update'] to_update = res data['followup_id'] = 'followup_id' in context and context['followup_id'] or False date = 'date' in context and cont...
defdo_print(self,cr,uid,ids,context=None):ifcontextisNone:context={}data=self.read(cr,uid,ids,[])[0]res=self._get_partners_followp(cr,uid,ids,context)['to_update']to_update=resdata['followup_id']='followup_id'incontextandcontext['followup_id']orFalsedate='date'incontextandcontext['date']ordata['date']foridinto_update.k...
469,709
def _get_project(self, cr, uid, context): user = self.pool.get('res.users').browse(cr,uid,uid, context=context) if user.context_project_id: return user.context_project_id return False
def _get_project(self, cr, uid, context): user = self.pool.get('res.users').browse(cr,uid,uid, context=context) if user.context_project_id: return user.context_project_id.id return False
469,710
def _tag_act_window(self, cr, rec, data_node=None): name = rec.get('name','').encode('utf-8') xml_id = rec.get('id','').encode('utf8') self._test_xml_id(xml_id) type = rec.get('type','').encode('utf-8') or 'ir.actions.act_window' view_id = False if rec.get('view'): view_id = self.id_get(cr, 'ir.actions.act_window', rec...
defuid = self.uid _tag_act_window(self,uid = self.uid cr,uid = self.uid rec,uid = self.uid data_node=None):uid = self.uid nameuid = self.uid =uid = self.uid rec.get('name','').encode('utf-8')uid = self.uid xml_iduid = self.uid =uid = self.uid rec.get('id','').encode('utf8')uid = self.uid self._test_xml_id(xml_id)uid = ...
469,711
def account_get(self, cr, uid, product_id=None, partner_id=None, user_id=None, date=None, context={}): domain = [] if product_id: domain += ['|',('product_id','=',product_id)] domain += [('product_id','=',False)] if partner_id: domain += ['|',('partner_id','=',partner_id)] domain += [('partner_id','=',False)] if user_i...
def account_get(self, cr, uid, product_id=None, partner_id=None, user_id=None, date=None, context={}): domain = [] if product_id: domain += ['|',('product_id','=',product_id)] domain += [('product_id','=',False)] if partner_id: domain += ['|',('partner_id','=',partner_id)] domain += [('partner_id','=',False)] if user_i...
469,712
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition=False, price_unit=False, address_invoice_id=False, context={}): res_prod = super(account_invoice_line,self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition, price_...
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition=False, price_unit=False, address_invoice_id=False, context={}): res_prod = super(account_invoice_line,self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition, price_...
469,713
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition=False, price_unit=False, address_invoice_id=False, context={}): res_prod = super(account_invoice_line,self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition, price_...
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition=False, price_unit=False, address_invoice_id=False, context={}): res_prod = super(account_invoice_line,self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition, price_...
469,714
def _get_account_analytic_invoice(self, cursor, user, picking, move_line): partner_id = picking.address_id and picking.address_id.partner_id or False rec = self.pool.get('account.analytic.default').account_get(cursor, user, move_line.product_id.id, partner_id and partner_id.id, user, time.strftime('%Y-%m-%d'), context=...
def _get_account_analytic_invoice(self, cursor, user, picking, move_line): partner_id = picking.address_id and picking.address_id.partner_id or False rec = self.pool.get('account.analytic.default').account_get(cursor, user, move_line.product_id.id, partner_id and partner_id.id, user, time.strftime('%Y-%m-%d'), context=...
469,715
def _get_account_analytic_invoice(self, cursor, user, picking, move_line): partner_id = picking.address_id and picking.address_id.partner_id or False rec = self.pool.get('account.analytic.default').account_get(cursor, user, move_line.product_id.id, partner_id and partner_id.id, user, time.strftime('%Y-%m-%d'), context=...
def _get_account_analytic_invoice(self, cursor, user, picking, move_line): partner_id = picking.address_id and picking.address_id.partner_id or False rec = self.pool.get('account.analytic.default').account_get(cursor, user, move_line.product_id.id, partner_id and partner_id.id, user, time.strftime('%Y-%m-%d'), context=...
469,716
def _get_account_analytic_invoice(self, cursor, user, picking, move_line): partner_id = picking.address_id and picking.address_id.partner_id or False rec = self.pool.get('account.analytic.default').account_get(cursor, user, move_line.product_id.id, partner_id and partner_id.id, user, time.strftime('%Y-%m-%d'), context=...
def _get_account_analytic_invoice(self, cursor, user, picking, move_line): partner_id = picking.address_id and picking.address_id.partner_id or False rec = self.pool.get('account.analytic.default').account_get(cursor, user, move_line.product_id.id, partner_id and partner_id.id, user, time.strftime('%Y-%m-%d'), context=...
469,717
def _get_account_analytic_invoice(self, cursor, user, picking, move_line): partner_id = picking.address_id and picking.address_id.partner_id or False rec = self.pool.get('account.analytic.default').account_get(cursor, user, move_line.product_id.id, partner_id and partner_id.id, user, time.strftime('%Y-%m-%d'), context=...
def _get_account_analytic_invoice(self, cursor, user, picking, move_line): partner_id = picking.address_id and picking.address_id.partner_id or False rec = self.pool.get('account.analytic.default').account_get(cursor, user, move_line.product_id.id, partner_id and partner_id.id, user, time.strftime('%Y-%m-%d'), context=...
469,718
def invoice_line_create(self, cr, uid, ids, context={}): create_ids = super(sale_order_line,self).invoice_line_create(cr, uid, ids, context) sale_line_obj = self.browse(cr, uid, ids[0], context) pool_inv_line = self.pool.get('account.invoice.line') for line in pool_inv_line.browse(cr, uid, create_ids, context): rec = ...
def invoice_line_create(self, cr, uid, ids, context={}): create_ids = super(sale_order_line,self).invoice_line_create(cr, uid, ids, context) sale_line_obj = self.browse(cr, uid, ids[0], context) pool_inv_line = self.pool.get('account.invoice.line') for line in pool_inv_line.browse(cr, uid, create_ids, context): rec = ...
469,719
def invoice_line_create(self, cr, uid, ids, context={}): create_ids = super(sale_order_line,self).invoice_line_create(cr, uid, ids, context) sale_line_obj = self.browse(cr, uid, ids[0], context) pool_inv_line = self.pool.get('account.invoice.line') for line in pool_inv_line.browse(cr, uid, create_ids, context): rec = ...
def invoice_line_create(self, cr, uid, ids, context={}): create_ids = super(sale_order_line,self).invoice_line_create(cr, uid, ids, context) sale_line_obj = self.browse(cr, uid, ids[0], context) pool_inv_line = self.pool.get('account.invoice.line') for line in pool_inv_line.browse(cr, uid, create_ids, context): rec = ...
469,720
def invoice_line_create(self, cr, uid, ids, context={}): create_ids = super(sale_order_line,self).invoice_line_create(cr, uid, ids, context) sale_line_obj = self.browse(cr, uid, ids[0], context) pool_inv_line = self.pool.get('account.invoice.line') for line in pool_inv_line.browse(cr, uid, create_ids, context): rec = ...
def invoice_line_create(self, cr, uid, ids, context={}): create_ids = super(sale_order_line,self).invoice_line_create(cr, uid, ids, context) sale_line_obj = self.browse(cr, uid, ids[0], context) pool_inv_line = self.pool.get('account.invoice.line') for line in pool_inv_line.browse(cr, uid, create_ids, context): rec = ...
469,721
def _set_rrulestring(self, cr, uid, id, name, value, arg, context=None): """ Sets values of fields that defines event recurrence from the value of rrule string @param self: The object pointer @param cr: the current row, from the database cursor, @param id: List of calendar event's ids. @param context: A standard dictio...
def _set_rrulestring(self, cr, uid, id, name, value, arg, context=None): """ Sets values of fields that defines event recurrence from the value of rrule string @param self: The object pointer @param cr: the current row, from the database cursor, @param id: List of calendar event's ids. @param context: A standard dictio...
469,722
def _get_chart_account(cursor, user, account): if account.parent_id: chart_account = _get_chart_account(cursor, user, account.parent_id) else: chart_account = account return chart_account
def _get_chart_account(cursor, user, account): if account.parent_id: chart_account = _get_chart_account(cursor, user, account.parent_id) else: chart_account = account return chart_account
469,723
def _check_tracking(self, cr, uid, ids): """ Checks if production lot is assigned to stock move or not. @return: True or False """ for move in self.browse(cr, uid, ids): if move.picking_id and move.picking_id.type=="internal": return True if not move.prodlot_id and \ (move.state == 'done' and \ ( \ (move.product_id.t...
def _check_tracking(self, cr, uid, ids): """ Checks if production lot is assigned to stock move or not. @return: True or False """ for move in self.browse(cr, uid, ids): if not move.prodlot_id and \ (move.state == 'done' and \ ( \ (move.product_id.track_production and move.location_id.usage=='production') or \ (move.pr...
469,724
def _check_tracking(self, cr, uid, ids): """ Checks if production lot is assigned to stock move or not. @return: True or False """ for move in self.browse(cr, uid, ids): if move.picking_id and move.picking_id.type=="internal": return True if not move.prodlot_id and \ (move.state == 'done' and \ ( \ (move.product_id.t...
def _check_tracking(self, cr, uid, ids): """ Checks if production lot is assigned to stock move or not. @return: True or False """ for move in self.browse(cr, uid, ids): if move.picking_id and move.picking_id.type=="internal": return True if not move.prodlot_id and \ (move.state == 'done' and \ ( \ (move.product_id.t...
469,725
def _child_get(node, self=None, tagname=None): for n in node: if self and self.localcontext and n.get('rml_loop'): for ctx in eval(n.get('rml_loop'),{}, self.localcontext): self.localcontext.update(ctx) if (tagname is None) or (n.tag==tagname): if n.get('rml_except', False): try: eval(n.get('rml_except'), {}, self.loc...
def _child_get(node, self=None, tagname=None): for n in node: if self and self.localcontext and n.get('rml_loop'): for ctx in eval(n.get('rml_loop'),{}, self.localcontext): self.localcontext.update(ctx) if (tagname is None) or (n.tag==tagname): if n.get('rml_except', False): try: eval(n.get('rml_except'), {}, self.loc...
469,726
def _child_get(node, self=None, tagname=None): for n in node: if self and self.localcontext and n.get('rml_loop'): for ctx in eval(n.get('rml_loop'),{}, self.localcontext): self.localcontext.update(ctx) if (tagname is None) or (n.tag==tagname): if n.get('rml_except', False): try: eval(n.get('rml_except'), {}, self.loc...
def _child_get(node, self=None, tagname=None): for n in node: if self and self.localcontext and n.get('rml_loop'): for ctx in eval(n.get('rml_loop'),{}, self.localcontext): self.localcontext.update(ctx) if (tagname is None) or (n.tag==tagname): if n.get('rml_except', False): try: eval(n.get('rml_except'), {}, self.loc...
469,727
def _child_get(node, self=None, tagname=None): for n in node: if self and self.localcontext and n.get('rml_loop'): for ctx in eval(n.get('rml_loop'),{}, self.localcontext): self.localcontext.update(ctx) if (tagname is None) or (n.tag==tagname): if n.get('rml_except', False): try: eval(n.get('rml_except'), {}, self.loc...
def _child_get(node, self=None, tagname=None): for n in node: if self and self.localcontext and n.get('rml_loop'): for ctx in eval(n.get('rml_loop'),{}, self.localcontext): self.localcontext.update(ctx) if (tagname is None) or (n.tag==tagname): if n.get('rml_except', False): try: eval(n.get('rml_except'), {}, self.loc...
469,728
def _child_get(node, self=None, tagname=None): for n in node: if self and self.localcontext and n.get('rml_loop'): for ctx in eval(n.get('rml_loop'),{}, self.localcontext): self.localcontext.update(ctx) if (tagname is None) or (n.tag==tagname): if n.get('rml_except', False): try: eval(n.get('rml_except'), {}, self.loc...
def _child_get(node, self=None, tagname=None): for n in node: if self and self.localcontext and n.get('rml_loop'): for ctx in eval(n.get('rml_loop'),{}, self.localcontext): self.localcontext.update(ctx) if (tagname is None) or (n.tag==tagname): if n.get('rml_except', False): try: eval(n.get('rml_except'), {}, self.loc...
469,729
def _col_get(self, cr, user, context={}): result = [] cols = self.pool.get('account.move.line')._columns for col in cols: if col in ('period_id', 'journal_id'): continue
def _col_get(self, cr, user, context={}): result = [] cols = self.pool.get('account.move.line')._columns for col in cols: if col in ('period_id', 'journal_id'): continue
469,730
def _lang_data_get(self, cr, uid, lang_id): conv = localeconv() lang_obj=self.browse(cr,uid,lang_id) thousands_sep = lang_obj.thousands_sep or conv[monetary and 'mon_thousands_sep' or 'thousands_sep'] decimal_point = lang_obj.decimal_point grouping = lang_obj.grouping return (grouping, thousands_sep, decimal_point)
def _lang_data_get(self, cr, uid, lang_id, monetary=False): conv = localeconv() lang_obj=self.browse(cr,uid,lang_id) thousands_sep = lang_obj.thousands_sep or conv[monetary and 'mon_thousands_sep' or 'thousands_sep'] decimal_point = lang_obj.decimal_point grouping = lang_obj.grouping return (grouping, thousands_sep, de...
469,731
def format(self, cr, uid, ids, percent, value, grouping=False, monetary=False): """ Format() will return the language-specific output for float values"""
def format(self, cr, uid, ids, percent, value, grouping=False, monetary=False): """ Format() will return the language-specific output for float values"""
469,732
def _get_invoice_from_reconcile(self, cr, uid, ids, context=None): move = {} for r in self.pool.get('account.move.reconcile').browse(cr, uid, ids, context=context): for line in r.line_partial_ids: move[line.move_id.id] = True for line in r.line_id: move[line.move_id.id] = True
def _get_invoice_from_reconcile(self, cr, uid, ids, context=None): move = {} for r in self.pool.get('account.move.reconcile').browse(cr, uid, ids, context=context): for line in r.line_partial_ids: move[line.move_id.id] = True for line in r.line_id: move[line.move_id.id] = True
469,733
def default_get(self, cr, uid, fields_list, context=None): res = super(event_make_invoice, self).default_get(cr, uid, fields_list, context) return res
def default_get(self, cr, uid, fields_list, context=None): res = super(event_make_invoice, self).default_get(cr, uid, fields_list, context) return res
469,734
def make_invoice(self, cr, uid, ids, context={}):
def make_invoice(self, cr, uid, ids, context={}):
469,735
def make_invoice(self, cr, uid, ids, context={}):
def make_invoice(self, cr, uid, ids, context={}):
469,736
def make_invoice(self, cr, uid, ids, context={}):
def make_invoice(self, cr, uid, ids, context={}):
469,737
def make_invoice(self, cr, uid, ids, context={}):
def make_invoice(self, cr, uid, ids, context={}):
469,738
def _get_child_ids(self, cr, uid, ids, field_name, arg, context={}): result = {} for record in self.browse(cr, uid, ids, context): if record.child_parent_ids: result[record.id] = [x.id for x in record.child_parent_ids] else: result[record.id] = []
def _get_child_ids(self, cr, uid, ids, field_name, arg, context={}): result = {} for record in self.browse(cr, uid, ids, context): if record.child_parent_ids: result[record.id] = [x.id for x in record.child_parent_ids] else: result[record.id] = []
469,739
def get_digits(self, obj=None, f=None, dp=None): d = DEFAULT_DIGITS = 2 if dp: decimal_precision_obj = self.pool.get('decimal.precision') ids = decimal_precision_obj.search(self.cr, self.uid, [('name', '=', dp)]) if ids: d = decimal_precision_obj.browse(self.cr, self.uid, ids)[0].digits elif obj and f: d = getattr(obj....
def get_digits(self, obj=None, f=None, dp=None): d = DEFAULT_DIGITS = 2 if dp: decimal_precision_obj = self.pool.get('decimal.precision') ids = decimal_precision_obj.search(self.cr, self.uid, [('name', '=', dp)]) if ids: d = decimal_precision_obj.browse(self.cr, self.uid, ids)[0].digits elif obj and f: res_digits = get...
469,740
def get_file(self, cr, uid, id, file_node, mode, context=None): if context is None: context = {} boo = self.browse(cr, uid, id, context) if not boo.online: raise RuntimeError('media offline') ira = self.pool.get('ir.attachment').browse(cr, uid, file_node.file_id, context=context) if boo.type == 'filestore': if not ira...
def get_file(self, cr, uid, id, file_node, mode, context=None): if context is None: context = {} boo = self.browse(cr, uid, id, context) if not boo.online: raise RuntimeError('media offline') ira = self.pool.get('ir.attachment').browse(cr, uid, file_node.file_id, context=context) if boo.type == 'filestore': if not ira...
469,741
def get_file(self, cr, uid, id, file_node, mode, context=None): if context is None: context = {} boo = self.browse(cr, uid, id, context) if not boo.online: raise RuntimeError('media offline') ira = self.pool.get('ir.attachment').browse(cr, uid, file_node.file_id, context=context) if boo.type == 'filestore': if not ira...
def get_file(self, cr, uid, id, file_node, mode, context=None): if context is None: context = {} boo = self.browse(cr, uid, id, context) if not boo.online: raise RuntimeError('media offline') ira = self.pool.get('ir.attachment').browse(cr, uid, file_node.file_id, context=context) if boo.type == 'filestore': if not ira...
469,742
def die(cond, msg): if cond: print msg sys.exit(1)
def die(cond, msg): if cond: print msg sys.exit(1)
469,743
def onchange_contact_id(self, cr, uid, ids, contact, partner): data ={} if not contact: return data
def onchange_contact_id(self, cr, uid, ids, contact, partner): data ={} if not contact: return data
469,744
def onchange_event(self, cr, uid, ids, event_id, partner_invoice_id): context={} if not event_id: return {'value': {'unit_price': False, 'event_product': False}} data_event = self.pool.get('event.event').browse(cr, uid, event_id) context['currency_id'] = data_event.currency_id.id if data_event.product_id: if not par...
defif data_event.user_id.id: return {'value': {'user_id':data_event.user_id.id}} onchange_event(self,if data_event.user_id.id: return {'value': {'user_id':data_event.user_id.id}} cr,if data_event.user_id.id: return {'value': {'user_id':data_event.user_id.id}} uid,if data_event.user_id.id: return {'value': {'user_id'...
469,745
def setlast_tracking(self, cr, uid, ids, context=None): tracking_obj = self.pool.get('stock.tracking') tracking = context.get('tracking', False) last_track = [line.tracking_id.id for line in self.browse(cr, uid, ids)[0].picking_id.move_lines if line.tracking_id] if not last_track: last_track = tracking_obj.create(cr, u...
def setlast_tracking(self, cr, uid, ids, context=None): tracking_obj = self.pool.get('stock.tracking') for line in self.browse(cr, uid, ids, context=context): last_track = None if line.picking_id: tracking_ids = [l.tracking_id.id for l in line.picking_id.move_lines if l.tracking_id] if tracking_ids: last_track = max(tr...
469,746
def _get_payment_term_lines(term_id, amount): term_pool = self.pool.get('account.payment.term') if term_id and amount: terms = term_pool.compute(cr, uid, term_id, amount) return terms return False
def_get_payment_term_lines(term_id,amount):term_pool=self.pool.get('account.payment.term')ifterm_idandamount:terms=term_pool.compute(cr,uid,term_id,amount)returntermsreturnFalse
469,747
def execute(self, query, params=None): if '%d' in query or '%f' in query: self.__logger.warn(query) self.__logger.warn("SQL queries cannot contain %d or %f anymore. " "Use only %s") if params: query = query.replace('%d', '%s').replace('%f', '%s')
def execute(self, query, params=None): if '%d' in query or '%f' in query: self.__logger.warn(query) self.__logger.warn("SQL queries cannot contain %d or %f anymore. " "Use only %s") if params: query = query.replace('%d', '%s').replace('%f', '%s')
469,748
def borrow(self, dsn): self._debug('Borrow connection to %r', dsn)
def borrow(self, dsn): self._debug('Borrow connection to %r', dsn)
469,749
def close_all(self, dsn): self._debug('Close all connections to %r', dsn) for i, (cnx, used) in tools.reverse_enumerate(self._connections): if dsn_are_equals(cnx.dsn, dsn): cnx.close() self._connections.pop(i)
def close_all(self, dsn): self.__logger.info('%r: Close all connections to %r', self, dsn) for i, (cnx, used) in tools.reverse_enumerate(self._connections): if dsn_are_equals(cnx.dsn, dsn): cnx.close() self._connections.pop(i)
469,750
def assign_partner(self, cr, uid, ids, context=None): ok = False for part in self.browse(cr, uid, ids, context=context): if not part.country_id: continue addr = ', '.join(filter(None, [part.street, (part.zip or '')+' '+(part.city or ''), part.state_id and part.state_id.name, part.country_id and part.country_id.name])) ...
def assign_partner(self, cr, uid, ids, context=None): ok = False for part in self.browse(cr, uid, ids, context=context): if not part.country_id: continue addr = ', '.join(filter(None, [part.street, (part.zip or '')+' '+(part.city or ''), part.state_id and part.state_id.name, part.country_id and part.country_id.name])) ...
469,751
def onchange_journal_id(self, cursor, user, statement_id, journal_id, context=None): if not journal_id: return {'value': {'currency': False}}
def onchange_journal_id(self, cursor, user, statement_id, journal_id, context=None): if not journal_id: return {'value': {'currency': False}}
469,752
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
469,753
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
469,754
def get_reply_defaults(self, cr, uid, fields, context=None): """ This function gets default values for reply mail """ hist_obj = self.pool.get('crm.case.history') res_ids = context and context.get('active_ids', []) or []
def get_reply_defaults(self, cr, uid, fields, context=None): """ This function gets default values for reply mail """ hist_obj = self.pool.get('crm.case.history') res_ids = context and context.get('active_ids', []) or []
469,755
def __get_default_search_view(self, cr, uid, context=None):
def __get_default_search_view(self, cr, uid, context=None):
469,756
def encode(s): if isinstance(s, unicode): return s.encode('utf8') return s
def encode(s): if isinstance(s, unicode): return s.encode('utf8') return s
469,757
def on_change_paid(self, cr, uid, id, tax, account): return self._on_change( cr, uid, ids, tax, vals={'account_paid_id': account})
def on_change_paid(self, cr, uid, id, tax, account): return self._on_change( cr, uid, ids, tax, vals={'account_paid_id': account})
469,758
def send_welcome_email(self, cr, uid, id, context=None): logger= netsvc.Logger() user = self.pool.get('res.users').read(cr, uid, id, context=context) if not tools.config.get('smtp_server'): logger.notifyChannel('mails', netsvc.LOG_WARNING, _('"smtp_server" needs to be set to send mails to users')) return False if not t...
def send_welcome_email(self, cr, uid, id, context=None): logger= netsvc.Logger() user = self.pool.get('res.users').read(cr, uid, id, context=context) if not tools.config.get('smtp_server'): logger.notifyChannel('mails', netsvc.LOG_WARNING, _('"smtp_server" needs to be set to send mails to users')) return False if not t...
469,759
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...
469,760
def create(self, cr, uid, ids, datas, context=None):
def create(self, cr, uid, ids, datas, context=None):
469,761
def create(self, cr, uid, ids, datas, context=None):
def create(self, cr, uid, ids, datas, context=None):
469,762
def trans_unrec(self, cr, uid, ids, context=None): obj_move_line = self.pool.get('account.move.line') obj_move_reconcile = self.pool.get('account.move.reconcile') if context is None: context = {} recs = obj_move_line.read(cr, uid, data['ids'], ['reconcile_id','reconcile_partial_id']) unlink_ids = [] full_recs = filter(...
def trans_unrec(self, cr, uid, ids, context=None): obj_move_line = self.pool.get('account.move.line') obj_move_reconcile = self.pool.get('account.move.reconcile') if context is None: context = {} recs = obj_move_line.read(cr, uid, context['active_ids'], ['reconcile_id','reconcile_partial_id']) unlink_ids = [] full_recs...
469,763
def _calc_amount(self, cr, uid, ids, prop, unknow_none, unknow_dict): res = {} for order in self.browse(cr, uid, ids): res[order.id] = 0 for oline in order.order_line: res[order.id] += oline.price_unit * oline.product_qty return res
def _calc_amount(self, cr, uid, ids, prop, unknow_none, unknow_dict): res = {} for order in self.browse(cr, uid, ids): res[order.id] = 0 for oline in order.order_line: res[order.id] += oline.price_unit * oline.product_qty return res
469,764
def action_invoice_create(self, cr, uid, ids, *args): res = False
def action_invoice_create(self, cr, uid, ids, *args): res = False
469,765
def format_mail(self, obj, body): data = { 'object_id': obj.id, 'object_subject': hasattr(obj, 'name') and obj.name or False, 'object_date': hasattr(obj, 'date') and obj.date or False, 'object_description': hasattr(obj, 'description') and obj.description or False, 'object_user': hasattr(obj, 'user_id') and (obj.user_id...
def format_mail(self, obj, body): data = { 'object_id': obj.id, 'object_subject': hasattr(obj, 'name') and obj.name or False, 'object_date': hasattr(obj, 'date') and obj.date or False, 'object_description': hasattr(obj, 'description') and obj.description or False, 'object_user': hasattr(obj, 'user_id') and (obj.user_id...
469,766
def _parent_compute(self, cr, uid, ids, name, args, context=None): if context is None: context = {} result = {} obj_dept = self.pool.get('hr.department') for user_id in ids: emp_ids = self.pool.get('hr.employee').search(cr, uid, [('user_id', '=', user_id)]) cr.execute('SELECT emp.department_id FROM hr_employee AS emp \...
def _parent_compute(self, cr, uid, ids, name, args, context=None): if context is None: context = {} result = {} obj_dept = self.pool.get('hr.department') for user_id in ids: emp_ids = self.pool.get('hr.employee').search(cr, uid, [('user_id', '=', user_id)]) cr.execute('SELECT emp.department_id FROM hr_employee AS emp \...
469,767
def get_reply_defaults(self, cr, uid, fields, context=None): """ This function gets default values for reply mail """ hist_obj = self.pool.get('crm.case.history') res_ids = context and context.get('active_ids', []) or []
def get_reply_defaults(self, cr, uid, fields, context=None): """ This function gets default values for reply mail """ hist_obj = self.pool.get('crm.case.history') res_ids = context and context.get('active_ids', []) or []
469,768
def get_reply_defaults(self, cr, uid, fields, context=None): """ This function gets default values for reply mail """ hist_obj = self.pool.get('crm.case.history') res_ids = context and context.get('active_ids', []) or []
def get_reply_defaults(self, cr, uid, fields, context=None): """ This function gets default values for reply mail """ hist_obj = self.pool.get('crm.case.history') res_ids = context and context.get('active_ids', []) or []
469,769
def _register_hook(self, cr, uid, ids, context=None): if not context: context = {} for action_rule in self.browse(cr, uid, ids, context=context): model = action_rule.model_id.model obj_pool = self.pool.get(model) obj_pool.__setattr__('create', self._create(obj_pool.create, model, context=context)) obj_pool.__setattr__(...
def _register_hook(self, cr, uid, ids, context=None): if not context: context = {} for action_rule in self.browse(cr, uid, ids, context=context): model = action_rule.model_id.model obj_pool = self.pool.get(model) if not hasattr(obj_pool, 'base_action_ruled'): obj_pool.create = self._create(obj_pool.create, model, conte...
469,770
def _register_hook(self, cr, uid, ids, context=None): if not context: context = {} for action_rule in self.browse(cr, uid, ids, context=context): model = action_rule.model_id.model obj_pool = self.pool.get(model) obj_pool.__setattr__('create', self._create(obj_pool.create, model, context=context)) obj_pool.__setattr__(...
def_register_hook(self,cr,uid,ids,context=None):ifnotcontext:context={}foraction_ruleinself.browse(cr,uid,ids,context=context):model=action_rule.model_id.modelobj_pool=self.pool.get(model)obj_pool.__setattr__('create',self._create(obj_pool.create,model,context=context))obj_pool.__setattr__('write',self._write(obj_pool....
469,771
def _lines_a(self, general_account_id, account_id, date1, date2): self.cr.execute("SELECT aal.id AS id, aal.name AS name, aal.code AS code, aal.amount AS balance, aal.date AS date, aaj.code AS cj, aal.unit_amount AS quantity \ FROM account_analytic_line AS aal, account_analytic_journal AS aaj \ WHERE (aal.general_accou...
def _lines_a(self, general_account_id, account_id, date1, date2): self.cr.execute("SELECT aal.id AS id, aal.name AS name, aal.code AS code, aal.amount AS balance, aal.date AS date, aaj.code AS cj, aal.unit_amount AS quantity \ FROM account_analytic_line AS aal, account_analytic_journal AS aaj \ WHERE (aal.general_accou...
469,772
def _centralise(self, cr, uid, move, mode, context=None): assert(mode in ('debit', 'credit'), 'Invalid Mode') #to prevent sql injection if context is None: context = {}
def _centralise(self, cr, uid, move, mode, context=None): assert mode in ('debit', 'credit'), 'Invalid Mode' #to prevent sql injection if context is None: context = {}
469,773
def _get_root_calendar_directory(self, cr, uid, context=None): objid = self.pool.get('ir.model.data') try: mid = objid._get_id(cr, uid, 'caldav', 'document_directory_calendars0') if not mid: return False root_id = objid.read(cr, uid, mid, ['res_id'])['res_id'] root_cal_dir = self.browse(cr,uid, root_id, context=context...
def _get_root_calendar_directory(self, cr, uid, context=None): objid = self.pool.get('ir.model.data') try: mid = objid._get_id(cr, uid, 'document', 'dir_calendars') if not mid: return False root_id = objid.read(cr, uid, mid, ['res_id'])['res_id'] root_cal_dir = self.browse(cr,uid, root_id, context=context) return root_...
469,774
def get(self, cr, obj, ids, name, user=None, context=None, values=None): if not context: context = {} if not values: values = {} res = {} for r in values: res[r['id']] = r[name] for id in ids: res.setdefault(id, '') obj = obj.pool.get(self._obj) # build a dictionary of the form {'id_of_distant_resource': name_of_distan...
def get(self, cr, obj, ids, name, user=None, context=None, values=None): if not context: context = {} if not values: values = {} res = {} for r in values: res[r['id']] = r[name] for id in ids: res.setdefault(id, '') obj = obj.pool.get(self._obj) # build a dictionary of the form {'id_of_distant_resource': name_of_distan...
469,775
def _amount_all(self, cr, uid, ids, name, args, context=None): tax_obj = self.pool.get('account.tax') res={} for order in self.browse(cr, uid, ids): res[order.id] = { 'amount_paid': 0.0, 'amount_return':0.0, 'amount_tax':0.0, } for payment in order.statement_ids: res[order.id]['amount_paid'] += payment.amount for paym...
def _amount_all(self, cr, uid, ids, name, args, context=None): tax_obj = self.pool.get('account.tax') res={} val=0.0 cur_obj = self.pool.get('res.currency') cur = order.pricelist_id.currency_id for order in self.browse(cr, uid, ids): res[order.id] = { 'amount_paid': 0.0, 'amount_return':0.0, 'amount_tax':0.0, } val=0.0...
469,776
def _amount_all(self, cr, uid, ids, name, args, context=None): tax_obj = self.pool.get('account.tax') res={} for order in self.browse(cr, uid, ids): res[order.id] = { 'amount_paid': 0.0, 'amount_return':0.0, 'amount_tax':0.0, } for payment in order.statement_ids: res[order.id]['amount_paid'] += payment.amount for paym...
def _amount_all(self, cr, uid, ids, name, args, context=None): tax_obj = self.pool.get('account.tax') res={} for order in self.browse(cr, uid, ids): res[order.id] = { 'amount_paid': 0.0, 'amount_return':0.0, 'amount_tax':0.0, } for payment in order.statement_ids: res[order.id]['amount_paid'] += payment.amount for paym...
469,777
def action_confirm(self, cr, uid, ids): """ Confirms production order. @return: Newly generated picking Id. """ picking_id = False proc_ids = [] seq_obj = self.pool.get('ir.sequence') pick_obj = self.pool.get('stock.picking') move_obj = self.pool.get('stock.move') proc_obj = self.pool.get('procurement.order') wf_servic...
def action_confirm(self, cr, uid, ids): """ Confirms production order. @return: Newly generated picking Id. """ picking_id = False proc_ids = [] seq_obj = self.pool.get('ir.sequence') pick_obj = self.pool.get('stock.picking') move_obj = self.pool.get('stock.move') proc_obj = self.pool.get('procurement.order') wf_servic...
469,778
def _get_order(self, cr, uid, ids, context=None): if context is None: context = {} result = {} for line in self.pool.get('sale.order.line').browse(cr, uid, ids, context=context): result[line.order_id.id] = True return result.keys()
def _get_order(self, cr, uid, ids, context=None): if context is None: context = {} result = {} for line in self.pool.get('sale.order.line').browse(cr, uid, ids, context=context): result[line.order_id.id] = True return result.keys()
469,779
def _get_register(self, cr, uid, ids, fields, args, context=None): """Get Confirm or uncofirm register value. @param ids: List of Event registration type's id @param fields: List of function fields(register_current and register_prospect). @param context: A standard dictionary for contextual values @return: Dictionary o...
def _get_register(self, cr, uid, ids, fields, args, context=None): """Get Confirm or uncofirm register value. @param ids: List of Event registration type's id @param fields: List of function fields(register_current and register_prospect). @param context: A standard dictionary for contextual values @return: Dictionary o...
469,780
def _get_register(self, cr, uid, ids, fields, args, context=None): """Get Confirm or uncofirm register value. @param ids: List of Event registration type's id @param fields: List of function fields(register_current and register_prospect). @param context: A standard dictionary for contextual values @return: Dictionary o...
def _get_register(self, cr, uid, ids, fields, args, context=None): """Get Confirm or uncofirm register value. @param ids: List of Event registration type's id @param fields: List of function fields(register_current and register_prospect). @param context: A standard dictionary for contextual values @return: Dictionary o...
469,781
def result_get(self): return self.result
def result_get(self): return self.result
469,782
def result_get(self): return self.result
def result_get(self): return self.result
469,783
def create(self, cr, user, vals, context=None): if ('name' not in vals) or (vals.get('name')=='/'): seq_obj_name = 'stock.picking.' + vals['type'] vals['name'] = self.pool.get('ir.sequence').get(cr, user, seq_obj_name) type_list = { 'out':_('Packing List'), 'in':_('Reception'), 'internal': _('Internal picking'), 'deli...
def create(self, cr, user, vals, context=None): if ('name' not in vals) or (vals.get('name')=='/'): seq_obj_name = 'stock.picking.' + vals['type'] vals['name'] = self.pool.get('ir.sequence').get(cr, user, seq_obj_name) type_list = { 'out':_('Packing List'), 'in':_('Reception'), 'internal': _('Internal picking'), 'deli...
469,784
def _check_date(self, cr, uid, ids): for rec in self.read(cr, uid, ids, ['number_of_days_temp','date_from','date_to']): if rec['number_of_days_temp'] < 0: return False date_from = time.strptime(rec['date_from'], '%Y-%m-%d %H:%M:%S') date_to = time.strptime(rec['date_to'], '%Y-%m-%d %H:%M:%S') if date_from > date_to: re...
def _check_date(self, cr, uid, ids): for rec in self.read(cr, uid, ids, ['number_of_days_temp','date_from','date_to', 'type']): if rec['number_of_days_temp'] < 0: return False date_from = time.strptime(rec['date_from'], '%Y-%m-%d %H:%M:%S') date_to = time.strptime(rec['date_to'], '%Y-%m-%d %H:%M:%S') if date_from > dat...
469,785
def get_module_resource(module, *args): """Return the full path of a resource of the given module. @param module: the module @param args: the resource path components @return: absolute path to the resource """ a = get_module_path(module) if zipfile.is_zipfile( a +'.zip') : zip = zipfile.ZipFile( a + ".zip") files = [...
def get_module_resource(module, *args): """Return the full path of a resource of the given module. @param module: the module @param args: the resource path components @return: absolute path to the resource """ a = get_module_path(module) if zipfile.is_zipfile( a +'.zip') : zip = zipfile.ZipFile( a + ".zip") files = [...
469,786
def get_module_resource(module, *args): """Return the full path of a resource of the given module. @param module: the module @param args: the resource path components @return: absolute path to the resource """ a = get_module_path(module) if zipfile.is_zipfile( a +'.zip') : zip = zipfile.ZipFile( a + ".zip") files = [...
def get_module_resource(module, *args): """Return the full path of a resource of the given module. @param module: the module @param args: the resource path components @return: absolute path to the resource """ a = get_module_path(module) if zipfile.is_zipfile( a +'.zip') : zip = zipfile.ZipFile( a + ".zip") files = [...
469,787
def _compute_day(self, cr, uid, ids, fields, args, context=None): if context is None: 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 st...
def _compute_day(self, cr, uid, ids, fields, args, context=None): if context is None: 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 st...
469,788
def do_close(self, cr, uid, ids, context=None): """ Close Task """ if context is None: context = {} request_pool = self.pool.get('res.request') for task in self.browse(cr, uid, ids, context=context): project = task.project_id if project: # Send request to project manager if project.warn_manager and project.user_id and ...
def do_close(self, cr, uid, ids, context=None): """ Close Task """ if context is None: context = {} request = self.pool.get('res.request') for task in self.browse(cr, uid, ids, context=context): project = task.project_id if project: # Send request to project manager if project.warn_manager and project.user_id and (proj...
469,789
def _set_attendee_data(self, cr, uid, id, name, value, arg, context): if not value: return eventdata = self.browse(cr, uid, id, context=context) att_len = len(eventdata.attendee_ids) if att_len == len(value.split(',')): return if att_len > len(value.split(',')): for attendee in eventdata.attendee_ids[len(value.split(',...
def _set_attendee_data(self, cr, uid, id, name, value, arg, context): if not value: return eventdata = self.browse(cr, uid, id, context=context) att_len = len(eventdata.attendee_ids) if att_len == len(value.split(',')): return if att_len > len(value.split(',')): for attendee in eventdata.attendee_ids[len(value.split(',...
469,790
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True): if isinstance(ids, (str, int, long)): select = [ids] else: select = ids new_ids = [] for id in select: id = common.caldav_id2real_id(id) if not id in new_ids: new_ids.append(id) if 'case_id' in vals: vals['case_id'] = common.caldav_id2rea...
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True): if isinstance(ids, (str, int, long)): select = [ids] else: select = ids new_ids = [] for id in select: id = common.caldav_id2real_id(id) if not id in new_ids: new_ids.append(id) if 'case_id' in vals: vals['case_id'] = common.caldav_id2rea...
469,791
def onchange_partner_id(self, cr, uid, ids, type, partner_id, date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False): """ Function that is call when the partner of the invoice is changed it will retriev and set the good bank partner bank""" res = super(account_invoice, self).onchange_partner_i...
def onchange_partner_id(self, cr, uid, ids, type, partner_id, date_invoice=False, payment_term=False, partner_bank=False, company_id=False): """ Function that is call when the partner of the invoice is changed it will retriev and set the good bank partner bank""" res = super(account_invoice, self).onchange_partner_id( ...
469,792
def onchange_partner_id(self, cr, uid, ids, type, partner_id, date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False): """ Function that is call when the partner of the invoice is changed it will retriev and set the good bank partner bank""" res = super(account_invoice, self).onchange_partner_i...
def onchange_partner_id(self, cr, uid, ids, type, partner_id, date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False): """ Function that is call when the partner of the invoice is changed it will retriev and set the good bank partner bank""" res = super(account_invoice, self).onchange_partner_i...
469,793
def history_message(self, cr, uid, vals): dictcreate = dict(vals) ref_ids = str(dictcreate.get('ref_ids')).split(';') msg = dictcreate.get('message') msg = self.pool.get('email.server.tools').parse_message(msg) server_tools_pool = self.pool.get('email.server.tools') message_id = msg.get('message-id', False) msg_pool = ...
def history_message(self, cr, uid, vals): dictcreate = dict(vals) ref_ids = str(dictcreate.get('ref_ids')).split(';') msg = dictcreate.get('message') msg = self.pool.get('email.server.tools').parse_message(msg) server_tools_pool = self.pool.get('email.server.tools') message_id = msg.get('message-id', False) msg_pool = ...
469,794
def history_message(self, cr, uid, vals): dictcreate = dict(vals) ref_ids = str(dictcreate.get('ref_ids')).split(';') msg = dictcreate.get('message') msg = self.pool.get('email.server.tools').parse_message(msg) server_tools_pool = self.pool.get('email.server.tools') message_id = msg.get('message-id', False) msg_pool = ...
def history_message(self, cr, uid, vals): dictcreate = dict(vals) ref_ids = str(dictcreate.get('ref_ids')).split(';') msg = dictcreate.get('message') msg = self.pool.get('email.server.tools').parse_message(msg) server_tools_pool = self.pool.get('email.server.tools') message_id = msg.get('message-id', False) msg_pool = ...
469,795
def history_message(self, cr, uid, vals): dictcreate = dict(vals) ref_ids = str(dictcreate.get('ref_ids')).split(';') msg = dictcreate.get('message') msg = self.pool.get('email.server.tools').parse_message(msg) server_tools_pool = self.pool.get('email.server.tools') message_id = msg.get('message-id', False) msg_pool = ...
def history_message(self, cr, uid, vals): dictcreate = dict(vals) ref_ids = str(dictcreate.get('ref_ids')).split(';') msg = dictcreate.get('message') msg = self.pool.get('email.server.tools').parse_message(msg) server_tools_pool = self.pool.get('email.server.tools') message_id = msg.get('message-id', False) msg_pool = ...
469,796
def base_change(self, cr, uid, ids, base, currency_id=False, company_id=False, date_invoice=False): cur_obj = self.pool.get('res.currency') company_obj = self.pool.get('res.company') company_currency = False if company_id: company_currency = company_obj.read(cr, uid, [company_id], ['currency_id'])[0]['currency_id'][0] ...
def base_change(self, cr, uid, ids, base, currency_id=False, company_id=False, date_invoice=False): cur_obj = self.pool.get('res.currency') company_obj = self.pool.get('res.company') company_currency = False if company_id: company_currency = company_obj.read(cr, uid, [company_id], ['currency_id'])[0]['currency_id'][0] ...
469,797
def amount_change(self, cr, uid, ids, amount, currency_id=False, company_id=False, date_invoice=False): cur_obj = self.pool.get('res.currency') company_obj = self.pool.get('res.company') company_currency = False tax_sign = 1 if ids: tax_amount = self.read(cr, uid, ids[0], ['tax_amount'])['tax_amount'] if tax_amount < 0...
def amount_change(self, cr, uid, ids, amount, currency_id=False, company_id=False, date_invoice=False): cur_obj = self.pool.get('res.currency') company_obj = self.pool.get('res.company') company_currency = False factor = 1 if ids: tax_amount = self.read(cr, uid, ids[0], ['tax_amount'])['tax_amount'] if tax_amount < 0: ...
469,798
def amount_change(self, cr, uid, ids, amount, currency_id=False, company_id=False, date_invoice=False): cur_obj = self.pool.get('res.currency') company_obj = self.pool.get('res.company') company_currency = False tax_sign = 1 if ids: tax_amount = self.read(cr, uid, ids[0], ['tax_amount'])['tax_amount'] if tax_amount < 0...
def amount_change(self, cr, uid, ids, amount, currency_id=False, company_id=False, date_invoice=False): cur_obj = self.pool.get('res.currency') company_obj = self.pool.get('res.company') company_currency = False tax_sign = 1 if ids: factor = self.read(cr, uid, ids[0], ['factor_tax'])['factor_tax'] if company_id: compan...
469,799