Skip to content

Commit b267efb

Browse files
author
Anusha
committed
[MIG] sale_resource_booking: Migration to 18.0
1 parent 6b375ec commit b267efb

17 files changed

+158
-99
lines changed

sale_resource_booking/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Sell resource bookings
77
!! This file is generated by oca-gen-addon-readme !!
88
!! changes will be overwritten. !!
99
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10-
!! source digest: sha256:2c7b056857ea134dae0ac6043e2982ce997241cd8c4794123f23c322d1f01f01
10+
!! source digest: sha256:f7b67664bfd13e82684465bc6234ce76e9d2b3545a3b49d6737524587e778a56
1111
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1212
1313
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png

sale_resource_booking/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"name": "Sell resource bookings",
66
"summary": "Link resource bookings with sales",
7-
"version": "15.0.1.0.1",
7+
"version": "18.0.1.0.0",
88
"development_status": "Beta",
99
"category": "Appointments",
1010
"website": "https://github.com/OCA/sale-workflow",

sale_resource_booking/i18n/es.po

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ msgstr ""
77
"Project-Id-Version: Odoo Server 12.0\n"
88
"Report-Msgid-Bugs-To: \n"
99
"POT-Creation-Date: 2021-04-22 10:26+0000\n"
10-
"PO-Revision-Date: 2023-10-10 20:36+0000\n"
11-
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
10+
"PO-Revision-Date: 2021-04-22 11:29+0100\n"
11+
"Last-Translator: Jairo Llopis <jairo.llopis@tecnativa.com>\n"
1212
"Language-Team: \n"
13-
"Language: es\n"
13+
"Language: es_ES\n"
1414
"MIME-Version: 1.0\n"
1515
"Content-Type: text/plain; charset=UTF-8\n"
1616
"Content-Transfer-Encoding: 8bit\n"
17-
"Plural-Forms: nplurals=2; plural=n != 1;\n"
18-
"X-Generator: Weblate 4.17\n"
17+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
18+
"X-Generator: Poedit 2.4.2\n"
1919

2020
#. module: sale_resource_booking
2121
#: model_terms:ir.ui.view,arch_db:sale_resource_booking.view_order_form
@@ -38,7 +38,7 @@ msgid "Booking type"
3838
msgstr "Tipo de reserva/cita"
3939

4040
#. module: sale_resource_booking
41-
#: code:addons/sale_resource_booking/models/sale_order.py:0
41+
#: code:addons/sale_resource_booking/models/sale_order.py:39
4242
#: model_terms:ir.ui.view,arch_db:sale_resource_booking.view_order_form
4343
#, python-format
4444
msgid "Bookings"
@@ -219,6 +219,11 @@ msgstr "Cuenta de reservas de recursos"
219219
msgid "Resource combination"
220220
msgstr "Combinación de recursos"
221221

222+
#. module: sale_resource_booking
223+
#: model:ir.model,name:sale_resource_booking.model_sale_order
224+
msgid "Sale Order"
225+
msgstr "Pedido de venta"
226+
222227
#. module: sale_resource_booking
223228
#: model:ir.model,name:sale_resource_booking.model_resource_booking_sale
224229
msgid "Sale order generator for resource booking types"
@@ -244,11 +249,6 @@ msgstr "Pedido de venta que originó esta reserva/cita."
244249
msgid "Sales"
245250
msgstr "Ventas"
246251

247-
#. module: sale_resource_booking
248-
#: model:ir.model,name:sale_resource_booking.model_sale_order
249-
msgid "Sales Order"
250-
msgstr "Orden de Venta"
251-
252252
#. module: sale_resource_booking
253253
#: model:ir.model,name:sale_resource_booking.model_sale_order_line
254254
msgid "Sales Order Line"
@@ -263,6 +263,3 @@ msgstr "Guardar sin enviar invitaciones"
263263
#: model_terms:ir.ui.view,arch_db:sale_resource_booking.view_order_form
264264
msgid "Sync bookings"
265265
msgstr "Sincronizar reservas/citas"
266-
267-
#~ msgid "Sale Order"
268-
#~ msgstr "Pedido de venta"

sale_resource_booking/i18n/fr.po

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Translation of Odoo Server.
22
# This file contains the translation of the following modules:
3-
# * sale_resource_booking
3+
# * sale_resource_booking
44
#
55
msgid ""
66
msgstr ""
@@ -18,11 +18,7 @@ msgstr ""
1818

1919
#. module: sale_resource_booking
2020
#: model_terms:ir.ui.view,arch_db:sale_resource_booking.view_order_form
21-
msgid ""
22-
"(Re)sync resource bookings. The sync will be done automatically when "
23-
"confirming the quotation, but you can do it beforehand if needed with this "
24-
"button. It will create missing resource bookings in pending state, or cancel "
25-
"the spare ones."
21+
msgid "(Re)sync resource bookings. The sync will be done automatically when confirming the quotation, but you can do it beforehand if needed with this button. It will create missing resource bookings in pending state, or cancel the spare ones."
2622
msgstr ""
2723
"(Re)synchroniser les réservations de ressources. La synchronisation sera "
2824
"faite automatiquement à la confirmation du devis mais vous pouvez le faire "
@@ -37,7 +33,7 @@ msgid "Booking type"
3733
msgstr "Type de réservation"
3834

