[IMP] add the user that created the inventory revaluation, so that there's proper traceability

This commit is contained in:
jbeficent
2016-09-13 12:03:20 +02:00
committed by Jordi Ballester Alomar
parent f6893e2b29
commit 0b4592c06d
2 changed files with 7 additions and 0 deletions

View File

@@ -98,6 +98,11 @@ class StockInventoryRevaluation(models.Model):
default=lambda self: fields.Date.context_today(self),
states={'draft': [('readonly', False)]})
user_id = fields.Many2one('res.users', 'Created by',
readonly=True,
states={'draft': [('readonly', False)]},
default=lambda self: self.env.user)
journal_id = fields.Many2one('account.journal', 'Journal',
default=_default_journal,
readonly=True,

View File

@@ -32,6 +32,7 @@
<group name="main">
<group name="basic">
<field name="document_date"/>
<field name="user_id"/>
<field name="revaluation_type"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
@@ -107,6 +108,7 @@
<field name="name"/>
<field name="revaluation_type"/>
<field name="document_date"/>
<field name="user_id"/>
<field name="product_template_id"/>
<field name="uom_id"/>
<field name="cost_method"/>