-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
[11.0][MIG] base_transaction_id #190
Conversation
(lp:c2c-financial-addons/6.1 rev 24.1.5)
…t working yet, just for backup) (lp:c2c-financial-addons/6.1 rev 24.1.8)
…ll as on the automatic reconciliation wizard. (lp:c2c-financial-addons/6.1 rev 24.1.10)
…eed both finaly (lp:c2c-financial-addons/6.1 rev 24.1.15)
(lp:c2c-financial-addons/6.1 rev 58)
…ostly based on : account_statement_ext -> provide profile per bank statement, remove period, choose to use balance check or not,... account_statement_base_completion -> provide a completion rule system to fullfill the bank statement (partner, account,...) account_statement_base_import -> provide a base to create your own file parser for each bank/office and link it to a profile account_statement_transactionid_completion and account_statement_transactionid_import to use the transaction ID recorded in th SO account_advanced_reconcile -> An advanced way to setup reconciliation rules on every account account_financial_report_webkit -> some little fixes (lp:c2c-financial-addons/6.1 rev 63)
(lp:c2c-financial-addons/6.1 rev 77)
…me account than the invoice's one (the payable / receivable)
the values before the write
65b7868
to
18615b1
Compare
base_transaction_id/README.rst
Outdated
* Joël Grand-Guillaume <joel.grandguillaume@camptocamp.com> | ||
* Alexandre Fayolle <alexandre.fayolle@camptocamp.com> | ||
* Guewen Baconnier <guewen.baconnier@camptocamp.com> | ||
* Pedro Baeza <pedro.baezo@gmail.com> |
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.
is that email correct?
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 removed it as he didn't contributed directly to that module, he has few commits through OCA module maintenance
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.
Yeah, I haven't made anything significant here.
base_transaction_id/README.rst
Outdated
Bugs are tracked on `GitHub Issues | ||
<https://github.com/OCA/bank-statement-reconcile/issues>`_. In case of trouble, please | ||
check there if your issue has already been reported. If you spotted it first, | ||
help us smashing it by providing a detailed and welcomed feedback. |
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.
From latest README.rst template:
help us smash it by providing detailed and welcomed feedback.
@@ -0,0 +1,58 @@ | |||
# Translation of Odoo Server. |
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.
Remove this file
base_transaction_id/__manifest__.py
Outdated
'depends': [ | ||
'sale', | ||
], | ||
'website': 'https://www.odoo-community.org/', |
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 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.
@yvaucher remember to update this
base_transaction_id/__manifest__.py
Outdated
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
{'name': 'Base transaction id for financial institutes', | ||
'version': '11.0.1.0.0', | ||
'author': "Camptocamp,Odoo Community Association (OCA)", |
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.
Separate authors w/ space, please
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.
https://github.com/OCA/maintainer-tools/blob/master/CONTRIBUTING.md#modules
According to contribution guidelines this is correct
author + ',Odoo Community Association (OCA)
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.
Odoo parses both with or without spaces, so no problem in any
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.
@pedrobaeza that just doesn't look good when it gets rendered, imho
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.
The parsing is the same as said. You can try.
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
|
||
<record model="ir.ui.view" id="invoice_view_custom"> |
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.
id
must be declared before model
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.
Please give me a reference on this, according to the OCA codebase both are used:
└─> ack record.*model=.*id= --xml | wc -l
24252
└─> ack record.*id=.*model= --xml | wc -l
21737
EDIT: wrong greping
EDIT2: removing occurence of OpenUpgrade which is not revelent
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.
base_transaction_id/README.rst
Outdated
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/OCA/bank-statement-reconcile/issues>`_. In case of trouble, please |
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.
Thanks for the review, I did the fixes accordingly |
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.
@yvaucher code LGTM. Just some nitpicking non-blocking remarks
base_transaction_id/README.rst
Outdated
Base transaction id for financial institutes | ||
============================================ | ||
|
||
Adds transaction id to invoice and sale models and views. |
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.
keep ID
always uppercase, just to make it homogeneous when referring to it
@@ -0,0 +1,20 @@ | |||
# Copyright 2012 Yannick Vaucher, Camptocamp SA |
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.
2012-2018 ? Same for other headings
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.
Here are the changes I made, I don't think it deserve a bump on copyright as no code was change in python files.
@api.multi | ||
def get_reconciliation_proposition(self, excluded_ids=None): | ||
""" Look for transaction_ref to give them as proposition move line """ | ||
if self.name: |
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.
self.ensure_one() ?
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 was written at a time we considered ensure_one to be called anyway. I can add it thought
|
||
@api.multi | ||
def get_reconciliation_proposition(self, excluded_ids=None): | ||
""" Look for transaction_ref to give them as proposition move line """ |
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.
not a requirement but a good habit: no space around docstring text + end w/ period ;)
@api.model | ||
def domain_move_lines_for_reconciliation(self, excluded_ids=None, | ||
str=False): | ||
""" Add transaction_ref in search of move lines""" |
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.
docstring: same
<field name="model">account.invoice</field> | ||
<field name="inherit_id" ref="account.invoice_form"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//page[@name='other_info']/group/group/field[@name='origin']" position="after"> |
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'd replace group/group
with //
to make it more robust in case is moved. Even if as you are selecting the field origin.... why not selecting only that? Very likely we don't have the same filed twice. 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, can obviously be simplified.
It was probably failing in v10 as it was changed from
<field name="origin" position="after">
to this.
If there are 1 origin field in the invoice lines before the origin field of the main object.
So it might be safer to stick with the expr but simplify it a bit.
|
||
@api.model | ||
def domain_move_lines_for_reconciliation(self, excluded_ids=None, | ||
str=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.
Bad idea to use str as it is a builtin
not sure were the super is defined though
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.
Defined in src/addons/account/models/account_move.py
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.
Let's try a PR on master odoo/odoo#22392
e484090
to
bdfc16d
Compare
Squashed commits |
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.
LGTM w/ some remarks
@api.multi | ||
def get_reconciliation_proposition(self, excluded_ids=None): | ||
"""Look for transaction_ref to give them as proposition move line.""" | ||
if self.name: |
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.
ensure_one
?
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.
Would make it more explicit right.
) | ||
|
||
@api.multi | ||
def prepare_move_lines_for_reconciliation_widget(self, |
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.
It's better to open the line right after the parenthesis :)
class AccountInvoice(models.Model): | ||
_inherit = 'account.invoice' | ||
|
||
transaction_id = fields.Char(string='Transaction ID', |
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.
same remark about code formatting
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.
While I also prefer this format with return after opening parethesis I prefer not to change this to not alter too much the code base history.
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.
Please update website key in manifest, otherwise LGTM 👍
bdfc16d
to
b6f25e6
Compare
Changed website key in Other demands seems irrelevant to me for that module migration. |
@yvaucher The PR has been approved and it seems there is nothing left to do with it. What about merging? :) |
@OCA/accounting-maintainers anyone who could merge this? As it is my PR I don't want to force merge. |
Can you maybe squash a bit the commit history? 🙏 |
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 some commits would indeed help clarifying the history but I have the feeling this PR could be merged as is. @yvaucher already did some squashing 2.5 months ago. Isn't this PR been opened for too long now? :P
Yeah, but 50 commits for such a simple module I think it's too much, but I let you the final call. |
@pedrobaeza ok I'll squash few of my commits and drop the ones "Make modules uninstallable" I guess I can easily make it around 40 commits, this is a quite old module thus we have many commits. |
@pedrobaeza I squashed the commits in a new branch, thus I'm closing this one |
No description provided.