{"push_id":2728479962,"size":1,"distinct_size":1,"ref":"refs/heads/master-event-ticket-name-seb","head":"4a2eab2dc2c21e3ec25adb727c13b5fc162feea8","before":"715515e09fa7931631d845dc572d0d562a3aeb03","commits":[{"sha":"4a2eab2dc2c21e3ec25adb727c13b5fc162feea8","author":{"name":"Sébastien Theys","email":"62d754cc350e84d3b1c32ae79f976f5348e74a40@odoo.com"},"message":"[IMP] various: added a method to compute a default name for a SaleOrderLine, based on its product\n\nI added the method because the code to compute the name was duplicated in several places. This will make it more consistent.\n\nMoreover this gives the option for modules to override the method to define a custom name as necessary.\n\n[IMP] event_sale: compute a consistent description for a SaleOrderLine based on an EventTicket\n\nThe description will be the same whether the sale order comes from the front end or the back end. It takes into account the customer language.\n\nThe default description will be computed as follow:\n\n1. the first line is either the event name (if exists) or the product name (if exists)\n2. then the ticket name\n3. then (if exists) the product name only if different than the event name (avoid duplicate)\n4. and finally the product description_sale (if exists)\n\nThis makes the default name consitent with what is done for the standard products while adding the info from the event/ticket and also avoiding duplicate info.\n\n[IMP] event_sale: added constraints, on change and no create/edit from the sale order line of a ticket\n\nThe goal of this change is to prevent inconsistent states. The selected ticket must belong to the selected event, the event must be linked to the product, ...\n\nMoreover we don't want a user to create a ticket or an event from this view because some fields or relations would not be set correctly from here.\n\n[FIX] event_sale: improved tests to take into account new constraints\n\nWe previously added new constraints to prevent inconsistent states. The selected ticket must belong to the selected event, the event must be linked to the product, ...\n\nThis change will fix the test to work with those new constraints.\n\n[IMP] various: renamed methods and improved comments\n\nWe reviewed my task with AL and found that some things where not very clear at first glance.\n\nThis commit attempts to improve the method names and the comments.\n\n[IMP] event_sale: removed constrains for performance\n\nWe reviewed this task with AL and decided to remove these constrains because:\n\t- they will be called for every sale order line, even though only very few of them actually have tickets\n\t- they only prevent a behaviour that is not possible by using the interface normally\n\n[IMP] event_sale: improved sale order line view\n\nIt was possible to select a ticket related to a product before an event was selected.\nThis is typically the case for tickets defined in an event_type but not in an event.\n\nThe ticket field is now hidden until both the product and the event have been selected.\nThis way we are sure the selected ticket will belong to an event and not an event_type.\n\nWe also improve here the comments of the related onchange methods.\n\n[IMP] event_sale: updated ticket multiline description\n\nTo compute the ticket multiline description we decided to ignore entirely the product name and the product description_sale because they are considered to be replaced by the ticket name and event name.\n\t-> The workflow of creating a new event also does not lead to filling them correctly, as the product is created through the event interface\n\n[IMP] website_event_sale: updated views to show ticket name and event name\n\nThe standard behaviour was to show product name in several places instead of the sale order line description.\n\nHowever, for event tickets, we don't want to show the product name, but the ticket name and event name instead.\n\n[IMP] event_sale: reset ticket on event change\n\nWe don't want the user to be able to select a ticket belonging to the wrong event.\n\n[IMP] website_event_sale: added ticket on confirmation page\n\nThe ticket name was missing from the registration confirmation page (shown when the ticket is free and/or the user paid with a direct method).\n\nThis is now fixed.\n\nmin diff","distinct":true,"url":"https://api.github.com/repos/odoo-dev/odoo/commits/4a2eab2dc2c21e3ec25adb727c13b5fc162feea8"}]}
{"actor":{"display_login":"seb-odoo"}}