[TMP]Translate FR/fr, and unit test

This commit is contained in:
michel 2018-01-18 15:27:35 +01:00
parent e7ba4b91f8
commit c5b86c609e
5 changed files with 57 additions and 35 deletions

View File

@ -6,15 +6,14 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 10.0\n" "Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-10 16:50+0000\n" "POT-Creation-Date: 2018-01-18 14:18+0000\n"
"PO-Revision-Date: 2018-01-10 16:50+0000\n" "PO-Revision-Date: 2018-01-18 14:18+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n" "Content-Transfer-Encoding: \n"
"Language: fr\n" "Plural-Forms: \n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: golem_season #. module: golem_season
#: model:ir.model.fields,field_description:golem_season.field_golem_season_member_counter #: model:ir.model.fields,field_description:golem_season.field_golem_season_member_counter
@ -32,7 +31,7 @@ msgid "Created on"
msgstr "Créé le" msgstr "Créé le"
#. module: golem_season #. module: golem_season
#: code:addons/golem_season/models/golem_season.py:58 #: code:addons/golem_season/models/golem_season.py:75
#, python-format #, python-format
msgid "Current period cannot be included into another existing period." msgid "Current period cannot be included into another existing period."
msgstr "La période actuelle est en conflit avec une période existante." msgstr "La période actuelle est en conflit avec une période existante."
@ -58,7 +57,7 @@ msgid "Display Name"
msgstr "Nom affiché" msgstr "Nom affiché"
#. module: golem_season #. module: golem_season
#: code:addons/golem_season/models/golem_season.py:54 #: code:addons/golem_season/models/golem_season.py:71
#, python-format #, python-format
msgid "End of the period is in range of an existing period." msgid "End of the period is in range of an existing period."
msgstr "La fin de la période est en conflit avec une période existante." msgstr "La fin de la période est en conflit avec une période existante."
@ -130,17 +129,29 @@ msgid "Seasons"
msgstr "Saisons" msgstr "Saisons"
#. module: golem_season #. module: golem_season
#: code:addons/golem_season/models/golem_season.py:44 #: code:addons/golem_season/models/golem_season.py:62
#, python-format #, python-format
msgid "Start of the period cannot be after end of the period." msgid "Start of the period cannot be after end of the period."
msgstr "Le début de la période ne peut être postérieur à sa fin." msgstr "Le début de la période ne peut être postérieur à sa fin."
#. module: golem_season #. module: golem_season
#: code:addons/golem_season/models/golem_season.py:50 #: code:addons/golem_season/models/golem_season.py:67
#, python-format #, python-format
msgid "Start of the period is in range of an existing period." msgid "Start of the period is in range of an existing period."
msgstr "Le début de la période est en conflit avec une période existante." msgstr "Le début de la période est en conflit avec une période existante."
#. module: golem_season
#: code:addons/golem_season/models/golem_season.py:58
#, python-format
msgid "The date end is required"
msgstr "The date end is required"
#. module: golem_season
#: code:addons/golem_season/models/golem_season.py:60
#, python-format
msgid "The date start is required"
msgstr "The date start is required"
#. module: golem_season #. module: golem_season
#: code:addons/golem_season/models/golem_season.py:28 #: code:addons/golem_season/models/golem_season.py:28
#: sql_constraint:golem.season:0 #: sql_constraint:golem.season:0
@ -149,7 +160,8 @@ msgid "This season name has already been used."
msgstr "Ce nom pour la saison a déjà été utilisé. Merci d'en choisir un autre." msgstr "Ce nom pour la saison a déjà été utilisé. Merci d'en choisir un autre."
#. module: golem_season #. module: golem_season
#: code:addons/golem_season/models/golem_season.py:97 #: code:addons/golem_season/models/golem_season.py:114
#, python-format #, python-format
msgid "You can't delete the default season" msgid "You can't delete the default season"
msgstr "Vous ne pouvez pas supprimer la saison par défaut" msgstr "Vous ne pouvez pas supprimer la saison par défaut"

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 10.0\n" "Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-10 16:50+0000\n" "POT-Creation-Date: 2018-01-18 14:18+0000\n"
"PO-Revision-Date: 2018-01-10 16:50+0000\n" "PO-Revision-Date: 2018-01-18 14:18+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -31,7 +31,7 @@ msgid "Created on"
msgstr "" msgstr ""
#. module: golem_season #. module: golem_season
#: code:addons/golem_season/models/golem_season.py:58 #: code:addons/golem_season/models/golem_season.py:75
#, python-format #, python-format
msgid "Current period cannot be included into another existing period." msgid "Current period cannot be included into another existing period."
msgstr "" msgstr ""
@ -57,7 +57,7 @@ msgid "Display Name"
msgstr "" msgstr ""
#. module: golem_season #. module: golem_season
#: code:addons/golem_season/models/golem_season.py:54 #: code:addons/golem_season/models/golem_season.py:71
#, python-format #, python-format
msgid "End of the period is in range of an existing period." msgid "End of the period is in range of an existing period."
msgstr "" msgstr ""
@ -129,17 +129,29 @@ msgid "Seasons"
msgstr "" msgstr ""
#. module: golem_season #. module: golem_season
#: code:addons/golem_season/models/golem_season.py:44 #: code:addons/golem_season/models/golem_season.py:62
#, python-format #, python-format
msgid "Start of the period cannot be after end of the period." msgid "Start of the period cannot be after end of the period."
msgstr "" msgstr ""
#. module: golem_season #. module: golem_season
#: code:addons/golem_season/models/golem_season.py:50 #: code:addons/golem_season/models/golem_season.py:67
#, python-format #, python-format
msgid "Start of the period is in range of an existing period." msgid "Start of the period is in range of an existing period."
msgstr "" msgstr ""
#. module: golem_season
#: code:addons/golem_season/models/golem_season.py:58
#, python-format
msgid "The date end is required"
msgstr ""
#. module: golem_season
#: code:addons/golem_season/models/golem_season.py:60
#, python-format
msgid "The date start is required"
msgstr ""
#. module: golem_season #. module: golem_season
#: code:addons/golem_season/models/golem_season.py:28 #: code:addons/golem_season/models/golem_season.py:28
#: sql_constraint:golem.season:0 #: sql_constraint:golem.season:0
@ -148,7 +160,7 @@ msgid "This season name has already been used."
msgstr "" msgstr ""
#. module: golem_season #. module: golem_season
#: code:addons/golem_season/models/golem_season.py:97 #: code:addons/golem_season/models/golem_season.py:114
#, python-format #, python-format
msgid "You can't delete the default season" msgid "You can't delete the default season"
msgstr "" msgstr ""

