Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ

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       

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
12
ก.ค. 17
6831
0
พ.ย. 24
689
0
ก.ย. 24
995
1
มี.ค. 24
905
0
มิ.ย. 23
1681