mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-19 09:53:38 -06:00
[FIX] PEP8 compliance and use company_default_get
This commit is contained in:
parent
0727881da0
commit
fce5f2aa47
@ -19,6 +19,6 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import document_page_multi_company
|
||||
from . import document_page_multi_company
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
@ -18,6 +18,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp.osv import fields, orm
|
||||
|
||||
|
||||
@ -28,7 +29,8 @@ class document_page_history(orm.Model):
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'company_id': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
|
||||
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')
|
||||
._company_default_get(cr, uid, 'document_page_history', context=c)
|
||||
}
|
||||
|
||||
|
||||
@ -39,7 +41,8 @@ class document_page(orm.Model):
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'company_id': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
|
||||
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')
|
||||
._company_default_get(cr, uid, 'document_page', context=c)
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
Loading…
Reference in New Issue
Block a user