View File

@ -61,7 +61,6 @@ class GolemSeason(models.Model):
if season.date_start > season.date_end: if season.date_start > season.date_end:
raise models.ValidationError(_('Start of the period cannot be ' raise models.ValidationError(_('Start of the period cannot be '
'after end of the period.')) 'after end of the period.'))
else:
seasons = self.env['golem.season'].search([]) seasons = self.env['golem.season'].search([])
for eachs in seasons: for eachs in seasons:
if eachs.date_start < season.date_start < eachs.date_end: if eachs.date_start < season.date_start < eachs.date_end:

View File

@ -67,7 +67,7 @@ class TestGolemSeason(TransactionCase):
def test__onchange_season_dates(self): def test__onchange_season_dates(self):
""" Test if membership date """ """ Test if membership """
membership = self.env['product.template'].create({'name': 'Name', membership = self.env['product.template'].create({'name': 'Name',
'membership': True, 'membership': True,
'membership_date_from': '2017-11-01', 'membership_date_from': '2017-11-01',
@ -77,5 +77,4 @@ class TestGolemSeason(TransactionCase):
'membership_id': membership.id, 'membership_id': membership.id,
'membership_date_from': '2017-11-01', 'membership_date_from': '2017-11-01',
'membership_date_to': '2018-11-01'}) 'membership_date_to': '2018-11-01'})
self.assertEqual(new_season.date_start, membership.membership_date_from) self.assertEqual(new_season.membership_id, membership)
self.assertEqual(new_season.date_end, membership.membership_date_to)

View File

@ -36,7 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<group string="Season"> <group string="Season">
<field name="is_default" invisible="True" /> <field name="is_default" invisible="True" />
<field name="membership_id" options="{'no_create': true}"/> <field name="membership_id" options="{'no_create': true}"/>
<field name="name" /> <field name="name" attrs="{'required': True}" />
<field name="date_start" <field name="date_start"
attrs="{'required': [('date_end', '!=', False)]}" /> attrs="{'required': [('date_end', '!=', False)]}" />
<field name="date_end" <field name="date_end"