İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
6527 Görünümler

How to Revised Quotation

I need to revised(same functionality of duplicates) a quotation with same quotation number with a sequence,When we click on duplicate from Quotation(sale.order) form in each time the quotation revised should come with 

Quotation S001 Rev 001 

Quotation S001 Rev 002 


Quotation S00 Rev 003 


Quotation S001 Rev 004  etc..  like that

I tried below code its not completed my logic is not correct need a help ...How to change my below code?




def _check_increment(self,cr,uid,ids,context=None): 
#Here How to add increment code

return True

def copy(self, cr, uid, id, default={}, context=None):
if not default:
default = {}
default.update({'name': " Revised"+str(self._check_increment(cr,uid,id,context))+self.pool.get('sale.order').browse(cr, uid, id, context=context).name})
return super(sale_order, self).copy(cr, uid, id, default, context=context)


Required output from duplicate method call is

Quotation S001 Rev 001 

Quotation S001 Rev 002 


Quotation S00 Rev 003 


Quotation S001 Rev 004  et

like

How can I acheive this ? need a help





Avatar
Vazgeç

It would be easy for you if you attach your order report into notes because report itself call revision history. more info contact@tidyway.in

En İyi Yanıt

Maybe you can see this

https://github.com/OCA/sale-workflow/pull/137


Avatar
Vazgeç

This is a new module called sale_order_revision: Revisions for sale orders (and quotations) On cancelled orders, you can click on the "New copy of Quotation" button. This will create a new revision of the quotation, with the same base number and a '-revno' suffix appended. A message is added in the chatter saying that a new revision was created. In the form view, a new tab is added that lists the previous revisions, with the date they were made obsolete and the user who performed the action. The old revisions of a sale order are flagged as inactive, so they don't clutter up searches.

@Vince Vinet - After a couple of years using sales_order_revision can you tell me if you can recommend it for O10E? (et un gros bonjour de Montréal)