Merge pull request #102 from Dur-Pro/15.0

Merge changes from Durpro into bemade-addons base
This commit is contained in:
Marc Durepos 2024-02-27 11:58:41 -05:00 committed by GitHub
commit 9f654bc107
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 472 additions and 257 deletions

View file

@ -20,7 +20,7 @@
########################################################################################
{
'name': 'Improved Field Service Management',
'version': '15.0.1.0.7',
'version': '15.0.1.0.13',
'summary': 'Adds functionality necessary for managing field service operations at Durpro.',
'description': 'Adds functionality necessary for managing field service operations at Durpro.',
'category': 'Services/Field Service',
@ -56,11 +56,6 @@
'wizard/new_task_from_template.xml',
],
'assets': {
'web.assets_tests': [
'bemade_fsm/static/tests/tours/task_template_tour.js',
'bemade_fsm/static/tests/tours/equipment_tour.js',
'bemade_fsm/static/tests/tours/sale_order_tour.js',
],
'web.report_assets_common': [
'bemade_fsm/static/src/scss/bemade_fsm.scss'
],

View file

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-02 20:26+0000\n"
"PO-Revision-Date: 2023-10-02 20:26+0000\n"
"POT-Creation-Date: 2024-02-13 17:09+0000\n"
"PO-Revision-Date: 2024-02-13 17:09+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -16,7 +16,7 @@ msgstr ""
"Plural-Forms: \n"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table_with_pricing_and_labour
msgid ""
"<span groups=\"account.group_show_line_subtotals_tax_excluded\">\n"
" Amount</span>\n"
@ -24,9 +24,9 @@ msgid ""
" Total Price</span>"
msgstr ""
"<span groups=\"account.group_show_line_subtotals_tax_excluded\">\n"
" Prix</span>\n"
" Montant</span>\n"
" <span groups=\"account.group_show_line_subtotals_tax_included\">\n"
" Prix</span>"
" Prix Total</span>"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_signature_block
@ -40,12 +40,12 @@ msgstr ""
" </span>"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table_with_pricing_and_labour
msgid "<span>Disc.%</span>"
msgstr "<span>Escompte %</span>"
msgstr "<span>% Escompte</span>"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table_with_pricing_and_labour
msgid ""
"<strong class=\"mr16\">Section\n"
" Subtotal</strong>"
@ -54,19 +54,19 @@ msgstr ""
" Sous-total</strong>"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table_with_pricing_and_labour
msgid "<strong>Taxes</strong>"
msgstr ""
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table_with_pricing_and_labour
msgid "<strong>Total</strong>"
msgstr ""
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table_with_pricing_and_labour
msgid "<strong>Untaxed amount</strong>"
msgstr "<strong>Montant hors taxes</strong>"
msgstr "<strong>Montant hors-taxes</strong>"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment__message_needaction
@ -78,20 +78,15 @@ msgstr "Action requise"
msgid "Activities"
msgstr "Activités"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment__activity_exception_decoration
msgid "Activity Exception Decoration"
msgstr ""
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment__activity_state
msgid "Activity State"
msgstr ""
msgstr "État de l'activité"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment__activity_type_icon
msgid "Activity Type Icon"
msgstr ""
msgstr "Icône du type d'activité"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment__tag_ids
@ -119,14 +114,12 @@ msgstr "Bloqué"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task__allow_billable
msgid "Can be billed"
msgstr ""
msgstr "Peut être facturé"
#. module: bemade_fsm
#: model:ir.model.fields,help:bemade_fsm.field_res_partner__is_site_contact
#: model:ir.model.fields,help:bemade_fsm.field_res_users__is_site_contact
msgid ""
"Check if the contact is a site contact, otherwise it is a not in that list"
msgstr ""
#: model_terms:ir.ui.view,arch_db:bemade_fsm.project_task_from_template_wizard_view_form
msgid "Cancel"
msgstr "Annuler"
#. module: bemade_fsm
#: model:ir.model.fields,help:bemade_fsm.field_bemade_fsm_equipment__tag_ids
@ -178,11 +171,37 @@ msgstr ""
msgid "Contacts and Equipment"
msgstr "Contacts et équipements"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.project_task_from_template_wizard_view_form
msgid "Create Task"
msgstr "Créer une tâche"
#. module: bemade_fsm
#. openerp-web
#: code:addons/bemade_fsm/static/src/xml/project_view_buttons.xml:0
#: code:addons/bemade_fsm/static/src/xml/project_view_buttons.xml:0
#, python-format
msgid "Create Task from Template"
msgstr "Créer une tâche à partir d'un gabarit"
#. module: bemade_fsm
#: model:ir.model,name:bemade_fsm.model_project_task_from_template_wizard
msgid "Create Task from Template Wizard"
msgstr "Assistant pour création de tâche à partir d'un gabarit"
#. module: bemade_fsm
#. openerp-web
#: code:addons/bemade_fsm/static/src/xml/project_view_buttons.xml:0
#, python-format
msgid "Create from Template"
msgstr "Créer à partir d'un gabarit"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment__create_uid
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment_tag__create_uid
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment_type__create_uid
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_visit__create_uid
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task_from_template_wizard__create_uid
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task_template__create_uid
msgid "Created by"
msgstr "Créé par"
@ -192,6 +211,7 @@ msgstr "Créé par"
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment_tag__create_date
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment_type__create_date
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_visit__create_date
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task_from_template_wizard__create_date
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task_template__create_date
msgid "Created on"
msgstr "Date de création"
@ -206,6 +226,11 @@ msgstr "Client"
msgid "Customer:"
msgstr "Client :"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_timesheet_entries
msgid "Date"
msgstr ""
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task_template__assignees
msgid "Default Assignees"
@ -247,7 +272,8 @@ msgid "Default tags for tasks created from this template."
msgstr "Étiquettes par défaut pour tâches créées à partir de ce gabarit."
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_materials_table
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table_with_pricing_and_labour
msgid "Delivered"
msgstr "Livré"
@ -255,7 +281,8 @@ msgstr "Livré"
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment__description
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task_template__description
#: model_terms:ir.ui.view,arch_db:bemade_fsm.task_template_form_view
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_materials_table
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table_with_pricing_and_labour
msgid "Description"
msgstr ""
@ -274,6 +301,7 @@ msgstr "Détails"
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment_tag__display_name
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment_type__display_name
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_visit__display_name
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task_from_template_wizard__display_name
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task_template__display_name
msgid "Display Name"
msgstr "Nom pour affichage"
@ -286,7 +314,7 @@ msgstr "Employés assignés aux tâches créées à partir de ce gabarit."
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task__planned_date_end
msgid "End Date"
msgstr ""
msgstr "Date de fin"
#. module: bemade_fsm
#: model:ir.actions.act_window,name:bemade_fsm.action_window_equipment
@ -302,8 +330,9 @@ msgstr "Équipement désservi"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_res_partner__equipment_count
#: model:ir.model.fields,field_description:bemade_fsm.field_res_users__equipment_count
msgid "Equipment Count"
msgstr ""
msgstr "Nombre d'équipemenets"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment__complete_name
@ -313,7 +342,7 @@ msgstr "Nom d'équipement"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_equipment_summary
msgid "Equipment Serviced"
msgstr "Équipement désservi"
msgstr "Équipement(s) désservi"
#. module: bemade_fsm
#: model:ir.actions.act_window,name:bemade_fsm.action_window_equipment_tags
@ -349,11 +378,6 @@ msgstr "Durée estimée"
msgid "Exception"
msgstr ""
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment__failed_message_ids
msgid "Failed Messages"
msgstr "Messages échoués"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.bemade_fsm_project_task_form_inherit
#: model_terms:ir.ui.view,arch_db:bemade_fsm.partner_equipment_location_view_form
@ -389,7 +413,7 @@ msgstr "Abonnés (partenaires)"
#. module: bemade_fsm
#: model:ir.model.fields,help:bemade_fsm.field_bemade_fsm_equipment__activity_type_icon
msgid "Font awesome icon e.g. fa-tasks"
msgstr ""
msgstr "Icône Font Awesome p.ex. fa-tasks"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_sale_order_line__is_fully_delivered
@ -416,9 +440,10 @@ msgstr "A un message"
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment_tag__id
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment_type__id
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_visit__id
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task_from_template_wizard__id
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task_template__id
msgid "ID"
msgstr ""
msgstr "Identifiant"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment__activity_exception_icon
@ -456,6 +481,8 @@ msgid ""
"Indicates whether a line or all the lines in a section have been entirely "
"delivered and invoiced."
msgstr ""
"Indique si une ligne ou toutes les lignes dans une section ont été "
"entièrement livrées et facturées."
#. module: bemade_fsm
#: model:ir.model.fields,help:bemade_fsm.field_bemade_fsm_visit__is_completed
@ -487,6 +514,12 @@ msgstr ""
msgid "Invoiced"
msgstr "Facturé"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_sale_order__is_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_sale_order_line__is_fsm
msgid "Is FSM"
msgstr "Est FSM"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_sale_order_line__is_field_service
msgid "Is Field Service"
@ -501,7 +534,7 @@ msgstr "Est un abonné"
#: model:ir.model.fields,field_description:bemade_fsm.field_res_partner__is_site_contact
#: model:ir.model.fields,field_description:bemade_fsm.field_res_users__is_site_contact
msgid "Is a site contact"
msgstr ""
msgstr "Est un contact sur site"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_visit__label
@ -513,6 +546,7 @@ msgstr "Nom"
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment_tag____last_update
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment_type____last_update
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_visit____last_update
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task_from_template_wizard____last_update
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task_template____last_update
msgid "Last Modified on"
msgstr "Dernière modification"
@ -522,6 +556,7 @@ msgstr "Dernière modification"
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment_tag__write_uid
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment_type__write_uid
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_visit__write_uid
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task_from_template_wizard__write_uid
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task_template__write_uid
msgid "Last Updated by"
msgstr "Modifié par"
@ -531,6 +566,7 @@ msgstr "Modifié par"
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment_tag__write_date
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment_type__write_date
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_visit__write_date
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task_from_template_wizard__write_date
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task_template__write_date
msgid "Last Updated on"
msgstr "Dernière mise à jour"
@ -550,6 +586,11 @@ msgstr "Pièce jointe principale"
msgid "Mark as Delivered"
msgstr "Marquer comme livré"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_materials_table
msgid "Materials"
msgstr "Matériaux"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment__message_has_error
msgid "Message Delivery error"
@ -560,6 +601,15 @@ msgstr "Erreur de livraison de message"
msgid "Messages"
msgstr ""
#. module: bemade_fsm
#: code:addons/bemade_fsm/models/task.py:0
#, python-format
msgid ""
"Modifying the planned start or end time on a task is not permitted when that"
" task already has planning records associated to it. Please modify or delete"
" the planning records instead."
msgstr ""
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment__my_activity_date_deadline
msgid "My Activity Deadline"
@ -573,9 +623,14 @@ msgid "Name"
msgstr "Nom"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment__activity_calendar_event_id
msgid "Next Activity Calendar Event"
msgstr "Évènement au calendrier de la prochaine activité"
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task_from_template_wizard__new_task_title
msgid "New Task Title"
msgstr "Nouveau titre de tâche"
#. module: bemade_fsm
#: model:ir.actions.act_window,name:bemade_fsm.action_new_task_from_template
msgid "New Task from Template"
msgstr "Nouvelle tâche à partir d'un gabarit"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_equipment__activity_date_deadline
@ -618,7 +673,8 @@ msgid "Number of unread messages"
msgstr "Nombre de messages non-lus"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_materials_table
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table_with_pricing_and_labour
msgid "Ordered"
msgstr "Commandé"
@ -636,6 +692,7 @@ msgid "P&ID Tag"
msgstr "Tag P&ID"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.project_task_view_search_fsm_inherit
#: model_terms:ir.ui.view,arch_db:bemade_fsm.task_template_search_view
msgid "Parent Task"
msgstr "Tâche parent"
@ -661,10 +718,25 @@ msgstr "Notes sur l'emplacement physique"
msgid "Plan as field service"
msgstr "Planifier comme service terrain"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_info_block
msgid "Planned end:"
msgstr "Fin planifiée :"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_info_block
msgid "Purchase Order:"
msgstr "Commande :"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_info_block
msgid "Planned start:"
msgstr "Début planifié :"
#. module: bemade_fsm
#: model:ir.model,name:bemade_fsm.model_product_template
msgid "Product Template"
msgstr "Modèle de produit"
msgstr "Modèle d'article"
#. module: bemade_fsm
#: model:ir.model.fields,help:bemade_fsm.field_product_product__is_field_service
@ -677,10 +749,21 @@ msgstr ""
" considéré lors de la planification."
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task_from_template_wizard__project_id
#: model_terms:ir.ui.view,arch_db:bemade_fsm.task_template_search_view
msgid "Project"
msgstr "Projet"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task__propagate_assignment
msgid "Propagate Assignment"
msgstr "Propager l'assignation"
#. module: bemade_fsm
#: model:ir.model.fields,help:bemade_fsm.field_project_task__propagate_assignment
msgid "Propagate assignment of this task to all subtasks."
msgstr "Propager l'assignation de cette tâche à toutes les sous-tâches."
#. module: bemade_fsm
#: model:project.task.type,legend_done:bemade_fsm.planning_project_stage_exception
#: model:project.task.type,legend_done:bemade_fsm.planning_project_stage_waiting_parts
@ -717,12 +800,17 @@ msgstr "Section de commande de vente"
#: model:ir.model,name:bemade_fsm.model_sale_order
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_visit__sale_order_id
msgid "Sales Order"
msgstr "Commande de ventes"
msgstr "Bon de commande"
#. module: bemade_fsm
#: model:ir.model,name:bemade_fsm.model_sale_order_line
msgid "Sales Order Line"
msgstr "Ligne de commandes de vente"
msgstr "Ligne de bons de commande"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_sale_order_line__section_line_ids
msgid "Section Line"
msgstr "Section"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task_template__sequence
@ -730,7 +818,9 @@ msgid "Sequence"
msgstr "Séquence"
#. module: bemade_fsm
#: code:addons/bemade_fsm/models/sale_order.py:0
#: model:ir.model.fields,field_description:bemade_fsm.field_bemade_fsm_visit__task_id
#, python-format
msgid "Service Visit"
msgstr "Visite de service"
@ -759,13 +849,14 @@ msgstr "Contacts sur site :"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_res_partner__equipment_ids
#: model:ir.model.fields,field_description:bemade_fsm.field_res_users__equipment_ids
msgid "Site Equipment"
msgstr ""
msgstr "Équipement sur site"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task__planned_date_begin
msgid "Start Date"
msgstr ""
msgstr "Date de début"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_tasks_table
@ -816,6 +907,7 @@ msgstr "Tâche"
#: model:ir.actions.act_window,name:bemade_fsm.task_template_act_window
#: model:ir.model.fields,field_description:bemade_fsm.field_product_product__task_template_id
#: model:ir.model.fields,field_description:bemade_fsm.field_product_template__task_template_id
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task_from_template_wizard__task_template_id
#: model_terms:ir.ui.view,arch_db:bemade_fsm.task_template_form_view
#: model_terms:ir.ui.view,arch_db:bemade_fsm.task_template_search_view
#: model_terms:ir.ui.view,arch_db:bemade_fsm.task_template_tree_view
@ -835,14 +927,10 @@ msgstr "Nom de tâche"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_tasks_table
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_timesheet_entries
msgid "Technician"
msgstr "Technicien·ne"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_info_block
msgid "Technicians:"
msgstr "Technicien·ne·s:"
#. module: bemade_fsm
#: model:ir.model,name:bemade_fsm.model_project_task_template
msgid "Template for new project tasks"
@ -855,6 +943,11 @@ msgstr ""
"L'équipement à désservir par défaut pour les nouveaux articles de commande "
"de ventes."
#. module: bemade_fsm
#: model:ir.model.fields,help:bemade_fsm.field_project_task_from_template_wizard__project_id
msgid "The project the new task should be created in."
msgstr ""
#. module: bemade_fsm
#: model:ir.model.fields,help:bemade_fsm.field_bemade_fsm_visit__so_section_id
msgid ""
@ -864,6 +957,20 @@ msgstr ""
"La section sur la commande de vente représentant la main d'oeuvre et les "
"pièces pour cette visite"
#. module: bemade_fsm
#: model:ir.model.fields,help:bemade_fsm.field_project_task_from_template_wizard__task_template_id
msgid "The template to use when creating the new task."
msgstr "Le gabarit à utiliser en créant la nouvelle tâche."
#. module: bemade_fsm
#: model:ir.model.fields,help:bemade_fsm.field_project_task_from_template_wizard__new_task_title
msgid ""
"The title (name) for the newly created task. If left blank, the name of the "
"template will be used."
msgstr ""
"Le titre (nom) de la nouvelle tâche. Si laissé vide, le nom du gabarit sera "
"utilisé."
#. module: bemade_fsm
#: model_terms:ir.actions.act_window,help:bemade_fsm.task_template_act_window
msgid "There are no task templates, click above to create one."
@ -871,7 +978,22 @@ msgstr ""
"Il n'existe aucun gabarit de tâche, cliquez ci-dessus pour en créer une."
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table
#: code:addons/bemade_fsm/models/sale_order_line.py:0
#, python-format
msgid ""
"This task has been created from: <a href=# data-oe-model=sale.order data-oe-"
"id=%d>%s</a> (%s)"
msgstr ""
"Cette tâche a été créée à partir de : <a href=# data-oe-model=sale.order data-oe-"
"id=%d>%s</a> (%s)"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_timesheet_entries
msgid "Time"
msgstr "Temps"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table_with_pricing_and_labour
msgid "Time &amp; Material"
msgstr "Temps &amp; matériaux"
@ -886,7 +1008,7 @@ msgid "Type of the exception activity on record."
msgstr "Type d'activité d'exception sur l'enregistrement."
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_sale_order_table_with_pricing_and_labour
msgid "Unit Price"
msgstr "Prix unitaire"
@ -906,13 +1028,19 @@ msgid "View Task"
msgstr "Voir tâche"
#. module: bemade_fsm
#: code:addons/bemade_fsm/models/sale_order_line.py:0
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task__visit_id
#: model:ir.model.fields,field_description:bemade_fsm.field_sale_order__visit_ids
#: model:ir.model.fields,field_description:bemade_fsm.field_sale_order_line__visit_id
#: model:ir.model.fields,field_description:bemade_fsm.field_sale_order_line__visit_ids
#, python-format
msgid "Visit"
msgstr "Visite"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_sale_order_line__visit_ids
msgid "Visits"
msgstr "Visites"
#. module: bemade_fsm
#: model:project.task.type,name:bemade_fsm.planning_project_stage_waiting_parts
msgid "Waiting on Parts"
@ -928,24 +1056,23 @@ msgstr "Messages du site web"
msgid "Website communication history"
msgstr "Historique de communication du site web"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_timesheet_entries
msgid "Work Completed"
msgstr "Travaux complétés"
#. module: bemade_fsm
#: model:project.task.type,name:bemade_fsm.planning_project_stage_work_completed
msgid "Work Executed"
msgstr "Travaux exécutés"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_info_block
msgid "Work Order"
msgstr "Bon de travail"
#. module: bemade_fsm
#: model_terms:ir.ui.view,arch_db:bemade_fsm.workorder_page_info_block
msgid ""
"Work Order\n"
" Contacts:"
msgstr ""
"Bon de travail\n"
" Contacts :"
"Contacts recevant le bon de travail :"
#. module: bemade_fsm
#: model:ir.model.fields,field_description:bemade_fsm.field_project_task__work_order_contacts

View file

@ -72,4 +72,5 @@ class Equipment(models.Model):
def _compute_complete_name(self):
for rec in self:
tag_part = "[%s] " % rec.pid_tag if rec.pid_tag else ""
rec.complete_name = tag_part + rec.name
name = rec.name or ""
rec.complete_name = tag_part + name

View file

@ -94,7 +94,7 @@ class Task(models.Model):
pattern = re.compile(r"\d+$")
matches = map(lambda n: pattern.search(n), prev_seqs)
seq += max(map(lambda n: int(n.group(1)) if n else 0), matches)
rec.work_order_number = rec.sale_order_id.name.replace('SO', 'WO', 1) \
rec.work_order_number = rec.sale_order_id.name.replace('SO', 'SVR', 1) \
+ f"-{seq}"
return res

View file

@ -1,7 +1,61 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<template id="workorder_page_sale_order_table">
<template id="workorder_page_materials_table">
<t t-set="order_lines"
t-value="doc.relevant_order_lines.filtered(lambda l:
l.product_id.type != 'service' and not l.is_downpayment and not l.visit_id)"/>
<t t-if="order_lines">
<t t-set="visit_lines" t-value="order_lines.mapped('visit_id')"/>
<t t-set="section_lines"
t-value="order_lines.filtered(lambda l: l.display_type == 'line_section')"/>
</t>
<div t-if="order_lines.filtered(lambda l: not l.display_type)" style="page-break-inside: avoid;">
<h2 t-if="order_lines">Materials</h2>
<div t-if="order_lines" class="table-responsive-sm">
<table class="table table-sm o_main_table">
<thead>
<tr>
<th class="text-left">Description</th>
<th class="text-right">Ordered</th>
<th class="text-right">Delivered</th>
</tr>
</thead>
<tbody class="sale_tbody">
<t t-foreach="order_lines" t-as="line">
<t t-set="is_task" t-value="line == doc.sale_line_id"/>
<tr t-att-class="'bg-200 font-weight-bold o_line_section' if line.display_type == 'line_section' else 'font-italic o_line_note' if line.display_type == 'line_note' else ''">
<t t-if="not line.display_type">
<td><span t-field="line.name"/></td>
<td class="text-right">
<span t-field="line.product_uom_qty"/>
<span t-field="line.product_uom"
groups="uom.group_uom"/>
</td>
<td class="text-right">
<span t-field="line.qty_delivered"/>
<span t-field="line.product_uom"
groups="uom.group_uom"/>
</td>
</t>
<t t-if="line.display_type == 'line_section'">
<td colspan="99">
<span t-field="line.name"/>
</td>
</t>
<t t-if="line.display_type == 'line_note'">
<td colspan="99">
<span t-field="line.name"/>
</td>
</t>
</tr>
</t>
</tbody>
</table>
</div>
</div>
</template>
<template id="workorder_page_sale_order_table_with_pricing_and_labour">
<t t-set="order_lines" t-value="doc.relevant_order_lines"/>
<t t-if="order_lines">
<t t-set="visit_lines" t-value="order_lines.mapped('visit_id')"/>
@ -164,7 +218,6 @@
</template>
<template id="workorder_page_tasks_table">
<t t-set="interventions" t-value="doc.child_ids"/>
<t t-set="timesheets" t-value="doc.timesheet_ids"/>
<t t-foreach="interventions" t-as="intervention">
<div style="page-break-inside: avoid;">
<h2 t-out="str(intervention_index + 1) + '. ' + intervention.name"/>
@ -182,9 +235,8 @@
<thead>
<tr>
<th width="7%">Status</th>
<th width="30%">Task</th>
<th width="18%">Technician</th>
<th width="45%">Comments</th>
<th width="39%">Task</th>
<th width="54%">Comments</th>
</tr>
</thead>
<tbody>
@ -194,11 +246,6 @@
<td>
<span t-out="task.name"/>
</td>
<td>
<t t-foreach="task.user_ids" t-as="user">
<span t-out="user.name + (', ' if not user_last else '')"/>
</t>
</td>
<td t-out="task.description or ''"/>
</tr>
<tr class="mt-0 pt-0">
@ -207,7 +254,6 @@
<t t-call="bemade_fsm.subtask_list"/>
</td>
<td/>
<td/>
</tr>
</t>
</tbody>
@ -218,20 +264,16 @@
</template>
<template id="workorder_page_info_block">
<h1>Work Order <span t-out="doc.work_order_number"></span></h1>
<div class="row">
<div t-attf-class="{{'col-6' if report_type == 'pdf' else 'col-md-6 col-12'}}">
<div t-if="doc.user_ids"><h6>Technicians: </h6></div>
<t t-foreach="doc.user_ids" t-as="user">
<div class="mb-3">
<div t-esc="user" t-options='{
"widget": "contact",
"fields": ["name", "email"]
}'/>
</div>
</t>
</div>
<h1>
<span name="work_order_number" t-out="doc.name"/>
</h1>
<h4 t-if="doc.sale_order_id and doc.sale_order_id.client_order_ref">
Purchase Order: <span
name="po_number"
t-out="doc.sale_order_id.client_order_ref"/>
</h4>
<hr/>
<div class="row" name="address_and_time">
<div t-attf-class="{{('col-6' if report_type == 'pdf' else 'col-md-6 col-12') + ' mb-3'}}">
<t t-if="doc.partner_id">
<div><h6>Customer: </h6></div>
@ -241,8 +283,19 @@
}'/>
</t>
</div>
<div t-attf-class="{{('col-6' if report_type == 'pdf' else 'col-md-6 col-12') + ' mb-3'}}"
t-if="doc.planned_date_begin or doc.planned_date_end">
<div t-if="doc.planned_date_begin"><h6>Planned start: </h6></div>
<div class="mb-3">
<div t-out="doc.planned_date_begin.strftime('%Y-%m-%d %H:%M')"/>
</div>
<div t-if="doc.planned_date_end"><h6>Planned end: </h6></div>
<div class="mb-3">
<div t-out="doc.planned_date_end.strftime('%Y-%m-%d %H:%M')"/>
</div>
</div>
</div>
<div class="row">
<div class="row" name="site_and_work_order_contacts">
<div t-attf-class="{{'col-6' if report_type == 'pdf' else 'col-md-6 col-12'}}">
<div t-if="doc.site_contacts"><h6>Site Contacts: </h6></div>
<t t-foreach="doc.site_contacts" t-as="contact">
@ -267,13 +320,20 @@
</t>
</div>
</div>
<hr/>
<div t-if="not is_html_empty(doc.description)" class="row" name="visit_description">
<div class="col-12">
<span t-out="doc.description" />
</div>
</div>
<hr t-if="not is_html_empty(doc.description)"/>
</template>
<template id="workorder_equipment_summary">
<div t-if="doc.equipment_ids and len(doc.child_ids) > 1"
style="page-break-inside: avoid;">
<h3>Equipment Serviced</h3>
<div class="table-responsive-sm">
<table class="table table-sm o_main_table">
<table class="table table-sm o_main_table overflow-hidden">
<thead>
<tr>
<th>Tag</th>
@ -305,6 +365,47 @@
</div>
</div>
</template>
<template id="workorder_page_timesheet_entries">
<t t-set="timesheets" t-value="doc.timesheet_ids"/>
<div t-if="timesheets" style="page-break-inside: avoid;">
<h1>Time</h1>
<div class="table-responsive-sm">
<table class="table table-sm o_main_table">
<thead>
<tr>
<th width="14%">Date</th>
<th width="30%">Technician</th>
<th width="49%">Work Completed</th>
<th width="7%" class="text-right">Time</th>
</tr>
</thead>
<tbody>
<tr t-foreach="timesheets" t-as="timesheet" class="p-1 m-1">
<td>
<span t-out="timesheet.date.strftime('%Y-%m-%d')"/>
</td>
<td>
<span t-field="timesheet.employee_id.name"/>
</td>
<td>
<span t-field="timesheet.name"/>
</td>
<td>
<span t-esc="timesheet.unit_amount"
t-options="{
'widget': 'duration',
'digital': True,
'unit': 'hour',
'round': 'minute'
}"
/>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</template>
<template id="workorder_page_signature_block">
<div t-if="doc.worksheet_signature">
<div t-if="report_type == html" class="ribbon" style="
@ -342,7 +443,8 @@
<template id="work_order_page">
<div class="page">
<t t-call="bemade_fsm.workorder_page_info_block"/>
<t t-call="bemade_fsm.workorder_page_sale_order_table"/>
<t t-call="bemade_fsm.workorder_page_timesheet_entries"/>
<t t-call="bemade_fsm.workorder_page_materials_table"/>
<t t-call="bemade_fsm.workorder_equipment_summary"/>
<t t-call="bemade_fsm.workorder_page_signature_block"/>
<t t-call="bemade_fsm.workorder_page_tasks_table"/>
@ -368,4 +470,4 @@
</xpath>
</template>
</data>
</odoo>
</odoo>

