Commit c9d6fb42 by François

Add sigma and vpc data in 'title' of average sale column

parent dd73be81
dev_cooperatic #5673_bug_calendrier_echange_service 3832-makeups-and-member-status-update 4081 4444_improve_presence_recording 4709 4778-reception-dont-get-finished-orders 4809-remove-shelf-value-col-to-reduce-server-load 4880-rapports-reception-faux 4950-douchage-appli-reception 5474-et-5462-Voir-les-rattrapages-choisis-dans-admin-bdm-et-corrige-lenteur-affichage-admin-rattrapages 5641-reception-trier-a-la-maj-prix-dans-ordre-de-pointage-quantites 6286_bug_encaissement_souscription_cheque_espece 6813-marking-parent-gone-when-unpairing-binom-does-not-unsuscribe-parent-from-shift-template 6832--certaines-absences-engendrent-une-erreur 7723-7559-change-purchase-order-workflow-django-side 7731-third-party-side-brinks-pos-export-not-working 7747-inventaire-par-article 7800-make-test-solution-work 7848-cannot-validate-qty-with-decimal-on-kg-product adaptation_supercafoutch adaptation_supercoop adaptation_supercoop_supercafoutch adpatation_chouette assistance_import_article coop_dev_necessitant_modules_bdm_odoo_modifies correctif_nb_rattrapages_creation_binome_avec_ajout_automatique_au_point_negatif dev_lgds dev_principale dev_principale_clean docker export_capital_detenu fix_bug_process_picking fusion_custom_graoucoop graoucoop_backup graoucoop_prod graoucoop_tmp hot_fix_shelf_labels_auto_print howto impression_etiquettes_rayons integration_lien_precommandes_dans_espace_membre lacagette_prod local_branch master meal-voucher-and-label-printer-software-bug migration-v12 pour_graoucoop_prod pour_version_prod_cagette refonte_espace_membre_sc retouches_tickets_supercoop sc-setup-stock-app supercafoutch-preprod supercafoutch-prod-20221003 supercafoutch_prod ticket_4146 20210701 supercafoutch_20250120_151258 supercafoutch_20250120_150340 supercafoutch_20240909_080630 supercafoutch_20240609_115709 supercafoutch_20240212_082431 supercafoutch_20240107_181851 supercafoutch_prod_until_240107 supercafoutch-prod-20221003 supercafoutch-230911 supercafoutch-230824 supercafoutch-230823 supercafoutch-230823-the-true-one migration-v12-tag lacagette_20240310_074751 lacagette_20240107_122554 lacagette_20240107_120916 graoucoop_20240609_122614 cagette_testtag cagette-230814 cagette-230630
4 merge requests!40Add Howto page (to explain how to use 'Odoo user connect' feature),!37Aide a la commande : ajout info stats sur conso moyenne au survol,!106Dev principale,!45Intégration des Dev cooperatic (Aide à la commande, Réception avec cache couchDB, possibilité de valider une présence Comité)
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
width: 300px; width: 300px;
border-radius: 10px; border-radius: 10px;
} }
#products_table .help {cursor: help;}
#table_header_select_all{ #table_header_select_all{
display: flex; display: flex;
align-content: center; align-content: center;
......
...@@ -904,7 +904,8 @@ function prepare_datatable_data(product_ids = []) { ...@@ -904,7 +904,8 @@ function prepare_datatable_data(product_ids = []) {
qty_available: +parseFloat(product.qty_available).toFixed(3), qty_available: +parseFloat(product.qty_available).toFixed(3),
daily_conso: product.daily_conso, daily_conso: product.daily_conso,
purchase_ok: product.purchase_ok, purchase_ok: product.purchase_ok,
uom: product.uom_id[1] uom: product.uom_id[1],
stats: "Ecart type: " + product.sigma + ", % jours sans vente = " + (product.vpc) * 100
}; };
const computed_data = _compute_product_data(product); const computed_data = _compute_product_data(product);
...@@ -973,6 +974,9 @@ function prepare_datatable_columns() { ...@@ -973,6 +974,9 @@ function prepare_datatable_columns() {
{ {
data: "daily_conso", data: "daily_conso",
title: "Conso moy /jour", title: "Conso moy /jour",
render: function (data, type, full) {
return '<div class="help" title="' + full.stats+ '">' + data + '</div>';
},
className: "dt-body-center", className: "dt-body-center",
width: "6%" width: "6%"
} }
......
...@@ -511,7 +511,7 @@ class CagetteProducts(models.Model): ...@@ -511,7 +511,7 @@ class CagetteProducts(models.Model):
#'to': '2019-08-10', #'to': '2019-08-10',
} }
sales = CagetteProducts.get_template_products_sales_average(sales_average_params) sales = CagetteProducts.get_template_products_sales_average(sales_average_params)
if 'list' in sales and len(sales['list']) > 0: if 'list' in sales and len(sales['list']) > 0:
sales = sales['list'] sales = sales['list']
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment