コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
8237 ビュー
{
    'name': 'HR Recruitment Extensionssss',
    'version': '1.1',
    'category': 'Generic Modules',
    'description': """
    After Applicantis hired it will automatically fetch value from Applicants to Employee master
       """,
    'author': 'Sridhar',
    'depends': ['base','hr','hr_recruitment'],
    'update_xml': ['hr_reqiurement_ext_view.xml'],
    'installable': True,
    'active': False,
}
__openerp__.py

class hr_recruitment_ext(osv.osv):
    _name = 'hr.recruitment.ext'
    _description = 'Extension of the Reqirement process'
    _inherit = 'hr.applicant'
    _columns ={
        'doj':fields.date('Date of Birth'),
        'presentsal':fields.integer('Present Salary', size=16),
    }
hr_recruitment_ext()

hr_recruitment_ext.py

<?xml version="1.0"?>
<openerp>
    <data>
    <record model="ir.ui.view" id ="hr_recruitment_ext_form">
        <field name = "name"> hr.applicant</field>
        <field name = "model"> hr.applicant</field>
        <field name = "type">form</field>
        <field name = "inherit_id" ref ="hr_recruitment.crm_case_form_view_job"/>
        <field name = "arch" type ="xml">
            <notebook position="inside">
                      <page string="Relations">
                    <!--  <field name="relation_ids" colspan="4" nolabel="1"/>-->
             <field name = "doj"/>
                  <field name = "presentsal"/>
        </page>
           </notebook>

        </field>
    </record>
    </data>
</openerp>

hr_requrement_ext_view.xml

I thing every thing is done perfectly but it is not working please help for this problem. this error is occurred. except_orm: (u'ValidateError', u'The value " form" for the field "ir_ui_view.type" is not in the selection')

thanks and regards sridharan G Chennai

アバター
破棄

If you find that someone has helped you sincerely you should credit them by clicking the up arrow beside their answer. If you find that someone has provided you with a correct answer to your question you should alert all future readers that the answer is correct using the check mark beside their answer.

最善の回答

This line:

<field name = "type"> form</field>

Must be

<field name = "type">form</field>

The error is the space before the word form

And correct the view with this:

Python code:

class hr_applicant(osv.osv):
    _inherit = 'hr.applicant'
    _columns = {
        'doj':fields.date('Date of Birth'),
        'presentsal':fields.integer('Present Salary'),
    }
hr_applicant()

View Code

<?xml version="1.0"?>
<openerp>
    <data>
    <record model="ir.ui.view" id="hr_recruitment_ext_form">
        <field name="name">hr.applicant</field>
        <field name="model">hr.applicant</field>
        <field name="type">form</field>
        <field name="inherit_id" ref="hr_recruitment.crm_case_form_view_job"/>
        <field name="arch" type="xml">
            <field name="partner_id" position="before">
                   <field name="doj"/>
                   <field name="presentsal"/>
           </field>
        </field>
    </record>
    </data>
</openerp>
アバター
破棄
著作者

thanks for your answer after i solving the error i got this error.

You must correct it in your view file, too!

著作者

Now this error raise.... "except_orm: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!')"

著作者

Help me mr.Francesco Apruzzese i spend lot of time for this problem...

I've updated my answer with new python and xml code

著作者

ok tel me a positive answer... i'm waiting for your answer...

著作者

ok i will check and tell it is work or not...

著作者

same error... what can i do every thing i correct but it is not not working in openerp 7.

I've re-updated my answer. The xml code is the some but the python code is changed. Please, try it.

著作者

No sir it is not working... i will try another database....

One moment. Recorrect python code. Try now.

著作者

Fresh database it is installed but fields cant view, AttributeError: View definition error for inherited view 'hr_recruitment_ext.hr_recruitment_ext_form' on model 'hr.applicant': Element '<notebook>' not found in parent view 'hr_recruitment.crm_case_form_view_job'.]

Which version of openerp are you using?

著作者

OpenERP 7 sir,

The error is you are trying to insert a page in a notebook that not exist. If you see the original view you can see that in your view there isn't a notebook. I've updated my xml code in the answer...try it, please.

著作者

again this error will come after restarting the server this error will come "except_orm: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!')" Again i creating new data base means only this problem solve.

I've update xml and python again. Try now.

著作者

TypeError: The model "hr.recruitment" specifies an unexisting parent class "hr.recruitment" You may need to add a dependency on the parent class' module.

go in the _openerp_.py fiel and add hr_recruitment in the dependences

著作者

i already added not woking... { 'name': 'HR Recruitment Extensionssss', 'version': '1.1', 'category': 'Generic Modules', 'description': """ After Applicantis hired it will automatically fetch value from Applicants to Employee master """, 'author': 'Sridhar', 'depends': ['base','hr','hr_recruitment'], 'update_xml': ['hr_reqiurement_ext_view.xml'], 'installable': True, 'active': False, }

xml and python update again. Try now.

著作者

yes it is working perfectly thank you so much...

著作者

send me a face book id friend...

Oh, good news!!!! :D Now you can set this answer as correct to help future user and if you want you can give me a +1 clicking on up arrow.

I've not a facebook account, I'm sorry....:)

著作者

linked in id...

You can find it in my profile bio...;)

著作者

i'm new for OpenERP if i having doubt means i easyily contact you that why i asking sir... any have thank u so much...

The best way to solve the problem is to use this site so also other user ca found solution to their problem. P.S. Rember to set my answer as correct to close the answer and help future user search.

著作者

sir again i adding i two field means i facing same problem why this coming... reason???

著作者

sir, same code work on the Demo DB only other DB it is not working, error is same "except_orm: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!')" it is OpenERP 7 problem or my side problem... please help me sir, it is very confusion for me...

関連投稿 返信 ビュー 活動
1
3月 15
4723
2
3月 15
10378
6
9月 17
8135
1
4月 15
4637
1
3月 15
4402