Skip to content

8.0 Add support for partner bank matching on invoice update - #6

Merged
pedrobaeza merged 2 commits into
OCA:8.0from
akretion:8odoo-experience-improvements
Oct 18, 2016
Merged

pedrobaeza merged 2 commits into
OCA:8.0from
akretion:8odoo-experience-improvements

Conversation

@alexis-via

Copy link
Copy Markdown
Contributor

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.

@coveralls

coveralls commented Oct 5, 2016 •

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.002%) to 81.938% when pulling c9beb1c on akretion:8odoo-experience-improvements into 684c8ea on OCA:8.0.

partner = partner.commercial_partner_id
iban = iban.replace(' ', '')
rpbo = self.env['res.partner.bank']
self._cr.execute(

Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OK

'state': 'iban',
'acc_number': iban,
'bank_bic': bic,
})

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
Contributor Author

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 ?

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OK

return partner

@api.model
def _match_partner_bank(

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Member

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
@coveralls

coveralls commented Oct 11, 2016 •

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.002%) to 81.938% when pulling 3337d07 on akretion:8odoo-experience-improvements into 684c8ea on OCA:8.0.

@pedrobaeza pedrobaeza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Squashing on merging

@pedrobaeza

Copy link
Copy Markdown
Member

@alexis-via, what are the plans for bringing this to v9?

@alexis-via

Copy link
Copy Markdown
Contributor Author

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:

  • the support of sale order import when your products have a price-include=True taxes
  • add support for importing an invoice from a foreign country with VAT that you can't get back

I don't have any plans for v9, but my port to v10 should be compatible with v9 I guess.

@pedrobaeza

Copy link
Copy Markdown
Member

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.

@pedrobaeza
pedrobaeza merged commit 4ef7cb6 into OCA:8.0 Oct 18, 2016
njeudy pushed a commit to njeudy/edi that referenced this pull request Jan 27, 2018
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
njeudy pushed a commit to njeudy/edi that referenced this pull request Jan 27, 2018
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
hbrunn pushed a commit that referenced this pull request Feb 21, 2018
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
njeudy pushed a commit to njeudy/edi that referenced this pull request Oct 2, 2018
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
astirpe pushed a commit to njeudy/edi that referenced this pull request Oct 12, 2018
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
tarteo pushed a commit to tarteo/edi that referenced this pull request Oct 31, 2018
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
tarteo pushed a commit to tarteo/edi that referenced this pull request Oct 31, 2018
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
tarteo pushed a commit to tarteo/edi that referenced this pull request Oct 31, 2018
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
antoinecln pushed a commit to antoinecln/edi that referenced this pull request Nov 23, 2018
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
antoinecln pushed a commit to antoinecln/edi that referenced this pull request Nov 23, 2018
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
antoinecln pushed a commit to antoinecln/edi that referenced this pull request Nov 23, 2018
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
joshuajan pushed a commit to shine-it/edi that referenced this pull request Dec 28, 2018
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
alexis-via referenced this pull request in akretion/edi Mar 4, 2019
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
alexis-via referenced this pull request in akretion/edi Mar 4, 2019
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
rubdos pushed a commit to rubdos/edi that referenced this pull request Mar 9, 2019
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
MiquelRForgeFlow pushed a commit to ForgeFlow/edi that referenced this pull request Mar 13, 2019
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
MiquelRForgeFlow pushed a commit to ForgeFlow/edi that referenced this pull request Mar 14, 2019
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
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.

4 participants