View file

@ -5,9 +5,12 @@
<field name="name">Work Order Report (PDF)</field>
<field name="report_name">bemade_fsm.work_order</field>
<field name="report_file">bemade_fsm.work_order</field>
<field name="print_report_name">'%s Work Order %s' % (
time.strftime('%Y-%m-%d'), object.work_order_number)</field>
<field name="print_report_name">'%s %s' % (
object.planned_date_begin.strftime('%Y-%m-%d') if object.planned_date_begin else time.strftime('%Y-%m-%d'),
object.name
)
</field>
<field name="report_type">qweb-pdf</field>
</record>
</data>
</odoo>
</odoo>

View file

@ -1,146 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<record id="default_worksheet_template" model="ir.actions.report">
<field name="name">Complete Worksheet Report (PDF)</field>
<field name="model">project.task</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">bemade_fsm.worksheet_complete</field>
<field name="print_report_name">
'%s Worksheet %s' % (time.strftime('%Y-%m-%d'), object.name)
</field>
<field name="binding_model_id" ref="model_project_task"/>
<field name="binding_type">report</field>
</record>
<template id="worksheet_complete">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t t-call="bemade_fsm.worksheet_complete_page"
t-lang="doc.partner_id.lang"/>
</t>
</t>
</template>
<template id="worksheet_complete_page">
<t t-call="web.external_layout">
<t t-set="address" t-if="doc.sale_order_id">
<strong class="big-red">Customer:</strong>
<div t-field="doc.sale_order_id.partner_id"
t-options='{"widget": "contact",
"fields": ["address", "name"], "no_marker": True}'/>
</t>
<t t-set="information_block">
<strong>Service Address:</strong>
<div t-field="doc.partner_id"
t-options='{"widget": "contact",
"fields": ["address", "name", "phone"],
"no_marker": True, "phone_icons": True}'/>
</t>
<div class="page">
<div class="oe_structure"/>
<h2 class="mt-3">
<span>Work Order </span>
<span t-if="doc.sale_order_id" t-field="doc.sale_order_id.name"/>
<span t-else="" t-field="doc.name"/>
</h2>
<div class="container">
<div class="row mb-3 border-dark">
<div t-if="doc.sale_order_id.client_order_ref" class="col-4">
<span class="font-weight-bolder">Your Reference:</span>
<span t-field="doc.sale_order_id.client_order_ref"/>
</div>
<div t-if="doc.site_contacts" class="col-4">
<span class="font-weight-bolder">Site Contacts:</span>
<t t-foreach="doc.site_contacts" t-as="contact">
<span t-field="contact.name"/>
<span t-out="contact"
t-options='{"widget": "contact",
"fields": ["phone", "mobile", "email"],
"no_marker": True, "phone_icons": True}'/>
</t>
</div>
<div t-if="doc.work_order_contacts" class="col-4">
<span class="font-weight-bolder">Work order attn:</span>
<t t-foreach="doc.work_order_contacts" t-as="contact">
<span t-field="contact.name"/>
<span t-out="contact"
t-options='{"widget": "contact",
"fields": ["phone", "mobile", "email"],
"no_marker": True, "phone_icons": True}'/>
</t>
</div>
</div>
<div class="row mb-3 border-dark">
<div class="col-4" t-if="doc.user_ids">
<span class="font-weight-bolder">Technician(s)</span>
<t t-foreach="doc.user_ids" t-as="technician">
<p class="m-0" t-field="technician.name"/>
</t>
</div>
<div class="col-4" t-if="doc.planned_date_begin">
<span class="font-weight-bolder">Planned Start</span>
<p t-field="doc.planned_date_begin"
t-options="{'widget': 'datetime'}"/>
</div>
<div class="col-4" t-if="doc.planned_date_end">
<span class="font-weight-bolder">Planned End</span>
<p t-field="doc.planned_date_end"
t-options="{'widget': 'datetime'}"/>
</div>
</div>
</div>
<div class="container">
<h3 class="mb32"><strong>Interventions</strong></h3>
<t t-foreach="doc.child_ids" t-as="intervention">
<div class="row">
<div class="col-6">
<h4><span t-field="intervention.name"/></h4>
<span t-if="intervention.description"
t-field="intervention.description"/>
</div>
<div t-if="intervention.equipment_ids"
class="col-6">
<h4>Equipment: </h4>
<t t-foreach="intervention.equipment_ids"
t-as="equipment">
<span t-field="equipment.complete_name"/>
<span t-if="equipment_index &lt; equipment_size -1"
t-out="', '"/>
</t>
</div>
</div>
<div class="row">
<table class="table table-borderless col-12">
<thead>
<th>Done</th>
<th>Task to do</th>
</thead>
<tbody>
<t t-foreach="intervention.child_ids"
t-as="task">
<tr class="wo-task">
<td style="width: 5%">
<input type="checkbox"
t-att-checked="task.is_complete"/>
</td>
<td style="width: 95%">
<p t-field="task.name"/>
<p t-field="task.description"/>
</td>
<!-- TODO: Figure out what to do with the old
concept of task comments -->
</tr>
</t>
</tbody>
</table>
</div>
</t>
</div>
</div>
</t>
</template>
</data>
</odoo>

