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 | etc.
I want to add new Page tab in Product Form View Dynamically With the help of field_view_get() Method
_inherit = 'product.product'
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False):
Changes the view dynamically
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
@param context: A standard dictionary
@return: New arch of view.
ret_val = super(product_product, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu)
if view_type == 'form':
#doc = etree.XML(res['arch'])
doc = etree.XML(ret_val['arch'], parser=None, base_url=None)
_moves_arch_lst = """
first_node = doc.xpath("//page[@string='Sales']")
if first_node and len(first_node)>0:
#<What Code should I have to write so My Page tab will appear in Product From View> ret_val['arch'] = etree.tostring(doc, encoding="utf-8")
About This Community
This platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 6/6/15, 12:50 AM|
|Seen: 910 times|
|Last updated: 9/7/15, 2:40 PM|