Add module hr_expense_usability_dp

This commit is contained in:
Alexis de Lattre
2017-06-08 11:58:06 +02:00
parent 19909b6761
commit a3245985e5
7 changed files with 50 additions and 20 deletions

View File

@@ -0,0 +1,13 @@
======================================
HR Expense Usability Decimal Precision
======================================
I want to be able to have a decimal precision different from the default 'Product Price' precision. But, if I create this new decimal precision via the XML data of the *hr_expense_usability* module, it won't apply on demo data nor data created via post_install script, because it's too "late" in the module installation process. I tried to create this new decimal precision via a *pre_init_hook*, but it doesn't work. So I decided to make a small module that only creates this decimal precision and the *hr_expense_usability* module depends on it.
Credits
=======
Contributors
------------
* Alexis de Lattre <alexis.delattre@akretion.com>

View File

@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-

View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'HR Expense Usability Decimal Precision',
'version': '10.0.1.0.0',
'category': 'Human Resources',
'license': 'AGPL-3',
'summary': 'Technical module for hr_expense_usability',
'description': '',
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['hr_expense'],
'data': [
'decimal_precision_data.xml',
],
'installable': True,
}

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">
<record forcecreate="True" id="decimal_expense_price" model="decimal.precision">
<field name="name">Expense Unit Price</field>
<field name="digits" eval="3"/>
</record>
</odoo>