Skip to content

Commit

Permalink
Rename module & add field to view
Browse files Browse the repository at this point in the history
  • Loading branch information
lasley committed Jun 15, 2017
1 parent 863408a commit aca8d78
Show file tree
Hide file tree
Showing 16 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions contract_auto/README.rst → contract_payment_auto/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

=============
Contract Auto
=============
=====================
Contract Auto Payment
=====================

This module allows for the configuration of automatic payments on invoices that are created by a contract.

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ def _pay_invoice(self, invoice):
else:
template = self.pay_retry_mail_template_id

template.send_mail(invoice.id)
if template:
template.send_mail(invoice.id)

return True

@api.multi
def _get_tx_vals(self, invoice):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ def _default_invoice_mail_template_id(self):
@api.model
def _default_pay_retry_mail_template_id(self):
return self.env.ref(
'contract_auto.mail_template_auto_pay_retry',
'contract_payment_auto.mail_template_auto_pay_retry',
raise_if_not_found=False,
)

@api.model
def _default_pay_fail_mail_template_id(self):
return self.env.ref(
'contract_auto.mail_template_auto_pay_fail',
'contract_payment_auto.mail_template_auto_pay_fail',
raise_if_not_found=False,
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='sale']" position="inside">
<field name="payment_token_ids" invisible="1" />
<field name="payment_token_id" />
</xpath>
</field>
Expand Down

0 comments on commit aca8d78

Please sign in to comment.