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

Porting module from 8.0 to 9.0: Field `account_analytic_id` does not exist

By
Ermin Trevisan
on 9/28/16, 5:33 AM 204 views

I try to port the module pos_analytic_by_config from 8.0 to 9.0

Model:

from openerp import models, fields

class PosConfig(models.Model):

    _inherit = 'pos.config'

    account_analytic_id = fields.Many2one( comodel_name='account.analytic.account', string='Analytic Account')

View:

<?xml version="1.0" encoding="utf-8"?>
<openerp>
 <data>
 <record id="view_pos_config_form" model="ir.ui.view">
 <field name="name">pos.config.form.view (pos_analytic_by_config)
</field>
 <field name="model">pos.config</field>
 <field name="inherit_id" ref="point_of_sale.view_pos_config_form"/>
 <field name="arch" type="xml">
 <xpath expr="//field[@name='journal_id']" position="after">
 <field name="account_analytic_id" />
 </xpath>
 </field>
 </record>
 </data>
</openerp>


__openerp__.py:

{ 'name': "POS Analytic Config",

    'summary': """Use analytic account defined on POS configuration for POS orders""", 'author': 'ACSONE SA/NV,' 'Odoo Community Association (OCA)', 'website': "http://acsone.eu", 'category': 'Point Of Sale, Accounting', 'version': '9.0.1.0.0', 'license': 'AGPL-3', 'depends': [ 'point_of_sale', ],

    'data': [ 'views/pos_config_view.xml', ],}

Has this to do with the new API (sorry, but I'm not a developer)?

0
Ivan Yelizariev
On 10/13/16, 7:05 AM

You probably made another changes? E.g. in __init__.py ?

Sorry for my late reply, but I was abroad. No, I did not make any other changes.

Ermin Trevisan
on 10/14/16, 4:00 AM
0
ayman mohammed adam
On 9/28/16, 7:31 AM

dear Ermin Trevisan ,

try add dependency:

analytic ],'depends': [ 'point_of_sale','analytic' ],

I hope I helped you...

Hi Ayman

Thank you very much, but it did not help, I still have the same error.

Ermin Trevisan
on 9/28/16, 7:59 AM
Ermin Trevisan
on 9/28/16, 8:10 AM

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: 9/28/16, 5:33 AM
Seen: 204 times
Last updated: 10/13/16, 7:05 AM