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

My previous Accounting package gave us 24 hours to cancel transactions before posting became permanent. 

Odoo seems to allow cancelling on EVERYTHING once I allow it.

Can I configure this feature to be selective?  Only within 24 hours?

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

The easiest way is to allow cancelling but use Lock Dates to prevent people from cancelling anything prior to the Lock Date.

v10 - Fiscal Year section of Accounting --> Configuration --> Settings

v11 - Accounting --> Adviser --> Actions --> Lock Dates

v12 - Accounting --> Accounting --> Actions --> Lock Dates

There is a lock date for everyone EXCEPT the Accounting Adviser users (normally the CFO/Controller) and there is a lock date for ALL USERS. 

The first lock date can be set daily to the previous day.  The second lock date can be set after the month end close.



Another way would be to create your own Server Action button that conditionally calls the default cancel button:


if (datetime.datetime.now().date() - record.create_date.date()).days > 0:
raise Warning("This entry was posted more than 24 hours ago and can't be Cancelled. Please Reverse it.")
else:
record.button_cancel()

You would then replace the default CANCEL button with a new button linked to this Server Action.

This example allows same day cancellations on the Journal Entry.  You could do something similar on Payments and Bills/Invoices.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
أغسطس 25
126
1
أغسطس 25
270
0
أغسطس 25
195
2
أغسطس 25
216
2
أغسطس 25
778