mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 13:35:42 +00:00
feat: criado funcções de movimentação de estoque
This commit is contained in:
@@ -2,7 +2,6 @@ from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
from categories.models import Categories
|
||||
# from comandas.models import Comanda
|
||||
|
||||
|
||||
|
||||
@@ -47,14 +46,6 @@ class Product(models.Model):
|
||||
def __str__(self) -> str:
|
||||
return f"{self.name}"
|
||||
|
||||
def subStock(self, qtd):
|
||||
self.quantity -= qtd
|
||||
self.save()
|
||||
|
||||
def addStock(self, qtd):
|
||||
self.quantity += qtd
|
||||
self.save()
|
||||
|
||||
|
||||
|
||||
class ProductComponent(models.Model):
|
||||
|
||||
Reference in New Issue
Block a user