View file

@ -19,3 +19,7 @@ class TestEquipment(BemadeFSMBaseTest):
partner_company.write({'equipment_ids': [Command.set([])]})
with self.assertRaises(MissingError):
equipment.name
def test_compute_complete_name_when_name_blank(self):
equipment = self._generate_equipment(name=False)
complete_name = equipment.complete_name

View file

@ -23,7 +23,8 @@ class TaskTest(BemadeFSMBaseTest):
task.propagate_assignment = True
task.write({
'user_ids': [Command.set([self.user.id])]
'user_ids': [Command.set([self.user.id])],
'propagate_assignment': True,
})
self.assertTrue(all([t.user_ids == self.user for t in task | task._get_all_subtasks()]))
@ -31,7 +32,8 @@ class TaskTest(BemadeFSMBaseTest):
def test_reassigning_task_doesnt_propagate_by_default(self):
task = self.task
task.write({
'user_ids': [Command.set([self.user.id])]
'user_ids': [Command.set([self.user.id])],
'propagate_assignment': True,
})
self.assertFalse(any([t.user_ids for t in task.child_ids.child_ids]))

View file

@ -18,20 +18,20 @@
<field name="owned_equipment_ids" invisible="True"/>
<group>
<field name="site_contacts"
attrs="{'invisible': [('company_type','=','person')]}"
attrs="{'invisible': [('type','!=','delivery')]}"
context="{'tree_view_ref': 'bemade_fsm.fsm_contacts_view_tree'}"/>
<field name="work_order_contacts"
attrs="{'invisible': [('company_type','=','person')]}"
attrs="{'invisible': [('type','!=','delivery')]}"
context="{'tree_view_ref': 'bemade_fsm.fsm_contacts_view_tree'}"/>
<field name="equipment_ids" attrs="{'invisible': [('company_type','=','person')]}"
<field name="equipment_ids" attrs="{'invisible': [('type','!=','delivery')]}"
context="{'tree_view_ref': 'bemade_fsm.fsm_equipment_view_tree'}"
readonly="False"/>
<field attrs="{'invisible': ['|', ('company_type','=','person'), ('owned_equipment_ids','=',False)]}"
<field attrs="{'invisible': ['|', ('type','!=','delivery'), ('owned_equipment_ids','=',False)]}"
context="{'tree_view_ref': 'bemade_fsm.fsm_equipment_view_tree'}"
name="owned_equipment_ids"
readonly="True"/>
<field name="site_ids"
attrs="{'invisible': [('company_type','=','company')]}">
attrs="{'invisible': [('company_type','=','company'), ('type', '=', 'delivery')]}">
<tree editable="bottom">
<field name="name" widget="res_partner_many2one"/>
</tree>

