Feat(MySQL): Database population with data for Kitchen project.

This commit is contained in:
2024-11-11 14:56:55 +00:00
parent db15a7f8fc
commit 88ccfe592a
26 changed files with 591 additions and 280 deletions

View File

@@ -492,6 +492,12 @@ class Model_View_Store(Model_View_Base):
# validation conducted by server
return DataStore_User().get_many_user_order(self.info_user['sub'], ids_order, n_order_max, id_checkout_session)
def get_many_plant(self, get_inactive = False):
plants = DataStore_Store_Base().get_many_plant(get_inactive)
return plants
def get_many_storage_location(self, get_inactive = False):
storage_locations = DataStore_Store_Base().get_many_storage_location(get_inactive)
return storage_locations
def get_many_currency(self):
currencies = DataStore_Store_Base().get_many_currency()
return currencies

View File

@@ -33,6 +33,8 @@ class Model_View_Store_Stock_Item(Model_View_Store):
filters_stock_item: Filters_Stock_Item
form_filters: Filters_Stock_Item = None
list_options_product: list = None
plants: list = None
storage_locations: list = None
units_measurement: list = None
units_measurement_time: list = None
variations: list = None
@@ -87,6 +89,8 @@ class Model_View_Store_Stock_Item(Model_View_Store):
self.units_measurement_time = [unit_measurement for unit_measurement in self.units_measurement if unit_measurement.is_unit_of_time]
self.currencies = self.get_many_currency()
self.currency_options = [currency.to_json_option() for currency in self.currencies]
self.plants = self.get_many_plant(False)
self.storage_locations = self.get_many_storage_location(False)
@classmethod
def save_stock_items(cls, comment, list_stock_items):