Odoo Help

Welcome!

This community 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.

0

object inheritance : create new object from inherited class

By
Clément THOMAS
on 8/27/13, 5:30 AM 985 views

Hay,

I do object inheritance with _name != _inherit like in second part of doc

class custom_material(osv.osv):
    _name = 'network.material'
    _inherit = 'network.material'
    _columns = {
        'manuf_warranty': fields.boolean('Manufacturer warranty?'),
    }
    _defaults = {
        'manuf_warranty': lambda *a: False,
    }
custom_material()

Have you a tip to create a custom material from a network material (by copying it ?)

0
Clément THOMAS
On 8/27/13, 6:04 AM

I've found the solution : You can use result of copy_data method of network material class in create method of custom material

Hi. How can you do this?

Souleymane Male
on 3/17/14, 1:00 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

3 follower(s)

Stats

Asked: 8/27/13, 5:30 AM
Seen: 985 times
Last updated: 3/16/15, 8:10 AM