diff --git a/addons/account/report/account_report.py b/addons/account/report/account_report.py index b7d3441913f..1136300f065 100644 --- a/addons/account/report/account_report.py +++ b/addons/account/report/account_report.py @@ -132,7 +132,7 @@ class report_aged_receivable(osv.osv): while (last_month_date > fy_start_date): LIST_RANGES.append(today + " to " + last_month_date.strftime('%Y-%m-%d')) - today = (last_month_date- 1).strftime('%Y-%m-%d') + today = (last_month_date- relativedelta(days=1)).strftime('%Y-%m-%d') last_month_date = datetime.strptime(today, '%Y-%m-%d') - relativedelta(months=1) LIST_RANGES.append(today +" to " + fy_start_date.strftime('%Y-%m-%d')) diff --git a/addons/account_voucher/test/sales_receipt.yml b/addons/account_voucher/test/sales_receipt.yml index af10d614730..628d1795bc8 100644 --- a/addons/account_voucher/test/sales_receipt.yml +++ b/addons/account_voucher/test/sales_receipt.yml @@ -42,11 +42,7 @@ if l.reconcile_id: reconciled = True break - if not reconciled: - print "Info: Voucher is not paid" - else: - print "Info: Voucher is paid" - + assert (not reconciled), "Found reconciled move lines, should not be" - I create and post a voucher payment of amount 30000.0 for the partner Seagate - @@ -74,8 +70,6 @@ assert (voucher_id.state=='draft'), "Voucher is not in draft state" wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'account.voucher', voucher_id.id, 'proforma_voucher', cr) - - - I check that move lines are reconciled meaning voucher is paid - @@ -85,7 +79,4 @@ if l.reconcile_id: reconciled = True break - if not reconciled: - print "Info: Voucher is not paid" - else: - print "Info: Voucher is paid" \ No newline at end of file + assert reconciled, "Found unreconciled move lines/unpaid voucher" diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py index a13fbf9a582..3e2daa586c1 100644 --- a/addons/base_action_rule/base_action_rule.py +++ b/addons/base_action_rule/base_action_rule.py @@ -113,6 +113,8 @@ the rule to mark CC(mail to any other person defined in actions)."), 'filter_id':fields.many2one('ir.filters', 'Filter', required=False), 'act_email_from' : fields.char('Email From', size=64, required=False, help="Use a python expression to specify the right field on which one than we will use for the 'From' field of the header"), + 'act_email_to' : fields.char('Email To', size=64, required=False, + help="Use a python expression to specify the right field on which one than we will use for the 'To' field of the header"), } _defaults = { @@ -356,13 +358,20 @@ the rule to mark CC(mail to any other person defined in actions)."), emails += (action.act_email_cc or '').split(',') if action.act_mail_to_email: emails += (action.act_mail_to_email or '').split(',') + + locals_for_emails = { + 'user' : self.pool.get('res.users').browse(cr, uid, uid, context=context), + 'obj' : obj, + } + + if action.act_email_to: + emails.append(safe_eval(action.act_email_to, {}, locals_for_emails)) + emails = filter(None, emails) if len(emails) and action.act_mail_body: emails = list(set(emails)) - email_from = safe_eval(action.act_email_from, {}, { - 'user' : self.pool.get('res.users').browse(cr, uid, uid, context=context), - 'obj' : obj, - }) + email_from = safe_eval(action.act_email_from, {}, locals_for_emails) + def to_email(text): return re.findall(r'([^ ,<@]+@[^> ,]+)', text or '') emails = to_email(','.join(filter(None, emails))) diff --git a/addons/base_action_rule/base_action_rule_view.xml b/addons/base_action_rule/base_action_rule_view.xml index 755f6680d34..01951b3c9b8 100644 --- a/addons/base_action_rule/base_action_rule_view.xml +++ b/addons/base_action_rule/base_action_rule_view.xml @@ -65,12 +65,13 @@ - + - - - - + + + + + diff --git a/addons/base_calendar/wizard/base_calendar_invite_attendee.py b/addons/base_calendar/wizard/base_calendar_invite_attendee.py index 98369962ab7..c92a40e72b2 100644 --- a/addons/base_calendar/wizard/base_calendar_invite_attendee.py +++ b/addons/base_calendar/wizard/base_calendar_invite_attendee.py @@ -36,11 +36,11 @@ class base_calendar_invite_attendee(osv.osv_memory): _columns = { 'type': fields.selection([('internal', 'Internal User'), \ ('external', 'External Email'), \ - ('partner', 'Partner Contacts')], 'Type', required=True), + ('partner', 'Partner Contacts')], 'Type', required=True, help="Select whom you want to Invite"), 'user_ids': fields.many2many('res.users', 'invite_user_rel', 'invite_id', 'user_id', 'Users'), 'partner_id': fields.many2one('res.partner', 'Partner'), - 'email': fields.char('Email', size=124), + 'email': fields.char('Email', size=124, help="Provide external email address who will receive this invitation."), 'contact_ids': fields.many2many('res.partner.address', 'invite_contact_rel', 'invite_id', 'contact_id', 'Contacts'), 'send_mail': fields.boolean('Send mail?', help='Check this if you want to \ diff --git a/addons/base_calendar/wizard/base_calendar_invite_attendee_view.xml b/addons/base_calendar/wizard/base_calendar_invite_attendee_view.xml index 494787bbf97..ef7193e05fe 100644 --- a/addons/base_calendar/wizard/base_calendar_invite_attendee_view.xml +++ b/addons/base_calendar/wizard/base_calendar_invite_attendee_view.xml @@ -10,42 +10,31 @@ form
- - - - - - - - - - - - - - - - - - - - - -