3935
#. module: sale_resource_booking
40-
#: code:addons/sale_resource_booking/models/sale_order.py:0
36+
#: code:addons/sale_resource_booking/models/sale_order.py:39
4137
#: model_terms:ir.ui.view,arch_db:sale_resource_booking.view_order_form
4238
#, python-format
4339
msgid "Bookings"
@@ -119,20 +115,15 @@ msgstr "Si coché, une réservation en attente sera générée à la vente."
119115
#. module: sale_resource_booking
120116
#: model:ir.model.fields,help:sale_resource_booking.field_product_product__resource_booking_type_combination_rel_id
121117
#: model:ir.model.fields,help:sale_resource_booking.field_product_template__resource_booking_type_combination_rel_id
122-
msgid ""
123-
"If set, the booking will be created with this resource combination. "
124-
"Otherwise, the combination will be assigned automatically later, when the "
125-
"requester schedules the booking."
118+
msgid "If set, the booking will be created with this resource combination. Otherwise, the combination will be assigned automatically later, when the requester schedules the booking."
126119
msgstr ""
127120
"Si coché, la réservation sera crée avec cette combinaison de ressources. "
128121
"Autrement, la combinaison sera assignée automatiquement plus tard lorsque le "
129122
"demandeur planifiera la réservation."
130123

131124
#. module: sale_resource_booking
132125
#: model:ir.model.fields,help:sale_resource_booking.field_resource_booking__sale_order_state
133-
msgid ""
134-
"If there is a related quotation and it is not confirmed, the booking will "
135-
"not be able to become confirmed."
126+
msgid "If there is a related quotation and it is not confirmed, the booking will not be able to become confirmed."
136127
msgstr ""
137128
"Si il y a un devis lié qui n'est pas confirmé, la réservation ne pourra pas "
138129
"passer en confirmé."
@@ -219,6 +210,11 @@ msgstr "Nombre de réservation de ressources"
219210
msgid "Resource combination"
220211
msgstr "Combinaison de ressources"
221212

213+
#. module: sale_resource_booking
214+
#: model:ir.model,name:sale_resource_booking.model_sale_order
215+
msgid "Sale Order"
216+
msgstr "Commande"
217+
222218
#. module: sale_resource_booking
223219
#: model:ir.model,name:sale_resource_booking.model_resource_booking_sale
224220
msgid "Sale order generator for resource booking types"
@@ -244,11 +240,6 @@ msgstr "Commande d'origine de cette réservation."
244240
msgid "Sales"
245241
msgstr "Ventes"
246242

247-
#. module: sale_resource_booking
248-
#: model:ir.model,name:sale_resource_booking.model_sale_order
249-
msgid "Sales Order"
250-
msgstr ""
251-
252243
#. module: sale_resource_booking
253244
#: model:ir.model,name:sale_resource_booking.model_sale_order_line
254245
msgid "Sales Order Line"
@@ -263,6 +254,3 @@ msgstr "Sauvegarder sans envoyer d'invitations"
263254
#: model_terms:ir.ui.view,arch_db:sale_resource_booking.view_order_form
264255
msgid "Sync bookings"
265256
msgstr "Synchroniser les réservations"
266-
267-
#~ msgid "Sale Order"
268-
#~ msgstr "Commande"

sale_resource_booking/i18n/fr_CH.po

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Translation of Odoo Server.
22
# This file contains the translation of the following modules:
3-
# * sale_resource_booking
3+
# * sale_resource_booking
44
#
55
msgid ""
66
msgstr ""
@@ -18,11 +18,7 @@ msgstr ""
1818

1919
#. module: sale_resource_booking
2020
#: model_terms:ir.ui.view,arch_db:sale_resource_booking.view_order_form
21-
msgid ""
22-
"(Re)sync resource bookings. The sync will be done automatically when "
23-
"confirming the quotation, but you can do it beforehand if needed with this "
24-
"button. It will create missing resource bookings in pending state, or cancel "
25-
"the spare ones."
21+
msgid "(Re)sync resource bookings. The sync will be done automatically when confirming the quotation, but you can do it beforehand if needed with this button. It will create missing resource bookings in pending state, or cancel the spare ones."
2622
msgstr ""
2723
"(Re)synchroniser les réservations de ressources. La synchronisation sera "
2824
"faite automatiquement à la confirmation du devis mais vous pouvez le faire "
@@ -37,7 +33,7 @@ msgid "Booking type"
3733
msgstr "Type de réservation"
3834

3935
#. module: sale_resource_booking
40-
#: code:addons/sale_resource_booking/models/sale_order.py:0
36+
#: code:addons/sale_resource_booking/models/sale_order.py:39
4137
#: model_terms:ir.ui.view,arch_db:sale_resource_booking.view_order_form
4238
#, python-format
4339
msgid "Bookings"
@@ -119,20 +115,15 @@ msgstr "Si coché, une réservation en attente sera générée à la vente."
119115
#. module: sale_resource_booking
120116
#: model:ir.model.fields,help:sale_resource_booking.field_product_product__resource_booking_type_combination_rel_id
121117
#: model:ir.model.fields,help:sale_resource_booking.field_product_template__resource_booking_type_combination_rel_id
122-
msgid ""
123-
"If set, the booking will be created with this resource combination. "
124-
"Otherwise, the combination will be assigned automatically later, when the "
125-
"requester schedules the booking."
118+
msgid "If set, the booking will be created with this resource combination. Otherwise, the combination will be assigned automatically later, when the requester schedules the booking."
126119
msgstr ""
127120
"Si coché, la réservation sera crée avec cette combinaison de ressources. "
128121
"Autrement, la combinaison sera assignée automatiquement plus tard lorsque le "
129122
"demandeur planifiera la réservation."
130123

131124
#. module: sale_resource_booking
132125
#: model:ir.model.fields,help:sale_resource_booking.field_resource_booking__sale_order_state
133-
msgid ""
134-
"If there is a related quotation and it is not confirmed, the booking will "
135-
"not be able to become confirmed."
126+
msgid "If there is a related quotation and it is not confirmed, the booking will not be able to become confirmed."
136127
msgstr ""
137128
"Si il y a un devis lié qui n'est pas confirmé, la réservation ne pourra pas "
138129
"passer en confirmé."
@@ -219,6 +210,11 @@ msgstr "Nombre de réservation de ressources"
219210
msgid "Resource combination"
220211
msgstr "Combinaison de ressources"
221212

213+
#. module: sale_resource_booking
214+
#: model:ir.model,name:sale_resource_booking.model_sale_order
215+
msgid "Sale Order"
216+
msgstr "Commande"
217+
222218
#. module: sale_resource_booking
223219
#: model:ir.model,name:sale_resource_booking.model_resource_booking_sale
224220
msgid "Sale order generator for resource booking types"
@@ -244,11 +240,6 @@ msgstr "Commande d'origine de cette réservation."
244240
msgid "Sales"
245241
msgstr "Ventes"
246242

247-
#. module: sale_resource_booking
248-
#: model:ir.model,name:sale_resource_booking.model_sale_order
249-
msgid "Sales Order"
250-
msgstr ""
251-
252243
#. module: sale_resource_booking
253244
#: model:ir.model,name:sale_resource_booking.model_sale_order_line
254245
msgid "Sales Order Line"
@@ -263,6 +254,3 @@ msgstr "Sauvegarder sans envoyer d'invitations"
263254
#: model_terms:ir.ui.view,arch_db:sale_resource_booking.view_order_form
264255
msgid "Sync bookings"
265256
msgstr "Synchroniser les réservations"
266-
267-
#~ msgid "Sale Order"
268-
#~ msgstr "Commande"

sale_resource_booking/models/sale_order.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def write(self, vals):
2929
@api.depends("order_line.resource_booking_ids")
3030
def _compute_resource_bookings(self):
3131
for one in self:
32-
bookings = one.mapped("order_line.resource_booking_ids")
32+
bookings = one.sudo().order_line.mapped("resource_booking_ids")
3333
one.resource_booking_ids = bookings
3434
one.resource_booking_count = len(bookings)
3535

@@ -59,7 +59,7 @@ def action_confirm(self):
5959
action = self.env["ir.actions.act_window"]._for_xml_id(
6060
"sale_resource_booking.sale_order_booking_confirm_action"
6161
)
62-
action["context"] = {"default_order_id": self.id}
62+
action["context"] = {"default_order_id": self.id, "trigger_booking_email": True}
6363
actions = [action]
6464
if isinstance(result, dict):
6565
actions.insert(0, result)

sale_resource_booking/models/sale_order_line.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def _sync_resource_bookings(self):
7474
}
7575
rbc_rel = line.product_id.resource_booking_type_combination_rel_id
7676
context = {
77-
"default_partner_ids": [(4, line.order_id.partner_id.id)],
77+
"default_partner_id": line.order_id.partner_id.id,
7878
"default_combination_auto_assign": not rbc_rel,
7979
"default_combination_id": rbc_rel.combination_id.id,
8080
}

sale_resource_booking/static/description/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ <h1 class="title">Sell resource bookings</h1>
367367
!! This file is generated by oca-gen-addon-readme !!
368368
!! changes will be overwritten. !!
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370-
!! source digest: sha256:2c7b056857ea134dae0ac6043e2982ce997241cd8c4794123f23c322d1f01f01
370+
!! source digest: sha256:f7b67664bfd13e82684465bc6234ce76e9d2b3545a3b49d6737524587e778a56
371371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372372
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/sale-workflow/tree/18.0/sale_resource_booking"><img alt="OCA/sale-workflow" src="https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/sale-workflow-18-0/sale-workflow-18-0-sale_resource_booking"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373373
<p>This module extends the functionality of sale and resource bookings to

0 commit comments

Comments
 (0)