Skip to Content
Menu
This question has been flagged
1215 Views

Hi,

I am tired and fustrated at the following quest:

I am trying to show only records of SALE_ORDER table, that are: 

1. ARCHIVED

2. CANCELLED


I cannot figure out how this is done or in which field this is stored in the SALE_ORDER table.


All I can find is INVOICE_STATUS and the related LEAD stage_id, but this is not what I am looking for.


I want to list all SALE ORDERS that are either ARCHIVED(achieved by 'actions/archive') or CANCELLED(achived by pressing CANCEL button in odoo)


Avatar
Discard

By default there is no ARCHIVED in sale.order but if someone added it, the field name would be active
so to show all archived record you need to set active == false
for state there is a field named state, to show all canceled add and condition with state == "cancel"

Author

Thanks Muhammad!

but, the problem is that this "active" field, does not exist in the table sale_order, and therefore I cannot do that.

Yes as i mentioned it's not in sale.order default code and so is the functionality
Can you archive the record please make sure you can, I don't think you can, Archiving Sale order is not a default functionality.

Author

Hi Muhammad,
Yes, we can archive or delete sale orders from the odoo interface.

The issue is that looking at the database and the table sale_order, we have no way to list only ARCHIVED sale orders.
We can now, thanks to your comments, see CANCELED ones, but cannot find the relationship or the way in which odoo tells that a sale_order is ARCHIVED inside the database and specifically we do not see nothing nor a relationship that indicates that we can list ARCHIVED sale_orders

Related Posts Replies Views Activity
2
Nov 24
1862
2
Oct 24
345
2
Aug 24
362
3
Jul 24
6444
0
Apr 24
364