View file

View file

@ -0,0 +1,39 @@
#
# Bemade Inc.
#
# Copyright (C) June 2023 Bemade Inc. (<https://www.bemade.org>).
# Author: mdurepos (Contact : it@bemade.org)
#
# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1)
# It is forbidden to publish, distribute, sublicense, or sell copies of the Software
# or modified copies of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
{
'name': 'Open Project Details',
'version': '15.0.0.0.1',
'summary': 'Open Project Details',
'description': """
This module adds the ability to view project details from the project form view.
""",
'category': 'Project',
'author': 'Bemade Inc.',
'website': 'https://www.bemade.org',
'license': 'OPL-1',
'depends': [
'project',
],
'data': [
'views/project_project_views.xml'
],
'demo': [],
'installable': True,
'auto_install': False,
}

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<!-- Héritage de la vue Kanban des projets -->
<record id="project_view_project_kanban_inherit" model="ir.ui.view">
<field name="name">project.view.project.kanban.inherit</field>
<field name="model">project.project</field>
<field name="inherit_id" ref="project.view_project_kanban"/>
<field name="arch" type="xml">
<!-- Modification de la visibilité de la gestion des paramètres pour tous les utilisateurs -->
<div class="o_kanban_card_manage_settings row" groups="project.group_project_manager" position="attributes">
<attribute name="groups">base.group_user</attribute>
</div>
<xpath expr="//a[@name='action_view_kanban_project'][@type='edit']" position="replace">
<a class="dropdown-item" role="menuitem" type="open" name="action_view_kanban_project">Open</a>
</xpath>
</field>
</record>
</data>
</odoo>

