mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[IMP] add the user that created the inventory revaluation, so that there's proper traceability
This commit is contained in:
committed by
Jordi Ballester Alomar
parent
f6893e2b29
commit
0b4592c06d
@@ -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,
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
Reference in New Issue
Block a user