Feat: Informe de Ventas Por Usuario

This commit is contained in:
2024-10-21 12:16:07 -05:00
parent f05acd6484
commit 535befbf4b
6 changed files with 149 additions and 3 deletions

View File

@@ -205,3 +205,17 @@ Sale Fast Food Pizzas Sell by Product::
>>> actual_report = {(r.product_pizza, r.quantity) for r in reports}
>>> assert expected_report == actual_report, f"\n Expect: {expected_report} \n Actual: {actual_report}"
Sale Fast Food Sales by User::
>>> User = Model.get('res.user')
>>> user = User(config.user)
>>> ReportSalesByUser = Model.get('sale_fast_food.reporting.by_user')
>>> reports = ReportSalesByUser.find([])
>>> expected_report = {
... (user, 1)
... }
>>> actual_report = {(r.user, r.completed_sales) for r in reports}
>>> assert expected_report == actual_report, f"\n Expect: {expected_report} \n Actual: {actual_report}"