View file

@ -1,6 +1,6 @@
{
'name': 'Packing wizard',
'version': '15.0.1.0.0',
'version': '15.0.1.0.1',
'category': 'Extra Tools',
'summary': 'Allow automated packing type creation',
'description': """

View file

@ -59,7 +59,7 @@ class ChooseDeliveryPackage(models.TransientModel):
# if no package type found, create one
if not delivery_package_type:
delivery_package_type = delivery_package_type.create({
'name': f'Box {vals["width"]}x{vals["height"]}x{vals["length"]}',
'name': f'Box {self.width}x{self.height}x{self.length}',
'width': self.width,
'height': self.height,
'packaging_length': self.length,

View file

@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
from . import models

View file

@ -0,0 +1,24 @@
{
'name': 'Search Supplier Code',
'version': '1.0',
'summary': 'Search for products by supplier code',
'sequence': 10,
'description': """
This module adds the ability to search for products by supplier code.
""",
'category': 'Inventory/Purchase',
'author': 'Bemade',
'website': 'https://www.bemade.org',
'depends': [
'purchase',
'product'
],
'data': [
'views/product_product_views.xml',
],
'demo': [],
'installable': True,
'application': False,
'auto_install': False,
'license': 'LGPL-3',
}

View file

@ -0,0 +1 @@
from . import product_product

View file

@ -0,0 +1,26 @@
from odoo import models, fields, api
class ProductProduct(models.Model):
_inherit = 'product.product'
supplier_codes = fields.Char(
compute='_compute_supplier_codes',
string='Supplier Codes',
store=True,
search='_search_supplier_codes')
@api.depends('variant_seller_ids', 'variant_seller_ids.product_code')
def _compute_supplier_codes(self):
for product in self:
codes = filter(lambda x: isinstance(x, str), product.variant_seller_ids.mapped('product_code'))
product.supplier_codes = ', '.join(codes)
def _search_supplier_codes(self, operator, value):
if not value:
return []
supplierinfo_ids = self.env['product.supplierinfo'].search([('product_code', operator, value)])
product_ids = supplierinfo_ids.mapped('product_id.id')
return [('id', 'in', product_ids)]

View file

@ -0,0 +1,12 @@
<odoo>
<record id="view_product_product_search" model="ir.ui.view">
<field name="name">product.product.search.inherit</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_search_form_view"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="supplier_codes"/>
</field>
</field>
</record>
</odoo>