[IMP]GOLEM Activity Places Extended migration from sessions to new pure activities : end

This commit is contained in:
Fabien Bourgeois 2016-10-10 18:28:53 +02:00
parent 053f58891e
commit 0958c7777f
6 changed files with 83 additions and 43 deletions

View File

@ -16,8 +16,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
{ {
'name': 'GOLEM Activity Sessions Places', 'name': 'GOLEM Activity Places',
'summary': 'GOLEM Activities Session avdanced places management', 'summary': 'GOLEM Activity avdanced places management',
'description': ''' Management of minimum places, overbook and max 'description': ''' Management of minimum places, overbook and max
overbook... ''', overbook... ''',
'version': '0.1', 'version': '0.1',
@ -27,6 +27,6 @@
'application': False, 'application': False,
'installable': True, 'installable': True,
'auto_install': False, 'auto_install': False,
'depends': ['golem_activity_session_registration'], 'depends': ['golem_activity_registration'],
'data': ['views/golem_activity_view.xml'] 'data': ['views/golem_activity_view.xml']
} }

View File

@ -1,13 +1,13 @@
# Translation of Odoo Server. # Translation of Odoo Server.
# This file contains the translation of the following modules: # This file contains the translation of the following modules:
# * golem_activity_session_place # * golem_activity_place
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 8.0\n" "Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-03 15:21+0000\n" "POT-Creation-Date: 2016-10-10 16:26+0000\n"
"PO-Revision-Date: 2016-08-03 15:21+0000\n" "PO-Revision-Date: 2016-10-10 16:26+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -15,25 +15,45 @@ msgstr ""
"Content-Transfer-Encoding: \n" "Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: golem_activity_session_place #. module: golem_activity_place
#: view:golem.activity.session:golem_activity_session_place.searches #: field:golem.activity,is_overbooked:0
msgid "Full" msgid "Allow overbook?"
msgstr "Plein" msgstr "Autoriser la surcharge ?"
#. module: golem_activity_session_place #. module: golem_activity_place
#: model:ir.model,name:golem_activity_session_place.model_golem_activity_session #: model:ir.model,name:golem_activity_place.model_golem_activity
msgid "GOLEM Activities Sessions" msgid "GOLEM Activity"
msgstr "Séances des activités" msgstr "Activité"
#. module: golem_activity_session_place #. module: golem_activity_place
#: code:addons/golem_activity_session_place/models/golem_activity_session.py:52 #: field:golem.activity,places_min:0
msgid "Minimum places"
msgstr "Places minimum"
#. module: golem_activity_place
#: help:golem.activity,places_min:0
msgid "Minimum places to maintain the activity"
msgstr "Nombre de places minimales pour maintenir l'activité"
#. module: golem_activity_place
#: code:addons/golem_activity_place/models/golem_activity.py:51
#, python-format #, python-format
msgid "Number of places cannot be negative." msgid "Number of places cannot be negative."
msgstr "Le nombre de places ne peut pas être négatif" msgstr "Le nombre de places ne peut pas être négatif"
#. module: golem_activity_session_place #. module: golem_activity_place
#: code:addons/golem_activity_session_place/models/golem_activity_session.py:55 #: code:addons/golem_activity_place/models/golem_activity.py:54
#, python-format #, python-format
msgid "Overbooked places cannot be inferior than places" msgid "Overbooked places cannot be inferior than places"
msgstr "Le nombre de places avec surcharge ne peut être inférieur aux places" msgstr "Le nombre de places avec surcharge ne peut être inférieur aux place
#. module: golem_activity_place
#: field:golem.activity,places_overbooked:0
msgid "Places with overbook"
msgstr "Places avec surcharge"
#. module: golem_activity_place
#: view:golem.activity:golem_activity_place.tree
msgid "darkgrey: places_used < places_min; red: places_remain == 0; orange: places_remain <= 4;"
msgstr "darkgrey: places_used < places_min; red: places_remain == 0; orange: places_remain <= 4;"

View File

