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

How to use code from another module ?

By
peterm
on 11/13/13, 9:23 AM 875 views

Consider I write a module like this:

from osv import fields, osv
from sale_layout import one2many_mod2

class sale_order(osv.osv):

    _inherit = "sale.order"
    _columns = {
        'saleM102_line': one2many_mod2('sale.m102', 'order_id', 'SaleM102'),
    }
sale_order()

OpenERP won't start up, because cannot find sale_layout nor one2many_mod2.

[2013-11-13 10:10:48,390][test] CRITICAL:init:cannot import name one2many_mod2

How can I tell python to look there ?

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

0 follower(s)

Stats

Asked: 11/13/13, 9:23 AM
Seen: 875 times
Last updated: 3/16/15, 8:10 AM