mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
MIG hr_expense_change For odoo 12.0
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
'name': 'HR Expense Change',
|
||||
'author': 'Hibou Corp. <hello@hibou.io>',
|
||||
'version': '11.0.1.0.0',
|
||||
'version': '12.0.1.0.0',
|
||||
'category': 'Employees',
|
||||
'sequence': 95,
|
||||
'summary': 'Technical foundation for changing expenses.',
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
from odoo.addons.hr_expense.tests.test_expenses import TestCheckJournalEntry
|
||||
from odoo.addons.hr_expense.tests.test_expenses import TestAccountEntry
|
||||
|
||||
|
||||
class TestExpenseChange(TestCheckJournalEntry):
|
||||
class TestAccountEntry(TestAccountEntry):
|
||||
|
||||
def test_expense_change_basic(self):
|
||||
# posts expense and gets move ready at self.expense.account_move_id.id
|
||||
self.test_journal_entry()
|
||||
self.test_account_entry()
|
||||
self.assertEqual(self.expense.expense_line_ids.date, self.expense.account_move_id.date)
|
||||
|
||||
ctx = {'active_model': 'hr.expense', 'active_ids': self.expense.expense_line_ids.ids}
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
</record>
|
||||
|
||||
<!-- Add Button to Existing Forms -->
|
||||
<record id="hr_expense_form_view_inherit" model="ir.ui.view">
|
||||
<record id="hr_expense_view_form_inherit" model="ir.ui.view">
|
||||
<field name="name">hr.expense.form.inherit</field>
|
||||
<field name="model">hr.expense</field>
|
||||
<field name="inherit_id" ref="hr_expense.hr_expense_form_view"/>
|
||||
<field name="inherit_id" ref="hr_expense.hr_expense_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='state']" position="before">
|
||||
<button name="%(action_view_hr_expense_change)d" string="Change"
|
||||
|
||||
Reference in New Issue
Block a user