mirror of
https://github.com/bringout/oca-ocb-hr.git
synced 2026-04-24 18:52:02 +02:00
Initial commit: Hr packages
This commit is contained in:
commit
62531cd146
2820 changed files with 1432848 additions and 0 deletions
|
|
@ -0,0 +1,28 @@
|
|||
/** @odoo-module */
|
||||
|
||||
import { useService } from '@web/core/utils/hooks';
|
||||
import { formatMonetary } from "@web/views/fields/formatters";
|
||||
|
||||
const { Component, onWillStart, useState } = owl;
|
||||
|
||||
export class ExpenseDashboard extends Component {
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
this.orm = useService('orm');
|
||||
|
||||
this.state = useState({
|
||||
expenses: {}
|
||||
});
|
||||
|
||||
onWillStart(async () => {
|
||||
const expense_states = await this.orm.call("hr.expense", 'get_expense_dashboard', []);
|
||||
this.state.expenses = expense_states;
|
||||
});
|
||||
}
|
||||
|
||||
renderMonetaryField(value, currency_id) {
|
||||
return formatMonetary(value, { currencyId: currency_id});;
|
||||
}
|
||||
}
|
||||
ExpenseDashboard.template = 'hr_expense.ExpenseDashboard';
|
||||
Loading…
Add table
Add a link
Reference in a new issue