Odoo Help

1

How to revised a quotation with a sequence Number for a custom code?

By
Odoo
on 4/9/15, 7:35 PM 1,343 views

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





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

TidyWay Software Solutions, TidyWay
on 4/24/15, 10:41 AM
1
Bruno JOLIVEAU
On 4/24/15, 11:12 AM

Maybe you can see this

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


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.

Savoir-Faire Linux, Vince Vinet
on 4/24/15, 11:16 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 4/9/15, 7:35 PM
Seen: 1343 times
Last updated: 4/24/15, 11:12 AM