@ -1,13 +1,13 @@
# Translation of Odoo Server. # Translation of Odoo Server.
# This file contains the translation of the following modules: # This file contains the translation of the following modules:
# * golem_activity_session_place # * golem_activity_place
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 8.0\n" "Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-03 15:20+0000\n" "POT-Creation-Date: 2016-10-10 16:25+0000\n"
"PO-Revision-Date: 2016-08-03 15:20+0000\n" "PO-Revision-Date: 2016-10-10 16:25+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -15,25 +15,45 @@ msgstr ""
"Content-Transfer-Encoding: \n" "Content-Transfer-Encoding: \n"
"Plural-Forms: \n" "Plural-Forms: \n"
#. module: golem_activity_session_place #. module: golem_activity_place
#: view:golem.activity.session:golem_activity_session_place.searches #: field:golem.activity,is_overbooked:0
msgid "Full" msgid "Allow overbook?"
msgstr "" msgstr ""
#. module: golem_activity_session_place #. module: golem_activity_place
#: model:ir.model,name:golem_activity_session_place.model_golem_activity_session #: model:ir.model,name:golem_activity_place.model_golem_activity
msgid "GOLEM Activities Sessions" msgid "GOLEM Activity"
msgstr "" msgstr ""
#. module: golem_activity_session_place #. module: golem_activity_place
#: code:addons/golem_activity_session_place/models/golem_activity_session.py:52 #: field:golem.activity,places_min:0
msgid "Minimum places"
msgstr ""
#. module: golem_activity_place
#: help:golem.activity,places_min:0
msgid "Minimum places to maintain the activity"
msgstr ""
#. module: golem_activity_place
#: code:addons/golem_activity_place/models/golem_activity.py:51
#, python-format #, python-format
msgid "Number of places cannot be negative." msgid "Number of places cannot be negative."
msgstr "" msgstr ""
#. module: golem_activity_session_place #. module: golem_activity_place
#: code:addons/golem_activity_session_place/models/golem_activity_session.py:55 #: code:addons/golem_activity_place/models/golem_activity.py:54
#, python-format #, python-format
msgid "Overbooked places cannot be inferior than places" msgid "Overbooked places cannot be inferior than places"
msgstr "" msgstr ""
#. module: golem_activity_place
#: field:golem.activity,places_overbooked:0
msgid "Places with overbook"
msgstr ""
#. module: golem_activity_place
#: view:golem.activity:golem_activity_place.tree
msgid "darkgrey: places_used < places_min; red: places_remain == 0; orange: places_remain <= 4;"
msgstr ""

View File

@ -15,4 +15,4 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
from . import golem_activity_session from . import golem_activity

View File

@ -18,11 +18,11 @@
from openerp import models, fields, api, _ from openerp import models, fields, api, _
class GolemActivitySession(models.Model): class GolemActivity(models.Model):
_inherit = 'golem.activity.session' _inherit = 'golem.activity'
places_min = fields.Integer('Minimum places', default=0, places_min = fields.Integer('Minimum places', default=0,
help='Minimum places to maintain the session') help='Minimum places to maintain the activity')
is_overbooked = fields.Boolean('Allow overbook?', default=False) is_overbooked = fields.Boolean('Allow overbook?', default=False)
places_overbooked = fields.Integer('Places with overbook', default=0) places_overbooked = fields.Integer('Places with overbook', default=0)

View File

@ -20,10 +20,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<!-- Form --> <!-- Form -->
<record id="view_form" model="ir.ui.view"> <record id="view_form" model="ir.ui.view">
<field name="name">GOLEM Activity Sessions Places Form additions</field> <field name="name">GOLEM Activity Places Form additions</field>
<field name="model">golem.activity.session</field> <field name="model">golem.activity</field>
<field name="inherit_id" <field name="inherit_id"
ref="golem_activity_session_registration.activity_form" /> ref="golem_activity_registration.activity_form" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="places" position="after"> <field name="places" position="after">
<field name="places_min" /> <field name="places_min" />
@ -35,11 +35,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</record> </record>
<!-- Tree --> <!-- Tree -->
<record id="session_tree" model="ir.ui.view"> <record id="tree" model="ir.ui.view">
<field name="name">Session list places adaptations</field> <field name="name">Activity list places adaptations</field>
<field name="model">golem.activity.session</field> <field name="model">golem.activity</field>
<field name="inherit_id" <field name="inherit_id"
ref="golem_activity_session_registration.activity_tree" /> ref="golem_activity_registration.activity_tree" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree position="attributes"> <tree position="attributes">
<attribute name="colors">darkgrey: places_used &lt; places_min; red: places_remain == 0; orange: places_remain &lt;= 4;</attribute> <attribute name="colors">darkgrey: places_used &lt; places_min; red: places_remain == 0; orange: places_remain &lt;= 4;</attribute>