-
-
Notifications
You must be signed in to change notification settings - Fork 596
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
10.0 mig pos cash move reason mgs #177
10.0 mig pos cash move reason mgs #177
Conversation
5962b9b
to
f575797
Compare
# I get the statement from the session | ||
statement = self.env['account.bank.statement'].search( | ||
[('pos_session_id', '=', self.session.id), | ||
('journal_id', '=', self.cash_journal.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.
You should add limit=1
to prevent errors on line 93.
_register = False | ||
|
||
@api.onchange('product_id') | ||
def onchange_reason(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.
This should be named _onchange_product
.
f575797
to
567d6e6
Compare
@benwillig thanks to review this |
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.
Hi @GillesTephaneMeyomesse. thanks for porting this usefull module !
I was working on the 8.0 version and made some improvment available here. (some refactor, reducing code size) #248
could you review the PR and cherry pick the according commit ?
regards.
|
||
|
||
class PosBoxCashMoveReason(PosBox): | ||
_register = False | ||
|
||
@api.onchange('product_id') | ||
def onchange_reason(self): | ||
def _onchange_reason(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.
why do you changed the name of this function ?
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 the naming convention defined in the OCA contributing guidelines. You can check it there https://github.com/OCA/maintainer-tools/blob/master/CONTRIBUTING.md#models
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 ! I didn't know.
Hi. @benwillig could you update your review ? After I think we can merge. kind regards. |
ping @GillesTephaneMeyomesse and @benwillig. kind regards. |
@legalsylvain Please to proceed. You can make a PR to our branch. I will merge it . |
I will not work to the 10.0 version. (directly on 12.0). |
'summary': """""", | ||
'author': 'ACSONE SA/NV,' | ||
'Odoo Community Association (OCA)', | ||
'website': "http://acsone.eu", |
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.
closing, due to inactivity. |
No description provided.