[FIX] partial extend payment v2
This commit is contained in:
parent
e641b88b1f
commit
f17253d0b3
|
|
@ -165,22 +165,7 @@ class DonationExtensionWizard(models.TransientModel):
|
|||
|
||||
remaining = remaining - pay_amount
|
||||
|
||||
# elif invoice_ids and not self.is_different_payment:
|
||||
# return {
|
||||
# 'name': _('Register Payment'),
|
||||
# 'res_model': 'account.payment.register',
|
||||
# 'view_mode': 'form',
|
||||
# 'context': {
|
||||
# 'active_model': 'account.move',
|
||||
# 'active_ids': invoice_ids.ids,
|
||||
# 'dont_redirect_to_payments': True,
|
||||
# 'sponsorship_line_ids': donation_line_ids.ids,
|
||||
# 'sponsorship_payment': True,
|
||||
# 'default_sponsorship_payment': True,
|
||||
# },
|
||||
# 'target': 'new',
|
||||
# 'type': 'ir.actions.act_window',
|
||||
# }
|
||||
|
||||
|
||||
return {
|
||||
'type': 'ir.actions.client',
|
||||
|
|
@ -247,14 +232,6 @@ class ExtensionPaymentWizardLine(models.TransientModel):
|
|||
if self.wizard_id and not self.donation_line_ids:
|
||||
self.donation_line_ids = self.wizard_id.line_ids.mapped('donation_line_id').ids
|
||||
|
||||
# @api.onchange('payment_amount')
|
||||
# def _onchange_payment_amount(self):
|
||||
# amount = 0.0
|
||||
# for line in self.wizard_id.payment_line_ids:
|
||||
# amount += line.payment_amount
|
||||
# self.payment_amount = self.wizard_id.total_extension_amount - amount
|
||||
|
||||
|
||||
|
||||
@api.depends('donation_line_ids')
|
||||
def _compute_partner_id(self):
|
||||
|
|
@ -376,7 +353,6 @@ class DonationExtensionWizardLine(models.TransientModel):
|
|||
# Update end date
|
||||
donation_line_new_vals = {
|
||||
'end_date': new_end_date,
|
||||
'donation_amount': self.total_months_amount,
|
||||
'payment_month_count': self.donation_line_id.payment_month_count + self.months,
|
||||
}
|
||||
if self.direct_debit:
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
<group>
|
||||
<group string="Extension Details">
|
||||
<field name="months"/>
|
||||
<!-- <field name="is_different_payment"/>-->
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
|
|
|
|||
Loading…
Reference in New Issue