Merge lp:~openerp-dev/openobject-addons/trunk-followupclean-jco into lp:openobject-addons

Proposed by Josse Colpaert (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-followupclean-jco
Merge into: lp:openobject-addons
Diff against target: 103 lines (+18/-10)
4 files modified
account_followup/account_followup.py (+12/-7)
account_followup/account_followup_customers.xml (+3/-1)
account_followup/wizard/account_followup_print.py (+2/-1)
account_followup/wizard/account_followup_print_view.xml (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-followupclean-jco
Reviewer Review Type Date Requested Status
qdp (OpenERP) Needs Fixing
Review via email: mp+150329@code.launchpad.net

Description of the change

In this branch the field payment_no_email was added, which makes it possible not to send emails for a certain customer when launching follow-up if a manual action was assigned.

To post a comment you must log in.
Revision history for this message
qdp (OpenERP) (qdp) wrote :

as i understand, this field is used to say "i talked to this partner yesterday and he promised to pay the money at the end of the month, so in the meanwhile i should not remind him"... but if i'm right about the use of this field,
1) i think an example of use should be stated in the help tooltip
2) i wonder if it shouldn't also be excluded of paper printing, and then the usability could be improved (label would be "Exclude from followups in the meanwhile" or something alike)

also,
1) is it intended to put a second '⇾' after 'Mark Done' button?
2) can you remerge trunk in it, there are some conflicts :-s

thanks

review: Needs Fixing
8600. By Josse Colpaert (OpenERP)

[MERGE] Merge from trunk

Unmerged revisions

8600. By Josse Colpaert (OpenERP)

[MERGE] Merge from trunk

8599. By Josse Colpaert (OpenERP)

[MERGE] Merge with trunk and resolve conflicts

8598. By Josse Colpaert (OpenERP)

[FIX] Followuptable html titles depend on language

8597. By Josse Colpaert (OpenERP)

[MERGE] Merge from trunk

8596. By Josse Colpaert (OpenERP)

[IMP] Don't pass tz in create context will remove warnings

8595. By Josse Colpaert (OpenERP)

[FIX] Tests for setting manual actions are passed in UTC

8594. By Josse Colpaert (OpenERP)

[FIX] payment_no_email has to be on res_partner not wizard partner

8593. By Josse Colpaert (OpenERP)

[IMP] Not emailed clients by payment_no_email not anymore in number of clients emailed

8592. By Josse Colpaert (OpenERP)

[MERGE] Merge from trunk

8591. By Josse Colpaert (OpenERP)

