Skip to Content
Menu
This question has been flagged
1 Reply
2832 Views

Tell Team, 

Someone kindly help with what could be the issue here: . 

Model

class Company(models.Model):
"""Add fields to inherited odoo based model class: res.company."""

_inherit = 'res.company'

account = [('user_type_id', '=', 14)]
journal = [('type', '=', 'sale')]
 tithe_journal = fields.Many2one(
'account.journal', string="Journal", domain=journal)
tithe_journal = fields.Many2one(
'account.journal', string="Tithe Journal", domain=journal)
tithe_account = fields.Many2one(
'account.account', string="Tithe Account", domain=account)
donation_journal = fields.Many2one(
'account.journal', string="Journal", domain=journal)
donation_account = fields.Many2one(
'account.account', string="Account", domain=account)

View

<field name="arch" type="xml">
<xpath expr="//field[@name='partner_id']" position="replace">
<field name="partner_id" readonly="1" required="0" groups="base.group_no_one" invisible="1"/>
</xpath>
<xpath expr="//notebook" position="inside">
<!-- <page string="Pastor Information" name="pastor">-->
<!-- <field name="pastor_id" readonly="1"/>-->
<!-- </page>-->
<page string="Accounting">
<group>
<group string="Tithes">
  <field name="tithe_journal"/>
<field name="tithe_account"/>
</group>
<group string="Donations">
<field name="donation_journal"/>
<field name="donation_account"/>
</group>
<group string="Offerings">
<field name="offering_journal"/>
<field name="offering_account"/>
</group>
<group string="Pledges">
<field name="pledge_journal"/>
<field name="pledge_account"/>
</group>
<group string="Transit Account">
<field name="transit_account"/>
</group>
<group string="Social Media" name="social_media" groups="base.group_no_one">
<field name="social_github" invisible="1"/>
<field name="social_linkedin" invisible="1"/>
</group>
</group>
</page>
</xpath>
</field>

Error:

File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_ui_view.py", line 394, in _check_xml
    raise ValidationError("%s\n\n%s" % (_("Error while validating view"), tools.ustr(e)))
odoo.tools.convert.ParseError: "Error while validating view

Field `tithe_account` does not exist

Error context:
View `inherited res.comapany form view`
[view_id: 2027, xml_id: n/a, model: res.company, parent_id: 109]
None" while parsing file:/c:/program files (x86)/odoo 13.0/server/odoo/addons/pf_church/views/inherited/res_company_view.xml:2, near
<odoo>
    <data>

Avatar
Discard
Best Answer

Hi,

Did you restarted the service after adding the new field and before trying to upgrade the module ? If not restart the service and upgrade/install the module.


Also you can try to upgrade/install the module from the command line/terminal, to upgrade the module from terminal: odoo-bin -u module_name  -d database_name -c conf_file


How To Upgrade Module From Terminal in Odoo


Thanks

Avatar
Discard
Related Posts Replies Views Activity
0
Sep 24
184
0
Dec 23
439
0
Dec 21
1280
0
Jun 21
2014
2
Aug 20
3025