Hello all, please how do I copy some fields from one model to another model in OpenERP. For example, i have a model called club.member with fields id, name, address, country and state and another model called member. So i want to copy all the fields values from club.member model to member model. How do I achieve that? Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1
Reply
9516
Views
Hi,
You can start with this subject Here
this Technical_Memento_v0.7.3 contenant all method ORM.
or
create object member inherit to club.member.
class member(osv.osv):
_inherit = 'club.member'
or
club_member_pool = self.pool.get('club.member')
member_pool = self.pool.get('member')
#return all objects member selected ,generally one object ( actual object)
#you cane use search
club_member_browse = club_member_pool.browse(cr, uid, ids)
for club_member in club_member_browse
member : {
'name' : club_member.name,
'address' : club_member.address,
#....
}
member_pool.create(cr, uid, member)
Thank you very much for quick response! I will give it a trial
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up