Odoo Help


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

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

I try to port the module pos_analytic_by_config from 8.0 to 9.0


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')


<?xml version="1.0" encoding="utf-8"?>
 <record id="view_pos_config_form" model="ir.ui.view">
 <field name="name">pos.config.form.view (pos_analytic_by_config)
 <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" />


{ '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': '', '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)?


Ivan Elizaryev

--Ivan Elizaryev--
| 4 3 7
Ufa, Russian Federation
--Ivan Elizaryev--

I tried odoo at the end of 2013. I fell in love in it and have been working with odoo as a freelancer for almost two years. In September 2015 I began operate as a Company and have 5 developers for now.

Ivan, March 2016.

Ivan Elizaryev
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
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

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 9/28/16, 5:33 AM
Seen: 864 times
Last updated: 10/13/16, 7:05 AM