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

/res_config.py

class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'

​multi_jurnal_payment = fields.Boolean(string='Multi Jurnal Payment', config_parameter='fal_iseller.multi_jurnal_payment1')

/location_seler.py

class LocationIseller(models.Model):
​_name = 'location.seller'

​hidden = fields.Boolean(string='Hidden', default=False, compute='some_function')
​multi_journal_payment = fields.Boolean(string='Multi Jurnal Payment')

​def some_function(self):
​my_bool = self.env['ir.config_parameter'].sudo().get_param('fal_iseller.multi_jurnal_payment')
​self.hidden = my_bool


/location_seler.xml

id="location_iseller_tree" model="ir.ui.view">
name="name">location.seller.tree
name="model">location.seller
name="arch" type="xml">


name="hidden" invisible="1"/>
name="multi_journal_payment" attr="{'invisible': [('hidden', '=', False)]}"/>




อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
มิ.ย. 19
15716
1
มี.ค. 15
4610
0
ม.ค. 25
1243
0
เม.ย. 24
817
1
มี.ค. 24
1203