[IMP] stock, stock_account: Inventory Adjustment dates

- Change "Force Accounting Date" label in "Accounting Date" on
  inventory adjustments.
- 'accounting_date' only visible in debug mode
- Improvement tooltip of accounting_date,date

TASK-1819891
This commit is contained in:
Darshil Trivedi
2018-08-09 09:32:39 +02:00
committed by Pierre Masereel
parent 6448420c5d
commit 39db047514
3 changed files with 7 additions and 6 deletions
+2 -1
View File
@@ -29,7 +29,8 @@ class Inventory(models.Model):
'Inventory Date',
readonly=True, required=True,
default=fields.Datetime.now,
help="The date that will be used for the stock level check of the products and the validation of the stock move related to this inventory.")
help="If the inventory adjustment is not validated, date at which the theoritical quantities have been checked.\n"
"If the inventory adjustment is validated, date at which the inventory adjustment has been validated.")
line_ids = fields.One2many(
'stock.inventory.line', 'inventory_id', string='Inventories',
copy=True, readonly=False,
+4 -4
View File
@@ -15,10 +15,10 @@ class StockInventory(models.Model):
_inherit = "stock.inventory"
accounting_date = fields.Date(
'Force Accounting Date',
help="Choose the accounting date at which you want to value the stock "
"moves created by the inventory instead of the default one (the "
"inventory end date)")
'Accounting Date',
help="Date at which the accounting entries will be created"
" in case of automated inventory valuation."
" If empty, the inventoy date will be used.")
@api.multi
def post_inventory(self):
@@ -19,7 +19,7 @@
<field name="inherit_id" ref="stock.view_inventory_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='date']" position="after">
<field name="accounting_date" attrs="{'readonly':[('state','!=', 'draft')]}"/>
<field name="accounting_date" attrs="{'readonly':[('state','!=', 'draft')]}" groups="base.group_no_one"/>
</xpath>
</field>
</record>