-
-
Notifications
You must be signed in to change notification settings - Fork 310
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
8.0 Add support for partner bank matching on invoice update #6
Conversation
…as only supported on invoice creation)
iban = iban.replace(' ', '') | ||
rpbo = self.env['res.partner.bank'] | ||
self._cr.execute( | ||
"""SELECT id FROM res_partner_bank |
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.
Why make this with SQL?
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 need the replace() method in SQL because the IBAN can have spaces in res_partner_bank. In v9, this problem is solved by the acc_number_sanitized field, so I will remove this SQL request in v9 and use the ORM instead.
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.
OK
'acc_number': iban, | ||
'bank_bic': bic, | ||
}) | ||
chatter_msg.append(_( |
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.
You have to modify the translations due to this file change I think
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.
Translations are handled automatically via transifex, no ?
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.
Yes, but you will lose any of the already present translations. It's just to check and modify translation files to see the comment line about the code that contains this sentence.
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.
There are no translation for this module so far.
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.
OK
@@ -238,6 +238,36 @@ def _match_shipping_partner(self, shipping_dict, partner, chatter_msg): | |||
return partner | |||
|
|||
@api.model | |||
def _match_partner_bank( | |||
self, partner, iban, bic, chatter_msg, create_if_not_found=False): |
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.
To make it more tolerant, put chatter_msg
as optional.
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.
Mmm, it is that way in all the other methods of this module.
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.
But you can start with this one being more tolerant 😉 for reusing it in models without chatter.
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.
When I'll change that, I'll change it everywhere ; I don't want to do it partially.
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.
This is a good moment for that 😉, but I know that you're not going to do it, hehe
I didn't update sale_commercial_partner because this module will have to be moved to sale-workflow
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.
Squashing on merging
@alexis-via, what are the plans for bringing this to v9? |
I'll port it to v10 in December 2016 or January 2017 (when my customers will go live on v10) ; I don't want to start the port too early because I still have things that I want to change on v8 and I would like to avoid too much backporting work. The 2 points I want to address are:
I don't have any plans for v9, but my port to v10 should be compatible with v9 I guess. |
OK, thanks for sharing your plans. I'm not sure how to act because we need it on v9, but only for commodity (not mandatory requirement), but we want it now. I'll tell you later. |
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
PEP8 fix 8.0 Add support for partner bank matching on invoice update (OCA#6) Add support for partner bank matching on invoice update (before, it was only supported on invoice creation) 8.0 Use try/except when importing external libs (OCA#8) [FIX] LINT Use try/except when importing external libs Remove self.ensure_one() that has nothing to do in an api.model method
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add ecino as switzerland maintainer
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
Add support for partner bank matching on invoice update. Before, this feature was only supported on invoice creation. I developed this new feature this afternoon for my demo at my Odoo experience conference.