Skip to content
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

[IMP] SUITE account payment return: Improvements to suite #107

Merged
merged 2 commits into from
Oct 26, 2016

Conversation

carlosdauden
Copy link
Contributor

@carlosdauden carlosdauden commented Oct 25, 2016

  • Add raise "You can not be removed a payment return if state is 'Done'".
  • New SEPA return code.
  • Add check to match returns after import.
  • Spanish translation.

@Tecnativa

def unlink(self):
if self.filtered(lambda x: x.state == 'done'):
raise UserError(_(
"You can not be removed a payment return if state is 'Done'"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove be

#, python-format
msgid ""
"Could not make sense of the given file.\n"
"Did you install the module to support this type of file?"
msgstr "No se pudo hacer con sentido de el archivo dado.\n¿Instalaste el modulo para soportar este tipo de archivo?"
msgstr ""
"No se pudo hacer con sentido de el archivo dado.\n"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trato de usted, no de tú

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leo cosas contradictorias al respecto, por eso nunca lo tengo claro...

@@ -42,6 +42,10 @@
<field name="code">MD01</field>
<field name="name">No valid Mandate</field>
</record>
<record id="unpaid_reason_MD06" model="payment.return.reason">
<field name="code">MD06</field>
<field name="name">Disputed authorised transaction</field>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't translated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@carlosdauden carlosdauden force-pushed the 8.0-IMP-account_payment_return-SUITE branch from f3739fc to da46560 Compare October 25, 2016 12:21
@pedrobaeza
Copy link
Member

Include a test for unlinking returns for not dropping coverage

@carlosdauden carlosdauden force-pushed the 8.0-IMP-account_payment_return-SUITE branch from da46560 to 5232871 Compare October 25, 2016 16:08
@carlosdauden
Copy link
Contributor Author

@pedrobaeza changes done

@carlosdauden
Copy link
Contributor Author

cc @sergio-teruel

@pedrobaeza
Copy link
Member

Please don't squash while the review process. You only need to squash before merging (when the PR is approved), or it's more difficult to track changes from one review to the next. Reviewer can indicate you if you need to squash or not.

@pedrobaeza
Copy link
Member

You have to test also a case where there's no error and the payment can be removed.

@carlosdauden carlosdauden force-pushed the 8.0-IMP-account_payment_return-SUITE branch from 008d6da to 80eab8f Compare October 25, 2016 17:22
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes.

To the merger: squash on merging

Copy link
Member

@rafaelbn rafaelbn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK! Thanks

Copy link
Contributor

@sergio-teruel sergio-teruel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok..

if self.filtered(lambda x: x.state == 'done'):
raise UserError(_(
"You can not remove a payment return if state is 'Done'"))
return super(PaymentReturn, self).unlink()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd implement this as a global ir.rule instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is an option, but usually this is the way used and possibly better performance.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is the overlapping of access rules that grants you at the end the unlink. This has to be the way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I know it's late and after all it works fine this way, but just to clarify, I meant a global rule. Quoting from the above link:

Global rules are subtractive, they must all be matched for a record to be accessible

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, thanks for clarifying. Odoo doesn't do this kind of things by security rules, so there should be a reason for that. Maybe performance as pointed by Carlos, or maybe to not bypass this check removing access rule.

@pedrobaeza
Copy link
Member

Merging

@pedrobaeza pedrobaeza merged commit 9be9f2c into OCA:8.0 Oct 26, 2016
@pedrobaeza pedrobaeza deleted the 8.0-IMP-account_payment_return-SUITE branch October 26, 2016 09:48
carlosdauden added a commit to Tecnativa/account-payment that referenced this pull request Nov 7, 2016
carlosdauden added a commit to Tecnativa/account-payment that referenced this pull request Dec 10, 2016
carlosdauden added a commit to Tecnativa/account-payment that referenced this pull request Dec 10, 2016
carlosdauden added a commit to Tecnativa/account-payment that referenced this pull request Dec 12, 2016
pedrobaeza pushed a commit to Tecnativa/account-payment that referenced this pull request Mar 31, 2017
pedrobaeza pushed a commit to Tecnativa/account-payment that referenced this pull request Mar 31, 2017
pedrobaeza pushed a commit to Tecnativa/account-payment that referenced this pull request Apr 6, 2017
pedrobaeza pushed a commit to Tecnativa/account-payment that referenced this pull request Apr 6, 2017
pedrobaeza pushed a commit to Tecnativa/account-payment that referenced this pull request Apr 6, 2017
pedrobaeza pushed a commit to Tecnativa/account-payment that referenced this pull request Apr 17, 2017
pedrobaeza pushed a commit to Tecnativa/account-payment that referenced this pull request Apr 17, 2017
sergio-teruel pushed a commit to Tecnativa/account-payment that referenced this pull request Jul 2, 2017
joao-p-marques pushed a commit to Tecnativa/account-payment that referenced this pull request Mar 17, 2021
pablo-lp pushed a commit to jimsports/account-payment that referenced this pull request Aug 11, 2021
mariadforgeflow pushed a commit to ForgeFlow/account-payment that referenced this pull request Sep 28, 2021
victoralmau pushed a commit to Tecnativa/account-payment that referenced this pull request Nov 10, 2021
victoralmau pushed a commit to Tecnativa/account-payment that referenced this pull request Nov 11, 2021
polqubiq pushed a commit to QubiQ/account-payment that referenced this pull request Apr 7, 2022
LudLaf pushed a commit to Tecnativa/account-payment that referenced this pull request Jun 2, 2022
LudLaf pushed a commit to Tecnativa/account-payment that referenced this pull request Jun 3, 2022
LudLaf pushed a commit to Tecnativa/account-payment that referenced this pull request Jun 6, 2022
ChrisOForgeFlow pushed a commit to Kencove/account-payment that referenced this pull request Jun 8, 2022
ChrisOForgeFlow pushed a commit to ForgeFlow/account-payment that referenced this pull request Aug 25, 2022
ChrisOForgeFlow pushed a commit to ForgeFlow/account-payment that referenced this pull request Sep 30, 2022
ChrisOForgeFlow pushed a commit to ForgeFlow/account-payment that referenced this pull request Nov 28, 2022
carlosdauden added a commit to Tecnativa/account-payment that referenced this pull request Feb 27, 2023
victoralmau pushed a commit to Tecnativa/account-payment that referenced this pull request Mar 7, 2023
carlosdauden added a commit to Tecnativa/account-payment that referenced this pull request Mar 7, 2023
carlosdauden added a commit to Tecnativa/account-payment that referenced this pull request Mar 7, 2023
carlosdauden added a commit to Tecnativa/account-payment that referenced this pull request Mar 20, 2023
carlosdauden added a commit to Tecnativa/account-payment that referenced this pull request Mar 21, 2023
ao-landoo pushed a commit to landoo-es/account-payment that referenced this pull request Mar 22, 2023
heliaktiv pushed a commit to heliaktiv/account-payment that referenced this pull request Apr 17, 2023
Yadier-Tecnativa pushed a commit to Tecnativa/account-payment that referenced this pull request Jun 14, 2023
Yadier-Tecnativa pushed a commit to Tecnativa/account-payment that referenced this pull request Jul 8, 2023
Ricardoalso pushed a commit to camptocamp/account-payment that referenced this pull request Nov 14, 2023
Ricardoalso pushed a commit to camptocamp/account-payment that referenced this pull request Nov 14, 2023
Ricardoalso pushed a commit to camptocamp/account-payment that referenced this pull request Nov 14, 2023
Ricardoalso pushed a commit to camptocamp/account-payment that referenced this pull request Nov 14, 2023
carlos-lopez-tecnativa pushed a commit to Tecnativa/account-payment that referenced this pull request Jul 24, 2024
carolinafernandez-tecnativa pushed a commit to Tecnativa/account-payment that referenced this pull request Jul 25, 2024
carolinafernandez-tecnativa pushed a commit to Tecnativa/account-payment that referenced this pull request Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants