-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
l10n_ch: Move ISR subscription fields under res.partner.bank #35873
l10n_ch: Move ISR subscription fields under res.partner.bank #35873
Conversation
dbda34c
to
da175f5
Compare
@@ -16,7 +16,7 @@ | |||
</div> | |||
|
|||
<img class="swissqr" t-att-src="o.invoice_partner_bank_id.build_swiss_code_url(o.amount_residual, o.currency_id.name, o.invoice_date_due, o.partner_id, 'QRR', | |||
(o.invoice_partner_bank_id.bank_id.l10n_ch_postal_eur) if (o.invoice_partner_bank_id.currency_id.name == 'EUR') else o.invoice_partner_bank_id.bank_id.l10n_ch_postal_chf, | |||
(o.invoice_partner_bank_id.l10n_ch_isr_subscription_chf) if (o.invoice_partner_bank_id.currency_id.name == 'CHF') else o.invoice_partner_bank_id.l10n_ch_isr_subscription_chf, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I inverted the logic to have the default with CHF, as it is really more common to have CHF here.
@@ -15,8 +15,8 @@ | |||
class AccountMove(models.Model): | |||
_inherit = 'account.move' | |||
|
|||
l10n_ch_isr_postal = fields.Char(compute='_compute_l10n_ch_isr_postal', help='The postal reference identifying the bank managing this ISR.') | |||
l10n_ch_isr_postal_formatted = fields.Char(compute='_compute_l10n_ch_isr_postal', help="Postal reference of the bank, formated with '-' and without the padding zeros, to generate ISR report.") | |||
l10n_ch_isr_subscription = fields.Char(compute='_compute_l10n_ch_isr_subscription', help='ISR subscribtion number identifying your company or your bank to generate ISR.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subscribtion -> subscription
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch, fixed
@yvaucher If you could just do the autosquash then we can merge from here (if it is green). I did the basic tests and it works. But we need to check in the views (later). Maybe we need to add 2 related non-stored on the account journal like it is done with the postal code, because I suppose it is there where you will configure this. |
@jco-odoo Indeed, we will probably add those config either from the "Add a bank account" action. I rebase and squash now |
An Inpayment Slip with Reference (ISR) subscription number is provided by the bank or by Postfinance ISR When the ISR subscription comes from Postfinance it is a direct subscription. ISR (bank) When the ISR subscription comes from a bank it is the bank subscription toward Postfinance. Having the subscription number on res.bank has 2 drawbacks: If you have multiple accounts at Postfinance or If you have multicompany and each company has a Postfinance account you won't be able to emit with different ISR subscriber numbers. This also renames the fields to be accurate on the meaning. An ISR reference is a Payment reference that will apear on the invoice. It is better to name it subscription number.
93f86ab
to
2cd39e1
Compare
Last build was there http://runbot.odoo.com/runbot/build/595787 |
@robodoo r+ |
An Inpayment Slip with Reference (ISR) subscription number is provided by the bank or by Postfinance ISR When the ISR subscription comes from Postfinance it is a direct subscription. ISR (bank) When the ISR subscription comes from a bank it is the bank subscription toward Postfinance. Having the subscription number on res.bank has 2 drawbacks: If you have multiple accounts at Postfinance or If you have multicompany and each company has a Postfinance account you won't be able to emit with different ISR subscriber numbers. This also renames the fields to be accurate on the meaning. An ISR reference is a Payment reference that will apear on the invoice. It is better to name it subscription number. closes #35873 Signed-off-by: Josse Colpaert <jco@openerp.com>
Merged at f3c1e6c, thanks! |
Description of the issue/feature this PR addresses:
An Inpayment Slip with Reference (ISR) subscription number is provided by the bank or by Postfinance
ISR When the ISR subscription comes from Postfinance it is a direct
subscription.
ISR (bank) When the ISR subscription comes from a bank it is the bank subscription
toward Postfinance.
Having the subscription number on res.bank has 2 drawbacks:
If you have multiple accounts at Postfinance
or
If you have multicompany and each company has a Postfinance account
you won't be able to emit with different ISR subscriber numbers.
This also renames the fields to be accurate on the meaning.
An ISR reference is a Payment reference that will apear on the invoice.
It is better to name it subscription number.
Current behavior before PR:
Fields for ISR subscription are misplaced. As it doesn't take into account the possibility of having an account at Postfinance and having a unique ISR subscription number.
Desired behavior after PR is merged:
Correct label and model for ISR subscription fields.
This PR only targets the model change. I'll address other issues in separated PRs.
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr