[IMP] stock_landed_costs: order for landed cost model
before this commit, when creating new record in landed cost, the newly added record is coming in the last position in the tree view. after this commit, the records shown in the tree view will be sorted based on the desc order of recorded date in the landed cost. closes odoo/odoo#124101 Signed-off-by: William Henrotin (whe) <whe@odoo.com>
This commit is contained in:
@@ -21,6 +21,7 @@ class StockLandedCost(models.Model):
|
||||
_name = 'stock.landed.cost'
|
||||
_description = 'Stock Landed Cost'
|
||||
_inherit = ['mail.thread', 'mail.activity.mixin']
|
||||
_order = 'date desc, id desc'
|
||||
|
||||
def _default_account_journal_id(self):
|
||||
"""Take the journal configured in the company, else fallback on the stock journal."""
|
||||
|
||||
Reference in New Issue
Block a user