diff --git a/addons/account/account_invoice_workflow.xml b/addons/account/account_invoice_workflow.xml index 4c919765596..917f004e7f0 100644 --- a/addons/account/account_invoice_workflow.xml +++ b/addons/account/account_invoice_workflow.xml @@ -42,7 +42,7 @@ write({'state':'open'}) - open + re-open write({'state':'open'}) function @@ -124,7 +124,15 @@ write({'state':'cancel'}) invoice_cancel - + + + + + account.move.line + move_line_id_payment_get() + test_paid() + + diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 423c39deea1..e2700a4e4b1 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -892,6 +892,7 @@ class account_invoice(osv.osv): self.write(cr, uid, [inv.id], {'move_id': move_id,'period_id':period_id, 'move_name':new_move_name}) self.pool.get('account.move').post(cr, uid, [move_id]) self._log_event(cr, uid, ids) + return True def line_get_convert(self, cr, uid, x, part, date, context=None): @@ -916,12 +917,12 @@ class account_invoice(osv.osv): } 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),)) - obj_inv = self.browse(cr, uid, ids)[0] - for (id, invtype, number, move_id, reference) in cr.fetchall(): + for obj_inv in self.browse(cr, uid, ids): + id = obj_inv.id + invtype = obj_inv.type + number = obj_inv.number + move_id = obj_inv.move_id and obj_inv.move_id.id or False + reference = obj_inv.reference if not number: if obj_inv.journal_id.invoice_sequence_id: sid = obj_inv.journal_id.invoice_sequence_id.id @@ -946,6 +947,8 @@ class account_invoice(osv.osv): 'WHERE account_move_line.move_id = %s ' \ 'AND account_analytic_line.move_id = account_move_line.id', (ref, move_id)) + message = _('Invoice ') + " '" + number + "' "+ _("is confirm") + self.log(cr, uid, id, message) return True def action_cancel(self, cr, uid, ids, *args): diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py index fa0ecf07786..7f74553f6bf 100644 --- a/addons/account_voucher/voucher.py +++ b/addons/account_voucher/voucher.py @@ -366,6 +366,10 @@ class account_voucher(osv.osv): 'move_id': move_id, 'move_ids':[(6, 0,line_ids)] } + + message = _('Voucher ') + " '" + inv.name + "' "+ _("is confirm") + self.log(cr, uid, inv.id, message) + self.write(cr, uid, [inv.id], rec) return True diff --git a/addons/account_voucher_payment/account_voucher_payment.py b/addons/account_voucher_payment/account_voucher_payment.py index 66ee2c75ce1..38c8bf93f4a 100755 --- a/addons/account_voucher_payment/account_voucher_payment.py +++ b/addons/account_voucher_payment/account_voucher_payment.py @@ -102,6 +102,7 @@ class account_voucher(osv.osv): line_ids = [] line_ids += [move_line_pool.create(cr, uid, move_line)] + rec_ids = [] for line in inv.payment_ids: amount=0.0 move_line = { @@ -147,16 +148,23 @@ class account_voucher(osv.osv): line_ids += [move_line_id] if line.invoice_id: - rec_ids = [move_line_id] + rec_ids += [move_line_id] for move_line in line.invoice_id.move_id.line_id: if line.account_id.id == move_line.account_id.id: rec_ids += [move_line.id] - move_line_pool.reconcile_partial(cr, uid, rec_ids) + #move_line_pool.reconcile_partial(cr, uid, rec_ids) + + if rec_ids: + move_line_pool.reconcile_partial(cr, uid, rec_ids) rec = { 'move_id': move_id, 'move_ids':[(6, 0,line_ids)] } + + message = _('Voucher ') + " '" + inv.name + "' "+ _("is confirm") + self.log(cr, uid, inv.id, message) + self.write(cr, uid, [inv.id], rec) return True diff --git a/addons/base_contact/base_contact_view.xml b/addons/base_contact/base_contact_view.xml index 0e04fd76110..a251ca6eb90 100644 --- a/addons/base_contact/base_contact_view.xml +++ b/addons/base_contact/base_contact_view.xml @@ -72,8 +72,8 @@ - - + + diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 606895e27a6..5c7fdb08522 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -154,6 +154,8 @@ and users"), \nIf the case needs to be reviewed then the state is set to \'Pending\'.'), 'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True),('model','=',_name)], readonly=True), 'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False),('model','=',_name)], readonly=True), + 'partner_assigned_id': fields.many2one('res.partner', 'Assigned Partner', help="Partner this case has been forwarded/assigned to.", select=True), + 'date_assign': fields.date('Assignation Date', help="Last date this case was forwarded/assigned to a partner"), } _defaults = { diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index 590aa9931ee..bcc72d74042 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -193,11 +193,10 @@ name="%(crm.action_crm_send_mail)d" context="{'mail':'new', 'model': 'crm.lead'}" icon="gtk-go-forward" type="action" /> -