Skip to Content
Menu
This question has been flagged
4 Replies
3583 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)?

Avatar
Discard
Best Answer

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

Avatar
Discard
Author

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

Best Answer

dear Ermin Trevisan ,

try add dependency:

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

I hope I helped you...

Avatar
Discard
Author

Hi Ayman

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