Skip to content

Commit

Permalink
Remove post_move option, because we cannot reconcile non-posted entri…
Browse files Browse the repository at this point in the history
…es, so we should always post the move
  • Loading branch information
alexis-via committed Apr 21, 2021
1 parent 7a858da commit f191edb
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 18 deletions.
1 change: 1 addition & 0 deletions account_check_deposit/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from . import models
from . import wizards
1 change: 0 additions & 1 deletion account_check_deposit/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from . import account_check_deposit
from . import account_move_line
from . import res_company
from . import res_config_settings
3 changes: 1 addition & 2 deletions account_check_deposit/models/account_check_deposit.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,7 @@ def validate_deposit(self):
)
counter_vals["move_id"] = move.id
move_line_obj.create(counter_vals)
if deposit.company_id.check_deposit_post_move:
move.action_post()
move.action_post()

deposit.write({"state": "done", "move_id": move.id})
for reconcile_lines in to_reconcile_lines:
Expand Down
1 change: 0 additions & 1 deletion account_check_deposit/models/res_company.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ class ResCompany(models.Model):
copy=False,
domain=[("reconcile", "=", True), ("deprecated", "=", False)],
)
check_deposit_post_move = fields.Boolean(string="Post Move for Check Deposits")
11 changes: 0 additions & 11 deletions account_check_deposit/views/res_config_settings_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,6 @@
/>
</div>
</div>
<div
class="col-xs-12 col-md-6 o_setting_box"
id="account_check_deposit_post_move"
>
<div class="o_setting_left_pane">
<field name="check_deposit_post_move" />
</div>
<div class="o_setting_right_pane">
<label for="check_deposit_post_move" />
</div>
</div>
</div>
</xpath>
</field>
Expand Down
1 change: 1 addition & 0 deletions account_check_deposit/wizards/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import res_config_settings
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,3 @@ class ResConfigSettings(models.TransientModel):
check_deposit_transfer_account_id = fields.Many2one(
related="company_id.check_deposit_transfer_account_id", readonly=False
)
check_deposit_post_move = fields.Boolean(
related="company_id.check_deposit_post_move", readonly=False
)
6 changes: 6 additions & 0 deletions setup/account_check_deposit/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit f191edb

Please sign in to comment.