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 prevent appending same tuples when inheriting fields.selection field

By
Abegail Sanchez
on 7/9/14, 6:44 AM 365 views

I have this but when I update my module it appends the same tuple

class account_journal_inherit(osv.osv):
 
    _inherit='account.journal'

    def __init__(self, pool, cr):
            
            _type=super(account_journal_inherit, self)._columns['type'].selection
            _type.append(('credit_payment', 'Prepaid Credit'))
            
            return super(account_journal_inherit, self).__init__(pool,cr)

 

Thanks

0

deep

--deep--
1617
| 5 4 7
Bengaluru, India
--deep--

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

deep
On 7/21/14, 6:38 AM

Could you elobrate more...

or you trying to say you want your own set of typle values for selection field "type" ?

If So then Override it... Re-define type under columns in your custom module.. that one can override its original values.. or extend it too...

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

1 follower(s)

Stats

Asked: 7/9/14, 6:44 AM
Seen: 365 times
Last updated: 3/16/15, 8:10 AM