Skip to content

Commit

Permalink
[FIX] joint_buying_base : currency + bad translations
Browse files Browse the repository at this point in the history
  • Loading branch information
legalsylvain committed Jul 27, 2023
1 parent 9ab78d5 commit d848197
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 14 deletions.
36 changes: 27 additions & 9 deletions joint_buying_base/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-07-26 19:52+0000\n"
"PO-Revision-Date: 2023-07-26 19:52+0000\n"
"POT-Creation-Date: 2023-07-27 09:31+0000\n"
"PO-Revision-Date: 2023-07-27 09:31+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand All @@ -26,11 +26,35 @@ msgstr "%s (copie)"
msgid "<b>Company Address:</b>"
msgstr "<b>Adresse de la société:</b>"

#. module: joint_buying_base
#: code:addons/joint_buying_base/models/joint_buying_tour.py:228
#, python-format
msgid "<i>Delivery and pick-up</i>"
msgstr "<i>Livraison et retrait</i>"

#. module: joint_buying_base
#: code:addons/joint_buying_base/models/joint_buying_tour.py:224
#, python-format
msgid "<i>Truck loading</i>"
msgstr "<i>Chargement du camion</i>"

#. module: joint_buying_base
#: code:addons/joint_buying_base/models/joint_buying_tour.py:226
#, python-format
msgid "<i>Truck unloading</i>"
msgstr "<i>Déchargement du camion</i>"

#. module: joint_buying_base
#: model_terms:ir.ui.view,arch_db:joint_buying_base.view_res_partner_form
msgid "<span class=\"oe_inline\"> ( On </span>"
msgstr "<span class=\"oe_inline\"> ( Dans </span>"

#. module: joint_buying_base
#: code:addons/joint_buying_base/models/joint_buying_tour.py:221
#, python-format
msgid "<span style='color: green'><b>Pause</b></span>"
msgstr ""

#. module: joint_buying_base
#: model_terms:ir.ui.view,arch_db:joint_buying_base.view_res_partner_form
msgid "<span> : Lat : </span>"
Expand Down Expand Up @@ -137,11 +161,6 @@ msgstr "Transporteur"
msgid "Carriers"
msgstr "Transporteurs"

#. module: joint_buying_base
#: model_terms:ir.ui.view,arch_db:joint_buying_base.view_joint_buying_tour_form
msgid "Chart"
msgstr "Graphique"

#. module: joint_buying_base
#: model:ir.model.fields,help:joint_buying_base.field_res_partner__is_joint_buying_stage
#: model:ir.model.fields,help:joint_buying_base.field_res_users__is_joint_buying_stage
Expand Down Expand Up @@ -1007,8 +1026,7 @@ msgstr ""
#: code:addons/joint_buying_base/models/joint_buying_tour_line.py:121
#, python-format
msgid "Unable to estimate a route because the following stages has no defined geographic coordinates. <br/>- %s"
msgstr "Impossible d'estimer le trajet car la ou les étapes suivantes n'ont pas de"
" coordonnées géographiques définies. . <br/>- %s"
msgstr "Impossible d'estimer le trajet car la ou les étapes suivantes n'ont pas de coordonnées géographiques définies. . <br/>- %s"

#. module: joint_buying_base
#: code:addons/joint_buying_base/models/joint_buying_tour_line.py:85
Expand Down
7 changes: 6 additions & 1 deletion joint_buying_base/models/joint_buying_carrier.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,10 @@ class JointBuyingCarrier(models.Model):
kilometer_cost = fields.Monetary(currency_field="currency_id")

currency_id = fields.Many2one(
comodel_name="res.currency", required=True, currency_field="currency_id"
comodel_name="res.currency",
required=True,
default=lambda x: x._default_currency_id(),
)

def _default_currency_id(self):
return self.env.ref("base.EUR")
8 changes: 4 additions & 4 deletions joint_buying_base/models/joint_buying_tour.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,14 @@ def _float_to_strtime(float_value):
line.arrival_point_id.name,
)
elif line.sequence_type == "pause":
line_name = f"<span style='color: green'><b>{_('Pause')}</b></span>"
line_name = _("<span style='color: green'><b>Pause</b></span>")
else:
if i == 0:
line_name = f"<i>{_('Truck loading')}</i>"
line_name = _("<i>Truck loading</i>")
elif i == len(tour.line_ids) - 1:
line_name = f"<i>{_('Truck unloading')}</i>"
line_name = _("<i>Truck unloading</i>")
else:
line_name = f"<i>{_('Delivery and pick-up')}</i>"
line_name = _("<i>Delivery and pick-up</i>")
description += (
f"<b>{_float_to_strtime(line.start_hour)} - "
f"{_float_to_strtime(line.arrival_hour)}</b> : {line_name}"
Expand Down

0 comments on commit d848197

Please sign in to comment.