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

Bank - > Branch Mapping [Closed]

By
priyankahdp
on 4/11/13, 4:51 AM 687 views

The Question has been closed

by
priyankahdp
on 04/30/2013 10:20:36

How to do above mapping in OpenERP ver 7. I'm try with one2many for bank class & many2one in branch class. restricted from domain attribute also. but we can add branches for another banks using ("Create and Edit option") in many2one field. i tried with widget="selection" then all records shows and there was not a mapping at that time

refer my code from here

class bank_registration(osv.osv):
    _name = "bpl.bank.registration"
    _description = "Bank"
    _columns = {
                'name': fields.char('Bank Name', size=128, required=True),
                'branches': fields.one2many('bpl.branch.registration', 'bank_id', 'Branch')
    }

bank_registration()

class branch_registration(osv.osv):
    _name = "bpl.branch.registration"
    _description = "Branch"
    _columns = {
        'name': fields.char('Branch Name', size=128, required=True),
        'bank_id': fields.many2one('bpl.bank.registration', 'Bank Name'),
type="char", size=50),
    }

branch_registration()

If i'm select bank then need to load branches for branch field.but when user can create them through "Create and Edit option".so need to use widget="selection".but when i use widget="selection" then many2one domain attribute not worked.what need to do for filter records with selection widget field

if user going to create new bank from that create and view option of branch field, then need to readonly that popup bank field with earlier selected value

sorted with openerp security restrictions

priyankahdp
on 4/30/13, 10:21 AM

About This Community

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

Question tools

0 follower(s)

Stats

Asked: 4/11/13, 4:51 AM
Seen: 687 times
Last updated: 3/16/15, 8:10 AM