Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- ลูกค้าสัมพันธ์
- e-Commerce
- ระบบบัญชี
- สินค้าคงคลัง
- PoS
- Project
- MRP
คำถามนี้ถูกตั้งค่าสถานะ
The company model (res.company) has a many2one to the company currency, so in v8 and later you can use:
self.env.ref('base.main_company').currency_id
how to get from the ODOO screen itself
Hi,
You can do as following:
def _get_currency(self, cr, uid, context=None):
user_obj = self.pool.get('res.users')
currency_obj = self.pool.get('res.currency')
user = user_obj.browse(cr, uid, uid, context=context)
if user.company_id:
return user.company_id.currency_id.id
else:
return currency_obj.search(cr, uid, [('rate', '=', 1.0)])[0]
_defaults = {
'currency': _get_currency,
}
self.env.company.currency_id
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
1
เม.ย. 24
|
1590 | ||
|
2
ม.ค. 24
|
1698 | ||
Error message
แก้ไขแล้ว
|
|
2
พ.ย. 23
|
2532 | |
change in currency configuration
แก้ไขแล้ว
|
|
1
มี.ค. 24
|
1850 | |
Currency automatic conversion
แก้ไขแล้ว
|
|
1
มี.ค. 23
|
1916 |