-
-
Notifications
You must be signed in to change notification settings - Fork 757
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 Migration of account_constraints and account_default_draft_move #34
Conversation
b6ca99c
to
3f78d02
Compare
Why are you including also account_constraints in this PR? |
@pedrobaeza Because account_default_draft_move depends on account_constraints |
About travis configuration, please see #36 |
Ah, OK. Is there any test we can run to check functionality? |
return True | ||
err_msg = (_('Invoice name (id): %s (%s)') % | ||
(line.invoice.name, line.invoice.id)) | ||
raise models.except_orm( |
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.
Wouldn't it be better to import directly openerp.exceptions and use directly exceptions.except_orm ?
01ac321
to
5bb7b1e
Compare
check=check) | ||
|
||
@api.cr_uid_ids_context | ||
def write(self, cr, uid, ids, vals, context=None, check=True, |
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 could use @api.multi here to remove cr, uid, ids and context
Then you could access context with: self._context
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 I prefer self.env.context
because self._context
accesses to a private attribute.
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.
@guewen @yvaucher unlink and write method of account_move_line isn't yet migrated in new API and unlink attemps to write in context which is frozen.This is the major reason why these methods don't use the new API.
Also context argument isn't at the end of method declaration of these methods and this causes errors.
Diff between 7.0 and 8.0: |
43d50da
to
65b2bca
Compare
Anyone willing to review this one? |
Since account_constraint forbids the deletion of account moves that are linked to a bank statement, I added the possibility to delete them from the bank statement view, to provide a way to fix erroneous matches. |
@fclementic2c would you like to test this one? |
Thanks @sbidoul |
Needs are rebase |
f521729
to
2ad0f86
Compare
@bwrsandman rebased |
@guewen your comments are for sure useful, thanks for sharing them! |
…utton Since account_constraint forbids the deletion of account moves that are linked to a bank statement, we add the possibility to delete them from the bank statement itself, to provide a way to fix erroneous matches.
f32a8ad
to
af67f03
Compare
@guewen Thanks for your comments ! |
Thanks @adrienpeiffer ! |
👍 as well The only possible annoyance is that the cancel button (yellow arrow) on bank statement line will appear twice if account_cancel is installed). But since one goal of account_default_draft_move is to make account_cancel unncessary that should not be an issue. |
8.0 Migration of account_constraints and account_default_draft_move
Add Program Manager on leads
* [FIX] Corrige a numeração dos lançamentos * [REF] Simplificação da preparação do lançamento financeiro * [REF] Remove accounting tab * [NEW] Module: financial_account * [REF] Refactoring create method to use it in another modules
Port account default draft move and account constraint to 8.0