commit
de8dae53e9
|
@ -912,11 +912,17 @@ account_invoice()
|
|||
|
||||
class account_invoice_line(osv.osv):
|
||||
def _amount_line(self, cr, uid, ids, prop, unknow_none,unknow_dict):
|
||||
res = {}
|
||||
for line in self.browse(cr, uid, ids):
|
||||
res[line.id] = round(line.price_unit * line.quantity * (1-(line.discount or 0.0)/100.0),2)
|
||||
return res
|
||||
|
||||
res = {}
|
||||
cur_obj=self.pool.get('res.currency')
|
||||
for line in self.browse(cr, uid, ids):
|
||||
if line.invoice_id:
|
||||
res[line.id] = line.price_unit * line.quantity * (1-(line.discount or 0.0)/100.0)
|
||||
cur = line.invoice_id.currency_id
|
||||
res[line.id] = cur_obj.round(cr, uid, cur, res[line.id])
|
||||
else:
|
||||
res[line.id] = round(line.price_unit * line.quantity * (1-(line.discount or 0.0)/100.0),2)
|
||||
return res
|
||||
|
||||
def _price_unit_default(self, cr, uid, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
|
|
@ -81,8 +81,7 @@ class board_board(osv.osv):
|
|||
'type': 'form',
|
||||
'arch': self.create_view(cr, user, id, context),
|
||||
})
|
||||
vals['view_id'] = view_id
|
||||
super(board_board, self).write(cr, user, [id], vals, context)
|
||||
super(board_board, self).write(cr, user, [id], {'view_id': view_id}, context)
|
||||
return id
|
||||
|
||||
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False):
|
||||
|
|
|
@ -158,7 +158,8 @@ class invoice_create(wizard.interface):
|
|||
pool.get('account.invoice.line').create(cr, uid, curr_line)
|
||||
strids = ','.join(map(str, data['ids']))
|
||||
cr.execute("update account_analytic_line set invoice_id=%%s WHERE account_id = %%s and id IN (%s)" % strids, (last_invoice,account.id,))
|
||||
|
||||
pool.get('account.invoice').button_reset_taxes(cr, uid, [last_invoice], context)
|
||||
|
||||
return {
|
||||
'domain': "[('id','in', ["+','.join(map(str,invoices))+"])]",
|
||||
'name': _('Invoices'),
|
||||
|
|
|
@ -712,7 +712,7 @@
|
|||
<separator colspan="4" string="Properties"/>
|
||||
<field colspan="4" name="property_ids" nolabel="1" groups="base.group_extended"/>
|
||||
</page>
|
||||
<page string="Note">
|
||||
<page string="Notes">
|
||||
<separator colspan="4" string="Note" />
|
||||
<field name="note" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
|
|
|
@ -78,7 +78,7 @@ class project_work(osv.osv):
|
|||
if line_id:
|
||||
obj = self.pool.get('hr.analytic.timesheet')
|
||||
if 'name' in vals:
|
||||
vals_line['name'] = '%s: %s' % (task.name, vals['name'] or '/')
|
||||
vals_line['name'] = '%s: %s' % (tools.ustr(task.name), tools.ustr(vals['name']) or '/')
|
||||
if 'user_id' in vals:
|
||||
vals_line['user_id'] = vals['user_id']
|
||||
if 'date' in vals:
|
||||
|
|
|
@ -97,7 +97,7 @@ def _track_lines(self, cr, uid, data, context):
|
|||
new_move.append(current_move)
|
||||
else:
|
||||
current_move = move.id
|
||||
new_prodlot = prodlot_obj.create(cr, uid, {'name': sequence, 'ref': '%d'%idx})
|
||||
new_prodlot = prodlot_obj.create(cr, uid, {'name': sequence, 'ref': '%d'%idx}, {'product_id': move.product_id.id})
|
||||
update_val['prodlot_id'] = new_prodlot
|
||||
move_obj.write(cr, uid, [current_move], update_val)
|
||||
|
||||
|
|
Loading…
Reference in New Issue