[FIX+IMP] account_tax_balance:
* Test * README * add extra parent menu. If not, with the web_responsive module is mixed between other menuspull/361/head
parent
40f29e2e06
commit
5e22669c25
|
@ -20,7 +20,7 @@ Select the company, the date range, the target moves and 'open taxes'
|
||||||
|
|
||||||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||||
:alt: Try me on Runbot
|
:alt: Try me on Runbot
|
||||||
:target: https://runbot.odoo-community.org/runbot/91/9.0
|
:target: https://runbot.odoo-community.org/runbot/91/10.0
|
||||||
|
|
||||||
Bug Tracker
|
Bug Tracker
|
||||||
===========
|
===========
|
||||||
|
|
|
@ -19,7 +19,10 @@ class AccountMove(models.Model):
|
||||||
], compute='_compute_move_type', store=True, readonly=True)
|
], compute='_compute_move_type', store=True, readonly=True)
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
@api.depends('line_ids.account_id.internal_type', 'line_ids.balance')
|
@api.depends(
|
||||||
|
'line_ids.account_id.internal_type', 'line_ids.balance',
|
||||||
|
'line_ids.account_id.user_type_id.type'
|
||||||
|
)
|
||||||
def _compute_move_type(self):
|
def _compute_move_type(self):
|
||||||
def _balance_get(line_ids, internal_type):
|
def _balance_get(line_ids, internal_type):
|
||||||
return sum(line_ids.filtered(
|
return sum(line_ids.filtered(
|
||||||
|
|
|
@ -65,7 +65,7 @@ class TestAccountTaxBalance(TransactionCase):
|
||||||
self.assertEqual(invoice.state, 'draft')
|
self.assertEqual(invoice.state, 'draft')
|
||||||
|
|
||||||
# change the state of invoice to open by clicking Validate button
|
# change the state of invoice to open by clicking Validate button
|
||||||
invoice.signal_workflow('invoice_open')
|
invoice.action_invoice_open()
|
||||||
|
|
||||||
self.assertEquals(tax.base_balance, 100.)
|
self.assertEquals(tax.base_balance, 100.)
|
||||||
self.assertEquals(tax.balance, 10.)
|
self.assertEquals(tax.balance, 10.)
|
||||||
|
@ -135,7 +135,7 @@ class TestAccountTaxBalance(TransactionCase):
|
||||||
self.assertEqual(refund.state, 'draft')
|
self.assertEqual(refund.state, 'draft')
|
||||||
|
|
||||||
# change the state of refund to open by clicking Validate button
|
# change the state of refund to open by clicking Validate button
|
||||||
refund.signal_workflow('invoice_open')
|
refund.action_invoice_open()
|
||||||
|
|
||||||
self.assertEquals(tax.base_balance, 75.)
|
self.assertEquals(tax.base_balance, 75.)
|
||||||
self.assertEquals(tax.balance, 7.5)
|
self.assertEquals(tax.balance, 7.5)
|
||||||
|
|
|
@ -34,9 +34,15 @@
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<menuitem
|
<menuitem
|
||||||
action="action_open_tax_balances"
|
id="menu_tax_balances"
|
||||||
id="menu_action_open_tax_balances"
|
name="Taxes Balance"
|
||||||
parent="account.menu_finance_reports"
|
parent="account.menu_finance_reports"
|
||||||
groups="account.group_account_user,account.group_account_manager"/>
|
groups="account.group_account_user,account.group_account_manager"/>
|
||||||
|
|
||||||
|
<menuitem
|
||||||
|
action="action_open_tax_balances"
|
||||||
|
id="menu_action_open_tax_balances"
|
||||||
|
parent="menu_tax_balances"
|
||||||
|
groups="account.group_account_user,account.group_account_manager"/>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
Loading…
Reference in New Issue