تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2683 أدوات العرض

Hi,

We use Odoo 10 CE and wish to have default values based on a condition.  The model in question being Invoice (account.invoice).


In the Invoice model, we have fiscal position ( fiscal_position_id) and journal ( journal_id).  We are able to select the fiscal position of the customer from the partner form and this changes on the Invoice -> other info tab depending on the selected customer.


We wish to select the corresponding journal based on corresponding partner fiscal position. For example, for all partners who are fiscal position as Normal, the corresponding journal on the invoice shall be Sale Journal and for all partners who have fiscal position as Exempt , the corresponding journal on the invoice shall be Invoice Journal.  


Kindly help.

Regards, 

الصورة الرمزية
إهمال
أفضل إجابة

Hi,

For this you can make change in the onchange method of the the partner in the invoice and apply the above logic.

For writing onchange function: https://www.youtube.com/watch?v=Cj6ME0qNdno

Thanks

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
أغسطس 17
5604
1
يوليو 25
401
2
يوليو 25
581
1
يوليو 25
1653
3
أبريل 25
1706