Feat: Informe de Ventas Por Usuario
This commit is contained in:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user