Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd

I'm trying to assign the Togo chart of accounts in Odoo to the creation of a new company in the database. The Togo chart of accounts is automatically activated but I can't. I don't know where the problem comes from after execution. tg code is assigned to chart_template but it does not work and there is no error


import loggingfrom odoo import api, modelsfrom odoo.addons.account.models.chart_template import template

_logger = logging.getLogger(__name__)

class ResCompany(models.Model):    _inherit = 'res.company'

    @api.model    def create(self, vals):        _logger.info("Creating a new company with values: %s", vals)        company = super(ResCompany, self).create(vals)        _logger.info("Company created with ID: %s and name %s", company.id,company.name)        company.chart_template='tg'        return company       

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
12
jul. 17
7109
1
mei 25
1741
0
nov. 24
1080
1
mrt. 24
1301
0
jun. 23
2153