Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- Project
- MRP
لقد تم الإبلاغ عن هذا السؤال
digits :
'exchange_rate': fields.related('currency_id', 'rate', type='float', string='Exchange Rate', digits=(12,6)),
or digits_compute defined value :
xml
<record forcecreate="True" id="decimal_account" model="decimal.precision">
<field name="name">Account</field>
<field name="digits">2</field>
</record>
python
import openerp.addons.decimal_precision as dp
'credit': fields.function(__compute, fnct_inv=_set_credit_debit, digits_compute=dp.get_precision('Account'), string='Credit', multi='balance'),
or digits_compute function :
from openerp import SUPERUSER_ID
import openerp
def get_precision_tax():
def change_digit_tax(cr):
res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Account')
return (16, res+3)
return change_digit_tax
'amount': fields.float('Amount', required=True, digits_compute=get_precision_tax(), help="For Tax Type percent enter % ratio between 0-1."),
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيلالمنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
---|---|---|---|---|
|
2
نوفمبر 22
|
7939 | ||
|
1
أبريل 16
|
4458 | ||
|
1
يونيو 15
|
4291 | ||
|
1
يونيو 15
|
3187 | ||
|
0
مارس 15
|
3402 |