Add name_get() on ir.model
Show state on sale.order tree view
This commit is contained in:
@@ -3,3 +3,4 @@ from . import partner
|
|||||||
from . import company
|
from . import company
|
||||||
from . import mail
|
from . import mail
|
||||||
from . import misc
|
from . import misc
|
||||||
|
from . import ir_model
|
||||||
|
|||||||
16
base_usability/models/ir_model.py
Normal file
16
base_usability/models/ir_model.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# Copyright 2019 Akretion France (http://www.akretion.com/)
|
||||||
|
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import api, models
|
||||||
|
|
||||||
|
|
||||||
|
class IrModel(models.Model):
|
||||||
|
_inherit = 'ir.model'
|
||||||
|
|
||||||
|
@api.depends('name', 'model')
|
||||||
|
def name_get(self):
|
||||||
|
res = []
|
||||||
|
for rec in self:
|
||||||
|
res.append((rec.id, '%s (%s)' % (rec.name, rec.model)))
|
||||||
|
return res
|
||||||
@@ -48,6 +48,9 @@
|
|||||||
<field name="amount_total" position="before">
|
<field name="amount_total" position="before">
|
||||||
<field name="amount_untaxed" sum="Total Untaxed"/>
|
<field name="amount_untaxed" sum="Total Untaxed"/>
|
||||||
</field>
|
</field>
|
||||||
|
<field name="state" position="attributes">
|
||||||
|
<attribute name="invisible">0</attribute>
|
||||||
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user