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