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
=== modified file 'account_followup/account_followup.py'
--- account_followup/account_followup.py 2013-03-14 11:27:40 +0000
+++ account_followup/account_followup.py 2013-05-22 08:22:28 +0000
@@ -208,12 +208,13 @@
208 for partner in self.browse(cr, uid, partner_ids, context=ctx):208 for partner in self.browse(cr, uid, partner_ids, context=ctx):
209 if partner.email and partner.email.strip():209 if partner.email and partner.email.strip():
210 level = partner.latest_followup_level_id_without_lit210 level = partner.latest_followup_level_id_without_lit
211 if level and level.send_email and level.email_template_id and level.email_template_id.id:211 if not partner.payment_no_email:
212 mtp.send_mail(cr, uid, level.email_template_id.id, partner.id, context=ctx)212 if level and level.send_email and level.email_template_id and level.email_template_id.id:
213 else:213 mtp.send_mail(cr, uid, level.email_template_id.id, partner.id, context=ctx)
214 mail_template_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 214 else:
215 'account_followup', 'email_template_account_followup_default')215 mail_template_id = self.pool.get('ir.model.data').get_object_reference(cr, uid,
216 mtp.send_mail(cr, uid, mail_template_id[1], partner.id, context=ctx)216 'account_followup', 'email_template_account_followup_default')
217 mtp.send_mail(cr, uid, mail_template_id[1], partner.id, context=ctx)
217 else:218 else:
218 unknown_mails = unknown_mails + 1219 unknown_mails = unknown_mails + 1
219 action_text = _("Email not sent because of email address of partner not filled in")220 action_text = _("Email not sent because of email address of partner not filled in")
@@ -288,6 +289,7 @@
288 #Find partner_id of user put as responsible289 #Find partner_id of user put as responsible
289 responsible_partner_id = self.pool.get("res.users").browse(cr, uid, vals['payment_responsible_id'], context=context).partner_id.id290 responsible_partner_id = self.pool.get("res.users").browse(cr, uid, vals['payment_responsible_id'], context=context).partner_id.id
290 self.pool.get("mail.thread").message_post(cr, uid, 0, 291 self.pool.get("mail.thread").message_post(cr, uid, 0,
292
291 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>",293 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>",
292 type = 'comment',294 type = 'comment',
293 subtype = "mail.mt_comment", context = context,295 subtype = "mail.mt_comment", context = context,
@@ -295,8 +297,9 @@
295 partner_ids = [responsible_partner_id])297 partner_ids = [responsible_partner_id])
296 return super(res_partner, self).write(cr, uid, ids, vals, context=context)298 return super(res_partner, self).write(cr, uid, ids, vals, context=context)
297299
300
298 def action_done(self, cr, uid, ids, context=None):301 def action_done(self, cr, uid, ids, context=None):
299 return self.write(cr, uid, ids, {'payment_next_action_date': False, 'payment_next_action':'', 'payment_responsible_id': False}, context=context)302 return self.write(cr, uid, ids, {'payment_next_action_date': False, 'payment_next_action':'', 'payment_responsible_id': False, 'payment_no_email': False}, context=context)
300303
301 def do_button_print(self, cr, uid, ids, context=None):304 def do_button_print(self, cr, uid, ids, context=None):
302 assert(len(ids) == 1)305 assert(len(ids) == 1)
@@ -446,6 +449,8 @@
446 help="This is when the manual follow-up is needed. " \449 help="This is when the manual follow-up is needed. " \
447 "The date will be set to the current date when the partner gets a follow-up level that requires a manual action. "\450 "The date will be set to the current date when the partner gets a follow-up level that requires a manual action. "\
448 "Can be practical to set manually e.g. to see if he keeps his promises."),451 "Can be practical to set manually e.g. to see if he keeps his promises."),
452 '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,'\
453 ' print letters and set manual actions, but mails will not be sent. Follow-up will happen by doing manual actions. '),
449 'unreconciled_aml_ids':fields.one2many('account.move.line', 'partner_id', domain=['&', ('reconcile_id', '=', False), '&', 454 'unreconciled_aml_ids':fields.one2many('account.move.line', 'partner_id', domain=['&', ('reconcile_id', '=', False), '&',
450 ('account_id.active','=', True), '&', ('account_id.type', '=', 'receivable'), ('state', '!=', 'draft')]), 455 ('account_id.active','=', True), '&', ('account_id.type', '=', 'receivable'), ('state', '!=', 'draft')]),
451 'latest_followup_date':fields.function(_get_latest, method=True, type='date', string="Latest Follow-up Date", 456 'latest_followup_date':fields.function(_get_latest, method=True, type='date', string="Latest Follow-up Date",
452457
=== modified file 'account_followup/account_followup_customers.xml'
--- account_followup/account_followup_customers.xml 2013-04-22 15:34:49 +0000
+++ account_followup/account_followup_customers.xml 2013-05-22 08:22:28 +0000
@@ -94,10 +94,12 @@
94 <label for="payment_next_action"/>94 <label for="payment_next_action"/>
95 <div>95 <div>
96 <field name="payment_next_action_date" class="oe_inline"/>96 <field name="payment_next_action_date" class="oe_inline"/>
97 <button name="action_done" type="object" string="⇾ Mark as Done"97 <button name="action_done" type="object" string="⇾ Mark as Done ⇾"
98 help="Click to mark the action as done." class="oe_link"98 help="Click to mark the action as done." class="oe_link"
99 attrs="{'invisible':[('payment_next_action_date','=', False)]}"99 attrs="{'invisible':[('payment_next_action_date','=', False)]}"
100 groups="base.group_partner_manager"/>100 groups="base.group_partner_manager"/>
101 <field name="payment_no_email" attrs="{'invisible': [('payment_next_action_date','=', False)]}" groups="base.group_partner_manager"/>
102 <i><label for="payment_no_email" attrs="{'invisible': [('payment_next_action_date','=', False)]}" groups="base.group_partner_manager"/></i>
101 <field name="payment_next_action" placeholder="Action to be taken e.g. Give a phonecall, Check if it's paid, ..."/>103 <field name="payment_next_action" placeholder="Action to be taken e.g. Give a phonecall, Check if it's paid, ..."/>
102 </div>104 </div>
103 </group>105 </group>
104106
=== modified file 'account_followup/wizard/account_followup_print.py'
--- account_followup/wizard/account_followup_print.py 2013-04-15 10:23:49 +0000
+++ account_followup/wizard/account_followup_print.py 2013-05-22 08:22:28 +0000
@@ -155,7 +155,7 @@
155 manuals[key]= 1155 manuals[key]= 1
156 else:156 else:
157 manuals[key] = manuals[key] + 1157 manuals[key] = manuals[key] + 1
158 if partner.max_followup_id.send_email:158 if partner.max_followup_id.send_email and not partner.partner_id.payment_no_email:
159 nbunknownmails += partner_obj.do_partner_mail(cr, uid, [partner.partner_id.id], context=context)159 nbunknownmails += partner_obj.do_partner_mail(cr, uid, [partner.partner_id.id], context=context)
160 nbmails += 1160 nbmails += 1
161 if partner.max_followup_id.send_letter:161 if partner.max_followup_id.send_letter:
@@ -299,6 +299,7 @@
299 for partner_id, followup_line_id, date_maturity,date, id in move_lines:299 for partner_id, followup_line_id, date_maturity,date, id in move_lines:
300 if not partner_id:300 if not partner_id:
301 continue301 continue
302
302 if followup_line_id not in fups:303 if followup_line_id not in fups:
303 continue304 continue
304 stat_line_id = partner_id * 10000 + company_id305 stat_line_id = partner_id * 10000 + company_id
305306
=== modified file 'account_followup/wizard/account_followup_print_view.xml'
--- account_followup/wizard/account_followup_print_view.xml 2013-02-11 15:13:52 +0000
+++ account_followup/wizard/account_followup_print_view.xml 2013-05-22 08:22:28 +0000
@@ -11,7 +11,7 @@
11 <field name="followup_id" groups="base.group_multi_company"/>11 <field name="followup_id" groups="base.group_multi_company"/>
12 <field name="date" groups="base.group_no_one"/>12 <field name="date" groups="base.group_no_one"/>
13 </group>13 </group>
14 <p class ="oe_grey">14 <p class ="oe_grey">
15 This action will send follow-up emails, print the letters and15 This action will send follow-up emails, print the letters and
16 set the manual actions per customer, according to the follow-up levels defined. 16 set the manual actions per customer, according to the follow-up levels defined.
17 </p>17 </p>

Subscribers

People subscribed via source and target branches

to all changes: