模型res.config.settings中的异常

时间:2019-05-09 18:22:49

标签: python

我在模型“ res.config.settings”上创建了一个“布尔”类型的字段,但是问题是,当我检查该字段然后单击“保存”时,该值未注册,仍然为False 这是我的python代码

enter from odoo import models, fields, api
import logging
class EcotaxeConfig(models.TransientModel):
    _inherit = "res.config.settings"

    is_ecotaxe = fields.Boolean('Ecotaxe') code here

这是关联视图

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record model="ir.ui.view" id="account_tax_eco_form">
<field name="name">account_taxe_eco_form</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
<field name="arch" type="xml">
  <div id="eu_service" position="after">
    <div class="col-xs-12 col-md-6 o_setting_box" >
      <div class="o_setting_left_pane">
        <field name="is_ecotaxe"/>
      </div>
      <div class="o_setting_right_pane">
        <label for="is_ecotaxe"/>                                                                                                   
        <div class="text-muted">                                                                                                    
          if you want to add ecotaxes with other taxes                                                                              
        </div>
      </div>
    </div>
  </div>
</field>

   

0 个答案:

没有答案