rem
stringlengths
0
322k
add
stringlengths
0
2.05M
context
stringlengths
8
228k
to_char(create_date, 'MM'), create_uid
to_char(create_date, 'MM')
def init(self, cr): tools.sql.drop_view_if_exists(cr, 'purchase_order_qty_amount') cr.execute(""" create or replace view purchase_order_qty_amount as ( select min(id) as id, to_char(create_date, 'MM') as month, sum(product_qty) as total_qty, create_uid as user_id, sum(price_unit*product_qty) as total_amount from purcha...
if not slip.employee_id.contract_id:
update = {} ttyme = datetime.fromtimestamp(time.mktime(time.strptime(slip.date,"%Y-%m-%d"))) contracts = self.get_contract(cr, uid, slip.employee_id, date, context) if contracts.get('id', False) == False: update.update({ 'basic': round(0.0), 'basic_before_leaves': round(0.0), 'name':'Salary Slip of %s for %s' % (slip.e...
def get_days(start, end, month, year, calc_day): count = 0 import datetime for day in range(start, end): if datetime.date(year, month, day).weekday() == calc_day: count += 1 return count
update = {}
def get_days(start, end, month, year, calc_day): count = 0 import datetime for day in range(start, end): if datetime.date(year, month, day).weekday() == calc_day: count += 1 return count
ttyme = datetime.fromtimestamp(time.mktime(time.strptime(slip.date,"%Y-%m-%d")))
def get_days(start, end, month, year, calc_day): count = 0 import datetime for day in range(start, end): if datetime.date(year, month, day).weekday() == calc_day: count += 1 return count
if not slip.employee_id.contract_id:
if not slip.contract_id:
def get_days(start, end, month, year, calc_day): count = 0 import datetime for day in range(start, end): if datetime.date(year, month, day).weekday() == calc_day: count += 1 return count
help="Check this box if you want to print all entries when printing the General Ledger, "\ "otherwise it will only print its balance."),
def _get_level(self, cr, uid, ids, field_name, arg, context={}): res={} accounts = self.browse(cr, uid, ids) for account in accounts: level = 0 if account.parent_id : obj = self.browse(cr, uid, account.parent_id.id) level = obj.level + 1 res[account.id] = level return res
'name': reg.invoice_label + '-' + reg.name,
'name': reg.invoice_label + '-' + c_name,
def _makeInvoices(self, cr, uid, context={}): invoices = {} invoice_ids = [] create_ids=[] tax_ids=[] inv_create = 0 inv_reject = 0 inv_rej_reason = "" list_inv = [] obj_event_reg = self.pool.get('event.registration') obj_lines = self.pool.get('account.invoice.line') inv_obj = self.pool.get('account.invoice') data_even...
acc_id = obj_task.project_id.analytic_account_id.id vals_line['account_id'] = acc_id res = obj_timesheet.on_change_account_id(cr, uid, False, acc_id) if res.get('value'): vals_line.update(res['value']) vals_line['general_account_id'] = result['general_account_id'] vals_line['journal_id'] = result['journal_id'] vals_lin...
acc_id = obj_task.project_id and obj_task.project_id.analytic_account_id.id or False if acc_id: vals_line['account_id'] = acc_id res = obj_timesheet.on_change_account_id(cr, uid, False, acc_id) if res.get('value'): vals_line.update(res['value']) vals_line['general_account_id'] = result['general_account_id'] vals_line['...
def create(self, cr, uid, vals, *args, **kwargs): obj_timesheet = self.pool.get('hr.analytic.timesheet') project_obj = self.pool.get('project.project') task_obj = self.pool.get('project.task') uom_obj = self.pool.get('product.uom') vals_line = {} context = kwargs.get('context', {}) #TOFIX: after loading project_timesh...
WHERE (period_id = %s) AND (warehouse_id = %s)", (f.period_id2.id, f.warehouse_id2.id))
WHERE (period_id = %s) AND (warehouse_id = %s)", (f.period_id.id, f.warehouse_id.id))
def create_planning(self,cr, uid, ids, context=None): if context is None: context = {} product_obj = self.pool.get('product.product') planning_obj = self.pool.get('stock.planning') mod_obj = self.pool.get('ir.model.data') prod_categ_obj = self.pool.get('product.category') template_obj = self.pool.get('product.template'...
def _amount_all(self, cr, uid, ids, field_name, arg, context):
def _amount_all(self, cr, uid, ids, field_name, arg, context=None):
def _amount_all(self, cr, uid, ids, field_name, arg, context): res = {} cur_obj=self.pool.get('res.currency') for order in self.browse(cr, uid, ids): res[order.id] = { 'amount_untaxed': 0.0, 'amount_tax': 0.0, 'amount_total': 0.0, } val = val1 = 0.0 cur=order.pricelist_id.currency_id for line in order.order_line: for c...
val+= c['amount'] val1 += line.price_subtotal
val += c['amount']
def _amount_all(self, cr, uid, ids, field_name, arg, context): res = {} cur_obj=self.pool.get('res.currency') for order in self.browse(cr, uid, ids): res[order.id] = { 'amount_untaxed': 0.0, 'amount_tax': 0.0, 'amount_total': 0.0, } val = val1 = 0.0 cur=order.pricelist_id.currency_id for line in order.order_line: for c...
refs = msg.get('references') references = refs.split()
refs = msg.get('references',False) references = False if refs: references = refs.split()
def search_message(self, cr, uid, message, context=None): #@param message: string of mail which is read from EML File #@return model,res_id references = [] dictcreate = dict(message) msg = dictcreate.get('message') msg = self.pool.get('email.server.tools').parse_message(msg) message_id = msg.get('message-id') refs = m...
msg = msg_pool.browse(cr, uid, msg_ids[0]) model = msg.model res_id = msg.res_id
if msg_ids and len(msg_ids): msg = msg_pool.browse(cr, uid, msg_ids[0]) model = msg.model res_id = msg.res_id
def search_message(self, cr, uid, message, context=None): #@param message: string of mail which is read from EML File #@return model,res_id references = [] dictcreate = dict(message) msg = dictcreate.get('message') msg = self.pool.get('email.server.tools').parse_message(msg) message_id = msg.get('message-id') refs = m...
bname,ext = os.path.splitext(filename)
try: bname,ext = os.path.splitext(filename or 'test.tmp') except Exception: bname, ext = filename, 'tmp'
def doIndex(self, content, filename=None, content_type=None, realfname = None, debug=False): fobj = None fname = None mime = None if content_type and self.mimes.has_key(content_type): mime = content_type fobj = self.mimes[content_type] elif filename: bname,ext = os.path.splitext(filename) if self.exts.has_key(ext): fob...
can_compute = True for child in current.child_id: if child.id not in sums: can_compute = False try: brs.insert(0, brs.pop(brs.index(child))) except ValueError: brs.insert(0, child) if can_compute: brs.pop(0) for fn in field_names: sums.setdefault(current.id, {})[fn] = accounts.get(current.id, {}).get(fn, 0.0) if curren...
brs.pop(0) for fn in field_names: sums.setdefault(current.id, {})[fn] = accounts.get(current.id, {}).get(fn, 0.0) if current.child_id: sums[current.id][fn] += sum(sums[child.id][fn] for child in current.child_id)
def __compute(self, cr, uid, ids, field_names, arg=None, context=None, query='', query_params=()): """ compute the balance, debit and/or credit for the provided account ids Arguments: `ids`: account ids `field_names`: the fields to compute (a list of any of 'balance', 'debit' and 'credit') `arg`: unused fields.function...
"sale_tax": fields.many2one("account.tax.template", "Sale Tax"), "purchase_tax": fields.many2one("account.tax.template", "Purchase Tax"),
"sale_tax": fields.many2one("account.tax.template", "Default Sale Tax"), "purchase_tax": fields.many2one("account.tax.template", "Default Purchase Tax"),
def _default_company(self, cr, uid, context={}): user = self.pool.get('res.users').browse(cr, uid, uid, context=context) if user.company_id: return user.company_id.id return self.pool.get('res.company').search(cr, uid, [('parent_id', '=', False)])[0]
ids = self.pool.get('account.tax.template').search(cr, uid, [("chart_template_id" , "=", chart_template_id)], order="sequence") if len(ids) > 0: id=ids[0] res['value']["sale_tax"] = id res['value']["purchase_tax"] = id
sale_tax_ids = self.pool.get('account.tax.template').search(cr, uid, [("chart_template_id" , "=", chart_template_id), ('type_tax_use', 'in', ('sale','all'))], order="sequence") purchase_tax_ids = self.pool.get('account.tax.template').search(cr, uid, [("chart_template_id" , "=", chart_template_id), ('type_tax_use', 'in'...
def onchange_chart_template_id(self, cr, uid, ids, chart_template_id=False, context=None): res = {} res['value'] = {} res['value']["sale_tax"] = False res['value']["purchase_tax"] = False if chart_template_id: ids = self.pool.get('account.tax.template').search(cr, uid, [("chart_template_id" , "=", chart_template_id)], ...
return sequence + str(self.checksum(sequence))
try: return sequence + str(self.checksum(sequence)) except Exception, e: return sequence
def make_sscc(self, cr, uid, context=None): sequence = self.pool.get('ir.sequence').get(cr, uid, 'stock.lot.tracking') return sequence + str(self.checksum(sequence))
method=True, store=True, type='datetime', string='Expected Date', select=1, help="Expected date for the picking to be processed. Will be set to date of actual processing if not specified."),
method=True, store=True, type='datetime', string='Expected Date', select=1, help="Expected date for the picking to be processed"),
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) new_id = super(stock_picking, self).create(cr, user, vals, context) return new_id
users_obj = self.pool.get('res.users')
def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial picking and moves done. @param partial_datas : Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom @return: Dictionary of values """ if context is ...
prodlot_id = partial_data.get('prodlot_id',False)
prodlot_id = partial_data.get('prodlot_id') prodlot_ids[move.id] = prodlot_id
def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial picking and moves done. @param partial_datas : Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom @return: Dictionary of values """ if context is ...
user = users_obj.browse(cr, uid, uid)
def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial picking and moves done. @param partial_datas : Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom @return: Dictionary of values """ if context is ...
pricetype ='standard_price' if pricetype and qty > 0:
if qty > 0:
def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial picking and moves done. @param partial_datas : Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom @return: Dictionary of values """ if context is ...
amount_unit = product.price_get(pricetype, context)[product.id]
amount_unit = product.price_get('standard_price', context)[product.id]
def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial picking and moves done. @param partial_datas : Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom @return: Dictionary of values """ if context is ...
product_obj.write(cr, uid, [product.id], {pricetype.field: new_std_price})
product_obj.write(cr, uid, [product.id], {'standard_price': new_std_price})
def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial picking and moves done. @param partial_datas : Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom @return: Dictionary of values """ if context is ...
new_obj = move_obj.copy(cr, uid, move.id, {
defaults = {
def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial picking and moves done. @param partial_datas : Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom @return: Dictionary of values """ if context is ...
})
} prodlot_id = prodlot_ids[move.id] if prodlot_id: defaults.update(prodlot_id=prodlot_id) new_obj = move_obj.copy(cr, uid, move.id, defaults)
def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial picking and moves done. @param partial_datas : Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom @return: Dictionary of values """ if context is ...
for move in too_many: product_qty = move_product_qty[move.id] move_obj.write(cr, uid, [move.id], { 'product_qty' : product_qty, 'product_uos_qty': product_qty, 'picking_id': new_picking, }) else: for move in too_many: product_qty = move_product_qty[move.id] move_obj.write(cr, uid, [move.id], { 'product_qty': product_qt...
for move in complete: if prodlot_ids.get(move.id): move_obj.write(cr, uid, move.id, {'prodlot_id': prodlot_ids[move.id]}) for move in too_many: product_qty = move_product_qty[move.id] defaults = { 'product_qty' : product_qty, 'product_uos_qty': product_qty, } prodlot_id = prodlot_ids.get(move.id) if prodlot_ids.get(mov...
def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial picking and moves done. @param partial_datas : Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom @return: Dictionary of values """ if context is ...
if new_picking:
def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial picking and moves done. @param partial_datas : Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom @return: Dictionary of values """ if context is ...
'date': fields.datetime('Date', required=True, help="Scheduled date for the movement of the products or real date if the move is done.", readonly=True), 'date_expected': fields.datetime('Date Expected', required=True, help="Scheduled date for the movement of the products"),
'date': fields.datetime('Date', required=True, help="Move date: scheduled date until move is done, then date of actual move processing", readonly=True), 'date_expected': fields.datetime('Scheduled Date', required=True, help="Scheduled date for the processing of this move"),
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...
users_obj = self.pool.get('res.users')
def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial pickings and moves done. @param partial_datas: Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom """ res = {} picking_obj = self.pool.get('stock....
prodlot_id = partial_data.get('prodlot_id',False)
prodlot_ids[move.id] = partial_data.get('prodlot_id')
def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial pickings and moves done. @param partial_datas: Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom """ res = {} picking_obj = self.pool.get('stock....
user = users_obj.browse(cr, uid, uid) context['currency_id'] = move.company_id.currency_id.id
move_currency_id = move.company_id.currency_id.id context['currency_id'] = move_currency_id
def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial pickings and moves done. @param partial_datas: Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom """ res = {} picking_obj = self.pool.get('stock....
user.company_id.currency_id.id, product_price)
move_currency_id, product_price)
def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial pickings and moves done. @param partial_datas: Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom """ res = {} picking_obj = self.pool.get('stock....
new_move = self.copy(cr, uid, move.id, { 'product_qty' : product_qty, 'product_uos_qty': product_qty, 'picking_id' : move.picking_id.id, 'state': 'assigned', 'move_dest_id': False, 'price_unit': move.price_unit, })
defaults = { 'product_qty' : product_qty, 'product_uos_qty': product_qty, 'picking_id' : move.picking_id.id, 'state': 'assigned', 'move_dest_id': False, 'price_unit': move.price_unit, } prodlot_id = prodlot_ids[move.id] if prodlot_id: defaults.update(prodlot_id=prodlot_id) new_move = self.copy(cr, uid, move.id, default...
def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial pickings and moves done. @param partial_datas: Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom """ res = {} picking_obj = self.pool.get('stock....
if prodlot_id: self.write(cr, uid, [move.id],{'prodlot_id': prodlot_id,})
if prodlot_ids.get(move.id): self.write(cr, uid, [move.id],{'prodlot_id': prodlot_ids.get(move.id)})
def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial pickings and moves done. @param partial_datas: Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom """ res = {} picking_obj = self.pool.get('stock....
ref = {} done_move_ids = [] for move in complete: done_move_ids.append(move.id) return done_move_ids
return [move.id for move in complete]
def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial pickings and moves done. @param partial_datas: Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom """ res = {} picking_obj = self.pool.get('stock....
select stock.create_date, min(stock.id) as id, sum(stock.product_qty) as qty, 0 as planned_qty
select stock.create_date as date, min(stock.id) as id, sum(stock.product_qty) as qty, 0 as planned_qty
def init(self, cr): tools.drop_view_if_exists(cr, 'report_delivery_products_planned') cr.execute(""" create or replace view report_delivery_products_planned as ( select stock.create_date, min(stock.id) as id, sum(stock.product_qty) as qty, 0 as planned_qty from stock_picking picking inner join stock_move stock on picki...
select stock.date, min(stock.id), 0 as actual_qty, sum(stock.product_qty) as planned_qty
select stock.date as date, min(stock.id), 0 as actual_qty, sum(stock.product_qty) as planned_qty
def init(self, cr): tools.drop_view_if_exists(cr, 'report_delivery_products_planned') cr.execute(""" create or replace view report_delivery_products_planned as ( select stock.create_date, min(stock.id) as id, sum(stock.product_qty) as qty, 0 as planned_qty from stock_picking picking inner join stock_move stock on picki...
if fil.parent_id: self.storage_id = fil.parent_id.storage_id.id else: self.storage_id = None
self.storage_id = None par = fil.parent_id while par: if par.storage_id and par.storage_id.id: self.storage_id = par.storage_id.id break par = par.parent_id
def __init__(self, path, parent, context, fil): super(node_file,self).__init__(path, parent,context) self.file_id = fil.id #todo: more info from ir_attachment if fil.file_type and '/' in fil.file_type: self.mimetype = str(fil.file_type) self.create_date = fil.create_date self.write_date = fil.write_date or fil.create_d...
return self._get_dav_props_hlpr(cr, nodes.node_dir,
return self._get_dav_props_hlpr(cr, nodes.node_file,
def get_dav_props(self, cr): return self._get_dav_props_hlpr(cr, nodes.node_dir, None, 'file_id', self.file_id) #'document.webdav.dir.property', 'dir_id', self.dir_id)
return self._get_dav_props_hlpr(cr, nodes.node_dir,
return self._get_dav_props_hlpr(cr, nodes.node_database,
def get_dav_props(self, cr): return self._get_dav_props_hlpr(cr, nodes.node_dir, 'document.webdav.dir.property', 'dir_id', False)
return self._get_dav_eprop_hlpr(cr, nodes.node_dir, ns, prop,
return self._get_dav_eprop_hlpr(cr, nodes.node_database, ns, prop,
def get_dav_eprop(self, cr, ns, prop): return self._get_dav_eprop_hlpr(cr, nodes.node_dir, ns, prop, 'document.webdav.dir.property', 'dir_id', False)
context.update({'lang': inv.partner_id.lang}) compute_taxes = ait_obj.compute(cr, uid, inv.id, context=context)
ctx = context.copy() ctx.update({'lang': inv.partner_id.lang}) compute_taxes = ait_obj.compute(cr, uid, inv.id, context=ctx)
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 not inv.journal_id.sequence_id: raise osv.except_osv(_('Error !...
print "formmmmmmmmmm", form
def get_fiscalyear(self,form): print "formmmmmmmmmm", form return pooler.get_pool(self.cr.dbname).get('account.fiscalyear').browse(self.cr,self.uid,form['fiscalyear_id']).name
return pooler.get_pool(self.cr.dbname).get('account.period').browse(self.cr,self.uid,form['period_from']).name
if form['filter'] == 'filter_period': if form['period_from']: return pooler.get_pool(self.cr.dbname).get('account.period').browse(self.cr,self.uid,form['period_from']).name return ''
def get_start_period(self, form): return pooler.get_pool(self.cr.dbname).get('account.period').browse(self.cr,self.uid,form['period_from']).name
return pooler.get_pool(self.cr.dbname).get('account.period').browse(self.cr,self.uid,form['period_to']).name
if form['filter'] == 'filter_period': if form['period_to']: return pooler.get_pool(self.cr.dbname).get('account.period').browse(self.cr,self.uid,form['period_to']).name return ''
def get_end_period(self, form): return pooler.get_pool(self.cr.dbname).get('account.period').browse(self.cr,self.uid,form['period_to']).name
obj=[]
def write(self, cr, uid, ids, vals, context=None): obj=[] if 'company_id' in vals: move_lines = self.pool.get('account.move.line').search(cr, uid, [('journal_id', 'in', ids)]) if move_lines: raise osv.except_osv(_('Warning !'), _('You cannot modify company of this journal as its related record exist in Entry Lines')) r...
journal_type = ('sale', 'sale_refund', 'purchase', 'purchase_refund') journal_seq = { 'sale':'seq_out_invoice', 'purchase':'seq_in_invoice', 'purchase_refund':'seq_out_refund', 'sale_refund':'seq_in_refund' }
def create_sequence(self, cr, uid, vals, context=None): """ Create new entry sequence for every new Joural @param cr: cursor to database @param user: id of current user @param ids: list of record ids to be process @param context: context arguments, like lang, time zone @return: return a result """
date_pool = self.pool.get('ir.model.data') result = True
def create_sequence(self, cr, uid, vals, context=None): """ Create new entry sequence for every new Joural @param cr: cursor to database @param user: id of current user @param ids: list of record ids to be process @param context: context arguments, like lang, time zone @return: return a result """
obj=[]
def write(self, cr, uid, ids, vals, context={}): obj=[] if 'company_id' in vals: move_lines = self.pool.get('account.move.line').search(cr, uid, [('period_id', 'in', ids)]) if move_lines: raise osv.except_osv(_('Warning !'), _('You cannot modify company of this period as its related record exist in Entry Lines')) retur...
new_account = acc_obj.create(cr, uid, vals)
acc_obj.create(cr, uid, vals)
def action_create(self,cr,uid,ids,context=None): acc_obj = self.pool.get('account.account') tmpl_obj = self.pool.get('account.account.template') data = self.read(cr, uid, ids) company_id = acc_obj.read(cr, uid, [data[0]['cparent_id']], ['company_id'])[0]['company_id'][0] account_template = tmpl_obj.browse(cr, uid, cont...
except Exception,e:
except:
def execute(self, cr, uid, ids, context=None): obj_multi = self.browse(cr, uid, ids[0]) obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_sequence = self.pool.get('ir.sequence') obj_acc_template = self.pool.get('account.account.templ...
case when uom.category_id != puom.category_id then pt.weight_net * inv_line.quantity else case when uom.factor_inv_data > 0 then pt.weight_net * inv_line.quantity * uom.factor_inv_data else pt.weight_net * inv_line.quantity / uom.factor end end
case when uom.category_id != puom.category_id then (pt.weight_net * inv_line.quantity) else (pt.weight_net * inv_line.quantity * uom.factor) end
def init(self, cr): drop_view_if_exists(cr, 'report_intrastat') cr.execute(""" create or replace view report_intrastat as ( select to_char(inv.create_date, 'YYYY') as name, to_char(inv.create_date, 'MM') as month, min(inv_line.id) as id, intrastat.id as intrastat_id, upper(inv_country.code) as code, sum(case when inv_l...
else case when uom.factor_inv_data > 0 then inv_line.quantity * uom.factor_inv_data else inv_line.quantity / uom.factor end end
else (inv_line.quantity * uom.factor) end
def init(self, cr): drop_view_if_exists(cr, 'report_intrastat') cr.execute(""" create or replace view report_intrastat as ( select to_char(inv.create_date, 'YYYY') as name, to_char(inv.create_date, 'MM') as month, min(inv_line.id) as id, intrastat.id as intrastat_id, upper(inv_country.code) as code, sum(case when inv_l...
if picking_id: wf_service.trg_validate(uid, 'stock.picking', picking_id, 'button_confirm', cr)
def action_ship_create(self, cr, uid, ids, *args): wf_service = netsvc.LocalService("workflow") picking_id = False move_obj = self.pool.get('stock.move') proc_obj = self.pool.get('procurement.order') company = self.pool.get('res.users').browse(cr, uid, uid).company_id for order in self.browse(cr, uid, ids, context={}):...
'account_id': a,
'account_id': account_id,
def action_invoice_create(self, cr, uid, ids, group=False, context=None): """ Creates invoice(s) for repair order. @param group: It is set to true when group invoice is to be generated. @return: Invoice Ids. """ res = {} invoices_group = {} inv_line_obj = self.pool.get('account.invoice.line') inv_obj = self.pool.get('a...
sid = inv.journal_id.invoice_sequence_id.id number = self.pool.get('ir.sequence').get_id(cr, uid, sid, 'id', {'fiscalyear_id': inv.period_id.fiscalyear_id.id})
sequence_id = inv.journal_id.invoice_sequence_id.id number = self.pool.get('ir.sequence').get_id(cr, uid, sequence_id, 'id', context=tmp_context)
def action_number(self, cr, uid, ids, *args): cr.execute('SELECT id, type, number, move_id, reference ' \ 'FROM account_invoice ' \ 'WHERE id IN %s', (tuple(ids),)) inv = self.browse(cr, uid, ids)[0] for (id, invtype, number, move_id, reference) in cr.fetchall(): if not number: tmp_context = { 'fiscalyear_id': inv.peri...
number = obj_seq.get_id(cr, uid, 'account.invoice.%s' % invtype, 'code=%s', context=tmp_context)
number = self.pool.get('ir.sequence').get_id(cr, uid, 'account.invoice.%s' % invtype, 'code', context=tmp_context)
def action_number(self, cr, uid, ids, *args): cr.execute('SELECT id, type, number, move_id, reference ' \ 'FROM account_invoice ' \ 'WHERE id IN %s', (tuple(ids),)) inv = self.browse(cr, uid, ids)[0] for (id, invtype, number, move_id, reference) in cr.fetchall(): if not number: tmp_context = { 'fiscalyear_id': inv.peri...
new_picking=picking_obj.copy(cr, uid, order_id.last_out_picking.id, {'name':'%s (return)' % order_id.name, 'move_lines':[], 'state':'draft', 'type':'in', 'type':'in', 'date':date_cur, }) new_order=order_obj.copy(cr,uid,order_id.id, {'name': 'Refund %s'%order_id.name, 'lines':[], 'statement_ids':[], 'last_out_picking'...
if order_id.last_out_picking.id: new_picking=picking_obj.copy(cr, uid, order_id.last_out_picking.id, {'name':'%s (return)' % order_id.name, 'move_lines':[], 'state':'draft', 'type':'in', 'type':'in', 'date':date_cur, }) new_order=order_obj.copy(cr,uid,order_id.id, {'name': 'Refund %s'%order_id.name, 'lines':[], 'stat...
def _create_returns2(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) order_obj = pool.get('pos.order') line_obj = pool.get('pos.order.line') picking_obj = pool.get('stock.picking') stock_move_obj = pool.get('stock.move') picking_ids = picking_obj.search(cr, uid, [('pos_order', 'in', data['ids']), ('sta...
'amount': fields.float('Amount', required=True, digits_compute=dp.get_precision('Account'), help="For taxes of type percentage, enter % ratio between 0-1."),
'amount': fields.float('Amount', required=True, digits_compute=get_precision_tax(), help="For taxes of type percentage, enter % ratio between 0-1."),
def copy(self, cr, uid, id, default=None, context=None): if default is None: default = {} default = default.copy() default.update({'line_ids': []}) return super(account_tax_code, self).copy(cr, uid, id, default, context)
totalin = totalex = round(price_unit * quantity, precision)
def compute_all(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None): """ RETURN: { 'total': 0.0, # Total without taxes 'total_included: 0.0, # Total with taxes 'taxes': [] # List of taxes, see compute for the format } """ precision = self.pool....
tex = self._compute(cr, uid, tex, price_unit, quantity, address_id=address_id, product=product, partner=partner)
def compute_all(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None): """ RETURN: { 'total': 0.0, # Total without taxes 'total_included: 0.0, # Total with taxes 'taxes': [] # List of taxes, see compute for the format } """ precision = self.pool....
print "Deprecated, use compute_all(...)['taxes'] instead of compute(...) to manage prices with tax included"
logger = netsvc.Logger() logger.notifyChannel("warning", netsvc.LOG_WARNING, "Deprecated, use compute_all(...)['taxes'] instead of compute(...) to manage prices with tax included")
def compute(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None): print "Deprecated, use compute_all(...)['taxes'] instead of compute(...) to manage prices with tax included" return self._compute(cr, uid, taxes, price_unit, quantity, address_id, product, partner)
today = (last_month_date- 1).strftime('%Y-%m-%d')
today = (last_month_date- relativedelta(days=1)).strftime('%Y-%m-%d')
def init(self, cr, uid=1): """ This view will be used in dashboard The reason writing this code here is, we need to check date range from today to first date of fiscal year. """ pool_obj_fy = pooler.get_pool(cr.dbname).get('account.fiscalyear') today = time.strftime('%Y-%m-%d') fy_id = pool_obj_fy.find(cr, uid, excepti...
<table width="100%"> <tr> <td width=60% style="padding-right:8px;"> <input id="sidebar_pad_datas" name="pad_name" size="5" /> </td> <td> <button>${_("Ok")}</button> </td> </tr> </table>
<input id="sidebar_pad_datas" name="pad_name" size="5" /> <button>${_("Ok")}</button>
def edit(self, template, template_text): output = super(SidebarTemplateEditor, self).edit(template, template_text)
'attendances_ids' : one2many_mod2('hr.attendance', 'sheet_id', 'Attendances', readonly=True, states={'draft':[('readonly',False)],'new':[('readonly',False)]}),
'attendances_ids' : one2many_mod2('hr.attendance', 'sheet_id', 'Attendances', readonly=True,),
def sign_out(self, cr, uid, ids, context=None): emp_obj = self.pool.get('hr.employee') if context is None: context = {} if not self.browse(cr, uid, ids, context=context)[0].date_current == time.strftime('%Y-%m-%d'): raise osv.except_osv(_('Error !'), _('You can not sign out from an other date than today')) emp_ids = em...
if il['analytics_id']:
if il.get('analytics_id', False):
def _get_analytic_lines(self, cr, uid, id): inv = self.browse(cr, uid, [id])[0] cur_obj = self.pool.get('res.currency')
repair_order = self.pool.get('mrp.repair').browse(cr, uid, record_id) if not repair_order.invoiced: res['arch'] = """ <form string="Cancel Repair" colspan="4"> <group col="2" colspan="2"> <label string="Do you want to continue?" colspan="4"/> <separator colspan="4"/> <button icon="gtk-cancel" special="cancel" string="N...
try: repair_order = self.pool.get('mrp.repair').browse(cr, uid, record_id) if not repair_order.invoiced: res['arch'] = """ <form string="Cancel Repair" colspan="4"> <group col="2" colspan="2"> <label string="Do you want to continue?" colspan="4"/> <separator colspan="4"/> <button icon="gtk-cancel" special="cancel" stri...
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ Changes the view dynamically @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param context: A standard dictionary @return: New arch of view....
company_currency=False
company_currency = False tax_amount = self.read(cr, uid, ids[0], ['tax_amount'])['tax_amount'] tax_sign=1 if tax_amount < 0: tax_sign = -1 elif tax_amount == 0: tax_sign = 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 if company_id: company_currency = company_obj.read(cr, uid, [company_id], ['currency_id'])[0]['currency_id'][0...
amount = cur_obj.compute(cr, uid, currency_id, company_currency, amount, context={'date': date_invoice or time.strftime('%Y-%m-%d')}, round=False) return {'value': {'tax_amount':amount}}
amount = cur_obj.compute(cr, uid, currency_id, company_currency, amount*tax_sign, context={'date': date_invoice or time.strftime('%Y-%m-%d')}, round=False) return {'value': {'tax_amount': amount}}
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 if company_id: company_currency = company_obj.read(cr, uid, [company_id], ['currency_id'])[0]['currency_id'][0...
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', c),
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=c),
def _get_account_line(self, cr, uid, ids, context={}): aac_ids = {} for acc in self.pool.get('account.analytic.account').browse(cr, uid, ids): aac_ids[acc.id] = True aal_ids = [] if aac_ids: aal_ids = self.pool.get('account.analytic.line').search(cr, uid, [('account_id','in',aac_ids.keys())], context=context) return aa...
print history_type
def _get_case_history(self, cr, uid, history_type, res_id, context=None): if not res_id: return
return False if type(self) != type(other):
def __eq__(self, other): if not self.context == other.context: return False if type(self) != type(other): return False # Two directory nodes, for the same document.directory, may have a # different context! (dynamic folders) if self.dctx != other.dctx: return False return self.dir_id == other.dir_id
return False if type(self) != type(other):
def __eq__(self, other): if not self.context == other.context: return False if type(self) != type(other): return False # Two nodes, for the same document.directory, may have a # different context! (dynamic folders) if self.dctx != other.dctx: return False return self.dir_id == other.dir_id
return False if type(self) != type(other):
def __eq__(self, other): if not self.context == other.context: return False if type(self) != type(other): return False if not self.res_model == other.res_model: return False if not self.res_id == other.res_id: return False if self.domain != other.domain: return False if self.dctx != other.dctx: return False return self...
return False if type(self) != type(other):
def __eq__(self, other): if not self.context == other.context: return False if type(self) != type(other): return False if self.dctx != other.dctx: return False return self.file_id == other.file_id
entry_type = 'journal_pur_voucher' if invoice.type == 'in_refund': entry_type = 'cont_voucher'
def pay_and_reconcile(self, cr, uid, ids, pay_amount, pay_account_id, period_id, pay_journal_id, writeoff_acc_id, writeoff_period_id, writeoff_journal_id, context=None, name=''): if context is None: context = {} #TODO check if we can use different period for payment and the writeoff line assert len(ids)==1, "Can only p...
entry_type = 'journal_sale_vou' if invoice.type == 'out_refund': entry_type = 'cont_voucher'
def pay_and_reconcile(self, cr, uid, ids, pay_amount, pay_account_id, period_id, pay_journal_id, writeoff_acc_id, writeoff_period_id, writeoff_journal_id, context=None, name=''): if context is None: context = {} #TODO check if we can use different period for payment and the writeoff line assert len(ids)==1, "Can only p...
id = obj_action.create(cr, uid, val) self.write(cr, uid, [thisrule.id], {"state": "subscribed", "action_id": id})
action_id = obj_action.create(cr, uid, val) self.write(cr, uid, [thisrule.id], {"state": "subscribed", "action_id": action_id})
def subscribe(self, cr, uid, ids, *args): """ Subscribe Rule for auditing changes on object and apply shortcut for logs on that object. @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Auddittrail Rule’s IDs. @return: True """ obj_action = ...
value = 'ir.actions.act_window,' + str(id)
value = 'ir.actions.act_window,' + str(action_id)
def subscribe(self, cr, uid, ids, *args): """ Subscribe Rule for auditing changes on object and apply shortcut for logs on that object. @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Auddittrail Rule’s IDs. @return: True """ obj_action = ...
"name": fields.char("Name", size=32), "object_id": fields.many2one('ir.model', 'Object'), "user_id": fields.many2one('res.users', 'User'), "method": fields.selection((('read', 'Read'), ('write', 'Write'), ('unlink', 'Delete'), ('create', 'Create')), "Method"), "timestamp": fields.datetime("Date"), "res_id": fields.inte...
"name": fields.char("Resource Name",size=64), "object_id": fields.many2one('ir.model', 'Object'), "user_id": fields.many2one('res.users', 'User'), "method": fields.char("Method", size=64), "timestamp": fields.datetime("Date"), "res_id": fields.integer('Resource Id'), "line_ids": fields.one2many('audittrail.log.line', ...
def unsubscribe(self, cr, uid, ids, *args): """ Unsubscribe Auditing Rule on object @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Auddittrail Rule’s IDs. @return: True """ obj_action = self.pool.get('ir.actions.act_window') val_obj = sel...
def get_value_text(self, cr, uid, field_name, values, object, context=None):
def get_value_text(self, cr, uid, field_name, values, model, context=None):
def unsubscribe(self, cr, uid, ids, *args): """ Unsubscribe Auditing Rule on object @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Auddittrail Rule’s IDs. @return: True """ obj_action = self.pool.get('ir.actions.act_window') val_obj = sel...
f_id = pool.get('ir.model.fields').search(cr, uid, [('name', '=', field_name), ('model_id', '=', object.id)]) if f_id: field = pool.get('ir.model.fields').read(cr, uid, f_id)[0] model = field['relation'] if field['ttype'] == 'many2one': if values: if type(values) == tuple: values = values[0] val = pool.get(model).read...
field_pool = pool.get('ir.model.fields') model_pool = pool.get('ir.model') obj_pool = pool.get(model.model) if obj_pool._inherits: inherits_ids = model_pool.search(cr, uid, [('model', '=', obj_pool._inherits.keys()[0])]) field_ids = field_pool.search(cr, uid, [('name', '=', field_name), ('model_id', 'in', (model.id, in...
def get_value_text(self, cr, uid, field_name, values, object, context=None): """ Gets textual values for the fields e.g.: For field of type many2one it gives its name value instead of id
@param object: Object who's values are being changed
@param model: Object who's values are being changed
def create_log_line(self, cr, uid, id, object, lines=[]): """ Creates lines for changed fields with its old and new values
obj = pool.get(object.model)
obj_pool = pool.get(model.model) model_pool = pool.get('ir.model') field_pool = pool.get('ir.model.fields') log_line_pool = pool.get('audittrail.log.line')
def create_log_line(self, cr, uid, id, object, lines=[]): """ Creates lines for changed fields with its old and new values
if obj._inherits: inherits_ids = pool.get('ir.model').search(cr, uid, [('model', '=', obj._inherits.keys()[0])]) f_id = pool.get('ir.model.fields').search(cr, uid, [('name', '=', line['name']), ('model_id', 'in', (object.id, inherits_ids[0]))])
if obj_pool._inherits: inherits_ids = model_pool.search(cr, uid, [('model', '=', obj_pool._inherits.keys()[0])]) field_ids = field_pool.search(cr, uid, [('name', '=', line['name']), ('model_id', 'in', (model.id, inherits_ids[0]))])
def create_log_line(self, cr, uid, id, object, lines=[]): """ Creates lines for changed fields with its old and new values
f_id = pool.get('ir.model.fields').search(cr, uid, [('name', '=', line['name']), ('model_id', '=', object.id)]) if f_id: fields = pool.get('ir.model.fields').read(cr, uid, f_id) old_value = 'old_value' in line and line['old_value'] or '' new_value = 'new_value' in line and line['new_value'] or '' old_value_text = 'ol...
field_ids = field_pool.search(cr, uid, [('name', '=', line['name']), ('model_id', '=', model.id)]) field_id = field_ids and field_ids[0] or False assert field_id, _("'%s' field is not exits in '%s' model" %(line['name'], model.model)) field = field_pool.read(cr, uid, field_id) old_value = 'old_value' in line and line...
def create_log_line(self, cr, uid, id, object, lines=[]): """ Creates lines for changed fields with its old and new values
def log_fct(self, db, uid, object, method, fct_src, *args):
def log_fct(self, db, uid, model, method, fct_src, *args):
def log_fct(self, db, uid, object, method, fct_src, *args): """ Logging function: This function is performs logging oprations according to method @param db: the current database @param uid: the current user’s ID for security checks, @param object: Object who's values are being changed @param method: method to log: crea...
@return: Returns result as per method of Object proxy """ logged_uids = []
@return: Returns result as per method of Object proxy """ res2 = args
def log_fct(self, db, uid, object, method, fct_src, *args): """ Logging function: This function is performs logging oprations according to method @param db: the current database @param uid: the current user’s ID for security checks, @param object: Object who's values are being changed @param method: method to log: crea...
obj_ids = pool.get('ir.model').search(cr, uid, [('model', '=', object)]) model_object = pool.get('ir.model').browse(cr, uid, obj_ids)[0]
resource_pool = pool.get(model) log_pool = pool.get('audittrail.log') model_pool = pool.get('ir.model') model_ids = model_pool.search(cr, uid, [('model', '=', model)]) model_id = model_ids and model_ids[0] or False assert model_id, _("'%s' Model is not exits..." %(model)) model = model_pool.browse(cr, uid, model_id)
def log_fct(self, db, uid, object, method, fct_src, *args): """ Logging function: This function is performs logging oprations according to method @param db: the current database @param uid: the current user’s ID for security checks, @param object: Object who's values are being changed @param method: method to log: crea...
res_id = fct_src(db, uid, object, method, *args)
res_id = fct_src(db, uid, model.model, method, *args)
def log_fct(self, db, uid, object, method, fct_src, *args): """ Logging function: This function is performs logging oprations according to method @param db: the current database @param uid: the current user’s ID for security checks, @param object: Object who's values are being changed @param method: method to log: crea...
new_value = pool.get(model_object.model).read(cr, uid, [res_id], args[0].keys())[0] if 'id' in new_value: del new_value['id'] if not logged_uids or uid in logged_uids: resource_name = pool.get(model_object.model).name_get(cr, uid, [res_id]) resource_name = resource_name and resource_name[0][1] or '' vals = { "method": ...
resource = resource_pool.read(cr, uid, res_id, args[0].keys()) vals = { "method": method, "object_id": model.id, "user_id": uid, "res_id": resource['id'], } if 'id' in resource: del resource['id'] log_id = log_pool.create(cr, uid, vals) lines = [] for field in resource: line = { 'name': field, 'new_value': resource[fie...
def log_fct(self, db, uid, object, method, fct_src, *args): """ Logging function: This function is performs logging oprations according to method @param db: the current database @param uid: the current user’s ID for security checks, @param object: Object who's values are being changed @param method: method to log: crea...
if method in ('write'): res_ids = args[0] for res_id in res_ids: old_values = pool.get(model_object.model).read(cr, uid, res_id, args[1].keys()) old_values_text = {} for field in args[1].keys(): old_values_text[field] = self.get_value_text(cr, uid, field, old_values[field], model_object) res = fct_src(db, uid, object, ...
elif method in ('read'):
def log_fct(self, db, uid, object, method, fct_src, *args): """ Logging function: This function is performs logging oprations according to method @param db: the current database @param uid: the current user’s ID for security checks, @param object: Object who's values are being changed @param method: method to log: crea...
res = fct_src(db, uid, object, method, *args)
res = fct_src(db, uid, model.model, method, *args)
def log_fct(self, db, uid, object, method, fct_src, *args): """ Logging function: This function is performs logging oprations according to method @param db: the current database @param uid: the current user’s ID for security checks, @param object: Object who's values are being changed @param method: method to log: crea...
if not logged_uids or uid in logged_uids: resource_name = pool.get(model_object.model).name_get(cr, uid, [res_id]) resource_name = resource_name and resource_name[0][1] or '' id = pool.get('audittrail.log').create(cr, uid, {"method": method, "object_id": model_object.id, "user_id": uid, "res_id": res_id, "name": resour...
vals = { "method": method, "object_id": model.id, "user_id": uid, "res_id": res_id, } log_id = log_pool.create(cr, uid, vals) lines = [] for field in old_values[res_id]: line = { 'name': field, 'old_value': old_values[res_id][field], 'old_value_text': self.get_value_text(cr, uid, field, old_values[res_id][field], mode...
def log_fct(self, db, uid, object, method, fct_src, *args): """ Logging function: This function is performs logging oprations according to method @param db: the current database @param uid: the current user’s ID for security checks, @param object: Object who's values are being changed @param method: method to log: crea...
if method in ('unlink'):
elif method in ('unlink'):
def log_fct(self, db, uid, object, method, fct_src, *args): """ Logging function: This function is performs logging oprations according to method @param db: the current database @param uid: the current user’s ID for security checks, @param object: Object who's values are being changed @param method: method to log: crea...
old_values[res_id] = pool.get(model_object.model).read(cr, uid, res_id, [])
old_values[res_id] = resource_pool.read(cr, uid, res_id)
def log_fct(self, db, uid, object, method, fct_src, *args): """ Logging function: This function is performs logging oprations according to method @param db: the current database @param uid: the current user’s ID for security checks, @param object: Object who's values are being changed @param method: method to log: crea...
if not logged_uids or uid in logged_uids: resource_name = pool.get(model_object.model).name_get(cr, uid, [res_id]) resource_name = resource_name and resource_name[0][1] or '' id = pool.get('audittrail.log').create(cr, uid, {"method": method, "object_id": model_object.id, "user_id": uid, "res_id": res_id, "name": resour...
vals = { "method": method, "object_id": model.id, "user_id": uid, "res_id": res_id, } log_id = log_pool.create(cr, uid, vals) lines = [] for field in old_values[res_id]: if field in ('id'): continue line = { 'name': field, 'old_value': old_values[res_id][field], 'old_value_text': self.get_value_text(cr, uid, field, ol...
def log_fct(self, db, uid, object, method, fct_src, *args): """ Logging function: This function is performs logging oprations according to method @param db: the current database @param uid: the current user’s ID for security checks, @param object: Object who's values are being changed @param method: method to log: crea...
for field in old_values[res_id]: if old_values[res_id][field]: line = { 'name': field, 'old_value': old_values[res_id][field], 'old_value_text': self.get_value_text(cr, uid, field, old_values[res_id][field], model_object) } lines.append(line) cr.commit() self.create_log_line(cr, uid, id, model_object, lines) res = fct_...
for field in resource.keys(): line = { 'name': field, 'new_value': resource[field], 'old_value': old_values[resource_id]['value'][field], 'new_value_text': self.get_value_text(cr, uid, field, resource[field], model), 'old_value_text': old_values[resource_id]['text'][field] } lines.append(line) self.create_log_line(cr,...
def log_fct(self, db, uid, object, method, fct_src, *args): """ Logging function: This function is performs logging oprations according to method @param db: the current database @param uid: the current user’s ID for security checks, @param object: Object who's values are being changed @param method: method to log: crea...