mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 13:05:42 +00:00
[FR] Add last updated column for supplier parts (#4214)
* Move to updated Meta mixin * [FR] Add last updated column for supplier parts Fixes #3327 * add updated to table * bump API version * add missing migration * incremetn api ;-)
This commit is contained in:
28
InvenTree/part/migrations/0093_auto_20230115_1404.py
Normal file
28
InvenTree/part/migrations/0093_auto_20230115_1404.py
Normal file
@ -0,0 +1,28 @@
|
||||
# Generated by Django 3.2.16 on 2023-01-15 14:04
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('part', '0092_part_last_stocktake'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='partinternalpricebreak',
|
||||
name='updated',
|
||||
field=models.DateTimeField(auto_now=True, help_text='Timestamp of last update', null=True, verbose_name='Updated'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='partsellpricebreak',
|
||||
name='updated',
|
||||
field=models.DateTimeField(auto_now=True, help_text='Timestamp of last update', null=True, verbose_name='Updated'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='partpricing',
|
||||
name='updated',
|
||||
field=models.DateTimeField(auto_now=True, help_text='Timestamp of last update', null=True, verbose_name='Updated'),
|
||||
),
|
||||
]
|
@ -2275,7 +2275,7 @@ def after_save_part(sender, instance: Part, created, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
class PartPricing(models.Model):
|
||||
class PartPricing(common.models.MetaMixin):
|
||||
"""Model for caching min/max pricing information for a particular Part
|
||||
|
||||
It is prohibitively expensive to calculate min/max pricing for a part "on the fly".
|
||||
@ -2785,12 +2785,6 @@ class PartPricing(models.Model):
|
||||
choices=common.settings.currency_code_mappings(),
|
||||
)
|
||||
|
||||
updated = models.DateTimeField(
|
||||
verbose_name=_('Updated'),
|
||||
help_text=_('Timestamp of last pricing update'),
|
||||
auto_now=True
|
||||
)
|
||||
|
||||
scheduled_for_update = models.BooleanField(
|
||||
default=False,
|
||||
)
|
||||
|
Reference in New Issue
Block a user