Refactor action_move_line_create on account_voucher
THe method that create the move lines in account_voucher is too long, we will refactor to separate the generation of the dicts and data, in ths way in localization we can make the work more modular, and overwriting just what we need to comply with laws.
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Essential
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- Nhomar - Vauxoo
- Definition:
- Approved
- Series goal:
- None
- Implementation:
- Implemented
- Milestone target:
- None
- Started by
- Nhomar - Vauxoo
- Completed by
- Nhomar - Vauxoo
Whiteboard
This method have 207 lines we will refactor for merge proposal.
We will follow this guidelines:
http://
http://
http://
Deleted unused method:
1.- _get_payment_
-------
revno: 5323
revision-id: openerp@
parent: <email address hidden>
author: Nhomar Hernandez <email address hidden>
committer: openerp <openerp@
branch nick: openobject-addons
timestamp: Sat 2011-10-08 18:46:41 -0400
message:
[REF] Deleted unused method _get_payment_
2.- call-your-
The method is iterating with a variable called "inv" but we are iterating over Voucher, the variable is renamed in all the method following the guideline call-your-
-------
revno: 5325
revision-id: <email address hidden>
parent: <email address hidden>
author: Javier Duran <email address hidden>
committer: Servidor Desarrollo <email address hidden>
branch nick: openobject-addons
timestamp: Sat 2011-10-08 19:06:26 -0400
message:
[REF] The method call the voucher as 'inv' it is confusing whe you are reading a lot of lines and you are refering to something called diferently
3.- The creation of the first line can be different depends of the voucher and localization, we go out this method from the original ones.
-------
revno: 5327
revision-id: <email address hidden>
parent: <email address hidden>
author: Javier Duran <email address hidden>
committer: Servidor Desarrollo <email address hidden>
branch nick: openobject-addons
timestamp: Sat 2011-10-08 22:43:46 -0400
message:
[REF] Creation of the first line in an external method call first_move_
4.- The writeoff process in an external method, in this way we can override this depend of context of the voucher, and put some intelligence to this process in an external module.
-------
revno: 5329
revision-id: <email address hidden>
parent: <email address hidden>
author: Javier Duran <email address hidden>
committer: Servidor Desarrollo <email address hidden>
branch nick: openobject-addons
timestamp: Sun 2011-10-09 00:08:36 -0400
message:
[REF] writeoff_
5.- Modifying action_move_create method to return a dict, rename action_move_create method to account_move_get, added docstring of account_move_get, methods follows the guideline
-------
revno: 5332
revision-id: <email address hidden>
parent: javier@
author: <email address hidden>
committer: Javier Duran <email address hidden>
branch nick: openobject-
timestamp: Mon 2011-10-10 15:39:34 -0400
message:
[REF] Modifying action_move_create method to return a dict,
rename action_move_create method to account_move_get,
added docstring of account_move_get, methods follows the guideline.
6.- Modifying first_move_
-------
revno: 5333
revision-id: <email address hidden>
parent: <email address hidden>
author: <email address hidden>
committer: Javier Duran <email address hidden>
branch nick: openobject-addons
timestamp: Mon 2011-10-10 17:08:06 -0400
message:
[REF] Modifying first_move_
rename first_move_
added docstring of first_move_line_get method follows the guideline.
7.- Modifying writeoff_
-------
revno: 5334
revision-id: <email address hidden>
parent: <email address hidden>
author: <email address hidden>
committer: Javier Duran <email address hidden>
branch nick: openobject-addons
timestamp: Mon 2011-10-10 18:19:15 -0400
message:
[REF] Modifying writeoff_
rename writeoff_
added docstring of writeoff_
8.- Changing obtain company currency and current currency in an eternal method and rename one method.
-------
revno: 5335
revision-id: <email address hidden>
parent: <email address hidden>
committer: Javier Duran <email address hidden>
branch nick: openobject-addons
timestamp: Mon 2011-10-10 19:10:46 -0400
message:
[REF] Changing to an external method curr currency and comp currency
renaming a method from create to get