Odoo Help


1 Jawaban

Cybrosys Techno Solutions Pvt.Ltd India

--Cybrosys Techno Solutions Pvt.Ltd--
Cybrosys Technologies
| 7 6 10
Calicut, India
--Cybrosys Techno Solutions Pvt.Ltd--

Cybrosys Technologies is a private limited ISO certified company in Technology and Software Engineering sector. We serve as one of the best and trusted Odoo official partner, providing ultimate Customization and Implementation services in Odoo ERP. A frequent contributor to Odoo Apps, our customized free apps are downloaded by more than one lakh users. Most of our apps augment the potentialities of Odoo and are trending in the Odoo app store.

Cybrosys keeps privilege to be one among the finest Odoo Official Partners with 200+ free apps contribution towards the Odoo community. Cybrosys also stands number one in Odoo-social Media Integration empowering every kind of business solutions.

We are also enriched with highly skilled UI/UX technical experts for Developing, Implementing and Designing, thereby providing ultimate benefit to our customer base.

Today Cybrosys has reached par excellent in Odoo Implementation and allied services, proving its credibility and reliability. Our proven services are used by customers sprawling across 160+ countries including Middle East, African continents, UK, Germany, Spain, Thailand, Hong Kong, New Zealand, Australia, Malaysia, Singapore, Egypt etc.

We are rapidly expanding our base with robust quality management and business process re-engineering to meet the ultimate customer desire.

To know more about Cybrosys Technologies and our Odoo Apps, Kindly visit:

Cybrosys Technologies 

Odoo Apps 

And inbox us your queries to odoo@cybrosys.com

Cybrosys Techno Solutions Pvt.Ltd India
21/02/19 22.36


You can try something like this,

def do_product_revision(self):
for cur_rec in self:
## Create a new version to work on, and auto generate name
# Generate new version number
ver_no = cur_rec.ver_no + 1

# Update the product name P1-v01 to P1-v02, and version number from 1 -> 2
vals = {
'name': cur_rec.name.split("-")[0] + '-v%01d' % (ver_no),
'ver_no': ver_no,

# Copy old record, but with new name and version number into new_record.
new_record = cur_rec.copy(default=vals) ## How to open view of this record?!
return {
'type': 'ir.actions.act_window',
'res_model': 'Model_name_to_open',
'res_id': new_record.id,
'view_mode': 'form',
'target': 'new',


1 Komentar
Chun Heung Wong Netherlands
21/02/19 23.06

It worked! Thanks so much! I prefer removing the 'target' such that it doesnt open a pop-up. Learned another thing today!

Mengajukan pertanyaan
Keep Informed
1 Follower(s)
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.

Odoo Training Center

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

Test it now