[REF]GOLEM Family / History : area small enhancements

This commit is contained in:
Fabien BOURGEOIS 2018-10-26 17:47:22 +02:00
parent 96b844b6af
commit 88a28b0091
11 changed files with 80 additions and 18 deletions

View File

@ -19,7 +19,7 @@
'name': 'GOLEM families',
'summary': 'GOLEM Members Families',
'description': 'GOLEM Members Families',
'version': '10.0.2.4.0',
'version': '10.0.2.5.0',
'category': 'GOLEM',
'author': 'Fabien Bourgeois, Youssef El Ouahby',
'license': 'AGPL-3',

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-10-19 07:03+0000\n"
"PO-Revision-Date: 2018-10-19 09:04+0200\n"
"POT-Creation-Date: 2018-10-26 15:44+0000\n"
"PO-Revision-Date: 2018-10-26 17:45+0200\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -52,6 +52,31 @@ msgstr "<strong>Région</strong> :"
msgid "Address"
msgstr "Adresse"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_area_id
msgid "Area"
msgstr "Territoire"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_area_from_street
msgid "Area from street"
msgstr "Territoire automatique depuis la rue"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
msgid "Area, quarter..."
msgstr "Lieu, quartier..."
#. module: golem_family
#: model:ir.model.fields,help:golem_family.field_golem_family_area_id
msgid "Area, quarter... for statistics and activity price."
msgstr "Lieu, quartier... pour les statistiques et les tarifs des activités."
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_search
msgid "By area"
msgstr "Par territoire"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_search
msgid "By city"

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-10-19 07:03+0000\n"
"PO-Revision-Date: 2018-10-19 07:03+0000\n"
"POT-Creation-Date: 2018-10-26 15:44+0000\n"
"PO-Revision-Date: 2018-10-26 15:44+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -52,6 +52,31 @@ msgstr ""
msgid "Address"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_area_id
msgid "Area"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_area_from_street
msgid "Area from street"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
msgid "Area, quarter..."
msgstr ""
#. module: golem_family
#: model:ir.model.fields,help:golem_family.field_golem_family_area_id
msgid "Area, quarter... for statistics and activity price."
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_search
msgid "By area"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_search
msgid "By city"

View File

@ -177,9 +177,9 @@ class GolemFamily(models.Model):
[('name', 'ilike', mstreet)], limit=1
)
if street_id:
family.area_id = street_id.area_id
family.area_from_street = True
@api.constrains('street')
def save_street(self):
""" Save street if no exist """
@ -194,6 +194,7 @@ class GolemFamily(models.Model):
{'name': mstreet, 'area_id': family.area_id.id}
)
class GolemFamilyRole(models.Model):
""" GOLEM Family Role """
_name = 'golem.family.role'

View File

@ -188,19 +188,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<field name="arch" type="xml">
<search>
<field name="name" />
<field name='area_id' />
<field name="zip" />
<field name="city" />
<field name="phone" />
<field name="mobile" />
<field name="email" />
<field name='area_id'/>
<filter name="single_parent" string="Single-parent"
domain="[('single_parent', '=', True)]" />
<group string="Group By">
<filter name="group_city" string="By city"
context="{'group_by': 'city'}"/>
<filter name='group_by_area_id' string="By area"
context='{"group_by": "area_id"}'/>
<filter name="group_city" string="By city"
context="{'group_by': 'city'}"/>
</group>
</search>
</field>

View File

@ -20,7 +20,7 @@
'name': 'GOLEM Families History',
'summary': 'GOLEM Families History',
'description': 'GOLEM Families History',
'version': '10.0.0.1.0',
'version': '10.0.0.1.1',
'category': 'GOLEM',
'author': 'Fabien Bourgeois, Youssef El ouahby',
'license': 'AGPL-3',

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-10-26 06:41+0000\n"
"PO-Revision-Date: 2018-10-26 08:45+0200\n"
"POT-Creation-Date: 2018-10-26 15:44+0000\n"
"PO-Revision-Date: 2018-10-26 17:46+0200\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -15,6 +15,11 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: golem_family_history
#: model:ir.model.fields,field_description:golem_family_history.field_golem_family_history_area_id
msgid "Area"
msgstr "Territoire"
#. module: golem_family_history
#: model:ir.model.fields,field_description:golem_family_history.field_golem_family_history_city
msgid "City"

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-10-26 06:41+0000\n"
"PO-Revision-Date: 2018-10-26 06:41+0000\n"
"POT-Creation-Date: 2018-10-26 15:44+0000\n"
"PO-Revision-Date: 2018-10-26 15:44+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -15,6 +15,11 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: golem_family_history
#: model:ir.model.fields,field_description:golem_family_history.field_golem_family_history_area_id
msgid "Area"
msgstr ""
#. module: golem_family_history
#: model:ir.model.fields,field_description:golem_family_history.field_golem_family_history_city
msgid "City"
@ -99,7 +104,7 @@ msgstr ""
#: code:addons/golem_family_history/models/golem_family_history.py:30
#: sql_constraint:golem.family.history:0
#, python-format
msgid "You can only have one history line for each member and season combination."
msgid "You can only have one history line for each family and season combination."
msgstr ""
#. module: golem_family_history

View File

@ -28,7 +28,7 @@ class GolemFamily(models.Model):
family_history_ids = fields.One2many('golem.family.history', 'family_id',
readonly=True, string='History details')
@api.constrains('zip', 'city', 'country_id', 'member_ids')
@api.constrains('area_id', 'zip', 'city', 'country_id', 'member_ids')
def save_family_history(self):
""" Saves family history """
default_season = self.env['golem.season'].search([('is_default', '=', True)], limit=1)

View File

@ -35,7 +35,8 @@ class GolemFamilyHistory(models.Model):
season_id = fields.Many2one('golem.season', required=True, auto_join=True,
string='Season', ondelete='cascade')
zip_code = fields.Char(string='ZIP')
area_id = fields.Many2one('golem.partner.area', string='Area')
area_id = fields.Many2one('golem.partner.area', string='Area',
auto_join=True, ondelete='cascade')
city = fields.Char()
country_id = fields.Many2one('res.country', string='Country')
member_ids = fields.Many2many('res.partner', string='Members',

View File

@ -33,8 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<tree>
<field name="season_id"/>
<field name="member_ids"/>
<field name="zip_code"/>
<field name="area_id"/>
<field name="zip_code"/>
<field name="city"/>
<field name="country_id"/>
</tree>