[IMP] Adding payment_no_email again for trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_followup/account_followup.py'
2--- account_followup/account_followup.py 2013-03-14 11:27:40 +0000
3+++ account_followup/account_followup.py 2013-05-22 08:22:28 +0000
4@@ -208,12 +208,13 @@
5 for partner in self.browse(cr, uid, partner_ids, context=ctx):
6 if partner.email and partner.email.strip():
7 level = partner.latest_followup_level_id_without_lit
8- if level and level.send_email and level.email_template_id and level.email_template_id.id:
9- mtp.send_mail(cr, uid, level.email_template_id.id, partner.id, context=ctx)
10- else:
11- mail_template_id = self.pool.get('ir.model.data').get_object_reference(cr, uid,
12- 'account_followup', 'email_template_account_followup_default')
13- mtp.send_mail(cr, uid, mail_template_id[1], partner.id, context=ctx)
14+ if not partner.payment_no_email:
15+ if level and level.send_email and level.email_template_id and level.email_template_id.id:
16+ mtp.send_mail(cr, uid, level.email_template_id.id, partner.id, context=ctx)
17+ else:
18+ mail_template_id = self.pool.get('ir.model.data').get_object_reference(cr, uid,
19+ 'account_followup', 'email_template_account_followup_default')
20+ mtp.send_mail(cr, uid, mail_template_id[1], partner.id, context=ctx)
21 else:
22 unknown_mails = unknown_mails + 1
23 action_text = _("Email not sent because of email address of partner not filled in")
24@@ -288,6 +289,7 @@
25 #Find partner_id of user put as responsible
26 responsible_partner_id = self.pool.get("res.users").browse(cr, uid, vals['payment_responsible_id'], context=context).partner_id.id
27 self.pool.get("mail.thread").message_post(cr, uid, 0,
28+
29 body = _("You became responsible to do the next action for the payment follow-up of") + " <b><a href='#id=" + str(part.id) + "&view_type=form&model=res.partner'> " + part.name + " </a></b>",
30 type = 'comment',
31 subtype = "mail.mt_comment", context = context,
32@@ -295,8 +297,9 @@
33 partner_ids = [responsible_partner_id])
34 return super(res_partner, self).write(cr, uid, ids, vals, context=context)
35
36+
37 def action_done(self, cr, uid, ids, context=None):
38- return self.write(cr, uid, ids, {'payment_next_action_date': False, 'payment_next_action':'', 'payment_responsible_id': False}, context=context)
39+ return self.write(cr, uid, ids, {'payment_next_action_date': False, 'payment_next_action':'', 'payment_responsible_id': False, 'payment_no_email': False}, context=context)
40
41 def do_button_print(self, cr, uid, ids, context=None):
42 assert(len(ids) == 1)
43@@ -446,6 +449,8 @@
44 help="This is when the manual follow-up is needed. " \
45 "The date will be set to the current date when the partner gets a follow-up level that requires a manual action. "\
46 "Can be practical to set manually e.g. to see if he keeps his promises."),
47+ 'payment_no_email':fields.boolean('Don\'t send follow-up emails meanwhile', help='When checked, the follow-up wizard will go to the next level,'\
48+ ' print letters and set manual actions, but mails will not be sent. Follow-up will happen by doing manual actions. '),
49 'unreconciled_aml_ids':fields.one2many('account.move.line', 'partner_id', domain=['&', ('reconcile_id', '=', False), '&',
50 ('account_id.active','=', True), '&', ('account_id.type', '=', 'receivable'), ('state', '!=', 'draft')]),
51 'latest_followup_date':fields.function(_get_latest, method=True, type='date', string="Latest Follow-up Date",
52
53=== modified file 'account_followup/account_followup_customers.xml'
54--- account_followup/account_followup_customers.xml 2013-04-22 15:34:49 +0000
55+++ account_followup/account_followup_customers.xml 2013-05-22 08:22:28 +0000
56@@ -94,10 +94,12 @@
57 <label for="payment_next_action"/>
58 <div>
59 <field name="payment_next_action_date" class="oe_inline"/>
60- <button name="action_done" type="object" string="⇾ Mark as Done"
61+ <button name="action_done" type="object" string="⇾ Mark as Done ⇾"
62 help="Click to mark the action as done." class="oe_link"
63 attrs="{'invisible':[('payment_next_action_date','=', False)]}"
64 groups="base.group_partner_manager"/>
65+ <field name="payment_no_email" attrs="{'invisible': [('payment_next_action_date','=', False)]}" groups="base.group_partner_manager"/>
66+ <i><label for="payment_no_email" attrs="{'invisible': [('payment_next_action_date','=', False)]}" groups="base.group_partner_manager"/></i>
67 <field name="payment_next_action" placeholder="Action to be taken e.g. Give a phonecall, Check if it's paid, ..."/>
68 </div>
69 </group>
70
71=== modified file 'account_followup/wizard/account_followup_print.py'
72--- account_followup/wizard/account_followup_print.py 2013-04-15 10:23:49 +0000
73+++ account_followup/wizard/account_followup_print.py 2013-05-22 08:22:28 +0000
74@@ -155,7 +155,7 @@
75 manuals[key]= 1
76 else:
77 manuals[key] = manuals[key] + 1
78- if partner.max_followup_id.send_email:
79+ if partner.max_followup_id.send_email and not partner.partner_id.payment_no_email:
80 nbunknownmails += partner_obj.do_partner_mail(cr, uid, [partner.partner_id.id], context=context)
81 nbmails += 1
82 if partner.max_followup_id.send_letter:
83@@ -299,6 +299,7 @@
84 for partner_id, followup_line_id, date_maturity,date, id in move_lines:
85 if not partner_id:
86 continue
87+
88 if followup_line_id not in fups:
89 continue
90 stat_line_id = partner_id * 10000 + company_id
91
92=== modified file 'account_followup/wizard/account_followup_print_view.xml'
93--- account_followup/wizard/account_followup_print_view.xml 2013-02-11 15:13:52 +0000
94+++ account_followup/wizard/account_followup_print_view.xml 2013-05-22 08:22:28 +0000
95@@ -11,7 +11,7 @@
96 <field name="followup_id" groups="base.group_multi_company"/>
97 <field name="date" groups="base.group_no_one"/>
98 </group>
99- <p class ="oe_grey">
100+ <p class ="oe_grey">
101 This action will send follow-up emails, print the letters and
102 set the manual actions per customer, according to the follow-up levels defined.
103 </p>

Subscribers

People subscribed via source and target branches

to all changes: