Compare commits

..

3 Commits
master ... 2

166 changed files with 4446 additions and 10629 deletions

View File

@ -14,5 +14,3 @@
#
# 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/>.
from . import controllers

View File

@ -18,14 +18,15 @@
{
'name': 'GOLEM activities',
'summary': 'Extends Odoo products for multi-activity',
'version': '10.0.2.1.0',
'description': 'Multi-activities management',
'version': '0.1',
'category': 'GOLEM',
'author': 'Fabien Bourgeois, Michel Dessenne',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',
'application': True,
'installable': True,
'depends': ['product', 'account', 'golem_base', 'golem_season'],
'depends': ['product', 'golem_base', 'golem_season'],
'data': ['security/ir.model.access.csv',
'data/golem_activity_data.xml',
'views/golem_activity_views.xml']
'views/golem_activity_view.xml']
}

View File

@ -17,62 +17,30 @@ 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/>.
-->
<odoo>
<openerp>
<data noupdate="1">
<!-- Good default for product categories -->
<record id="property_account_expense_categ_id" model="ir.property">
<field name="name">property_account_expense_categ_id</field>
<field name="fields_id" search="[('model','=','product.category'),('name','=','property_account_expense_categ_id')]"/>
<field name="value">account.account,610</field>
<field name="company_id" ref="base.main_company"/>
</record>
<record id="property_account_income_categ_id" model="ir.property">
<field name="name">property_account_income_categ_id</field>
<field name="fields_id" search="[('model','=','product.category'),('name','=','property_account_income_categ_id')]"/>
<field name="value">account.account,854</field>
<field name="company_id" ref="base.main_company"/>
</record>
<!-- Base data for activities -->
<record model="golem.activity.type" id="golem_activity_type_activity">
<field name="name">Activity</field>
<field name="is_recurrent">1</field>
<record model="product.category" id="golem_product_category_activities">
<field name="name">Activités</field>
<field name="property_account_income_categ"
search="[('code', '=', '706000')]" />
<field name="property_account_expense_categ"
search="[('code', '=', '604000')]" />
</record>
<record model="golem.activity.type" id="golem_activity_type_workshop">
<field name="name">Workshop</field>
<field name="is_recurrent">0</field>
</record>
<record model="golem.activity.type" id="golem_activity_type_training">
<field name="name">Training</field>
<field name="is_recurrent">0</field>
</record>
<record model="product.category" id="golem_product_category_wellbeing">
<field name="name">Bien-Être</field>
<field name="parent_id"
eval="ref('product.product_category_all')" />
<field name="property_account_income_categ_id"
search="[('code', '=', '706000')]" />
<field name="property_account_expense_categ_id"
search="[('code', '=', '604000')]" />
eval="ref('golem_activity.golem_product_category_activities')" />
</record>
<record model="product.category" id="golem_product_category_martial">
<field name="name">Arts martiaux</field>
<field name="parent_id"
eval="ref('product.product_category_all')" />
<field name="property_account_income_categ_id"
search="[('code', '=', '706000')]" />
<field name="property_account_expense_categ_id"
search="[('code', '=', '604000')]" />
eval="ref('golem_activity.golem_product_category_activities')" />
</record>
<record model="product.category" id="golem_product_category_dance">
<field name="name">Danse</field>
<field name="parent_id"
eval="ref('product.product_category_all')" />
<field name="property_account_income_categ_id"
search="[('code', '=', '706000')]" />
<field name="property_account_expense_categ_id"
search="[('code', '=', '604000')]" />
eval="ref('golem_activity.golem_product_category_activities')" />
</record>
</data>
</odoo>
</openerp>

View File

@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-01 16:28+0000\n"
"PO-Revision-Date: 2018-02-01 16:28+0000\n"
"POT-Creation-Date: 2016-06-28 03:15+0000\n"
"PO-Revision-Date: 2016-06-28 03:15+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -17,282 +17,214 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_product_variant_count
msgid "# Product Variants"
msgstr "# Variantes d'articles"
#: field:golem.activity,product_variant_count:0
msgid "# of Product Variants"
msgstr "# de variantes d'articles"
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_description_sale
#: help:golem.activity,description_sale:0
msgid "A description of the Product that you want to communicate to your customers. This description will be copied to every Sale Order, Delivery Order and Customer Invoice/Refund"
msgstr "La description transmise à vos clients. Elle apparaîtra sur chacun des bons de commande, bons de livraison et factures/avoirs destinés à vos clients."
msgstr "Une description de l'article que vous voulez communiquer à vos utilisateurs. Cette description sera utilisée dans chaque bon de commande, bon de livraison et facture client ou avoir."
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_description_purchase
msgid "A description of the Product that you want to communicate to your vendors. This description will be copied to every Purchase Order, Receipt and Vendor Bill/Refund."
msgstr "La description du produit communiquée à vos fournisseurs. Elle sera copiée dans chaque bon de commande, réception et facture/avoir destinés à vos fournisseur."
#: help:golem.activity,description_purchase:0
msgid "A description of the Product that you want to communicate to your suppliers. This description will be copied to every Purchase Order, Receipt and Supplier Invoice/Refund."
msgstr "Une description de l'article que vous voulez communiquer à vos utilisateurs. Cette description sera utilisée dans chaque bon de commande, bon de livraison et facture client ou avoir."
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_description
#: help:golem.activity,description:0
msgid "A precise description of the Product, used only for internal information purposes."
msgstr "Une description précise du produit uniquement utilisée en interne."
msgstr "Une description précise de l'article, utilisée seulement pour de l'information interne (hors factures)."
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_type
msgid "A stockable product is a product for which you manage stock. The \"Inventory\" app has to be installed.\n"
"A consumable product, on the other hand, is a product for which stock is not managed.\n"
"A service is a non-material product you provide.\n"
"A digital content is a non-material product you sell online. The files attached to the products are the one that are sold on the e-commerce such as e-books, music, pictures,... The \"Digital Product\" module has to be installed."
msgstr "Un produit « stockable » est un produit pour lequel vous désirez gérer le stock. L'application « Inventaire » doit être installée.\n"
"Un produit « consommable », en revanche, est un produit non géré en stock.\n"
"Un service est un bien immatériel que vous fournissez ou achetez.\n"
"Un contenu numérique est un bien immatériel que vous vendez en ligne. Les fichier liés aux produits sont ceux vendu sur la boutique en ligne (livres électronique, musique, photos, …). Le module « Produits numériques » doit être installé."
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_active
#: field:golem.activity,active:0
msgid "Active"
msgstr "Actif"
#. module: golem_activity
#: model:ir.ui.menu,name:golem_activity.golem_activity_menu
#: model:ir.ui.menu,name:golem_activity.golem_activity_menu_list
#: model:ir.ui.menu,name:golem_activity.activity_menu
msgid "Activities"
msgstr "Activités"
#. module: golem_activity
#: model:ir.actions.act_window,name:golem_activity.product_category_action
#: model:ir.actions.act_window,name:golem_activity.category_action
msgid "Activities Categories"
msgstr "Catégories d'activités"
#. module: golem_activity
#: model:golem.activity.type,name:golem_activity.golem_activity_type_activity
msgid "Activity"
msgstr "Activité"
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_form
#: view:golem.activity:golem_activity.view_form
msgid "Activity Name"
msgstr "Nom de l'activité"
#. module: golem_activity
#: model:ir.ui.menu,name:golem_activity.golem_activity_type_menu_list
msgid "Activity Types"
msgstr "Types d'activité"
#: model:product.category,name:golem_activity.golem_product_category_activities
msgid "Activités"
msgstr "Activités"
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:120
#, python-format
msgid "Activity end date can not be set after linked season end."
msgstr "La date de fin ne peut pas être apprêt la date de fin de la saison."
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:116
#, python-format
msgid "Activity start date can not be set before linked season start."
msgstr "La date de début ne peut pas être avant la date de début de la saison."
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_name
msgid "Activity type"
msgstr "Type d'activité"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_animator_id
#: field:golem.activity,animator_id:0
msgid "Animator"
msgstr "Intervenant"
#. module: golem_activity
#: model:product.category,name:golem_activity.golem_product_category_martial
msgid "Arts martiaux"
msgstr "Arts martiaux"
#: model:product.category,name:golem_activity.golem_product_category_workshops
msgid "Ateliers"
msgstr "Ateliers"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_barcode
msgid "Barcode"
msgstr "Code Barre"
#: field:golem.activity,product_id:0
msgid "Automatically created field to link to parent product.template"
msgstr "Champ créé automatiquement pour lier l'article parent"
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_list_price
#: model:ir.model.fields,help:golem_activity.field_golem_activity_lst_price
#: help:golem.activity,list_price:0
msgid "Base price to compute the customer price. Sometimes called the catalog price."
msgstr "Prix de base pour calculer le prix client. Parfois appelé prix catalogue."
msgstr "Prix de base pour le client."
#. module: golem_activity
#: model:product.category,name:golem_activity.golem_product_category_wellbeing
msgid "Bien-Être"
msgstr "Bien-Être"
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_search
msgid "By animator"
msgstr "Par intervenant"
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_search
#: view:golem.activity:golem_activity.view_filter
msgid "By category"
msgstr "Par catégorie"
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_search
msgid "By type"
msgstr "Par type"
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_search
msgid "By weekday"
msgstr "Par jour"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_purchase_ok
msgid "Can be Purchased"
msgstr "Peut être acheté"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_rental
#: field:golem.activity,rental:0
msgid "Can be Rent"
msgstr "Peut être loué"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_sale_ok
#: field:golem.activity,sale_ok:0
msgid "Can be Sold"
msgstr "Peut être vendu"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_categ_id
msgid "Categ id"
msgstr "Catégorie"
#. module: golem_activity
#: model:ir.ui.menu,name:golem_activity.product_category_menu
#: model:ir.ui.menu,name:golem_activity.activity_categ
msgid "Categories"
msgstr "Catégories"
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_membership
#: help:golem.activity,membership:0
msgid "Check if the product is eligible for membership."
msgstr "Cochez si l'article est éligible pour l'adhésion"
msgstr "Check if the product is eligible for membership."
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_color
#: help:golem.activity,uos_coeff:0
msgid "Coefficient to convert default Unit of Measure to Unit of Sale\n"
" uos = uom * coeff"
msgstr "Coefficient to convert default Unit of Measure to Unit of Sale\n"
" uos = uom * coeff"
#. module: golem_activity
#: field:golem.activity,color:0
msgid "Color Index"
msgstr "Couleur"
msgstr "Color Index"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_company_id
#: field:golem.activity,company_id:0
msgid "Company"
msgstr "Société"
#. module: golem_activity
#: model:ir.ui.menu,name:golem_activity.golem_activity_menu_configuration
msgid "Configuration"
msgstr "Configuration"
#: help:golem.activity,type:0
msgid "Consumable are product where you don't manage stock, a service is a non-material product provided by a company or an individual."
msgstr "Consumable are product where you don't manage stock, a service is a non-material product provided by a company or an individual."
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_standard_price
msgid "Cost"
msgstr "Coût"
#: field:golem.activity,standard_price:0
msgid "Cost Price"
msgstr "Prix de revient"
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_standard_price
msgid "Cost of the product, in the default unit of measure of the product."
msgstr "Le prix de revient calculé est exprimé dans l'unité de mesure par défaut de l'article."
#: help:golem.activity,standard_price:0
msgid "Cost price of the product template used for standard stock valuation in accounting and used as a base price on purchase orders. Expressed in the default unit of measure of the product."
msgstr "Cost price of the product template used for standard stock valuation in accounting and used as a base price on purchase orders. Expressed in the default unit of measure of the product."
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_create_uid
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_create_uid
#: field:golem.activity,create_uid:0
msgid "Created by"
msgstr "Créé par"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_create_date
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_create_date
#: field:golem.activity,create_date:0
msgid "Created on"
msgstr "Créé le"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_currency_id
msgid "Currency"
msgstr "Devise"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_is_current
#: field:golem.activity,is_current:0
msgid "Current season?"
msgstr "Saison en cours?"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_taxes_id
#: field:golem.activity,taxes_id:0
msgid "Customer Taxes"
msgstr "Taxes à la vente"
msgstr "Taxes"
#. module: golem_activity
#: model:product.category,name:golem_activity.golem_product_category_dance
msgid "Danse"
msgstr "Danse"
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_tree
msgid "Date"
msgstr "Date "
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_membership_date_from
#: help:golem.activity,membership_date_from:0
msgid "Date from which membership becomes active."
msgstr "Date à partir de laquelle l'adhésion devient active."
msgstr "Date from which membership becomes active."
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_membership_date_to
#: help:golem.activity,message_last_post:0
msgid "Date of the last message posted on the record."
msgstr "Date of the last message posted on the record."
#. module: golem_activity
#: help:golem.activity,membership_date_to:0
msgid "Date until which membership remains active."
msgstr "Date jusqu'à laquelle l'adhésion reste active."
msgstr "Date until which membership remains active."
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_tree
msgid "Day"
msgstr "Jour"
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_uom_id
#: help:golem.activity,uom_id:0
msgid "Default Unit of Measure used for all stock operation."
msgstr "Unité de mesure par défaut utilisée pour toutes les opérations de stock"
msgstr "Default Unit of Measure used for all stock operation."
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_uom_po_id
#: help:golem.activity,uom_po_id:0
msgid "Default Unit of Measure used for purchase orders. It must be in the same category than the default unit of measure."
msgstr "Unité de mesure par défaut pour les ordres d'achat. Elle doit appartenir à la même catégorie que l'unité de mesure par défaut."
msgstr "Default Unit of Measure used for purchase orders. It must be in the same category than the default unit of measure."
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_search
#: view:golem.activity:golem_activity.view_filter
msgid "Default season"
msgstr "Saison par défaut"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_description
#: field:golem.activity,description:0
msgid "Description"
msgstr "Description"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_display_name
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_display_name
#: view:golem.activity:golem_activity.view_form
msgid "Details"
msgstr "Détails"
#. module: golem_activity
#: field:golem.activity,display_name:0
msgid "Display Name"
msgstr "Nom affiché"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_date_stop
#: field:golem.activity,ean13:0
msgid "EAN13 Barcode"
msgstr "Code-barres EAN13"
#. module: golem_activity
#: field:golem.activity,date_end:0
msgid "End date"
msgstr "Date de fin"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_property_account_expense_id
#: field:golem.activity,property_account_expense:0
msgid "Expense Account"
msgstr "Compte de dépenses"
msgstr "Compte de dépense"
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:138
#: selection:golem.activity,weekday:0
#, python-format
msgid "Friday"
msgstr "Vendredi"
#: field:golem.activity,message_follower_ids:0
msgid "Followers"
msgstr "Abonnés"
#. module: golem_activity
#: model:ir.actions.act_window,name:golem_activity.golem_activity_action
#: model:ir.actions.act_window,name:golem_activity.action
msgid "GOLEM Activities"
msgstr "Activités"
@ -302,167 +234,190 @@ msgid "GOLEM Activity"
msgstr "Activité"
#. module: golem_activity
#: model:ir.model,name:golem_activity.model_golem_activity_type
msgid "GOLEM Activity Type"
msgstr "GOLEM Activity Type"
#. module: golem_activity
#: model:ir.actions.act_window,name:golem_activity.golem_activity_type_action
msgid "GOLEM Activity Types"
msgstr "GOLEM Activity Types"
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_packaging_ids
#: help:golem.activity,packaging_ids:0
msgid "Gives the different ways to package the same product. This has no impact on the picking order and is mainly used if you use the EDI module."
msgstr "Indique les différentes façons d'emballer un même article. Ceci n'a pas d'impact sur les ordres de préparation, et sert principalement si vous activez le module d'EDI."
msgstr "Gives the different ways to package the same product. This has no impact on the picking order and is mainly used if you use the EDI module."
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_sequence
msgid "Gives the sequence order when displaying a product list"
msgstr "Indique l'ordre d'affichage lorsqu'une liste d'articles est affichée."
#: field:golem.activity,weight:0
msgid "Gross Weight"
msgstr "Gross Weight"
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_search
#: view:golem.activity:golem_activity.view_filter
msgid "Group By"
msgstr "Grouper par"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_id
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_id
#: help:golem.activity,message_summary:0
msgid "Holds the Chatter summary (number of messages, ...). This summary is directly in html format in order to be inserted in kanban views."
msgstr "Holds the Chatter summary (number of messages, ...). This summary is directly in html format in order to be inserted in kanban views."
#. module: golem_activity
#: field:golem.activity,id:0
msgid "ID"
msgstr "ID"
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_active
msgid "If unchecked, it will allow you to hide the product without removing it."
msgstr "En décochant cette case, il est possible de masquer l'article sans le supprimer."
#: help:golem.activity,message_unread:0
msgid "If checked new messages require your attention."
msgstr "If checked new messages require your attention."
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_image
#: help:golem.activity,active:0
msgid "If unchecked, it will allow you to hide the product without removing it."
msgstr "If unchecked, it will allow you to hide the product without removing it."
#. module: golem_activity
#: field:golem.activity,image:0
msgid "Image"
msgstr "Image"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_property_account_income_id
#: field:golem.activity,property_account_income:0
msgid "Income Account"
msgstr "Compte de revenus"
msgstr "Income Account"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_default_code
#: view:golem.activity:golem_activity.view_form
msgid "Information"
msgstr "Information"
#. module: golem_activity
#: field:golem.activity,categ_id:0
msgid "Internal Category"
msgstr "Catégorie"
#. module: golem_activity
#: field:golem.activity,default_code:0
msgid "Internal Reference"
msgstr "Référence interne"
msgstr "Référence"
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_barcode
msgid "International Article Number used for product identification."
msgstr "Numéro d'article international (IAN) utilisé pour identifier cet article."
#: field:golem.activity,message_is_follower:0
msgid "Is a Follower"
msgstr "Is a Follower"
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_form
msgid "Invoicing"
msgstr "Facturation"
#: field:golem.activity,is_product_variant:0
msgid "Is product variant"
msgstr "Is product variant"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_is_fullseason
msgid "Is full season?"
msgstr "Est sur toute la saison ?"
#: field:golem.activity,message_last_post:0
msgid "Last Message Date"
msgstr "Date du dernier message"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_is_recurrent
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_is_recurrent
msgid "Is recurrent?"
msgstr "Est récurrent ?"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity___last_update
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type___last_update
#: field:golem.activity,__last_update:0
msgid "Last Modified on"
msgstr "Dernière Modification le"
msgstr "Dernière modification le"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_write_uid
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_write_uid
#: field:golem.activity,write_uid:0
msgid "Last Updated by"
msgstr "Dernière mise à jour par"
msgstr "Dernière modification par"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_write_date
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_write_date
#: field:golem.activity,write_date:0
msgid "Last Updated on"
msgstr "Dernière mise à jour le"
msgstr "Dernière modification le"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_packaging_ids
#: model:ir.ui.menu,name:golem_activity.activity_list
msgid "List"
msgstr "Liste"
#. module: golem_activity
#: field:golem.activity,packaging_ids:0
msgid "Logistical Units"
msgstr "Unités logistique"
msgstr "Logistical Units"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_image_medium
#: field:golem.activity,seller_id:0
msgid "Main Supplier"
msgstr "Main Supplier"
#. module: golem_activity
#: help:golem.activity,seller_id:0
msgid "Main Supplier who has highest priority in Supplier List."
msgstr "Main Supplier who has highest priority in Supplier List."
#. module: golem_activity
#: field:golem.activity,mes_type:0
msgid "Measure Type"
msgstr "Measure Type"
#. module: golem_activity
#: field:golem.activity,image_medium:0
msgid "Medium-sized image"
msgstr "Image de taille moyenne"
msgstr "Medium-sized image"
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_image_medium
#: help:golem.activity,image_medium:0
msgid "Medium-sized image of the product. It is automatically resized as a 128x128px image, with aspect ratio preserved, only when the image exceeds one of those sizes. Use this field in form views or some kanban views."
msgstr "Image de taille moyenne de l'article. Elle sera automatiquement redimensionnée à 128 x 128 px, en préservent le rapport hauteur/largeur, si l'image dépasse une de ces dimensions. Utilisez ce champ dans les vues formulaire ou certaines vues kanban."
msgstr "Medium-sized image of the product. It is automatically resized as a 128x128px image, with aspect ratio preserved, only when the image exceeds one of those sizes. Use this field in form views or some kanban views."
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_membership
#: field:golem.activity,membership:0
msgid "Membership"
msgstr "Adhésion"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_membership_date_to
#: field:golem.activity,membership_date_to:0
msgid "Membership End Date"
msgstr "Date de fin d'adhésion"
msgstr "Fin de l'adhésion"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_membership_date_from
#: field:golem.activity,membership_date_from:0
msgid "Membership Start Date"
msgstr "Date de début d'adhésion"
msgstr "Début de l'adhésion"
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:134
#: selection:golem.activity,weekday:0
#, python-format
msgid "Monday"
msgstr "Lundi"
#: field:golem.activity,message_ids:0
msgid "Messages"
msgstr "Messages"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_full_name
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_name
#: help:golem.activity,message_ids:0
msgid "Messages and communication history"
msgstr "Messages and communication history"
#. module: golem_activity
#: field:golem.activity,activity_name:0
#: field:golem.activity,name:0
msgid "Name"
msgstr "Nom"
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_form
#: field:golem.activity,weight_net:0
msgid "Net Weight"
msgstr "Net Weight"
#. module: golem_activity
#: view:golem.activity:golem_activity.view_form
msgid "Others"
msgstr "Autres"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_price
#: field:golem.activity,price:0
msgid "Price"
msgstr "Prix"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_pricelist_id
#: field:golem.activity,pricelist_id:0
msgid "Pricelist"
msgstr "Liste de prix"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_item_ids
msgid "Pricelist Items"
msgstr "Éléments de la liste de prix"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_product_variant_id
msgid "Product"
msgstr "Article"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_attribute_line_ids
#: field:golem.activity,attribute_line_ids:0
msgid "Product Attributes"
msgstr "Caractéristiques d'articles"
msgstr "Product Attributes"
#. module: golem_activity
#: field:golem.activity,product_manager:0
msgid "Product Manager"
msgstr "Product Manager"
#. module: golem_activity
#: model:ir.model,name:golem_activity.model_product_template
@ -470,230 +425,193 @@ msgid "Product Template"
msgstr "Modèle d'article"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type
#: field:golem.activity,type:0
msgid "Product Type"
msgstr "Type d'article"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_product_id
msgid "Product id"
msgstr "Article"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_product_variant_ids
#: field:golem.activity,product_variant_ids:0
msgid "Products"
msgstr "Articles"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_lst_price
#: field:golem.activity,lst_price:0
msgid "Public Price"
msgstr "Prix public"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_description_purchase
#: field:golem.activity,description_purchase:0
msgid "Purchase Description"
msgstr "Description achat"
msgstr "Purchase Description"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_uom_po_id
#: field:golem.activity,uom_po_id:0
msgid "Purchase Unit of Measure"
msgstr "Unité de mesure d'achat"
msgstr "Purchase Unit of Measure"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_description_sale
#: field:golem.activity,description_sale:0
msgid "Sale Description"
msgstr "Description vente"
msgstr "Description de vente"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_list_price
#: field:golem.activity,list_price:0
msgid "Sale Price"
msgstr "Prix de vente"
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:139
#: selection:golem.activity,weekday:0
#, python-format
msgid "Saturday"
msgstr "Samedi"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_season_id
#: field:golem.activity,season_id:0
msgid "Season"
msgstr "Saison"
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_categ_id
msgid "Select category for the current activity"
msgstr "Sélectionnez la catégorie pour l'activité"
#: help:golem.activity,categ_id:0
msgid "Select category for the current product"
msgstr "Select category for the current product"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_sequence
msgid "Sequence"
msgstr "Séquence"
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_form
msgid "Session"
msgstr "Session"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_image_small
#: field:golem.activity,image_small:0
msgid "Small-sized image"
msgstr "Image de petite taille"
msgstr "Small-sized image"
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_image_small
#: help:golem.activity,image_small:0
msgid "Small-sized image of the product. It is automatically resized as a 64x64px image, with aspect ratio preserved. Use this field anywhere a small image is required."
msgstr "Vignette de l'article. Elle sera automatiquement redimensionnée à 64 x 64 px, en préservent le rapport hauteur/largeur. Utilisez ce champ partout où une petite image est nécessaire."
msgstr "Small-sized image of the product. It is automatically resized as a 64x64px image, with aspect ratio preserved. Use this field anywhere a small image is required."
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_sale_ok
#: help:golem.activity,uos_id:0
msgid "Specify a unit of measure here if invoicing is made in another unit of measure than inventory. Keep empty to use the default unit of measure."
msgstr "Specify a unit of measure here if invoicing is made in another unit of measure than inventory. Keep empty to use the default unit of measure."
#. module: golem_activity
#: help:golem.activity,sale_ok:0
msgid "Specify if the product can be selected in a sales order line."
msgstr "Indique si l'article peut être mis dans une ligne de commande de vente."
msgstr "Specify if the product can be selected in a sales order line."
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_date_start
#: model:product.category,name:golem_activity.golem_product_category_trainings
msgid "Stages"
msgstr "Stages"
#. module: golem_activity
#: field:golem.activity,date_start:0
msgid "Start date"
msgstr "Date de début"
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:113
#: code:addons/golem_activity/models/golem_activity.py:156
#: code:addons/golem_activity/models/golem_activity.py:47
#, python-format
msgid "Start of the period cannot be after end of the period."
msgstr "Le début de la période ne peut être antérieure à sa fin"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_hour_start
msgid "Start time"
msgstr "Heure de début"
#: field:golem.activity,state:0
msgid "Status"
msgstr "Statut"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_hour_stop
msgid "Stop time"
msgstr "Heure de fin"
#: field:golem.activity,message_summary:0
msgid "Summary"
msgstr "Résumé"
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:140
#: selection:golem.activity,weekday:0
#, python-format
msgid "Sunday"
msgstr "Dimanche"
#: field:golem.activity,seller_ids:0
msgid "Supplier"
msgstr "Supplier"
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_pricelist_id
msgid "Technical field. Used for searching on pricelists, not stored in database."
msgstr "Champ technique. Utilisé pour la recherche sur les listes de prix, non stocké en base de données."
#: field:golem.activity,seller_delay:0
msgid "Supplier Lead Time"
msgstr "Supplier Lead Time"
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_volume
#: field:golem.activity,seller_qty:0
msgid "Supplier Quantity"
msgstr "Supplier Quantity"
#. module: golem_activity
#: field:golem.activity,supplier_taxes_id:0
msgid "Supplier Taxes"
msgstr "Supplier Taxes"
#. module: golem_activity
#: help:golem.activity,weight:0
msgid "The gross weight in Kg."
msgstr "The gross weight in Kg."
#. module: golem_activity
#: help:golem.activity,weight_net:0
msgid "The net weight in Kg."
msgstr "The net weight in Kg."
#. module: golem_activity
#: help:golem.activity,volume:0
msgid "The volume in m3."
msgstr "Le volume en m³"
msgstr "The volume in m3."
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_weight
msgid "The weight of the contents in Kg, not including any packaging, etc."
msgstr "Le poids du contenu en kilogrammes, sans compter tout emballage, etc."
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_property_account_expense_id
#: help:golem.activity,property_account_expense:0
msgid "This account will be used for invoices instead of the default one to value expenses for the current product."
msgstr "Ce compte sera utilisé au lieu de celui par défaut pour les factures pour comptabiliser les achats pour le produit en cours."
msgstr "This account will be used for invoices instead of the default one to value expenses for the current product."
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_property_account_income_id
#: help:golem.activity,property_account_income:0
msgid "This account will be used for invoices instead of the default one to value sales for the current product."
msgstr "Ce compte sera utilisé au lieu de celui par défaut pour les factures pour comptabiliser les ventes pour le produit en cours."
msgstr "This account will be used for invoices instead of the default one to value sales for the current product."
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:28
#: sql_constraint:golem.activity.type:0
#, python-format
msgid "This activity type name has already been used."
msgstr "Ce nom pour un type d'activité a déjà été utilisé."
#: help:golem.activity,image:0
msgid "This field holds the image used as image for the product, limited to 1024x1024px."
msgstr "This field holds the image used as image for the product, limited to 1024x1024px."
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_image
msgid "This field holds the image used as image for the activity."
msgstr "This field holds the image used as image for the activity."
#: help:golem.activity,seller_qty:0
msgid "This is minimum quantity to purchase from Main Supplier."
msgstr "This is minimum quantity to purchase from Main Supplier."
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:137
#: selection:golem.activity,weekday:0
#, python-format
msgid "Thursday"
msgstr "Jeudi"
#: help:golem.activity,seller_delay:0
msgid "This is the average delay in days between the purchase order confirmation and the receipts for this product and for the default supplier. It is used by the scheduler to order requests based on reordering delays."
msgstr "This is the average delay in days between the purchase order confirmation and the receipts for this product and for the default supplier. It is used by the scheduler to order requests based on reordering delays."
#. module: golem_activity
#: model:golem.activity.type,name:golem_activity.golem_activity_type_training
msgid "Training"
msgstr "Stage"
#: model:product.category,name:golem_activity.golem_product_category_all_activities
msgid "Toutes les activités"
msgstr "Toutes les activités"
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_tree
msgid "True"
msgstr "True"
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:135
#: selection:golem.activity,weekday:0
#, python-format
msgid "Tuesday"
msgstr "Mardi"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_id_3891
msgid "Type"
msgstr "Type"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_uom_id
#: field:golem.activity,uom_id:0
msgid "Unit of Measure"
msgstr "Unité de mesure"
msgstr "Unit of Measure"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_supplier_taxes_id
msgid "Vendor Taxes"
msgstr "Taxes fournisseur"
#: field:golem.activity,uos_coeff:0
msgid "Unit of Measure -> UOS Coeff"
msgstr "Unit of Measure -> UOS Coeff"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_seller_ids
msgid "Vendors"
msgstr "Fournisseurs"
#: field:golem.activity,uos_id:0
msgid "Unit of Sale"
msgstr "Unit of Sale"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_volume
#: field:golem.activity,message_unread:0
msgid "Unread Messages"
msgstr "Messages non lus"
#. module: golem_activity
#: field:golem.activity,volume:0
msgid "Volume"
msgstr "Volume"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_warranty
#: field:golem.activity,warranty:0
msgid "Warranty"
msgstr "Garantie"
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:136
#: selection:golem.activity,weekday:0
#, python-format
msgid "Wednesday"
msgstr "Mercredi"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_weekday
msgid "Weekday"
msgstr "Jour"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_weight
msgid "Weight"
msgstr "Poids"
#. module: golem_activity
#: model:golem.activity.type,name:golem_activity.golem_activity_type_workshop
msgid "Workshop"
msgstr "Atelier"
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_form
#: view:golem.activity:golem_activity.view_form
msgid "describe the activity characteristics..."
msgstr "Décrivez ici les caractéristiques de l'activité..."
msgstr "Décrivez les caractéristiques de l'activité..."

View File

@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-01 16:28+0000\n"
"PO-Revision-Date: 2018-02-01 16:28+0000\n"
"POT-Creation-Date: 2016-07-11 10:05+0000\n"
"PO-Revision-Date: 2016-07-11 10:05+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -16,279 +16,78 @@ msgstr ""
"Plural-Forms: \n"
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_product_variant_count
msgid "# Product Variants"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_description_sale
msgid "A description of the Product that you want to communicate to your customers. This description will be copied to every Sale Order, Delivery Order and Customer Invoice/Refund"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_description_purchase
msgid "A description of the Product that you want to communicate to your vendors. This description will be copied to every Purchase Order, Receipt and Vendor Bill/Refund."
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_description
msgid "A precise description of the Product, used only for internal information purposes."
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_type
msgid "A stockable product is a product for which you manage stock. The \"Inventory\" app has to be installed.\n"
"A consumable product, on the other hand, is a product for which stock is not managed.\n"
"A service is a non-material product you provide.\n"
"A digital content is a non-material product you sell online. The files attached to the products are the one that are sold on the e-commerce such as e-books, music, pictures,... The \"Digital Product\" module has to be installed."
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_active
msgid "Active"
msgstr ""
#. module: golem_activity
#: model:ir.ui.menu,name:golem_activity.golem_activity_menu
#: model:ir.ui.menu,name:golem_activity.golem_activity_menu_list
#: model:ir.ui.menu,name:golem_activity.activity_menu
msgid "Activities"
msgstr ""
#. module: golem_activity
#: model:ir.actions.act_window,name:golem_activity.product_category_action
msgid "Activities Categories"
msgstr ""
#. module: golem_activity
#: model:golem.activity.type,name:golem_activity.golem_activity_type_activity
msgid "Activity"
msgstr ""
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_form
#: view:golem.activity:golem_activity.view_form
msgid "Activity Name"
msgstr ""
#. module: golem_activity
#: model:ir.ui.menu,name:golem_activity.golem_activity_type_menu_list
msgid "Activity Types"
#: model:product.category,name:golem_activity.golem_product_category_activities
msgid "Activités"
msgstr ""
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:120
#, python-format
msgid "Activity end date can not be set after linked season start."
msgstr ""
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:116
#, python-format
msgid "Activity start date can not be set before linked season start."
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_name
msgid "Activity type"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_animator_id
#: field:golem.activity,animator_id:0
msgid "Animator"
msgstr ""
#. module: golem_activity
#: model:product.category,name:golem_activity.golem_product_category_martial
msgid "Arts martiaux"
#: model:product.category,name:golem_activity.golem_product_category_workshops
msgid "Ateliers"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_barcode
msgid "Barcode"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_list_price
#: model:ir.model.fields,help:golem_activity.field_golem_activity_lst_price
msgid "Base price to compute the customer price. Sometimes called the catalog price."
msgstr ""
#. module: golem_activity
#: model:product.category,name:golem_activity.golem_product_category_wellbeing
msgid "Bien-Être"
msgstr ""
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_search
msgid "By animator"
msgstr ""
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_search
msgid "By category"
msgstr ""
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_search
msgid "By type"
msgstr ""
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_search
msgid "By weekday"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_purchase_ok
msgid "Can be Purchased"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_rental
msgid "Can be Rent"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_sale_ok
msgid "Can be Sold"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_categ_id
msgid "Categ id"
msgstr ""
#. module: golem_activity
#: model:ir.ui.menu,name:golem_activity.product_category_menu
msgid "Categories"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_membership
msgid "Check if the product is eligible for membership."
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_color
msgid "Color Index"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_company_id
msgid "Company"
msgstr ""
#. module: golem_activity
#: model:ir.ui.menu,name:golem_activity.golem_activity_menu_configuration
msgid "Configuration"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_standard_price
msgid "Cost"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_standard_price
msgid "Cost of the product, in the default unit of measure of the product."
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_create_uid
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_create_uid
#: field:golem.activity,create_uid:0
msgid "Created by"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_create_date
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_create_date
#: field:golem.activity,create_date:0
msgid "Created on"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_currency_id
msgid "Currency"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_is_current
#: field:golem.activity,is_current:0
msgid "Current season?"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_taxes_id
msgid "Customer Taxes"
#: help:golem.activity,message_last_post:0
msgid "Date of the last message posted on the record."
msgstr ""
#. module: golem_activity
#: model:product.category,name:golem_activity.golem_product_category_dance
msgid "Danse"
msgstr ""
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_tree
msgid "Date"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_membership_date_from
msgid "Date from which membership becomes active."
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_membership_date_to
msgid "Date until which membership remains active."
msgstr ""
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_tree
msgid "Day"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_uom_id
msgid "Default Unit of Measure used for all stock operation."
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_uom_po_id
msgid "Default Unit of Measure used for purchase orders. It must be in the same category than the default unit of measure."
msgstr ""
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_search
#: view:golem.activity:golem_activity.view_filter
msgid "Default season"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_description
msgid "Description"
#: view:golem.activity:golem_activity.view_form
msgid "Details"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_display_name
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_display_name
#: field:golem.activity,display_name:0
msgid "Display Name"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_date_stop
#: field:golem.activity,date_end:0
msgid "End date"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_property_account_expense_id
msgid "Expense Account"
#: field:golem.activity,message_follower_ids:0
msgid "Followers"
msgstr ""
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:138
#: selection:golem.activity,weekday:0
#, python-format
msgid "Friday"
msgstr ""
#. module: golem_activity
#: model:ir.actions.act_window,name:golem_activity.golem_activity_action
#: view:golem.activity:golem_activity.view_tree
#: model:ir.actions.act_window,name:golem_activity.action
msgid "GOLEM Activities"
msgstr ""
@ -298,166 +97,83 @@ msgid "GOLEM Activity"
msgstr ""
#. module: golem_activity
#: model:ir.model,name:golem_activity.model_golem_activity_type
msgid "GOLEM Activity Type"
#: help:golem.activity,message_summary:0
msgid "Holds the Chatter summary (number of messages, ...). This summary is directly in html format in order to be inserted in kanban views."
msgstr ""
#. module: golem_activity
#: model:ir.actions.act_window,name:golem_activity.golem_activity_type_action
msgid "GOLEM Activity Types"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_packaging_ids
msgid "Gives the different ways to package the same product. This has no impact on the picking order and is mainly used if you use the EDI module."
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_sequence
msgid "Gives the sequence order when displaying a product list"
msgstr ""
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_search
msgid "Group By"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_id
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_id
#: field:golem.activity,id:0
msgid "ID"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_active
msgid "If unchecked, it will allow you to hide the product without removing it."
#: help:golem.activity,message_unread:0
msgid "If checked new messages require your attention."
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_image
#: field:golem.activity,image:0
msgid "Image"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_property_account_income_id
msgid "Income Account"
#: view:golem.activity:golem_activity.view_form
msgid "Information"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_default_code
msgid "Internal Reference"
#: field:golem.activity,categ_id:0
msgid "Internal Category"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_barcode
msgid "International Article Number used for product identification."
#: field:golem.activity,message_is_follower:0
msgid "Is a Follower"
msgstr ""
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_form
msgid "Invoicing"
#: field:golem.activity,message_last_post:0
msgid "Last Message Date"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_is_fullseason
msgid "Is full season?"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_is_recurrent
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_is_recurrent
msgid "Is recurrent?"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity___last_update
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type___last_update
#: field:golem.activity,__last_update:0
msgid "Last Modified on"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_write_uid
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_write_uid
#: field:golem.activity,write_uid:0
msgid "Last Updated by"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_write_date
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_write_date
#: field:golem.activity,write_date:0
msgid "Last Updated on"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_packaging_ids
msgid "Logistical Units"
#: model:ir.ui.menu,name:golem_activity.activity_list
msgid "List"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_image_medium
msgid "Medium-sized image"
#: field:golem.activity,message_ids:0
msgid "Messages"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_image_medium
msgid "Medium-sized image of the product. It is automatically resized as a 128x128px image, with aspect ratio preserved, only when the image exceeds one of those sizes. Use this field in form views or some kanban views."
#: help:golem.activity,message_ids:0
msgid "Messages and communication history"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_membership
msgid "Membership"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_membership_date_to
msgid "Membership End Date"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_membership_date_from
msgid "Membership Start Date"
msgstr ""
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:134
#: selection:golem.activity,weekday:0
#, python-format
msgid "Monday"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_full_name
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_name
#: field:golem.activity,name:0
msgid "Name"
msgstr ""
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_form
msgid "Others"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_price
msgid "Price"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_pricelist_id
msgid "Pricelist"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_item_ids
msgid "Pricelist Items"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_product_variant_id
msgid "Product"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_attribute_line_ids
msgid "Product Attributes"
#: field:golem.activity,note:0
msgid "Note"
msgstr ""
#. module: golem_activity
@ -466,231 +182,53 @@ msgid "Product Template"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type
msgid "Product Type"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_product_id
msgid "Product id"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_product_variant_ids
msgid "Products"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_lst_price
msgid "Public Price"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_description_purchase
msgid "Purchase Description"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_uom_po_id
msgid "Purchase Unit of Measure"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_description_sale
msgid "Sale Description"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_list_price
msgid "Sale Price"
msgstr ""
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:139
#: selection:golem.activity,weekday:0
#, python-format
msgid "Saturday"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_season_id
#: field:golem.activity,season_id:0
msgid "Season"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_categ_id
#: help:golem.activity,categ_id:0
msgid "Select category for the current activity"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_sequence
msgid "Sequence"
#: model:product.category,name:golem_activity.golem_product_category_trainings
msgid "Stages"
msgstr ""
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_form
msgid "Session"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_image_small
msgid "Small-sized image"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_image_small
msgid "Small-sized image of the product. It is automatically resized as a 64x64px image, with aspect ratio preserved. Use this field anywhere a small image is required."
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_sale_ok
msgid "Specify if the product can be selected in a sales order line."
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_date_start
#: field:golem.activity,date_start:0
msgid "Start date"
msgstr ""
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:113
#: code:addons/golem_activity/models/golem_activity.py:156
#: code:addons/golem_activity/models/golem_activity.py:53
#, python-format
msgid "Start of the period cannot be after end of the period."
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_hour_start
msgid "Start time"
#: field:golem.activity,message_summary:0
msgid "Summary"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_hour_stop
msgid "Stop time"
msgstr ""
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:140
#: selection:golem.activity,weekday:0
#, python-format
msgid "Sunday"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_pricelist_id
msgid "Technical field. Used for searching on pricelists, not stored in database."
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_volume
msgid "The volume in m3."
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_weight
msgid "The weight of the contents in Kg, not including any packaging, etc."
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_property_account_expense_id
msgid "This account will be used for invoices instead of the default one to value expenses for the current product."
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_property_account_income_id
msgid "This account will be used for invoices instead of the default one to value sales for the current product."
msgstr ""
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:28
#: sql_constraint:golem.activity.type:0
#, python-format
msgid "This activity type name has already been used."
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,help:golem_activity.field_golem_activity_image
#: help:golem.activity,image:0
msgid "This field holds the image used as image for the activity."
msgstr ""
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:137
#: selection:golem.activity,weekday:0
#, python-format
msgid "Thursday"
#: model:product.category,name:golem_activity.golem_product_category_all_activities
msgid "Toutes les activités"
msgstr ""
#. module: golem_activity
#: model:golem.activity.type,name:golem_activity.golem_activity_type_training
msgid "Training"
#: field:golem.activity,message_unread:0
msgid "Unread Messages"
msgstr ""
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_tree
msgid "True"
msgstr ""
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:135
#: selection:golem.activity,weekday:0
#, python-format
msgid "Tuesday"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_type_id_3891
msgid "Type"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_uom_id
msgid "Unit of Measure"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_supplier_taxes_id
msgid "Vendor Taxes"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_seller_ids
msgid "Vendors"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_volume
msgid "Volume"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_warranty
msgid "Warranty"
msgstr ""
#. module: golem_activity
#: code:addons/golem_activity/models/golem_activity.py:136
#: selection:golem.activity,weekday:0
#, python-format
msgid "Wednesday"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_weekday
msgid "Weekday"
msgstr ""
#. module: golem_activity
#: model:ir.model.fields,field_description:golem_activity.field_golem_activity_weight
msgid "Weight"
msgstr ""
#. module: golem_activity
#: model:golem.activity.type,name:golem_activity.golem_activity_type_workshop
msgid "Workshop"
msgstr ""
#. module: golem_activity
#: model:ir.ui.view,arch_db:golem_activity.golem_activity_form
#: view:golem.activity:golem_activity.view_form
msgid "describe the activity characteristics..."
msgstr ""

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -15,57 +15,19 @@
# 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/>.
""" GOLEM activities related models """
from odoo import models, fields, api, _
class GolemActivityType(models.Model):
""" GOLEM Activity Type """
_name = 'golem.activity.type'
_description = 'GOLEM Activity Type'
_sql_constraints = [('golem_activity_type_name_uniq', 'UNIQUE (name)',
_('This activity type name has already been used.'))]
name = fields.Char('Activity type', required=True, translate=True)
is_recurrent = fields.Boolean('Is recurrent?')
from openerp import models, fields, api, _
class GolemActivity(models.Model):
""" GOLEM Activity """
_name = 'golem.activity'
_description = 'GOLEM Activity'
_inherit = 'mail.thread'
_inherits = {'product.template': 'product_id'}
_rec_name = 'full_name'
product_id = fields.Many2one('product.template', required=True,
ondelete='cascade')
image = fields.Binary(help='This field holds the image used as image for '
'the activity.')
full_name = fields.Char('Name', compute='_compute_full_name', store=True,
index=True)
is_fullseason = fields.Boolean('Is full season?',
compute='_compute_is_full_season')
@api.depends('date_start', 'date_stop')
def _compute_is_full_season(self):
""" Display date for is full season """
for activity in self:
if activity.date_start == activity.season_id.date_start and \
activity.date_stop == activity.season_id.date_end:
activity.is_fullseason = True
@api.depends('name', 'default_code')
def _compute_full_name(self):
""" Provide a better displayed name """
for activity in self:
full_name = unicode(activity.name)
if activity.default_code:
full_name = u'[{}] {}'.format(activity.default_code, full_name)
activity.full_name = full_name
name = fields.Char('Name', index=True, required=True)
default_code = fields.Char('Internal Reference', index=True)
image = fields.Binary('Image', help='This field holds the image used as '
'image for the activity.')
note = fields.Text('Note')
@api.model
def _default_season(self):
@ -76,91 +38,38 @@ class GolemActivity(models.Model):
season_id = fields.Many2one('golem.season', string='Season', copy=False,
required=True, default=_default_season,
ondelete='restrict')
is_current = fields.Boolean('Current season?', store=True, default=False,
compute='compute_is_current')
@api.depends('season_id')
def compute_is_current(self):
""" Checks if activity is active for current season """
default_season = self._default_season()
for activity in self:
activity.is_current = (default_season == activity.season_id)
animator_id = fields.Many2one('res.partner', string='Animator',
domain=[('is_company', '=', False)])
categ_id = fields.Many2one('product.category',
categ_id = fields.Many2one('product.category', 'Internal Category',
required=True,
help='Select category for the current activity')
type_id = fields.Many2one('golem.activity.type', required=True, index=True,
string='Type')
is_recurrent = fields.Boolean(related='type_id.is_recurrent')
date_start = fields.Date('Start date', copy=False)
date_stop = fields.Date('End date', copy=False)
date_end = fields.Date('End date', copy=False)
@api.onchange('date_start')
def _onchange_date_start(self):
""" Sets end date to start date if no start date """
for activity in self:
if not activity.date_stop:
activity.date_stop = activity.date_start
@api.constrains('date_start', 'date_stop')
@api.constrains('date_start', 'date_end')
def _check_period(self):
""" Checks if end date if after start date """
for activity in self:
if activity.date_start and activity.date_stop and \
activity.date_start > activity.date_stop:
""" Check if end date if after start date """
for a in self:
if a.date_start and a.date_end and a.date_start > a.date_end:
raise models.ValidationError(_('Start of the period cannot be '
'after end of the period.'))
if activity.season_id.date_start > activity.date_start:
msg = _(u'Activity start date can not be set before '
'linked season start.')
raise models.ValidationError(msg)
if activity.season_id.date_end < activity.date_stop:
msg = _(u'Activity end date can not be set after '
'linked season end.')
raise models.ValidationError(msg)
@api.onchange('season_id')
def _onchange_season_dates(self):
def onchange_season_dates(self):
""" Sets defaults dates according to season """
for activity in self:
if activity.season_id:
if not activity.date_start:
activity.date_start = activity.season_id.date_start
if not activity.date_stop:
activity.date_stop = activity.season_id.date_end
for a in self:
if a.season_id:
if not a.date_start:
a.date_start = a.season_id.date_start
if not a.date_end:
a.date_end = a.season_id.date_end
weekday = fields.Selection([('mon', _('Monday')),
('tue', _('Tuesday')),
('wed', _('Wednesday')),
('thu', _('Thursday')),
('fri', _('Friday')),
('sat', _('Saturday')),
('sun', _('Sunday'))], copy=False)
hour_start = fields.Float('Start time', copy=False)
hour_stop = fields.Float('Stop time', copy=False)
is_current = fields.Boolean('Current season?', store=True, default=False,
compute='_compute_is_current')
@api.onchange('hour_start')
def _onchange_hour_start(self):
""" Sets end hour to start hour if no start hour """
for activity in self:
if activity.hour_start and not activity.hour_stop:
activity.hour_stop = activity.hour_start + 1
@api.constrains('hour_start', 'hour_stop')
def _check_hour_period(self):
""" Check if end hour if after start hour """
for activity in self:
if activity.hour_start > activity.hour_stop:
raise models.ValidationError(_('Start of the period cannot be '
'after end of the period.'))
class ProductTemplate(models.Model):
""" GOLEM Activity Product adaptations """
_inherit = 'product.template'
type = fields.Selection(default='service')
default_code = fields.Char(copy=True)
categ_id = fields.Many2one(copy=True)
@api.one
@api.depends('season_id')
def _compute_is_current(self):
""" Checks if activity is active for current season """
default_season = self._default_season()
self.is_current = (default_season == self.season_id)

View File

@ -1,13 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_product_template_user,Access Product Template User,product.model_product_template,golem_base.group_golem_user,1,1,1,0
access_product_template_manager,Access Product Template Manager,product.model_product_template,golem_base.group_golem_manager,1,1,1,1
access_product_product_user,Access Product Product User,product.model_product_product,golem_base.group_golem_user,1,1,1,0
access_product_product_manager,Access Product Product Manager,product.model_product_product,golem_base.group_golem_manager,1,1,1,1
access_product_price_history_user,Access Product Price History User,product.model_product_price_history,golem_base.group_golem_user,1,1,1,0
access_product_price_history_manager,Access Product Price History Manager,product.model_product_price_history,golem_base.group_golem_manager,1,1,1,1
access_product_category_user,Access Product Category User,product.model_product_category,golem_base.group_golem_user,1,0,0,0
access_product_category_manager,Access Product Category Manager,product.model_product_category,golem_base.group_golem_manager,1,1,1,1
access_golem_activity_user,Access GOLEM Activity User,model_golem_activity,golem_base.group_golem_user,1,1,1,0
access_golem_activity_manager,Access GOLEM Activity Manager,model_golem_activity,golem_base.group_golem_manager,1,1,1,1
access_golem_activity_type_user,Access GOLEM Activity Type User,model_golem_activity_type,golem_base.group_golem_user,1,1,1,0
access_golem_activity_type_manager,Access GOLEM Activity Type Manager,model_golem_activity_type,golem_base.group_golem_manager,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
access_product_template_user Access Product Template User product.model_product_template golem_base.group_golem_user 1 1 1 0
access_product_template_manager Access Product Template Manager product.model_product_template golem_base.group_golem_manager 1 1 1 1
access_product_product_user Access Product Product User product.model_product_product golem_base.group_golem_user 1 1 1 0
access_product_product_manager Access Product Product Manager product.model_product_product golem_base.group_golem_manager 1 1 1 1
access_product_price_history_user Access Product Price History User product.model_product_price_history golem_base.group_golem_user 1 1 1 0
access_product_price_history_manager Access Product Price History Manager product.model_product_price_history golem_base.group_golem_manager 1 1 1 1
access_product_category_user Access Product Category User product.model_product_category golem_base.group_golem_user 1 0 0 0
access_product_category_manager Access Product Category Manager product.model_product_category golem_base.group_golem_manager 1 1 1 1
2 access_golem_activity_user Access GOLEM Activity User model_golem_activity golem_base.group_golem_user 1 1 1 0
3 access_golem_activity_manager Access GOLEM Activity Manager model_golem_activity golem_base.group_golem_manager 1 1 1 1
access_golem_activity_type_user Access GOLEM Activity Type User model_golem_activity_type golem_base.group_golem_user 1 1 1 0
access_golem_activity_type_manager Access GOLEM Activity Type Manager model_golem_activity_type golem_base.group_golem_manager 1 1 1 1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -15,8 +15,8 @@
# 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/>.
from odoo.tests.common import TransactionCase
from odoo.models import ValidationError
from openerp.tests.common import TransactionCase
from openerp.models import ValidationError
class GolemActivityTestCase(TransactionCase):

View File

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
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/>.
-->
<openerp>
<data>
<!-- Forms -->
<record id="view_form" model="ir.ui.view">
<field name="name">GOLEM Activity Form</field>
<field name="model">golem.activity</field>
<field name="arch" type="xml">
<form>
<sheet>
<div class="oe_right oe_button_box" style="width: 300px;"
name="buttons"></div>
<div class="oe_left" style="width: 500px;">
<field name="image" widget="image" class="oe_avatar oe_left"/>
<div class="oe_title" style="width: 390px;">
<label class="oe_edit_only" for="name" string="Activity Name"/>
<h1><field name="name" class="oe_inline"/></h1>
</div>
</div>
<group>
<field name="season_id" />
<field name="default_code" />
</group>
<group string="Details">
<group>
<field name="categ_id" />
<field name="animator_id" />
</group>
<group>
<field name="date_start" />
<field name="date_end" />
</group>
</group>
<notebook>
<page name="activity_info" string="Information">
<group>
<field name="note"
placeholder="describe the activity characteristics..."/>
</group>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" />
<field name="message_ids" widget="mail_thread" />
</div>
</form>
</field>
</record>
<!-- Trees -->
<record model="ir.ui.view" id="view_tree">
<field name="name">GOLEM Activity Tree/List</field>
<field name="model">golem.activity</field>
<field name="arch" type="xml">
<tree string="GOLEM Activities">
<field name="season_id" />
<field name="name" />
<field name="animator_id" />
</tree>
</field>
</record>
<!-- Searches -->
<record id="view_filter" model="ir.ui.view">
<field name="name">GOLEM Activity Filters</field>
<field name="model">golem.activity</field>
<field name="arch" type="xml">
<search>
<field name="name" />
<field name="season_id" widget="many2one" />
<filter name="season_default" string="Default season"
domain="[('is_current', '=', True)]" />
</search>
</field>
</record>
<!-- Actions -->
<act_window id="action" name="GOLEM Activities" res_model="golem.activity"
context="{'search_default_season_default': True, 'default_categ_id': ref('golem_activity.golem_product_category_activities')}" />
<!-- Menus -->
<menuitem id="activity_menu" name="Activities"
parent="base.menu_association" sequence="5"
groups="golem_base.group_golem_user" />
<menuitem id="activity_list" name="List"
groups="golem_base.group_golem_user"
parent="activity_menu" sequence="0" action="action" />
</data>
</openerp>

View File

@ -1,207 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
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/>.
-->
<odoo>
<data>
<!-- Forms -->
<record id="golem_activity_form" model="ir.ui.view">
<field name="name">GOLEM Activity Form</field>
<field name="model">golem.activity</field>
<field name="arch" type="xml">
<form>
<header />
<sheet>
<div class="oe_clear oe_right oe_button_box"
style="width: 300px;"
name="buttons"></div>
<div class="oe_left" style="width: 500px;">
<field name="image" widget="image" class="oe_avatar oe_left"/>
<div class="oe_title" style="width: 390px;">
<label class="oe_edit_only" for="name" string="Activity Name"/>
<h1><field name="name" required="True" class="oe_inline"/></h1>
</div>
</div>
<group>
<group>
<field name="season_id" required="True" />
<field name="animator_id" />
<field name="type_id" required="True" />
</group>
<group>
<field name="categ_id" required="True" />
<field name="default_code" />
<field name="list_price" />
</group>
</group>
<notebook>
<page name="session" string="Session">
<group>
<group name="dates">
<field name="is_recurrent" />
<field name="weekday"
attrs="{'invisible': [('is_recurrent', '=', False)]}" />
<field name="hour_start" widget="float_time"
attrs="{'invisible': [('is_recurrent', '=', False)]}" />
<field name="hour_stop" widget="float_time"
attrs="{'invisible': [('is_recurrent', '=', False)]}" />
<field name="is_fullseason" readonly="False"
attrs="{'invisible':[('is_recurrent', '=', False)]}" />
<field name="date_start"
attrs="{'invisible':[('is_recurrent', '=', True),
('is_fullseason', '=', True)]}" />
<field name="date_stop"
attrs="{'invisible':[('is_recurrent', '=', True),
('is_fullseason', '=', True)]}" />
</group>
<group name="places">
</group>
</group>
</page>
<page string="Invoicing" name="invoicing"
groups="account.group_account_invoice">
<group name="properties">
<field name="property_account_income_id"
domain="[('internal_type','=','other'),('deprecated','=',False)]"
groups="account.group_account_user"/>
<field name="taxes_id" widget="many2many_tags"/>
<field name="property_account_expense_id"
domain="[('internal_type','=','other'),('deprecated','=',False)]"
groups="account.group_account_user"/>
<field name="supplier_taxes_id" widget="many2many_tags"/>
</group>
</page>
<page name="activity_others" string="Others">
<group>
<field name="description"
placeholder="describe the activity characteristics..." />
<field name="active" />
</group>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" />
<field name="message_ids" widget="mail_thread" />
</div>
</form>
</field>
</record>
<!-- Trees -->
<record model="ir.ui.view" id="golem_activity_tree">
<field name="name">GOLEM Activity Tree/List</field>
<field name="model">golem.activity</field>
<field name="arch" type="xml">
<tree>
<field name="is_recurrent" invisible="True" />
<field name="season_id" />
<field name="type_id" />
<field name="full_name" />
<field name="animator_id" />
<field name="weekday" string="Day"
attrs="{'invisible': [('is_recurrent', '=', False)]}" />
<field name="date_start" string="Date" />
<field name="list_price" sum="True" />
</tree>
</field>
</record>
<record model="ir.ui.view" id="golem_activity_type_tree">
<field name="name">GOLEM Activity Type Tree/List</field>
<field name="model">golem.activity.type</field>
<field name="arch" type="xml">
<tree editable="top">
<field name="name" />
<field name="is_recurrent" />
</tree>
</field>
</record>
<!-- Calendars -->
<record id="golem_activity_calendar" model="ir.ui.view">
<field name="name">Activity calendar view</field>
<field name="model">golem.activity</field>
<field name="arch" type="xml">
<calendar date_start="date_start" date_stop="date_stop"
color="categ_id" display="[name]">
<field name="name" />
</calendar>
</field>
</record>
<!-- Searches -->
<record id="golem_activity_search" model="ir.ui.view">
<field name="name">GOLEM Activity Filters</field>
<field name="model">golem.activity</field>
<field name="arch" type="xml">
<search>
<field name="full_name" />
<field name="animator_id" />
<field name="type_id" />
<field name="categ_id" />
<field name="season_id" />
<filter name="season_default" string="Default season"
domain="[('is_current', '=', True)]" />
<group string="Group By">
<filter name="group_type_id" string="By type"
context="{'group_by': 'type_id'}" />
<filter name="group_category" string="By category"
context="{'group_by': 'categ_id'}"/>
<filter name="group_weekday" string="By weekday"
context="{'group_by': 'weekday'}" />
<filter name="group_animator" string="By animator"
context="{'group_by': 'animator_id'}" />
</group>
</search>
</field>
</record>
<!-- Actions -->
<act_window id="golem_activity_action" name="GOLEM Activities"
res_model="golem.activity" view_mode="tree,form,calendar"
context="{'search_default_season_default': True}" />
<act_window id="golem_activity_type_action" name="GOLEM Activity Types"
res_model="golem.activity.type" view_mode="tree" />
<record id="product_category_action" model="ir.actions.act_window">
<field name="name">Activities Categories</field>
<field name="res_model">product.category</field>
<field name="view_type">form</field>
<field name="view_id" ref="product.product_category_list_view" />
</record>
<!-- Menus -->
<menuitem id="golem_activity_menu" name="Activities" sequence="30"
groups="golem_base.group_golem_user"
web_icon="golem_activity,static/description/icon.png" />
<menuitem id="golem_activity_menu_list" name="Activities"
groups="golem_base.group_golem_user"
parent="golem_activity_menu" sequence="1" action="golem_activity_action" />
<menuitem id="golem_activity_menu_configuration" name="Configuration"
parent="golem_activity_menu" sequence="90"
groups="golem_base.group_golem_manager" />
<menuitem id="golem_activity_type_menu_list" name="Activity Types"
groups="golem_base.group_golem_manager"
parent="golem_activity_menu_configuration" sequence="5"
action="golem_activity_type_action" />
<menuitem id="product_category_menu" name="Categories"
parent="golem_activity_menu_configuration" sequence="10"
groups="golem_base.group_golem_manager"
action="product_category_action" />
</data>
</odoo>

View File

@ -1,30 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# 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/>.
{
'name': 'GOLEM Activity Places',
'summary': 'GOLEM Activity avdanced places management',
'version': '10.0.2.0.0',
'category': 'GOLEM',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',
'application': False,
'installable': True,
'auto_install': False,
'depends': ['golem_activity_registration'],
'data': ['views/golem_activity_views.xml']
}

View File

@ -1,53 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * golem_activity_place
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-01 22:35+0000\n"
"PO-Revision-Date: 2017-05-01 22:35+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: golem_activity_place
#: model:ir.model.fields,field_description:golem_activity_place.field_golem_activity_is_overbooked
msgid "Allow overbook?"
msgstr "Autoriser la surcharge ?"
#. module: golem_activity_place
#: model:ir.model,name:golem_activity_place.model_golem_activity
msgid "GOLEM Activity"
msgstr "Activité"
#. module: golem_activity_place
#: model:ir.model.fields,field_description:golem_activity_place.field_golem_activity_places_min
msgid "Minimum places"
msgstr "Places minimum"
#. module: golem_activity_place
#: model:ir.model.fields,help:golem_activity_place.field_golem_activity_places_min
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:57
#, python-format
msgid "Number of places cannot be negative."
msgstr "Le nombre de places ne peut pas être négatif"
#. module: golem_activity_place
#: code:addons/golem_activity_place/models/golem_activity.py:61
#, python-format
msgid "Overbooked places cannot be inferior than places"
msgstr "Le nombre de places avec surcharge ne peut être inférieur aux places"
#. module: golem_activity_place
#: model:ir.model.fields,field_description:golem_activity_place.field_golem_activity_places_overbooked
msgid "Places with overbook"
msgstr "Places avec surcharge"

View File

@ -1,54 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * golem_activity_place
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-01 22:34+0000\n"
"PO-Revision-Date: 2017-05-01 22:34+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: golem_activity_place
#: model:ir.model.fields,field_description:golem_activity_place.field_golem_activity_is_overbooked
msgid "Allow overbook?"
msgstr ""
#. module: golem_activity_place
#: model:ir.model,name:golem_activity_place.model_golem_activity
msgid "GOLEM Activity"
msgstr ""
#. module: golem_activity_place
#: model:ir.model.fields,field_description:golem_activity_place.field_golem_activity_places_min
msgid "Minimum places"
msgstr ""
#. module: golem_activity_place
#: model:ir.model.fields,help:golem_activity_place.field_golem_activity_places_min
msgid "Minimum places to maintain the activity"
msgstr ""
#. module: golem_activity_place
#: code:addons/golem_activity_place/models/golem_activity.py:57
#, python-format
msgid "Number of places cannot be negative."
msgstr ""
#. module: golem_activity_place
#: code:addons/golem_activity_place/models/golem_activity.py:61
#, python-format
msgid "Overbooked places cannot be inferior than places"
msgstr ""
#. module: golem_activity_place
#: model:ir.model.fields,field_description:golem_activity_place.field_golem_activity_places_overbooked
msgid "Places with overbook"
msgstr ""

View File

@ -1,31 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# 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/>.
{
'name': 'GOLEM Activity Member Registrations',
'summary': 'GOLEM Activities Member Registrations management',
'version': '10.0.1.1.0',
'category': 'GOLEM',
'author': 'Fabien Bourgeois, Michel Dessenne',
'license': 'AGPL-3',
'application': False,
'installable': True,
'depends': ['golem_activity', 'golem_member'],
'data': ['views/golem_activity_registration_views.xml',
'views/golem_member_views.xml', 'views/golem_activity_views.xml',
'security/ir.model.access.csv']
}

View File

@ -1,205 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * golem_activity_registration
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-14 23:16+0000\n"
"PO-Revision-Date: 2017-06-28 17:30+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_form_inherit_golem_activity_registration
msgid "Activities"
msgstr "Activités"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_activity_id
msgid "Activity"
msgstr "Activité"
#. module: golem_activity_registration
#: model:ir.ui.menu,name:golem_activity_registration.golem_activity_registration_menu
msgid "Activity registrations"
msgstr "Inscriptions"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_member_activity_registration_all_ids
msgid "All activities"
msgstr "Toutes les activités"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_form_inherit_golem_activity_registration
msgid "Base price"
msgstr "Prix de base"
#. module: golem_activity_registration
#: model:ir.model.fields,help:golem_activity_registration.field_golem_activity_registration_activity_price
msgid "Base price to compute the customer price. Sometimes called the catalog price."
msgstr "Prix de base pour calculer le prix usager. Parfois appelé prix catalogue."
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_registration_search
msgid "By season"
msgstr "Par saison"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_create_uid
msgid "Created by"
msgstr "Créé par"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_create_date
msgid "Created on"
msgstr "Créé le"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_member_activity_registration_ids
msgid "Current activities"
msgstr "Activités de la saison affichée par défaut"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_is_current
msgid "Current season?"
msgstr "Saison en cours?"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_registration_search
msgid "Default season"
msgstr "Saison par défaut"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_display_name
msgid "Display Name"
msgstr "Nom affiché"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_search_inherit_registration
msgid "Full"
msgstr "Plein"
#. module: golem_activity_registration
#: model:ir.model,name:golem_activity_registration.model_golem_activity
msgid "GOLEM Activity"
msgstr "Activité"
#. module: golem_activity_registration
#: model:ir.model,name:golem_activity_registration.model_golem_activity_registration
msgid "GOLEM Activity Registration"
msgstr "Inscription à l'activité"
#. module: golem_activity_registration
#: model:ir.actions.act_window,name:golem_activity_registration.golem_activity_registration_action
msgid "GOLEM Activity Registration List"
msgstr "Liste des inscriptions aux activités"
#. module: golem_activity_registration
#: model:ir.model,name:golem_activity_registration.model_golem_member
msgid "GOLEM Member"
msgstr "Adhérent"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_id
msgid "ID"
msgstr "ID"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration___last_update
msgid "Last Modified on"
msgstr "Dernière Modification le"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_write_uid
msgid "Last Updated by"
msgstr "Dernière mise à jour par"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_write_date
msgid "Last Updated on"
msgstr "Dernière mise à jour le"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_member_id
msgid "Member"
msgstr "Adhérent"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_activity_registration_ids
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_form_inherit_registration
msgid "Members"
msgstr "Adhérents"
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:38
#: sql_constraint:golem.activity:0
#, python-format
msgid "Number of places cannot be negative."
msgstr "Le nombre de places ne peut pas être négatif"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_places
msgid "Places"
msgstr "Places"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_places_used
msgid "Places used"
msgstr "Places prises"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_tree_inherit_registration
msgid "Remain"
msgstr "Reste"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_places_remain
msgid "Remaining places"
msgstr "Places restantes"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_activity_price
msgid "Sale Price"
msgstr "Prix de vente"
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_season_id
msgid "Season"
msgstr "Saison"
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:69
#, python-format
msgid "Sorry, there is no more place !"
msgstr "Désolé, il n'y a plus de place disponible !"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_registration_form
msgid "Subscription"
msgstr "Inscription"
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:98
#, python-format
msgid "Subscription can not be executed : the targeted member is not on the same season as the activity."
msgstr "L'inscription n'a pas pu être enregistrée : l'usager visé n'est pas ahdérant pour la même saison que celle pendant laquelle se déroule l'activité."
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:90
#: sql_constraint:golem.activity.registration:0
#, python-format
msgid "This member has already been registered for this activity."
msgstr "L'usager a déjà été inscrit à cette activité."
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_form_inherit_golem_activity_registration
msgid "Total"
msgstr "Total"

View File

@ -1,204 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * golem_activity_registration
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-09 15:14+0000\n"
"PO-Revision-Date: 2018-01-09 15:14+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_form_inherit_golem_activity_registration
msgid "Activities"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_activity_id
msgid "Activity"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.menu,name:golem_activity_registration.golem_activity_registration_menu
msgid "Activity registrations"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_member_activity_registration_all_ids
msgid "All activities"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_form_inherit_golem_activity_registration
msgid "Base price"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,help:golem_activity_registration.field_golem_activity_registration_activity_price
msgid "Base price to compute the customer price. Sometimes called the catalog price."
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_registration_search
msgid "By season"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_create_uid
msgid "Created by"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_create_date
msgid "Created on"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_member_activity_registration_ids
msgid "Current activities"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_is_current
msgid "Current season?"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_registration_search
msgid "Default season"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_display_name
msgid "Display Name"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_search_inherit_registration
msgid "Full"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model,name:golem_activity_registration.model_golem_activity
msgid "GOLEM Activity"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model,name:golem_activity_registration.model_golem_activity_registration
msgid "GOLEM Activity Registration"
msgstr ""
#. module: golem_activity_registration
#: model:ir.actions.act_window,name:golem_activity_registration.golem_activity_registration_action
msgid "GOLEM Activity Registration List"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model,name:golem_activity_registration.model_golem_member
msgid "GOLEM Member"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_id
msgid "ID"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration___last_update
msgid "Last Modified on"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_write_uid
msgid "Last Updated by"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_write_date
msgid "Last Updated on"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_member_id
msgid "Member"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_activity_registration_ids
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_form_inherit_registration
msgid "Members"
msgstr ""
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:38
#: sql_constraint:golem.activity:0
#, python-format
msgid "Number of places cannot be negative."
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_places
msgid "Places"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_places_used
msgid "Places used"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_tree_inherit_registration
msgid "Remain"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_places_remain
msgid "Remaining places"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_activity_price
msgid "Sale Price"
msgstr ""
#. module: golem_activity_registration
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_season_id
msgid "Season"
msgstr ""
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:69
#, python-format
msgid "Sorry, there is no more place !"
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_registration_form
msgid "Subscription"
msgstr ""
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:98
#, python-format
msgid "Subscription can not be executed : the targeted member is not on the same season as the activity."
msgstr ""
#. module: golem_activity_registration
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:90
#: sql_constraint:golem.activity.registration:0
#, python-format
msgid "This member has already been registered for this activity."
msgstr ""
#. module: golem_activity_registration
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_member_form_inherit_golem_activity_registration
msgid "Total"
msgstr ""

View File

@ -1,101 +0,0 @@
# -*- coding: utf-8 -*-
# copyright 2017 fabien bourgeois <fabien@yaltik.com>
#
# this program is free software: you can redistribute it and/or modify
# it under the terms of the gnu affero general public license as
# published by the free software foundation, either version 3 of the
# license, or (at your option) any later version.
#
# this program is distributed in the hope that it will be useful,
# but without any warranty; without even the implied warranty of
# merchantability or fitness for a particular purpose. see the
# gnu affero general public license for more details.
#
# 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/>.
""" GOLEM Activity Registration """
from odoo import models, fields, api, _
class GolemMember(models.Model):
""" GOLEM Member adaptations """
_inherit = 'golem.member'
activity_registration_ids = fields.One2many('golem.activity.registration',
'member_id', 'Current activities',
domain=[('is_current', '=', True)])
activity_registration_all_ids = fields.One2many('golem.activity.registration',
'member_id', 'All activities')
class GolemActivity(models.Model):
""" GOLEM Activity adaptations """
_inherit = 'golem.activity'
_sql_constraints = [('golem_activity_places_signed',
'CHECK (places >= 0)',
_('Number of places cannot be negative.'))]
activity_registration_ids = fields.One2many('golem.activity.registration',
'activity_id', 'Members',
index=True)
places_used = fields.Integer('Places used', compute='compute_places_used',
store=True)
@api.multi
@api.depends('activity_registration_ids')
def compute_places_used(self):
""" Computes used places """
for activity in self:
activity.places_used = len(activity.activity_registration_ids)
places = fields.Integer('Places', default=20)
places_remain = fields.Integer('Remaining places', store=True,
compute='_compute_places_remain')
@api.multi
@api.depends('places', 'places_used')
def _compute_places_remain(self):
""" Computes remaining places """
for activity in self:
activity.places_remain = activity.places - activity.places_used
@api.constrains('places_remain')
def _check_remaining_places(self):
""" Forbid inscription when there is no more place """
for activity in self:
if activity.places_remain < 0:
emsg = _('Sorry, there is no more place !')
raise models.ValidationError(emsg)
class GolemActivityRegistration(models.Model):
""" GOLEM Activity Registration """
_name = 'golem.activity.registration'
_description = 'GOLEM Activity Registration'
_rec_name ='activity_id'
member_id = fields.Many2one('golem.member', string='Member', required=True,
ondelete='cascade', index=True)
activity_id = fields.Many2one('golem.activity', required=True, index=True,
string='Activity', ondelete='cascade')
activity_price = fields.Float(related='activity_id.list_price')
season_id = fields.Many2one(string='Season',
related='activity_id.season_id', store=True)
is_current = fields.Boolean('Current season?',
related='activity_id.is_current', store=True)
_sql_constraints = [
('registration_uniq', 'UNIQUE (member_id, activity_id)',
_('This member has already been registered for this activity.'))]
@api.constrains('member_id', 'activity_id')
def _check_season_reliability(self):
""" Forbid registration when member season if not coherent with
activity season or are duplicates """
for reg in self:
if reg.activity_id.season_id not in reg.member_id.season_ids:
emsg = _('Subscription can not be executed : the targeted '
'member is not on the same season as the activity.')
raise models.ValidationError(emsg)

View File

@ -1,3 +0,0 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_golem_activity_registration_user,Access GOLEM Activity Registration User,model_golem_activity_registration,golem_base.group_golem_user,1,1,1,1
access_golem_activity_registration_manager,Access GOLEM Activity Registration Manager,model_golem_activity_registration,golem_base.group_golem_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_golem_activity_registration_user Access GOLEM Activity Registration User model_golem_activity_registration golem_base.group_golem_user 1 1 1 1
3 access_golem_activity_registration_manager Access GOLEM Activity Registration Manager model_golem_activity_registration golem_base.group_golem_manager 1 1 1 1

View File

@ -1,86 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
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/>.
-->
<odoo>
<data>
<!-- Form -->
<record id="golem_activity_registration_form" model="ir.ui.view">
<field name="name">Activity registration form</field>
<field name="model">golem.activity.registration</field>
<field name="arch" type="xml">
<form>
<sheet>
<group string="Subscription">
<field name="member_id" invisible="1" />
<field name="activity_id" />
<field name="season_id" />
</group>
</sheet>
</form>
</field>
</record>
<!-- Tree -->
<record id="golem_activity_registration_tree" model="ir.ui.view">
<field name="name">Activity registration list</field>
<field name="model">golem.activity.registration</field>
<field name="arch" type="xml">
<tree create="true" edit="false" delete="false" editable="top">
<field name="season_id" readonly="1" />
<field name="member_id" domain="[('is_current', '=', True)]" />
<field name="activity_id" domain="[('is_current', '=', True)]" />
</tree>
</field>
</record>
<!-- Search -->
<record id="golem_activity_registration_search" model="ir.ui.view">
<field name="name">GOLEM Activity Registration searches</field>
<field name="model">golem.activity.registration</field>
<field name="arch" type="xml">
<search>
<field name="season_id" widget="many2one" />
<field name="member_id" widget="many2one" />
<field name="activity_id" widget="many2one" />
<filter name="season_default" string="Default season"
domain="[('is_current', '=', True)]" />
<filter name="group_season" string="By season"
context="{'group_by': 'season_id'}"/>
</search>
</field>
</record>
<!-- Action -->
<record id="golem_activity_registration_action" model="ir.actions.act_window">
<field name="name">GOLEM Activity Registration List</field>
<field name="res_model">golem.activity.registration</field>
<field name="view_mode">tree</field>
<field name="context">{'search_default_season_default': True}</field>
</record>
<!-- Menu -->
<menuitem id="golem_activity_registration_menu" name="Activity registrations"
parent="golem_activity.golem_activity_menu"
action="golem_activity_registration_action"
groups="golem_base.group_golem_user"
sequence="20" />
</data>
</odoo>

View File

@ -1,81 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
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/>.
-->
<odoo>
<data>
<!-- Form -->
<record id="golem_activity_form_inherit_registration"
model="ir.ui.view">
<field name="name">Activity Registrations and Places</field>
<field name="model">golem.activity</field>
<field name="inherit_id" ref="golem_activity.golem_activity_form" />
<field name="arch" type="xml">
<group name="places" position="inside">
<field name="places" />
</group>
<page name="session" position="after">
<page string="Members">
<group>
<field name="places_remain" readonly="True" />
<field name="activity_registration_ids"
context="{'default_activity_id': active_id}">
<tree editable="top">
<field name="member_id"
domain="[('season_ids', '=', season_id)]" />
<field name="activity_id" readonly="1" />
<field name="season_id" readonly="1" />
</tree>
</field>
</group>
</page>
</page>
</field>
</record>
<!-- Tree -->
<record id="golem_activity_tree_inherit_registration" model="ir.ui.view">
<field name="name">Activity Tree registrations additions</field>
<field name="model">golem.activity</field>
<field name="inherit_id" ref="golem_activity.golem_activity_tree" />
<field name="arch" type="xml">
<tree position="attributes">
<attribute name="colors">red: places_remain == 0;orange: places_remain &lt;= 4;</attribute>
</tree>
<field name="date_start" position="after">
<field name="places" invisible="True" />
<field name="places_remain" string="Remain" />
</field>
</field>
</record>
<!-- Search -->
<record id="golem_activity_search_inherit_registration" model="ir.ui.view">
<field name="name">Activity Search registrations additions</field>
<field name="model">golem.activity</field>
<field name="inherit_id" ref="golem_activity.golem_activity_search" />
<field name="arch" type="xml">
<filter name="season_default" position="after">
<filter name="full_activity" string="Full"
domain="[('places_remain', '=', 0)]" />
</filter>
</field>
</record>
</data>
</odoo>

View File

@ -1,68 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
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/>.
-->
<odoo>
<data>
<!-- Form -->
<record id="golem_member_form_inherit_golem_activity_registration"
model="ir.ui.view">
<field name="name">Add activities registrations to member form</field>
<field name="model">golem.member</field>
<field name="inherit_id" ref="golem_member.golem_member_form" />
<field name="arch" type="xml">
<page name="other_page" position="before">
<page name="activities" string="Activities">
<field name="id" invisible="1" />
<group>
<field name="activity_registration_ids"
attrs="{'readonly': [('id', '=', False)]}"
context="{'default_member_id': active_id}">
<tree editable="top">
<field name="activity_id"
domain="[('is_current', '=', True)]" />
<field name="season_id" readonly="1" />
<field name="member_id" readonly="1" invisible="1" />
<field name="activity_price" string="Base price" sum="Total" />
</tree>
</field>
<field name="activity_registration_all_ids" readonly="1">
<tree>
<field name="activity_id" />
<field name="season_id" />
</tree>
</field>
</group>
</page>
</page>
</field>
</record>
<!-- Searches -->
<record id="golem_member_searches_inherit_golem_activity_registration"
model="ir.ui.view">
<field name="name">Add activities registrations to member searches</field>
<field name="model">golem.member</field>
<field name="inherit_id" ref="golem_member.golem_member_search" />
<field name="arch" type="xml">
<field name="number" position="before">
<field name="activity_registration_all_ids" widget="many2one"/>
</field>
</field>
</record>
</data>
</odoo>

View File

@ -1,47 +0,0 @@
# -*- coding: utf-8 -*-
# copyright 2016 fabien bourgeois <fabien@yaltik.com>
#
# this program is free software: you can redistribute it and/or modify
# it under the terms of the gnu affero general public license as
# published by the free software foundation, either version 3 of the
# license, or (at your option) any later version.
#
# this program is distributed in the hope that it will be useful,
# but without any warranty; without even the implied warranty of
# merchantability or fitness for a particular purpose. see the
# gnu affero general public license for more details.
#
# 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/>.
import json
import odoo.http as http
from odoo.http import request
from odoo.addons.web.controllers.main import CSVExport
class ExportGolemActivityMembers(CSVExport):
@http.route('/web/export/golem/activity_members', type='http', auth='user')
def export_csv_view(self, data):
data = json.loads(data)
FIELDS = ['number', 'lastname', 'firstname', 'street', 'zip', 'city',
'birthdate_date', 'email', 'phone', 'mobile']
aid = data.get('activity_id')
a_model = request.env['golem.activity']
activity = a_model.browse([aid])
registrations = activity.activity_registration_ids
rows = []
for r in registrations:
row = []
for f in FIELDS:
value = r.member_id.__getattribute__(f)
row.append(value)
rows.append(row)
return request.make_response(
self.from_data(FIELDS, rows),
headers=[('Content-Disposition', 'attachment; filename="%s"'
% self.filename('gollem.activity')),
('Content-Type', self.content_type)])

View File

@ -1,28 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * golem_activity_registration_export
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-10-16 16:20+0000\n"
"PO-Revision-Date: 2016-10-16 16:20+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: golem_activity_registration_export
#: view:golem.activity:golem_activity_registration_export.export_activity_form
msgid "Export members to CSV file"
msgstr "Exporter les adhérents vers un fichier tableur"
#. module: golem_activity_registration_export
#: model:ir.model,name:golem_activity_registration_export.model_golem_activity
msgid "GOLEM Activity"
msgstr "Activité"

View File

@ -1,27 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * golem_activity_registration_export
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-10-16 16:20+0000\n"
"PO-Revision-Date: 2016-10-16 16:20+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: golem_activity_registration_export
#: view:golem.activity:golem_activity_registration_export.export_activity_form
msgid "Export members to CSV file"
msgstr ""
#. module: golem_activity_registration_export
#: model:ir.model,name:golem_activity_registration_export.model_golem_activity
msgid "GOLEM Activity"
msgstr ""

View File

@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# 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/>.
from . import golem_activity_registration_export

View File

@ -1,32 +0,0 @@
# -*- coding: utf-8 -*-
# copyright 2016 fabien bourgeois <fabien@yaltik.com>
#
# this program is free software: you can redistribute it and/or modify
# it under the terms of the gnu affero general public license as
# published by the free software foundation, either version 3 of the
# license, or (at your option) any later version.
#
# this program is distributed in the hope that it will be useful,
# but without any warranty; without even the implied warranty of
# merchantability or fitness for a particular purpose. see the
# gnu affero general public license for more details.
#
# 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/>.
from json import dumps
from odoo import models, api
class GolemActivity(models.Model):
_inherit = 'golem.activity'
@api.multi
def do_export_csv(self):
""" Export basic data about members of the current activity to CSV """
self.ensure_one()
data = dumps({'activity_id': self.id})
url = '/web/export/golem/activity_members?data={}'.format(data)
print url
return {'type': 'ir.actions.act_url', 'url': url, 'target': 'self'}

View File

@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# 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/>.
from . import models, wizard

View File

@ -1,31 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# 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/>.
{
'name': 'GOLEM Activity Session Member Registrations States',
'summary': 'GOLEM Activities Session Member Registration states',
'version': '10.0.1.0.0',
'category': 'GOLEM',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',
'application': False,
'installable': True,
'depends': ['golem_activity_registration', 'golem_payment'],
'data': ['views/golem_activity_registration_views.xml',
'views/golem_member_views.xml', 'views/golem_activity_views.xml',
'wizard/golem_activity_registration_invoicing.xml']
}

View File

@ -1,217 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * golem_activity_registration_state
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-14 23:16+0000\n"
"PO-Revision-Date: 2017-06-14 23:16+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_ids
msgid "Activities"
msgstr "Activités"
#. module: golem_activity_registration_state
#: model:ir.ui.view,arch_db:golem_activity_registration_state.invoicing_form
msgid "Activities and Prices"
msgstr "Activities and Prices"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_activity_id
msgid "Activity id"
msgstr "Activité"
#. module: golem_activity_registration_state
#: model:ir.ui.view,arch_db:golem_activity_registration_state.invoicing_form
msgid "Cancel"
msgstr "Annuler"
#. module: golem_activity_registration_state
#: selection:golem.activity.registration,state:0
msgid "Canceled"
msgstr "Annulé"
#. module: golem_activity_registration_state
#: selection:golem.activity.registration,state:0
msgid "Confirmed"
msgstr "Confirmé"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_create_uid
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_create_uid
msgid "Created by"
msgstr "Créé par"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_create_date
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_create_date
msgid "Created on"
msgstr "Créé le"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_display_name
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_display_name
msgid "Display Name"
msgstr "Nom affiché"
#. module: golem_activity_registration_state
#: selection:golem.activity.registration,state:0
msgid "Draft"
msgstr "Brouillon"
#. module: golem_activity_registration_state
#: model:ir.model,name:golem_activity_registration_state.model_golem_activity
msgid "GOLEM Activity"
msgstr "Activité"
#. module: golem_activity_registration_state
#: model:ir.model,name:golem_activity_registration_state.model_golem_activity_registration
msgid "GOLEM Activity Registration"
msgstr "Inscription à l'activité"
#. module: golem_activity_registration_state
#: model:ir.model,name:golem_activity_registration_state.model_golem_activity_registration_invoicing
msgid "GOLEM Activity Registration Invoicing Wizard"
msgstr "GOLEM Activity Registration Invoicing Wizard"
#. module: golem_activity_registration_state
#: model:ir.model,name:golem_activity_registration_state.model_golem_member
msgid "GOLEM Member"
msgstr "Adhérent"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_member_has_draft_registrations
msgid "Has draft registrations ?"
msgstr "A des inscriptions non validées ?"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_id
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_id
msgid "ID"
msgstr "ID"
#. module: golem_activity_registration_state
#: model:ir.model.fields,help:golem_activity_registration_state.field_golem_activity_registration_invoicing_schedule_id
msgid "If no schedule is selected, only the invoice will be create. Otherwise, draft payments will be generated."
msgstr "Si aucun échéancier n'est sélectionné, seule la facture sera créée. Sinon, des brouillons de paiements seront générés."
#. module: golem_activity_registration_state
#: model:ir.ui.view,arch_db:golem_activity_registration_state.golem_member_form_inherit_registration_state
msgid "If you validate draft registration, they will be seen as confirmed. Then, an invoice will be created for the current member."
msgstr "Si vous validez les inscriptions, elles seront vues comme confirmées. Ensuite, une facture sera créée pour l'adhérent."
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoice_id
msgid "Invoice Reference"
msgstr "Référence de la facture"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoice_line_id
msgid "Invoice line"
msgstr "Ligne de facturation"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_invoicing_id
msgid "Invoicing id"
msgstr "Invoicing id"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_journal_id
msgid "Journal"
msgstr "Journal"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing___last_update
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line___last_update
msgid "Last Modified on"
msgstr "Dernière Modification le"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_write_uid
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_write_uid
msgid "Last Updated by"
msgstr "Dernière mise à jour par"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_write_date
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_write_date
msgid "Last Updated on"
msgstr "Dernière mise à jour le"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_member_id
msgid "Member"
msgstr "Adhérent"
#. module: golem_activity_registration_state
#: model:ir.ui.view,arch_db:golem_activity_registration_state.golem_member_form_inherit_registration_state
msgid "Note that you can't register activities if the member is new and not yet saved into the database."
msgstr "Notez que vous ne devez d'abord enregistrer la fiche d'un nouvel adhérent avant de pouvoir saisie ses activités."
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_schedule_id
msgid "Payment schedule"
msgstr "Échéancier de paiement"
#. module: golem_activity_registration_state
#: model:ir.ui.view,arch_db:golem_activity_registration_state.invoicing_form
msgid "Please confirm activity prices and choose a payment schedule if needed."
msgstr "Merci de confirmer les coûts des activités et de choisir, si souhaité, un échéancier de paiement."
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_price
msgid "Price"
msgstr "Prix"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_registration_id
msgid "Registration id"
msgstr "Registration id"
#. module: golem_activity_registration_state
#: code:addons/golem_activity_registration_state/models/golem_activity_registration.py:58
#: model:ir.ui.view,arch_db:golem_activity_registration_state.invoicing_form
#, python-format
msgid "Registration invoicing"
msgstr "Registration invoicing"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_season_id
msgid "Season"
msgstr "Saison"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_state
msgid "State"
msgstr "État"
#. module: golem_activity_registration_state
#: model:ir.ui.view,arch_db:golem_activity_registration_state.invoicing_form
msgid "Total"
msgstr "Total"
#. module: golem_activity_registration_state
#: model:ir.ui.view,arch_db:golem_activity_registration_state.invoicing_form
msgid "Validate"
msgstr "Valider"
#. module: golem_activity_registration_state
#: model:ir.ui.view,arch_db:golem_activity_registration_state.golem_member_form_inherit_registration_state
msgid "Validate all draft registrations"
msgstr "Valider toutes les inscriptions"
#. module: golem_activity_registration_state
#: model:ir.model,name:golem_activity_registration_state.model_golem_activity_registration_invoicing_line
msgid "golem.activity.registration.invoicing.line"
msgstr "golem.activity.registration.invoicing.line"

View File

@ -1,216 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * golem_activity_registration_state
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-14 23:16+0000\n"
"PO-Revision-Date: 2017-06-14 23:16+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_ids
msgid "Activities"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.ui.view,arch_db:golem_activity_registration_state.invoicing_form
msgid "Activities and Prices"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_activity_id
msgid "Activity id"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.ui.view,arch_db:golem_activity_registration_state.invoicing_form
msgid "Cancel"
msgstr ""
#. module: golem_activity_registration_state
#: selection:golem.activity.registration,state:0
msgid "Canceled"
msgstr ""
#. module: golem_activity_registration_state
#: selection:golem.activity.registration,state:0
msgid "Confirmed"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_create_uid
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_create_uid
msgid "Created by"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_create_date
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_create_date
msgid "Created on"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_display_name
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_display_name
msgid "Display Name"
msgstr ""
#. module: golem_activity_registration_state
#: selection:golem.activity.registration,state:0
msgid "Draft"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model,name:golem_activity_registration_state.model_golem_activity
msgid "GOLEM Activity"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model,name:golem_activity_registration_state.model_golem_activity_registration
msgid "GOLEM Activity Registration"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model,name:golem_activity_registration_state.model_golem_activity_registration_invoicing
msgid "GOLEM Activity Registration Invoicing Wizard"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model,name:golem_activity_registration_state.model_golem_member
msgid "GOLEM Member"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_member_has_draft_registrations
msgid "Has draft registrations ?"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_id
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_id
msgid "ID"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,help:golem_activity_registration_state.field_golem_activity_registration_invoicing_schedule_id
msgid "If no schedule is selected, only the invoice will be create. Otherwise, draft payments will be generated."
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.ui.view,arch_db:golem_activity_registration_state.golem_member_form_inherit_registration_state
msgid "If you validate draft registration, they will be seen as confirmed. Then, an invoice will be created for the current member."
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoice_id
msgid "Invoice Reference"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoice_line_id
msgid "Invoice line"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_invoicing_id
msgid "Invoicing id"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_journal_id
msgid "Journal"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing___last_update
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line___last_update
msgid "Last Modified on"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_write_uid
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_write_uid
msgid "Last Updated by"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_write_date
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_write_date
msgid "Last Updated on"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_member_id
msgid "Member"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.ui.view,arch_db:golem_activity_registration_state.golem_member_form_inherit_registration_state
msgid "Note that you can't register activities if the member is new and not yet saved into the database."
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_schedule_id
msgid "Payment schedule"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.ui.view,arch_db:golem_activity_registration_state.invoicing_form
msgid "Please confirm activity prices and choose a payment schedule if needed."
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_price
msgid "Price"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line_registration_id
msgid "Registration id"
msgstr ""
#. module: golem_activity_registration_state
#: code:addons/golem_activity_registration_state/models/golem_activity_registration.py:58
#: model:ir.ui.view,arch_db:golem_activity_registration_state.invoicing_form
#, python-format
msgid "Registration invoicing"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_season_id
msgid "Season"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_state
msgid "State"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.ui.view,arch_db:golem_activity_registration_state.invoicing_form
msgid "Total"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.ui.view,arch_db:golem_activity_registration_state.invoicing_form
msgid "Validate"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.ui.view,arch_db:golem_activity_registration_state.golem_member_form_inherit_registration_state
msgid "Validate all draft registrations"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model,name:golem_activity_registration_state.model_golem_activity_registration_invoicing_line
msgid "golem.activity.registration.invoicing.line"
msgstr ""

View File

@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# 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/>.
from . import golem_activity_registration

View File

@ -1,120 +0,0 @@
# -*- coding: utf-8 -*-
# copyright 2017 fabien bourgeois <fabien@yaltik.com>
#
# this program is free software: you can redistribute it and/or modify
# it under the terms of the gnu affero general public license as
# published by the free software foundation, either version 3 of the
# license, or (at your option) any later version.
#
# this program is distributed in the hope that it will be useful,
# but without any warranty; without even the implied warranty of
# merchantability or fitness for a particular purpose. see the
# gnu affero general public license for more details.
#
# 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/>.
""" GOLEM Activity Registration State """
from odoo import models, fields, api, _
class GolemMember(models.Model):
""" GOLEM Member adaptations """
_inherit = 'golem.member'
has_draft_registrations = fields.Boolean(
'Has draft registrations ?',
compute='_compute_has_draft_reg')
@api.depends('activity_registration_ids')
def _compute_has_draft_reg(self):
""" Check if there are draft states in member activities """
for member in self:
for reg in member.activity_registration_ids:
if reg.state == 'draft':
member.has_draft_registrations = True
return
member.has_draft_registrations = False
@api.multi
def do_validate_registrations(self):
""" Validate all draft registrations """
self.ensure_one()
member = self[0]
draft_registrations = member.activity_registration_ids.filtered(
lambda r: r.state == 'draft')
if draft_registrations:
invoicing = self.env['golem.activity.registration.invoicing'].create({
'member_id' : member.id,
'season_id': draft_registrations[0].activity_id.season_id.id
})
line_obj = self.env['golem.activity.registration.invoicing.line']
for reg in draft_registrations:
line_obj.create({'invoicing_id': invoicing.id,
'registration_id': reg.id,
'activity_id': reg.activity_id.id,
'price': reg.activity_id.list_price})
return {'name': _('Registration invoicing'),
'type': 'ir.actions.act_window',
'res_model': 'golem.activity.registration.invoicing',
'view_mode': 'form',
'res_id': invoicing.id,
'target': 'new'}
@api.multi
def write(self, values):
""" Handle removed activities to be canceled """
if 'activity_registration_ids' in values:
rids = values['activity_registration_ids']
r_keep, r_removed = [], []
for rid in rids: # == 2 is removal case
if rid[0] == 2:
r_removed.append(rid)
else:
r_keep.append(rid)
reg_obj = self.env['golem.activity.registration']
for rem in r_removed:
reg = reg_obj.browse([rem[1]])
# if already canceled, let it be removed, else cancel it
if reg.state != 'canceled':
reg.state = 'canceled'
else:
r_keep.append(rem)
values['activity_registration_ids'] = r_keep
return super(GolemMember, self).write(values)
class GolemActivity(models.Model):
""" GOLEM Activity adaptations """
_inherit = 'golem.activity'
@api.multi
@api.depends('activity_registration_ids')
def compute_places_used(self):
""" Computes used places """
for activity in self:
rids = activity.activity_registration_ids
activity.places_used = len(rids.filtered(lambda r: r.state == 'confirmed'))
class GolemActivityRegistration(models.Model):
""" GOLEM Activity Registration adaptations """
_inherit = 'golem.activity.registration'
state = fields.Selection([('draft', 'Draft'), ('confirmed', 'Confirmed'),
('canceled', 'Canceled')], required=True,
default='draft')
invoice_line_id = fields.Many2one('account.invoice.line',
string='Invoice line',
ondelete='set null')
invoice_id = fields.Many2one(related='invoice_line_id.invoice_id')
@api.multi
def write(self, values):
""" Recomputes values linked to registrations when state change """
res = super(GolemActivityRegistration, self).write(values)
if values.get('state'):
for registration in self:
registration.activity_id.compute_places_used()
return res

View File

@ -1,57 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
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/>.
-->
<odoo>
<data>
<!-- Tree -->
<record id="golem_activity_registration_tree_inherit_state"
model="ir.ui.view">
<field name="name">Session registration list</field>
<field name="model">golem.activity.registration</field>
<field name="inherit_id"
ref="golem_activity_registration.golem_activity_registration_tree" />
<field name="arch" type="xml">
<tree position="attributes">
<attribute name="colors">red: state == 'canceled';darkgrey: state == 'draft';</attribute>
</tree>
<tree position="inside">
<field name="state" invisible="1" />
</tree>
<field name="activity_id" position="after">
<field name="invoice_id" readonly="1" />
<field name="invoice_line_id" readonly="1" />
</field>
</field>
</record>
<!-- Search -->
<record id="golem_activity_registration_search_inherit_state"
model="ir.ui.view">
<field name="name">Registration state specific searches</field>
<field name="model">golem.activity.registration</field>
<field name="inherit_id"
ref="golem_activity_registration.golem_activity_registration_search" />
<field name="arch" type="xml">
<field name="activity_id" position="after">
<field name="invoice_id" widget="many2one" />
</field>
</field>
</record>
</data>
</odoo>

View File

@ -1,44 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
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/>.
-->
<odoo>
<data>
<!-- Form -->
<record id="golem_activity_form_inherit_registration_state"
model="ir.ui.view">
<field name="name">Activity Registrations States</field>
<field name="model">golem.activity</field>
<field name="inherit_id"
ref="golem_activity_registration.golem_activity_form_inherit_registration" />
<field name="arch" type="xml">
<tree position="replace">
<tree editable="top"
colors="red: state == 'canceled';darkgrey: state == 'draft';">
<field name="state" invisible="1" />
<field name="member_id"
domain="[('season_ids', '=', season_id)]" />
<field name="activity_id" readonly="1" />
<field name="season_id" readonly="1" />
<field name="invoice_id" readonly="1" />
</tree>
</tree>
</field>
</record>
</data>
</odoo>

View File

@ -1,54 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
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/>.
-->
<odoo>
<data>
<!-- Form -->
<record model="ir.ui.view" id="golem_member_form_inherit_registration_state">
<field name="name">Add state for registrations</field>
<field name="model">golem.member</field>
<field name="inherit_id"
ref="golem_activity_registration.golem_member_form_inherit_golem_activity_registration" />
<field name="arch" type="xml">
<field name="id" position="after">
<p attrs="{'invisible': [('id', '!=', False)]}" style="color:red;}"
colspan="2">
Note that you can't register activities if the member is new and not yet saved into the database.
</p>
<p colspan="2">
<field name="has_draft_registrations" invisible="1" />
<button name="do_validate_registrations" type="object"
string="Validate all draft registrations"
class="oe_highlight"
help="If you validate draft registration, they will be seen as confirmed. Then, an invoice will be created for the current member."
attrs="{'invisible': [('has_draft_registrations', '=', False)]}" />
</p>
</field>
<!-- TODO : one by one cancelation -->
<!-- TODO : do not allow removal if confirmed -->
<tree position="attributes">
<attribute name="colors">red: state == 'canceled';darkgrey: state == 'draft';</attribute>
</tree>
<tree position="inside">
<field name="state" invisible="1" />
</tree>
</field>
</record>
</data>
</odoo>

View File

@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# 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/>.
from . import golem_activity_registration_invoicing

View File

@ -1,108 +0,0 @@
# -*- coding: utf-8 -*-
# copyright 2017 fabien bourgeois <fabien@yaltik.com>
#
# this program is free software: you can redistribute it and/or modify
# it under the terms of the gnu affero general public license as
# published by the free software foundation, either version 3 of the
# license, or (at your option) any later version.
#
# this program is distributed in the hope that it will be useful,
# but without any warranty; without even the implied warranty of
# merchantability or fitness for a particular purpose. see the
# gnu affero general public license for more details.
#
# 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/>.
""" GOLEM Activity Registration Invoicing Wizard """
import logging
from odoo import models, fields, api
_LOGGER = logging.getLogger(__name__)
class GolemActivityRegistrationInvoicingLine(models.TransientModel):
""" GOLEM Activity Registration Invoicing Lines """
_name = 'golem.activity.registration.invoicing.line'
description = 'GOLEM Activity Registration Invoicing Lines'
invoicing_id = fields.Many2one('golem.activity.registration.invoicing',
required=True)
registration_id = fields.Many2one('golem.activity.registration', required=True)
activity_id = fields.Many2one('golem.activity', required=True, readonly=True)
price = fields.Float('Price')
class GolemActivityRegistrationInvoicing(models.TransientModel):
""" GOLEM Activity Registration Invoicing Wizard """
_name = 'golem.activity.registration.invoicing'
_description = 'GOLEM Activity Registration Invoicing Wizard'
season_id = fields.Many2one('golem.season', 'Season', required=True)
member_id = fields.Many2one('golem.member', 'Member', required=True)
line_ids = fields.One2many('golem.activity.registration.invoicing.line',
'invoicing_id', string='Activities')
schedule_id = fields.Many2one('golem.payment.schedule', 'Payment schedule',
domain='[("season_id", "=", season_id)]',
help='If no schedule is selected, only the '
'invoice will be create. Otherwise, draft '
'payments will be generated.')
journal_id = fields.Many2one('account.journal', 'Journal',
domain=[('type', 'in', ('bank', 'cash'))])
@api.multi
def _create_invoice(self):
""" Create invoice and lines """
self.ensure_one()
partner = self.member_id.partner_id
invoice = self.env['account.invoice'].create({
'partner_id': partner.id,
'account_id': partner.property_account_receivable_id.id,
'fiscal_position_id': partner.property_account_position_id.id
})
for line in self.line_ids:
product = line.activity_id.product_id
# Handling of invoice lines : needs cache record for onchange, then
# real writing...
invoice_line = self.env['account.invoice.line'].new({
'product_id': product.id,
'invoice_id': invoice.id
})
invoice_line._onchange_product_id()
line_values = dict(invoice_line._cache)
line_values['price_unit'] = line.price
invoice_line = self.env['account.invoice.line'].create(line_values)
invoice.compute_taxes()
line.registration_id.invoice_line_id = invoice_line.id
return invoice
@api.multi
def _create_payments(self, invoice):
""" Create payment if schedule has been chosen """
self.ensure_one()
if self.schedule_id and self.schedule_id.occurences > 0:
# TODO: make more intelligent price cut
amount = invoice.amount_total
amount_per_occurence = amount / self.schedule_id.occurences
for day in self.schedule_id.day_ids:
payment = self.env['account.payment'].new({
'payment_type': 'inbound',
'partner_type': 'customer',
'partner_id': self.member_id.partner_id.id,
'amount': amount_per_occurence,
'payment_date': day.day,
'journal_id': self.journal_id.id,
})
payment._onchange_journal()
payment_values = dict(payment._cache)
payment = self.env['account.payment'].create(payment_values)
payment.invoice_ids = [(4, invoice.id, False)]
@api.multi
def validate(self):
""" Validate and create invoice and payments """
self.ensure_one()
draft_registrations = self.member_id.activity_registration_ids.filtered(
lambda r: r.state == 'draft')
draft_registrations.write({'state': 'confirmed'})
invoice = self._create_invoice()
self._create_payments(invoice)

View File

@ -1,54 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
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/>.
-->
<odoo>
<data>
<!-- Form -->
<record id="invoicing_form" model="ir.ui.view">
<field name="name">GOLEM Activity Registration Invoicing Form</field>
<field name="model">golem.activity.registration.invoicing</field>
<field name="arch" type="xml">
<form string="Registration invoicing">
<p class="oe_grey">Please confirm activity prices and choose a payment schedule if needed.</p>
<group>
<field name="season_id" readonly="1" />
<field name="member_id" readonly="1" />
<field name="line_ids" string="Activities and Prices">
<tree delete="false" create="false" edit="true" editable="bottom">
<field name="activity_id" readonly="1" />
<field name="price" sum="Total" />
</tree>
</field>
<field name="schedule_id" />
<field name="journal_id"
attrs="{'invisible': [('schedule_id', '=', False)],
'required': [('schedule_id', '!=', False)]}" />
</group>
<footer>
<button name="validate" string="Validate" type="object"
class="oe_highlight" />
<button string="Cancel" class="oe_link" special="cancel" />
</footer>
</form>
</field>
</record>
</data>
</odoo>

View File

@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# 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/>.
{
'name': 'GOLEM Activity Sessions',
'summary': 'GOLEM Activities Session management',
'description': ''' Non-profit french MJC activies session management ''',
'version': '0.1',
'category': 'GOLEM',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',
'application': False,
'installable': True,
'auto_install': True,
'depends': ['product', 'mail', 'golem_activity', 'golem_member'],
'data': ['security/ir.model.access.csv',
'views/golem_activity_view.xml', 'views/golem_member_view.xml']
}

View File

@ -0,0 +1,831 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * golem_activity_session
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-03 15:20+0000\n"
"PO-Revision-Date: 2016-08-03 15:20+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: golem_activity_session
#: field:golem.activity.session,product_variant_count:0
msgid "# of Product Variants"
msgstr "# de variantes d'articles"
#. module: golem_activity_session
#: help:golem.activity.session,description_sale:0
msgid "A description of the Product that you want to communicate to your customers. This description will be copied to every Sale Order, Delivery Order and Customer Invoice/Refund"
msgstr "Une description de l'article que vous voulez communiquer à vos utilisateurs. Cette description sera utilisée dans chaque bon de commande, bon de livraison et facture client ou avoir."
#. module: golem_activity_session
#: help:golem.activity.session,description_purchase:0
msgid "A description of the Product that you want to communicate to your suppliers. This description will be copied to every Purchase Order, Receipt and Supplier Invoice/Refund."
msgstr "Une description de l'article que vous voulez communiquer à vos utilisateurs. Cette description sera utilisée dans chaque bon de commande, bon de livraison et facture client ou avoir."
#. module: golem_activity_session
#: help:golem.activity.session,description:0
msgid "A precise description of the Product, used only for internal information purposes."
msgstr "Une description précise de l'article, utilisée seulement pour de l'information interne (hors factures)."
#. module: golem_activity_session
#: field:golem.activity.session,active:0
msgid "Active"
msgstr "Actif"
#. module: golem_activity_session
#: view:golem.member:golem_activity_session.sessions_inscription
#: field:golem.member,activity_session_ids:0
msgid "Activities"
msgstr "Activités"
#. module: golem_activity_session
#: model:ir.actions.act_window,name:golem_activity_session.category_action
msgid "Activities Categories"
msgstr "Catégories d'activités"
#. module: golem_activity_session
#: model:ir.ui.menu,name:golem_activity_session.session_menu_list
msgid "Activities sessions"
msgstr "Séances des activités"
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:93
#: view:golem.activity.session:golem_activity_session.searches
#: field:golem.activity.session,activity_id:0
#: selection:golem.activity.session,type_of:0
#, python-format
msgid "Activity"
msgstr "Activité"
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:43
#, python-format
msgid "Activity Sessions"
msgstr "Séances de l'activité"
#. module: golem_activity_session
#: field:golem.activity.session,is_overbooked:0
msgid "Allow overbook?"
msgstr "Autoriser la surcharge?"
#. module: golem_activity_session
#: field:golem.activity.session,animator_id:0
msgid "Animator"
msgstr "Intervenant"
#. module: golem_activity_session
#: help:golem.activity.session,list_price:0
msgid "Base price to compute the customer price. Sometimes called the catalog price."
msgstr "Prix de base pour calculer le prix client."
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.searches
msgid "By animator"
msgstr "Par intervenant"
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.searches
msgid "By category"
msgstr "Par catégorie"
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.searches
msgid "By type"
msgstr "Par type"
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.searches
msgid "By weekday"
msgstr "Par jour de la semaine"
#. module: golem_activity_session
#: field:golem.activity.session,rental:0
msgid "Can be Rent"
msgstr "Peut être loué"
#. module: golem_activity_session
#: field:golem.activity.session,sale_ok:0
msgid "Can be Sold"
msgstr "Peut être vendu"
#. module: golem_activity_session
#: model:ir.ui.menu,name:golem_activity_session.activity_categ
msgid "Categories"
msgstr "Categories"
#. module: golem_activity_session
#: help:golem.activity.session,membership:0
msgid "Check if the product is eligible for membership."
msgstr "Check if the product is eligible for membership."
#. module: golem_activity_session
#: help:golem.activity.session,uos_coeff:0
msgid "Coefficient to convert default Unit of Measure to Unit of Sale\n"
" uos = uom * coeff"
msgstr "Coefficient to convert default Unit of Measure to Unit of Sale\n"
" uos = uom * coeff"
#. module: golem_activity_session
#: field:golem.activity.session,color:0
msgid "Color Index"
msgstr "Color Index"
#. module: golem_activity_session
#: field:golem.activity.session,company_id:0
msgid "Company"
msgstr "Company"
#. module: golem_activity_session
#: help:golem.activity.session,type:0
msgid "Consumable are product where you don't manage stock, a service is a non-material product provided by a company or an individual."
msgstr "Consumable are product where you don't manage stock, a service is a non-material product provided by a company or an individual."
#. module: golem_activity_session
#: field:golem.activity.session,standard_price:0
msgid "Cost Price"
msgstr "Cost Price"
#. module: golem_activity_session
#: help:golem.activity.session,standard_price:0
msgid "Cost price of the product template used for standard stock valuation in accounting and used as a base price on purchase orders. Expressed in the default unit of measure of the product."
msgstr "Cost price of the product template used for standard stock valuation in accounting and used as a base price on purchase orders. Expressed in the default unit of measure of the product."
#. module: golem_activity_session
#: field:golem.activity.session,create_uid:0
msgid "Created by"
msgstr "Créé par"
#. module: golem_activity_session
#: field:golem.activity.session,create_date:0
msgid "Created on"
msgstr "Créé le"
#. module: golem_activity_session
#: field:golem.activity.session,is_current:0
msgid "Current season?"
msgstr "Saison en cours?"
#. module: golem_activity_session
#: field:golem.activity.session,taxes_id:0
msgid "Customer Taxes"
msgstr "Taxes"
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.session_tree
msgid "Date"
msgstr "Date"
#. module: golem_activity_session
#: help:golem.activity.session,membership_date_from:0
msgid "Date from which membership becomes active."
msgstr "Date à partir de laquelle l'adhésion est devenu active."
#. module: golem_activity_session
#: help:golem.activity.session,message_last_post:0
msgid "Date of the last message posted on the record."
msgstr "Date du dernier message sur l'enregistrement."
#. module: golem_activity_session
#: help:golem.activity.session,membership_date_to:0
msgid "Date until which membership remains active."
msgstr "Date à laquelle l'adhésion reste active."
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.session_tree
msgid "Day"
msgstr "Jour"
#. module: golem_activity_session
#: help:golem.activity.session,uom_id:0
msgid "Default Unit of Measure used for all stock operation."
msgstr "Default Unit of Measure used for all stock operation."
#. module: golem_activity_session
#: help:golem.activity.session,uom_po_id:0
msgid "Default Unit of Measure used for purchase orders. It must be in the same category than the default unit of measure."
msgstr "Default Unit of Measure used for purchase orders. It must be in the same category than the default unit of measure."
#. module: golem_activity_session
#: field:golem.activity.session,default_code:0
msgid "Default code"
msgstr "Référence"
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.searches
msgid "Default season"
msgstr "Saison par défaut"
#. module: golem_activity_session
#: field:golem.activity.session,description:0
msgid "Description"
msgstr "Description"
#. module: golem_activity_session
#: field:golem.activity.session,display_name:0
msgid "Display Name"
msgstr "Nom affiché"
#. module: golem_activity_session
#: field:golem.activity.session,ean13:0
msgid "EAN13 Barcode"
msgstr "Code-barres EAN13"
#. module: golem_activity_session
#: field:golem.activity.session,date_end:0
msgid "End date"
msgstr "Date de fin"
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:161
#, python-format
msgid "End of the session cannot be after the end of activity date"
msgstr "La fin de la séance ne peut être après la fin de l'activité"
#. module: golem_activity_session
#: field:golem.activity.session,hour_end:0
msgid "End time"
msgstr "Heure de fin"
#. module: golem_activity_session
#: field:golem.activity.session,property_account_expense:0
msgid "Expense Account"
msgstr "Compte de dépense"
#. module: golem_activity_session
#: field:golem.activity.session,message_follower_ids:0
msgid "Followers"
msgstr "Abonnés"
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:169
#: selection:golem.activity.session,weekday:0
#, python-format
msgid "Friday"
msgstr "Vendredi"
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.searches
msgid "Full"
msgstr "Plein"
#. module: golem_activity_session
#: model:ir.model,name:golem_activity_session.model_golem_activity_session
msgid "GOLEM Activities Sessions"
msgstr "Séances des activités"
#. module: golem_activity_session
#: model:ir.actions.act_window,name:golem_activity_session.session_action_list
msgid "GOLEM Activities Sessions List"
msgstr "Liste des séances"
#. module: golem_activity_session
#: model:ir.model,name:golem_activity_session.model_golem_activity
msgid "GOLEM Activity"
msgstr "Activité"
#. module: golem_activity_session
#: model:ir.model,name:golem_activity_session.model_golem_member
msgid "GOLEM Member"
msgstr "Adhérent"
#. module: golem_activity_session
#: help:golem.activity.session,packaging_ids:0
msgid "Gives the different ways to package the same product. This has no impact on the picking order and is mainly used if you use the EDI module."
msgstr "Gives the different ways to package the same product. This has no impact on the picking order and is mainly used if you use the EDI module."
#. module: golem_activity_session
#: field:golem.activity.session,weight:0
msgid "Gross Weight"
msgstr "Gross Weight"
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.searches
msgid "Group By"
msgstr "Grouper par"
#. module: golem_activity_session
#: help:golem.activity.session,message_summary:0
msgid "Holds the Chatter summary (number of messages, ...). This summary is directly in html format in order to be inserted in kanban views."
msgstr "Holds the Chatter summary (number of messages, ...). This summary is directly in html format in order to be inserted in kanban views."
#. module: golem_activity_session
#: field:golem.activity.session,id:0
msgid "ID"
msgstr "ID"
#. module: golem_activity_session
#: help:golem.activity.session,message_unread:0
msgid "If checked new messages require your attention."
msgstr "If checked new messages require your attention."
#. module: golem_activity_session
#: help:golem.activity.session,active:0
msgid "If unchecked, it will allow you to hide the product without removing it."
msgstr "If unchecked, it will allow you to hide the product without removing it."
#. module: golem_activity_session
#: field:golem.activity.session,image:0
msgid "Image"
msgstr "Image"
#. module: golem_activity_session
#: field:golem.activity.session,property_account_income:0
msgid "Income Account"
msgstr "Income Account"
#. module: golem_activity_session
#: field:golem.activity.session,categ_id:0
msgid "Internal Category"
msgstr "Catégorie"
#. module: golem_activity_session
#: field:golem.activity.session,message_is_follower:0
msgid "Is a Follower"
msgstr "Is a Follower"
#. module: golem_activity_session
#: field:golem.activity.session,is_product_variant:0
msgid "Is product variant"
msgstr "Is product variant"
#. module: golem_activity_session
#: field:golem.activity.session,is_recurrent:0
msgid "Is recurrent ?"
msgstr "Est récurrent ?"
#. module: golem_activity_session
#: field:golem.activity.session,message_last_post:0
msgid "Last Message Date"
msgstr "Date du dernier message"
#. module: golem_activity_session
#: field:golem.activity.session,__last_update:0
msgid "Last Modified on"
msgstr "Dernière modification le"
#. module: golem_activity_session
#: field:golem.activity.session,write_uid:0
msgid "Last Updated by"
msgstr "Dernière modification par"
#. module: golem_activity_session
#: field:golem.activity.session,write_date:0
msgid "Last Updated on"
msgstr "Dernière modification le"
#. module: golem_activity_session
#: field:golem.activity.session,packaging_ids:0
msgid "Logistical Units"
msgstr "Logistical Units"
#. module: golem_activity_session
#: field:golem.activity.session,seller_id:0
msgid "Main Supplier"
msgstr "Main Supplier"
#. module: golem_activity_session
#: help:golem.activity.session,seller_id:0
msgid "Main Supplier who has highest priority in Supplier List."
msgstr "Main Supplier who has highest priority in Supplier List."
#. module: golem_activity_session
#: field:golem.activity.session,mes_type:0
msgid "Measure Type"
msgstr "Measure Type"
#. module: golem_activity_session
#: field:golem.activity.session,image_medium:0
msgid "Medium-sized image"
msgstr "Medium-sized image"
#. module: golem_activity_session
#: help:golem.activity.session,image_medium:0
msgid "Medium-sized image of the product. It is automatically resized as a 128x128px image, with aspect ratio preserved, only when the image exceeds one of those sizes. Use this field in form views or some kanban views."
msgstr "Medium-sized image of the product. It is automatically resized as a 128x128px image, with aspect ratio preserved, only when the image exceeds one of those sizes. Use this field in form views or some kanban views."
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.view_form
#: field:golem.activity.session,member_ids:0
msgid "Members"
msgstr "Adhérents"
#. module: golem_activity_session
#: field:golem.activity.session,membership:0
msgid "Membership"
msgstr "Adhésion"
#. module: golem_activity_session
#: field:golem.activity.session,membership_date_to:0
msgid "Membership End Date"
msgstr "Fin de l'adhésion"
#. module: golem_activity_session
#: field:golem.activity.session,membership_date_from:0
msgid "Membership Start Date"
msgstr "Début de l'adhésion"
#. module: golem_activity_session
#: field:golem.activity.session,message_ids:0
msgid "Messages"
msgstr "Messages"
#. module: golem_activity_session
#: help:golem.activity.session,message_ids:0
msgid "Messages and communication history"
msgstr "Messages et historique des échanges"
#. module: golem_activity_session
#: field:golem.activity.session,places_min:0
msgid "Minimum places"
msgstr "Places minimum"
#. module: golem_activity_session
#: help:golem.activity.session,places_min:0
msgid "Minimum places to maintain the session"
msgstr "Nombre de places minimum pour maintenir la session"
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:165
#: selection:golem.activity.session,weekday:0
#, python-format
msgid "Monday"
msgstr "Lundi"
#. module: golem_activity_session
#: field:golem.activity.session,name:0
#: field:golem.activity.session,session_name:0
msgid "Name"
msgstr "Nom"
#. module: golem_activity_session
#: field:golem.activity.session,weight_net:0
msgid "Net Weight"
msgstr "Net Weight"
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:215
#, python-format
msgid "Number of places cannot be negative."
msgstr "Le nombre de places ne peut pas être négatif"
#. module: golem_activity_session
#: field:golem.activity.session,places:0
msgid "Places"
msgstr "Places"
#. module: golem_activity_session
#: field:golem.activity.session,places_used:0
msgid "Places used"
msgstr "Places prises"
#. module: golem_activity_session
#: field:golem.activity.session,places_overbooked:0
msgid "Places with overbook"
msgstr "Places avec surcharge"
#. module: golem_activity_session
#: field:golem.activity.session,price:0
msgid "Price"
msgstr "Prix"
#. module: golem_activity_session
#: field:golem.activity.session,pricelist_id:0
msgid "Pricelist"
msgstr "Liste de prix"
#. module: golem_activity_session
#: field:golem.activity.session,attribute_line_ids:0
msgid "Product Attributes"
msgstr "Product Attributes"
#. module: golem_activity_session
#: field:golem.activity.session,product_manager:0
msgid "Product Manager"
msgstr "Product Manager"
#. module: golem_activity_session
#: model:ir.model,name:golem_activity_session.model_product_template
msgid "Product Template"
msgstr "Modèle d'article"
#. module: golem_activity_session
#: field:golem.activity.session,type:0
msgid "Product Type"
msgstr "Type d'article"
#. module: golem_activity_session
#: field:golem.activity.session,product_id:0
msgid "Product id"
msgstr "Product id"
#. module: golem_activity_session
#: field:golem.activity.session,product_variant_ids:0
msgid "Products"
msgstr "Articles"
#. module: golem_activity_session
#: field:golem.activity.session,lst_price:0
msgid "Public Price"
msgstr "Prix public"
#. module: golem_activity_session
#: field:golem.activity.session,description_purchase:0
msgid "Purchase Description"
msgstr "Purchase Description"
#. module: golem_activity_session
#: field:golem.activity.session,uom_po_id:0
msgid "Purchase Unit of Measure"
msgstr "Purchase Unit of Measure"
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.session_tree
msgid "Remain"
msgstr "Reste"
#. module: golem_activity_session
#: field:golem.activity.session,places_remain:0
msgid "Remaining places"
msgstr "Places restantes"
#. module: golem_activity_session
#: field:golem.activity.session,description_sale:0
msgid "Sale Description"
msgstr "Description de vente"
#. module: golem_activity_session
#: field:golem.activity.session,list_price:0
msgid "Sale Price"
msgstr "Prix de vente"
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:170
#: selection:golem.activity.session,weekday:0
#, python-format
msgid "Saturday"
msgstr "Samedi"
#. module: golem_activity_session
#: field:golem.activity.session,season_id:0
msgid "Season"
msgstr "Saison"
#. module: golem_activity_session
#: help:golem.activity.session,categ_id:0
msgid "Select category for the current activity"
msgstr "Select category for the current activity"
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.view_form
msgid "Service"
msgstr "Service"
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.view_form
msgid "Session"
msgstr "Session"
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.view_form
msgid "Session Name"
msgstr "Nom de la séance"
#. module: golem_activity_session
#: view:golem.activity:golem_activity_session.session_smart
#: field:golem.activity,session_count:0
msgid "Sessions"
msgstr "Séances"
#. module: golem_activity_session
#: field:golem.activity.session,image_small:0
msgid "Small-sized image"
msgstr "Small-sized image"
#. module: golem_activity_session
#: help:golem.activity.session,image_small:0
msgid "Small-sized image of the product. It is automatically resized as a 64x64px image, with aspect ratio preserved. Use this field anywhere a small image is required."
msgstr "Small-sized image of the product. It is automatically resized as a 64x64px image, with aspect ratio preserved. Use this field anywhere a small image is required."
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:205
#, python-format
msgid "Sorry, there is no more place !"
msgstr "Désolé mais il n'y a plus de place disponible !"
#. module: golem_activity_session
#: help:golem.activity.session,uos_id:0
msgid "Specify a unit of measure here if invoicing is made in another unit of measure than inventory. Keep empty to use the default unit of measure."
msgstr "Specify a unit of measure here if invoicing is made in another unit of measure than inventory. Keep empty to use the default unit of measure."
#. module: golem_activity_session
#: help:golem.activity.session,sale_ok:0
msgid "Specify if the product can be selected in a sales order line."
msgstr "Specify if the product can be selected in a sales order line."
#. module: golem_activity_session
#: field:golem.activity.session,date_start:0
msgid "Start date"
msgstr "Date de début"
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:187
#, python-format
msgid "Start of the period cannot be after end of the period."
msgstr "Le début de la période ne peut être antérieure à sa fin"
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:153
#, python-format
msgid "Start of the session cannot be after end of the session."
msgstr "Le début de la séance ne peut être après sa fin"
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:157
#, python-format
msgid "Start of the session cannot be before the start of activity date"
msgstr "Le début de la séance ne peut être fixé avant le début de l'activité"
#. module: golem_activity_session
#: field:golem.activity.session,hour_start:0
msgid "Start time"
msgstr "Heure de début"
#. module: golem_activity_session
#: field:golem.activity.session,state:0
msgid "Status"
msgstr "Statut"
#. module: golem_activity_session
#: field:golem.activity.session,message_summary:0
msgid "Summary"
msgstr "Résumé"
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:171
#: selection:golem.activity.session,weekday:0
#, python-format
msgid "Sunday"
msgstr "Dimanche"
#. module: golem_activity_session
#: field:golem.activity.session,seller_ids:0
msgid "Supplier"
msgstr "Supplier"
#. module: golem_activity_session
#: field:golem.activity.session,seller_delay:0
msgid "Supplier Lead Time"
msgstr "Supplier Lead Time"
#. module: golem_activity_session
#: field:golem.activity.session,seller_qty:0
msgid "Supplier Quantity"
msgstr "Supplier Quantity"
#. module: golem_activity_session
#: field:golem.activity.session,supplier_taxes_id:0
msgid "Supplier Taxes"
msgstr "Supplier Taxes"
#. module: golem_activity_session
#: help:golem.activity.session,weight:0
msgid "The gross weight in Kg."
msgstr "The gross weight in Kg."
#. module: golem_activity_session
#: help:golem.activity.session,weight_net:0
msgid "The net weight in Kg."
msgstr "The net weight in Kg."
#. module: golem_activity_session
#: help:golem.activity.session,volume:0
msgid "The volume in m3."
msgstr "The volume in m3."
#. module: golem_activity_session
#: help:golem.activity.session,property_account_expense:0
msgid "This account will be used for invoices instead of the default one to value expenses for the current product."
msgstr "This account will be used for invoices instead of the default one to value expenses for the current product."
#. module: golem_activity_session
#: help:golem.activity.session,property_account_income:0
msgid "This account will be used for invoices instead of the default one to value sales for the current product."
msgstr "This account will be used for invoices instead of the default one to value sales for the current product."
#. module: golem_activity_session
#: help:golem.activity.session,image:0
msgid "This field holds the image used as image for the activity."
msgstr "This field holds the image used as image for the activity."
#. module: golem_activity_session
#: help:golem.activity.session,seller_qty:0
msgid "This is minimum quantity to purchase from Main Supplier."
msgstr "This is minimum quantity to purchase from Main Supplier."
#. module: golem_activity_session
#: help:golem.activity.session,seller_delay:0
msgid "This is the average delay in days between the purchase order confirmation and the receipts for this product and for the default supplier. It is used by the scheduler to order requests based on reordering delays."
msgstr "This is the average delay in days between the purchase order confirmation and the receipts for this product and for the default supplier. It is used by the scheduler to order requests based on reordering delays."
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:168
#: selection:golem.activity.session,weekday:0
#, python-format
msgid "Thursday"
msgstr "Jeudi"
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:95
#: view:golem.activity.session:golem_activity_session.searches
#: selection:golem.activity.session,type_of:0
#, python-format
msgid "Training"
msgstr "Stage"
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.session_tree
msgid "True"
msgstr "Vrai"
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:166
#: selection:golem.activity.session,weekday:0
#, python-format
msgid "Tuesday"
msgstr "Mardi"
#. module: golem_activity_session
#: field:golem.activity.session,type_of:0
msgid "Type"
msgstr "Type"
#. module: golem_activity_session
#: field:golem.activity.session,uom_id:0
msgid "Unit of Measure"
msgstr "Unit of Measure"
#. module: golem_activity_session
#: field:golem.activity.session,uos_coeff:0
msgid "Unit of Measure -> UOS Coeff"
msgstr "Unit of Measure -> UOS Coeff"
#. module: golem_activity_session
#: field:golem.activity.session,uos_id:0
msgid "Unit of Sale"
msgstr "Unit of Sale"
#. module: golem_activity_session
#: field:golem.activity.session,message_unread:0
msgid "Unread Messages"
msgstr "Messages non lus"
#. module: golem_activity_session
#: field:golem.activity.session,volume:0
msgid "Volume"
msgstr "Volume"
#. module: golem_activity_session
#: field:golem.activity.session,warranty:0
msgid "Warranty"
msgstr "Garantie"
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:167
#: selection:golem.activity.session,weekday:0
#, python-format
msgid "Wednesday"
msgstr "Mercredi"
#. module: golem_activity_session
#: field:golem.activity.session,weekday:0
msgid "Weekday"
msgstr "Jour de la semaine"
#. module: golem_activity_session
#: help:golem.activity.session,is_recurrent:0
msgid "Work in progress"
msgstr "Travail en cours"
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:94
#: view:golem.activity.session:golem_activity_session.searches
#: selection:golem.activity.session,type_of:0
#, python-format
msgid "Workshop"
msgstr "Atelier"
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.view_form
msgid "describe the activity characteristics..."
msgstr "describe the activity characteristics..."

View File

@ -0,0 +1,828 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * golem_activity_session
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-03 15:20+0000\n"
"PO-Revision-Date: 2016-08-03 15:20+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: golem_activity_session
#: field:golem.activity.session,product_variant_count:0
msgid "# of Product Variants"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,description_sale:0
msgid "A description of the Product that you want to communicate to your customers. This description will be copied to every Sale Order, Delivery Order and Customer Invoice/Refund"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,description_purchase:0
msgid "A description of the Product that you want to communicate to your suppliers. This description will be copied to every Purchase Order, Receipt and Supplier Invoice/Refund."
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,description:0
msgid "A precise description of the Product, used only for internal information purposes."
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,active:0
msgid "Active"
msgstr ""
#. module: golem_activity_session
#: view:golem.member:golem_activity_session.sessions_inscription
#: field:golem.member,activity_session_ids:0
msgid "Activities"
msgstr ""
#. module: golem_activity_session
#: model:ir.actions.act_window,name:golem_activity_session.category_action
msgid "Activities Categories"
msgstr ""
#. module: golem_activity_session
#: model:ir.ui.menu,name:golem_activity_session.session_menu_list
msgid "Activities sessions"
msgstr ""
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:93
#: view:golem.activity.session:golem_activity_session.searches
#: field:golem.activity.session,activity_id:0
#: selection:golem.activity.session,type_of:0
#, python-format
msgid "Activity"
msgstr ""
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:43
#, python-format
msgid "Activity Sessions"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,is_overbooked:0
msgid "Allow overbook?"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,animator_id:0
msgid "Animator"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,list_price:0
msgid "Base price to compute the customer price. Sometimes called the catalog price."
msgstr ""
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.searches
msgid "By animator"
msgstr ""
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.searches
msgid "By category"
msgstr ""
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.searches
msgid "By type"
msgstr ""
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.searches
msgid "By weekday"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,rental:0
msgid "Can be Rent"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,sale_ok:0
msgid "Can be Sold"
msgstr ""
#. module: golem_activity_session
#: model:ir.ui.menu,name:golem_activity_session.activity_categ
msgid "Categories"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,membership:0
msgid "Check if the product is eligible for membership."
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,uos_coeff:0
msgid "Coefficient to convert default Unit of Measure to Unit of Sale\n"
" uos = uom * coeff"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,color:0
msgid "Color Index"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,company_id:0
msgid "Company"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,type:0
msgid "Consumable are product where you don't manage stock, a service is a non-material product provided by a company or an individual."
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,standard_price:0
msgid "Cost Price"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,standard_price:0
msgid "Cost price of the product template used for standard stock valuation in accounting and used as a base price on purchase orders. Expressed in the default unit of measure of the product."
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,create_uid:0
msgid "Created by"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,create_date:0
msgid "Created on"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,is_current:0
msgid "Current season?"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,taxes_id:0
msgid "Customer Taxes"
msgstr ""
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.session_tree
msgid "Date"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,membership_date_from:0
msgid "Date from which membership becomes active."
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,message_last_post:0
msgid "Date of the last message posted on the record."
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,membership_date_to:0
msgid "Date until which membership remains active."
msgstr ""
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.session_tree
msgid "Day"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,uom_id:0
msgid "Default Unit of Measure used for all stock operation."
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,uom_po_id:0
msgid "Default Unit of Measure used for purchase orders. It must be in the same category than the default unit of measure."
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,default_code:0
msgid "Default code"
msgstr ""
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.searches
msgid "Default season"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,description:0
msgid "Description"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,display_name:0
msgid "Display Name"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,ean13:0
msgid "EAN13 Barcode"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,date_end:0
msgid "End date"
msgstr ""
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:161
#, python-format
msgid "End of the session cannot be after the end of activity date"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,hour_end:0
msgid "End time"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,property_account_expense:0
msgid "Expense Account"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,message_follower_ids:0
msgid "Followers"
msgstr ""
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:169
#: selection:golem.activity.session,weekday:0
#, python-format
msgid "Friday"
msgstr ""
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.searches
msgid "Full"
msgstr ""
#. module: golem_activity_session
#: model:ir.model,name:golem_activity_session.model_golem_activity_session
msgid "GOLEM Activities Sessions"
msgstr ""
#. module: golem_activity_session
#: model:ir.actions.act_window,name:golem_activity_session.session_action_list
msgid "GOLEM Activities Sessions List"
msgstr ""
#. module: golem_activity_session
#: model:ir.model,name:golem_activity_session.model_golem_activity
msgid "GOLEM Activity"
msgstr ""
#. module: golem_activity_session
#: model:ir.model,name:golem_activity_session.model_golem_member
msgid "GOLEM Member"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,packaging_ids:0
msgid "Gives the different ways to package the same product. This has no impact on the picking order and is mainly used if you use the EDI module."
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,weight:0
msgid "Gross Weight"
msgstr ""
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.searches
msgid "Group By"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,message_summary:0
msgid "Holds the Chatter summary (number of messages, ...). This summary is directly in html format in order to be inserted in kanban views."
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,id:0
msgid "ID"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,message_unread:0
msgid "If checked new messages require your attention."
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,active:0
msgid "If unchecked, it will allow you to hide the product without removing it."
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,image:0
msgid "Image"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,property_account_income:0
msgid "Income Account"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,categ_id:0
msgid "Internal Category"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,message_is_follower:0
msgid "Is a Follower"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,is_product_variant:0
msgid "Is product variant"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,is_recurrent:0
msgid "Is recurrent ?"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,message_last_post:0
msgid "Last Message Date"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,__last_update:0
msgid "Last Modified on"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,write_uid:0
msgid "Last Updated by"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,write_date:0
msgid "Last Updated on"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,packaging_ids:0
msgid "Logistical Units"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,seller_id:0
msgid "Main Supplier"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,seller_id:0
msgid "Main Supplier who has highest priority in Supplier List."
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,mes_type:0
msgid "Measure Type"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,image_medium:0
msgid "Medium-sized image"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,image_medium:0
msgid "Medium-sized image of the product. It is automatically resized as a 128x128px image, with aspect ratio preserved, only when the image exceeds one of those sizes. Use this field in form views or some kanban views."
msgstr ""
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.view_form
#: field:golem.activity.session,member_ids:0
msgid "Members"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,membership:0
msgid "Membership"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,membership_date_to:0
msgid "Membership End Date"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,membership_date_from:0
msgid "Membership Start Date"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,message_ids:0
msgid "Messages"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,message_ids:0
msgid "Messages and communication history"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,places_min:0
msgid "Minimum places"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,places_min:0
msgid "Minimum places to maintain the session"
msgstr ""
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:165
#: selection:golem.activity.session,weekday:0
#, python-format
msgid "Monday"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,name:0
#: field:golem.activity.session,session_name:0
msgid "Name"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,weight_net:0
msgid "Net Weight"
msgstr ""
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:215
#, python-format
msgid "Number of places cannot be negative."
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,places:0
msgid "Places"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,places_used:0
msgid "Places used"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,places_overbooked:0
msgid "Places with overbook"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,price:0
msgid "Price"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,pricelist_id:0
msgid "Pricelist"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,attribute_line_ids:0
msgid "Product Attributes"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,product_manager:0
msgid "Product Manager"
msgstr ""
#. module: golem_activity_session
#: model:ir.model,name:golem_activity_session.model_product_template
msgid "Product Template"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,type:0
msgid "Product Type"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,product_id:0
msgid "Product id"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,product_variant_ids:0
msgid "Products"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,lst_price:0
msgid "Public Price"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,description_purchase:0
msgid "Purchase Description"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,uom_po_id:0
msgid "Purchase Unit of Measure"
msgstr ""
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.session_tree
msgid "Remain"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,places_remain:0
msgid "Remaining places"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,description_sale:0
msgid "Sale Description"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,list_price:0
msgid "Sale Price"
msgstr ""
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:170
#: selection:golem.activity.session,weekday:0
#, python-format
msgid "Saturday"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,season_id:0
msgid "Season"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,categ_id:0
msgid "Select category for the current activity"
msgstr ""
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.view_form
msgid "Service"
msgstr ""
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.view_form
msgid "Session"
msgstr ""
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.view_form
msgid "Session Name"
msgstr ""
#. module: golem_activity_session
#: view:golem.activity:golem_activity_session.session_smart
#: field:golem.activity,session_count:0
msgid "Sessions"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,image_small:0
msgid "Small-sized image"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,image_small:0
msgid "Small-sized image of the product. It is automatically resized as a 64x64px image, with aspect ratio preserved. Use this field anywhere a small image is required."
msgstr ""
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:205
#, python-format
msgid "Sorry, there is no more place !"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,uos_id:0
msgid "Specify a unit of measure here if invoicing is made in another unit of measure than inventory. Keep empty to use the default unit of measure."
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,sale_ok:0
msgid "Specify if the product can be selected in a sales order line."
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,date_start:0
msgid "Start date"
msgstr ""
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:187
#, python-format
msgid "Start of the period cannot be after end of the period."
msgstr ""
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:153
#, python-format
msgid "Start of the session cannot be after end of the session."
msgstr ""
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:157
#, python-format
msgid "Start of the session cannot be before the start of activity date"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,hour_start:0
msgid "Start time"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,state:0
msgid "Status"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,message_summary:0
msgid "Summary"
msgstr ""
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:171
#: selection:golem.activity.session,weekday:0
#, python-format
msgid "Sunday"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,seller_ids:0
msgid "Supplier"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,seller_delay:0
msgid "Supplier Lead Time"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,seller_qty:0
msgid "Supplier Quantity"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,supplier_taxes_id:0
msgid "Supplier Taxes"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,weight:0
msgid "The gross weight in Kg."
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,weight_net:0
msgid "The net weight in Kg."
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,volume:0
msgid "The volume in m3."
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,property_account_expense:0
msgid "This account will be used for invoices instead of the default one to value expenses for the current product."
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,property_account_income:0
msgid "This account will be used for invoices instead of the default one to value sales for the current product."
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,image:0
msgid "This field holds the image used as image for the activity."
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,seller_qty:0
msgid "This is minimum quantity to purchase from Main Supplier."
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,seller_delay:0
msgid "This is the average delay in days between the purchase order confirmation and the receipts for this product and for the default supplier. It is used by the scheduler to order requests based on reordering delays."
msgstr ""
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:168
#: selection:golem.activity.session,weekday:0
#, python-format
msgid "Thursday"
msgstr ""
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:95
#: view:golem.activity.session:golem_activity_session.searches
#: selection:golem.activity.session,type_of:0
#, python-format
msgid "Training"
msgstr ""
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.session_tree
msgid "True"
msgstr ""
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:166
#: selection:golem.activity.session,weekday:0
#, python-format
msgid "Tuesday"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,type_of:0
msgid "Type"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,uom_id:0
msgid "Unit of Measure"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,uos_coeff:0
msgid "Unit of Measure -> UOS Coeff"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,uos_id:0
msgid "Unit of Sale"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,message_unread:0
msgid "Unread Messages"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,volume:0
msgid "Volume"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,warranty:0
msgid "Warranty"
msgstr ""
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:167
#: selection:golem.activity.session,weekday:0
#, python-format
msgid "Wednesday"
msgstr ""
#. module: golem_activity_session
#: field:golem.activity.session,weekday:0
msgid "Weekday"
msgstr ""
#. module: golem_activity_session
#: help:golem.activity.session,is_recurrent:0
msgid "Work in progress"
msgstr ""
#. module: golem_activity_session
#: code:addons/golem_activity_session/models/golem_activity_session.py:94
#: view:golem.activity.session:golem_activity_session.searches
#: selection:golem.activity.session,type_of:0
#, python-format
msgid "Workshop"
msgstr ""
#. module: golem_activity_session
#: view:golem.activity.session:golem_activity_session.view_form
msgid "describe the activity characteristics..."
msgstr ""

View File

@ -15,4 +15,4 @@
# 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/>.
from . import golem_activity
from . import golem_activity_session

View File

@ -0,0 +1,210 @@
# -*- coding: utf-8 -*-
# copyright 2016 fabien bourgeois <fabien@yaltik.com>
#
# this program is free software: you can redistribute it and/or modify
# it under the terms of the gnu affero general public license as
# published by the free software foundation, either version 3 of the
# license, or (at your option) any later version.
#
# this program is distributed in the hope that it will be useful,
# but without any warranty; without even the implied warranty of
# merchantability or fitness for a particular purpose. see the
# gnu affero general public license for more details.
#
# 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/>.
from openerp import models, fields, api, _
class GolemMember(models.Model):
_inherit = 'golem.member'
activity_session_ids = fields.Many2many('golem.activity.session',
string='Activities')
class GolemActivity(models.Model):
_inherit = 'golem.activity'
session_count = fields.Integer('Sessions',
compute='_compute_session_count')
@api.one
def _compute_session_count(self):
dmn = [('activity_id', '=', self.id)]
cnt = self.env['golem.activity.session'].search_count(dmn)
self.session_count = cnt
@api.multi
def button_session(self):
self.ensure_one()
return {'name': _('Activity Sessions'),
'type': 'ir.actions.act_window',
'res_model': 'golem.activity.session',
'view_mode': 'tree,form',
'context': {'default_activity_id': self.id,
'default_animator_id': self.animator_id.id},
'domain': [('activity_id', '=', self.id)]}
class ProductTemplate(models.Model):
_inherit = 'product.template'
# Make default service for type
type = fields.Selection(default='service')
class GolemActivitySession(models.Model):
_name = 'golem.activity.session'
_description = 'GOLEM Activities Sessions'
_inherit = 'mail.thread'
_inherits = {'product.template': 'product_id'}
_rec_name = 'session_name'
_sql_constraints = [('golem_activity_session_places_signed',
'CHECK (places >= 0)',
_('Number of places cannot be negative.'))]
product_id = fields.Many2one('product.template', required=True,
ondelete='cascade')
default_code = fields.Char(copy=True) # Copy the default code
@api.model
def _default_name(self):
""" Default name to activity name """
d_aid = self.env.context.get('default_activity_id')
aobj = self.env['golem.activity']
return aobj.browse([d_aid]).name if d_aid else None
image = fields.Binary(related='activity_id.image')
categ_id = fields.Many2one(related='activity_id.categ_id', readonly=True)
session_name = fields.Char('Name', compute='_compute_full_name',
store=True, index=True)
@api.one
@api.depends('name', 'default_code')
def _compute_full_name(self):
""" Provide a better displayed name """
session_name = unicode(self.name)
if self.default_code:
session_name = u'[{}] {}'.format(self.default_code, session_name)
self.session_name = session_name
member_ids = fields.Many2many('golem.member', string='Members')
type_of = fields.Selection([('activity', _('Activity')),
('workshop', _('Workshop')),
('training', _('Training'))],
default='activity', index=True, string='Type')
@api.onchange('type_of')
def onchange_type_of(self):
for s in self:
if s.type_of != 'activity':
s.is_recurrent = False
else:
s.is_recurrent = True
places_used = fields.Integer('Places used', compute='_compute_places_used')
@api.one
@api.depends('member_ids')
def _compute_places_used(self):
self.places_used = len(self.member_ids)
# TODO: to link with calendar.event
activity_id = fields.Many2one('golem.activity', string='Activity',
required=True)
animator_id = fields.Many2one('res.partner', string='Animator')
is_current = fields.Boolean('Current season?',
related='activity_id.is_current')
season_id = fields.Many2one(string='Season',
related='activity_id.season_id')
@api.onchange('activity_id')
def onchange_activity_id(self):
""" Sets session name and animator as activity's one if empty """
for s in self:
if not s.name:
s.name = s.activity_id.name
if not s.default_code:
s.default_code = s.activity_id.default_code
if not s.animator_id:
s.animator_id = s.activity_id.animator_id
is_recurrent = fields.Boolean('Is recurrent ?', default=True,
help='Work in progress')
date_start = fields.Datetime('Start date')
date_end = fields.Datetime('End date')
@api.onchange('date_start')
def onchange_date_start(self):
""" Sets end date to start date if no start date """
for s in self:
if not s.date_end:
s.date_end = s.date_start
@api.constrains('date_start', 'date_end')
def _check_date_period(self):
""" Check if end date if after start date and if dates are included
into main activity period"""
for s in self:
if not s.is_recurrent:
if s.date_start > s.date_end:
emsg = _('Start of the session cannot be after end of the '
'session.')
raise models.ValidationError(emsg)
if s.date_start < s.activity_id.date_start:
emsg = _('Start of the session cannot be before the start '
'of activity date')
raise models.ValidationError(emsg)
if s.date_end > s.activity_id.date_end:
emsg = _('End of the session cannot be after the end of '
'activity date')
raise models.ValidationError(emsg)
weekday = fields.Selection([('mon', _('Monday')),
('tue', _('Tuesday')),
('wed', _('Wednesday')),
('thu', _('Thursday')),
('fri', _('Friday')),
('sat', _('Saturday')),
('sun', _('Sunday'))])
hour_start = fields.Float('Start time')
hour_end = fields.Float('End time')
@api.onchange('hour_start')
def onchange_hour_start(self):
""" Sets end hour to start hour if no start hour """
for s in self:
if s.hour_start and not s.hour_end:
s.hour_end = s.hour_start + 1
@api.constrains('hour_start', 'hour_end')
def _check_hour_period(self):
""" Check if end hour if after start hour """
for s in self:
if s.hour_start > s.hour_end:
raise models.ValidationError(_('Start of the period cannot be '
'after end of the period.'))
places = fields.Integer('Places', default=20)
places_remain = fields.Integer('Remaining places', store=True,
compute='_compute_places_remain')
@api.one
@api.depends('places', 'member_ids')
def _compute_places_remain(self):
used = len(self.member_ids)
self.places_remain = self.places - used
@api.constrains('places_remain')
def _check_remaining_places(self):
""" Forbid inscription when there is no more place """
for s in self:
if s.places_remain < 0:
emsg = _('Sorry, there is no more place !')
raise models.ValidationError(emsg)

View File

@ -0,0 +1,5 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_golem_activity_session_user,Access GOLEM Activity Session User,model_golem_activity_session,golem_base.group_golem_user,1,1,1,1
access_golem_product_template_user,Access GOLEM Product Template User,model_product_template,golem_base.group_golem_user,1,1,1,1
access_golem_product_product_user,Access GOLEM Product Product User,product.model_product_product,golem_base.group_golem_user,1,1,1,1
access_golem_product_pricehist_user,Access GOLEM Product Price History User,product.model_product_price_history,golem_base.group_golem_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_golem_activity_session_user Access GOLEM Activity Session User model_golem_activity_session golem_base.group_golem_user 1 1 1 1
3 access_golem_product_template_user Access GOLEM Product Template User model_product_template golem_base.group_golem_user 1 1 1 1
4 access_golem_product_product_user Access GOLEM Product Product User product.model_product_product golem_base.group_golem_user 1 1 1 1
5 access_golem_product_pricehist_user Access GOLEM Product Price History User product.model_product_price_history golem_base.group_golem_user 1 1 1 1

View File

@ -15,4 +15,4 @@
# 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/>.
from . import golem_activity_registration
from . import test_golem_activity_session

View File

@ -0,0 +1,85 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# 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/>.
from openerp.tests.common import TransactionCase
from openerp.models import ValidationError
from psycopg2 import IntegrityError
class GolemActivitySessionTestCase(TransactionCase):
def setUp(self):
super(GolemActivitySessionTestCase, self).setUp()
season_model = self.env['golem.season'].sudo()
season_data = {'name': u'Current', 'date_start': '2010-01-01',
'date_end': '2010-12-31'}
season1 = season_model.create(season_data)
activity_model = self.env['golem.activity'].sudo()
categ = self.ref('golem_activity.golem_product_category_activities')
self.activity1 = activity_model.create({'name': 'activity1',
'default_code': 'A1',
'categ_id': categ,
'season_id': season1.id})
self.activity1.onchange_season_dates()
self.session_model = self.env['golem.activity.session'].sudo()
sdata = {'name': 's1', 'activity_id': self.activity1.id}
self.session1 = self.session_model.create(sdata)
self.session1.onchange_activity_id()
self.member_model = self.env['golem.member'].sudo()
def test_session_name(self):
""" Test activity session name computing """
self.assertEqual(self.session1.default_code,
self.activity1.default_code)
self.assertEqual(self.session1.session_name, u'[A1] s1')
def test_check_period(self):
""" Test periods constraints """
self.session1.write({'is_recurrent': False, 'date_start': '2010-01-10',
'date_end': '2010-01-31'})
# Start after end
with self.assertRaises(ValidationError):
self.session1.date_start = '2011-01-15'
# Start before activity start
with self.assertRaises(ValidationError):
self.session1.date_start = '2009-01-15'
# End after activity end
with self.assertRaises(ValidationError):
self.session1.date_end = '2012-01-15'
def test_session_places_constraint(self):
""" Test that you cannot fix negative places """
try:
self.session1.places = -2
except IntegrityError as e:
self.assertIn('violates check constraint', e.args[0])
self.cr.rollback()
def test_session_places(self):
""" Test computed places fields """
self.session1.places = 1
self.assertEqual(self.session1.places_remain, 1)
self.assertEqual(self.session1.places_used, 0)
m1 = self.member_model.create({'lastname': 'DOE', 'firstname': 'Joe'})
m2 = self.member_model.create({'lastname': 'DOE', 'firstname': 'Jen'})
# Member subscription
self.session1.member_ids = [m1.id]
self.assertEqual(self.session1.places_remain, 0)
self.assertEqual(self.session1.places_used, 1)
# No place anymore
with self.assertRaises(ValidationError):
self.session1.member_ids = [m1.id, m2.id]

View File

@ -0,0 +1,196 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
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/>.
-->
<openerp>
<data>
<!-- Form -->
<record model="ir.ui.view" id="session_smart">
<field name="name">Add sessions management into smart button</field>
<field name="model">golem.activity</field>
<field name="inherit_id" ref="golem_activity.view_form" />
<field name="arch" type="xml">
<div name="buttons" position="inside">
<button class="oe_inline oe_stat_button" type="object"
name="button_session" icon="fa-list">
<field string="Sessions" name="session_count"
widget="statinfo" />
</button>
</div>
</field>
</record>
<record id="view_form" model="ir.ui.view">
<field name="name">GOLEM Activity Sessions Form</field>
<field name="model">golem.activity.session</field>
<field name="arch" type="xml">
<form>
<sheet>
<div class="oe_title" style="width: 390px;">
<label class="oe_edit_only" for="name" string="Session Name"/>
<h1><field name="name" class="oe_inline"/></h1>
</div>
<group string="Session">
<group>
<field name="activity_id" />
<field name="animator_id" />
<field name="type_of" />
<field name="places" />
</group>
<group>
<field name="is_recurrent" />
<field name="weekday"
attrs="{'invisible': [('is_recurrent', '=', False)]}" />
<field name="hour_start" widget="float_time"
attrs="{'invisible': [('is_recurrent', '=', False)]}" />
<field name="hour_end" widget="float_time"
attrs="{'invisible': [('is_recurrent', '=', False)]}" />
<field name="date_start"
attrs="{'invisible': [('is_recurrent', '=', True)]}" />
<field name="date_end"
attrs="{'invisible': [('is_recurrent', '=', True)]}" />
</group>
</group>
<notebook>
<page string="Members">
<group>
<field name="places_remain" readonly="True" />
<field name="member_ids"
context="{'search_default_season_default': True}" />
</group>
</page>
<page string="Service">
<group>
<group>
<field name="default_code" />
<field name="list_price" />
<field name="description"
placeholder="describe the activity characteristics..."/>
</group>
<group>
<field name="type" />
<field name="categ_id" />
<field name="active" />
</group>
</group>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" />
<field name="message_ids" widget="mail_thread" />
</div>
</form>
</field>
</record>
<!-- Tree -->
<record id="session_tree" model="ir.ui.view">
<field name="name">Session list</field>
<field name="model">golem.activity.session</field>
<field name="arch" type="xml">
<tree colors="red: places_remain == 0;
orange: places_remain &lt;= 4;">
<field name="is_recurrent" invisible="True" />
<field name="season_id" />
<field name="type_of" />
<field name="session_name" />
<field name="weekday" string="Day"
attrs="{'invisible': [('is_recurrent', '=', False)]}" />
<field name="date_start" string="Date"
attrs="{'invisible': [('is_recurrent', '=', True)]}" />
<field name="places" invisible="True" />
<field name="places_remain" string="Remain" />
<field name="list_price" sum="True" />
</tree>
</field>
</record>
<!-- Calendars -->
<record id="calendar" model="ir.ui.view">
<field name="name">Activity sessions calendar view</field>
<field name="model">golem.activity.session</field>
<field name="arch" type="xml">
<calendar date_start="date_start" date_end="date_end"
color="categ_id" display="[name]">
<field name="name" />
</calendar>
</field>
</record>
<!-- Searches -->
<record id="searches" model="ir.ui.view">
<field name="name">GOLEM Activity Sessions Searches</field>
<field name="model">golem.activity.session</field>
<field name="arch" type="xml">
<search>
<field name="session_name" />
<field name="activity_id" widget="many2one" />
<field name="animator_id" widget="many2one" />
<field name="categ_id" widget="many2one" />
<field name="season_id" widget="many2one" />
<filter name="season_default" string="Default season"
domain="[('is_current', '=', True)]" />
<filter name="full_session" string="Full"
domain="[('places_remain', '=', 0)]" />
<filter name="type_of_activity" string="Activity"
domain="[('type_of', '=', 'activity')]" />
<filter name="type_of_workshop" string="Workshop"
domain="[('type_of', '=', 'workshop')]" />
<filter name="type_of_training" string="Training"
domain="[('type_of', '=', 'training')]" />
<group string="Group By">
<filter name="group_type_of" string="By type"
context="{'group_by': 'type_of'}" />
<filter name="group_category" string="By category"
context="{'group_by': 'categ_id'}"/>
<filter name="group_weekday" string="By weekday"
context="{'group_by': 'weekday'}" />
<filter name="group_animator" string="By animator"
context="{'group_by': 'animator_id'}" />
</group>
</search>
</field>
</record>
<!-- Actions -->
<record id="session_action_list" model="ir.actions.act_window">
<field name="name">GOLEM Activities Sessions List</field>
<field name="res_model">golem.activity.session</field>
<field name="view_mode">tree,form,calendar</field>
<field name="context">{'search_default_season_default': True}</field>
<!--<field name="view_id" ref="product.product_template_kanban_view"/>-->
</record>
<record id="category_action" model="ir.actions.act_window">
<field name="name">Activities Categories</field>
<field name="res_model">product.category</field>
<field name="view_type">form</field>
<field name="view_id" ref="product.product_category_list_view" />
</record>
<!-- Menus -->
<menuitem id="session_menu_list" name="Activities sessions"
parent="golem_activity.activity_menu" action="session_action_list"
groups="golem_base.group_golem_user"
sequence="10" />
<menuitem id="activity_categ" name="Categories"
parent="golem_activity.activity_menu" sequence="10"
groups="golem_base.group_golem_manager"
action="category_action" />
</data>
</openerp>

View File

@ -15,24 +15,23 @@ GNU Affero General Public License for more details.
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/>.
-->
<odoo>
<openerp>
<data>
<!-- Form -->
<record id="export_activity_form" model="ir.ui.view">
<field name="name">Activity Registrations CSV Export</field>
<field name="model">golem.activity</field>
<field name="inherit_id"
ref="golem_activity.view_form" />
<record model="ir.ui.view" id="sessions_inscription">
<field name="name">Add sessions inscriptions to member form</field>
<field name="model">golem.member</field>
<field name="inherit_id" ref="golem_member.view_form" />
<field name="arch" type="xml">
<header position="inside">
<div style="min-height: 30px;">
<button name="do_export_csv" type="object" class="oe_button"
string="Export members to CSV file" />
</div>
</header>
<page name="other_page" position="before">
<page name="sessions" string="Activities">
<field name="activity_session_ids"
context="{'search_default_season_default': True}" />
</page>
</page>
</field>
</record>
</data>
</odoo>
</openerp>

View File

@ -16,14 +16,17 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
{
'name': 'GOLEM Activity Member Registrations CSV exports',
'summary': 'GOLEM Activities Member Registration CSV exports',
'version': '10.0.1.0.0',
'name': 'GOLEM Activity Sessions Places',
'summary': 'GOLEM Activities Session avdanced places management',
'description': ''' Management of minimum places, overbook and max
overbook... ''',
'version': '0.1',
'category': 'GOLEM',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',
'application': False,
'installable': False,
'depends': ['golem_activity_registration'],
'installable': True,
'auto_install': False,
'depends': ['golem_activity_session'],
'data': ['views/golem_activity_view.xml']
}

View File

@ -0,0 +1,39 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * golem_activity_session_place
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-03 15:21+0000\n"
"PO-Revision-Date: 2016-08-03 15:21+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: golem_activity_session_place
#: view:golem.activity.session:golem_activity_session_place.searches
msgid "Full"
msgstr "Plein"
#. module: golem_activity_session_place
#: model:ir.model,name:golem_activity_session_place.model_golem_activity_session
msgid "GOLEM Activities Sessions"
msgstr "Séances des activités"
#. module: golem_activity_session_place
#: code:addons/golem_activity_session_place/models/golem_activity_session.py:52
#, python-format
msgid "Number of places cannot be negative."
msgstr "Le nombre de places ne peut pas être négatif"
#. module: golem_activity_session_place
#: code:addons/golem_activity_session_place/models/golem_activity_session.py:55
#, python-format
msgid "Overbooked places cannot be inferior than places"
msgstr "Le nombre de places avec surcharge ne peut être inférieur aux places"

View File

@ -0,0 +1,39 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * golem_activity_session_place
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-03 15:20+0000\n"
"PO-Revision-Date: 2016-08-03 15:20+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: golem_activity_session_place
#: view:golem.activity.session:golem_activity_session_place.searches
msgid "Full"
msgstr ""
#. module: golem_activity_session_place
#: model:ir.model,name:golem_activity_session_place.model_golem_activity_session
msgid "GOLEM Activities Sessions"
msgstr ""
#. module: golem_activity_session_place
#: code:addons/golem_activity_session_place/models/golem_activity_session.py:52
#, python-format
msgid "Number of places cannot be negative."
msgstr ""
#. module: golem_activity_session_place
#: code:addons/golem_activity_session_place/models/golem_activity_session.py:55
#, python-format
msgid "Overbooked places cannot be inferior than places"
msgstr ""

View File

@ -15,4 +15,4 @@
# 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/>.
from . import test_golem_activity
from . import golem_activity_session

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# copyright 2017 fabien bourgeois <fabien@yaltik.com>
# copyright 2016 fabien bourgeois <fabien@yaltik.com>
#
# this program is free software: you can redistribute it and/or modify
# it under the terms of the gnu affero general public license as
@ -15,48 +15,42 @@
# 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/>.
""" GOLEM Activity Advanced Places management """
from openerp import models, fields, api, _
from odoo import models, fields, api, _
class GolemActivity(models.Model):
""" GOLEM Activity Advanced Places management """
_inherit = 'golem.activity'
class GolemActivitySession(models.Model):
_inherit = 'golem.activity.session'
places_min = fields.Integer('Minimum places', default=0,
help='Minimum places to maintain the activity')
help='Minimum places to maintain the session')
is_overbooked = fields.Boolean('Allow overbook?', default=False)
places_overbooked = fields.Integer('Places with overbook', default=0)
@api.multi
@api.depends('places', 'is_overbooked', 'places_overbooked', 'places_used')
@api.one
@api.depends('places', 'is_overbooked', 'places_overbooked', 'member_ids')
def _compute_places_remain(self):
""" Overwrite : computes remaining places """
for activity in self:
if not activity.is_overbooked:
activity.places_remain = activity.places - activity.places_used
else:
activity.places_remain = activity.places_overbooked - activity.places_used
used = len(self.member_ids)
if not self.is_overbooked:
self.places_remain = self.places - used
else:
self.places_remain = self.places_overbooked - used
@api.onchange('is_overbooked', 'places')
def onchange_is_overbooked(self):
""" Realtime display for places and overbooked """
for activity in self:
if activity.places and activity.is_overbooked:
if not activity.places_overbooked or \
(activity.places_overbooked < activity.places):
activity.places_overbooked = activity.places + 1
for s in self:
if s.places and s.is_overbooked:
if not s.places_overbooked or (s.places_overbooked < s.places):
s.places_overbooked = s.places + 1
@api.constrains('places', 'places_overbooked')
def _check_places(self):
""" Check integers are signed and overbooked to be superior than
normal places """
for activity in self:
for field in ['places', 'places_overbooked']:
if activity[field] < 0:
for v in self:
for f in ['places', 'places_overbooked']:
if v[f] < 0:
emsg = _('Number of places cannot be negative.')
raise models.ValidationError(emsg)
if activity.is_overbooked and \
(activity.places_overbooked <= activity.places):
if v.is_overbooked and (v.places_overbooked <= v.places):
emsg = _('Overbooked places cannot be inferior than places')
raise models.ValidationError(emsg)

View File

@ -15,4 +15,4 @@
# 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/>.
from . import controllers, models
from . import test_golem_activity_session

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -15,14 +15,11 @@
# 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/>.
""" GOLEM Activity Places Tests """
from odoo.tests.common import TransactionCase
from odoo.models import ValidationError
from openerp.tests.common import TransactionCase
from openerp.models import ValidationError
class GolemActivitySessionTestCase(TransactionCase):
""" GOLEM Activity Places Tests """
def setUp(self):
super(GolemActivitySessionTestCase, self).setUp()

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@ -15,15 +15,14 @@ GNU Affero General Public License for more details.
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/>.
-->
<odoo>
<openerp>
<data>
<!-- Form -->
<record id="golem_activity_registration_form_inherit_place" model="ir.ui.view">
<field name="name">GOLEM Activity Places Form additions</field>
<field name="model">golem.activity</field>
<field name="inherit_id"
ref="golem_activity_registration.golem_activity_form_inherit_registration" />
<record id="view_form" model="ir.ui.view">
<field name="name">GOLEM Activity Sessions Places Form additions</field>
<field name="model">golem.activity.session</field>
<field name="inherit_id" ref="golem_activity_session.view_form" />
<field name="arch" type="xml">
<field name="places" position="after">
<field name="places_min" />
@ -35,11 +34,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</record>
<!-- Tree -->
<record id="golem_activity_registration_tree_inherit_place" model="ir.ui.view">
<field name="name">Activity list places adaptations</field>
<field name="model">golem.activity</field>
<field name="inherit_id"
ref="golem_activity_registration.golem_activity_tree_inherit_registration" />
<record id="session_tree" model="ir.ui.view">
<field name="name">Session list places adaptations</field>
<field name="model">golem.activity.session</field>
<field name="inherit_id" ref="golem_activity_session.session_tree" />
<field name="arch" type="xml">
<tree position="attributes">
<attribute name="colors">darkgrey: places_used &lt; places_min; red: places_remain == 0; orange: places_remain &lt;= 4;</attribute>
@ -51,5 +49,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</field>
</record>
<!-- Searches -->
<record id="searches" model="ir.ui.view">
<field name="name">GOLEM Activity Sessions Searches</field>
<field name="model">golem.activity.session</field>
<field name="inherit_id" ref="golem_activity_session.searches" />
<field name="arch" type="xml">
<search>
<filter name="full_session" string="Full"
domain="[('places_remain', '=', 0)]" />
</search>
</field>
</record>
</data>
</odoo>
</openerp>

View File

@ -18,7 +18,7 @@
{
'name': 'GOLEM base module for global dependencies',
'summary': 'GOLEM base installs base and shared dependencies for GOLEM',
'version': '10.0.1.0.0',
'version': '0.1',
'category': 'GOLEM',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',
@ -26,12 +26,10 @@
'installable': True,
'depends': ['membership', 'contacts', 'mail', 'account_voucher',
'partner_firstname', 'partner_contact_birthdate',
'partner_contact_gender',
'l10n_fr', 'l10n_fr_state', 'l10n_fr_department',
'partner_contact_gender', 'partner_contact_nationality',
'l10n_fr_state', 'l10n_fr_department', 'l10n_fr_tax_sale_ttc',
'l10n_fr_siret',
'web_widget_phone_check_fr', 'web_widget_email_check',
'web_widget_url_check',
# 'web_one2many_kanban',
'web_responsive'],
'data': ['security/golem_security.xml', 'views/menus.xml']
'web_widget_url_check'],
'data': ['security/golem_security.xml']
}

View File

@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-01 14:19+0000\n"
"PO-Revision-Date: 2017-06-28 17:30+0000\n"
"POT-Creation-Date: 2016-07-21 13:17+0000\n"
"PO-Revision-Date: 2016-07-21 13:17+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -26,188 +26,3 @@ msgstr "Administrateur"
msgid "GOLEM user"
msgstr "Utilisateur"
#. module: golem_base
#: model:ir.ui.menu,name:golem_base.membership_products_menu
msgid "Membership Products"
msgstr "Types d'adhésions"
#. module: base
#: model:ir.actions.act_window,name:base.action_res_company_form
#: model:ir.actions.act_window,name:base.company_normal_action_tree
#: model:ir.model,name:base.model_res_company
#: model:ir.model.fields,field_description:base.field_res_users_company_ids
#: model:ir.ui.menu,name:base.menu_action_res_company_form
#: model:ir.ui.view,arch_db:base.view_company_tree
#: model:ir.ui.view,arch_db:base.view_res_partner_filter
msgid "Companies"
msgstr "Personnes morales"
#. module: base
#: model:ir.ui.view,arch_db:base.view_users_form
msgid "Companies count"
msgstr "Nombre de personnes morales"
#. module: base
#: model:ir.model.fields,field_description:base.field_ir_attachment_company_id
#: model:ir.model.fields,field_description:base.field_ir_property_company_id
#: model:ir.model.fields,field_description:base.field_ir_sequence_company_id
#: model:ir.model.fields,field_description:base.field_ir_values_company_id
#: model:ir.model.fields,field_description:base.field_res_currency_rate_company_id
#: model:ir.model.fields,field_description:base.field_res_partner_bank_company_id
#: model:ir.model.fields,field_description:base.field_res_partner_company_id
#: model:ir.model.fields,field_description:base.field_res_users_company_id
#: model:ir.ui.view,arch_db:base.view_attachment_search
#: model:ir.ui.view,arch_db:base.view_company_form
#: model:ir.ui.view,arch_db:base.view_partner_form
#: model:ir.ui.view,arch_db:base.view_partner_simple_form
#: model:ir.ui.view,arch_db:base.view_res_partner_filter
#: model:ir.ui.view,arch_db:base.view_users_search
#: selection:res.partner,company_type:0
msgid "Company"
msgstr "Personne morale"
#. module: base
#: model:res.partner.category,name:base.res_partner_category_17
msgid "Company Contact"
msgstr "Contact de la personne morale"
#. module: base
#: model:ir.model.fields,field_description:base.field_res_company_name
#: model:ir.model.fields,field_description:base.field_res_partner_company_name
#: model:ir.model.fields,field_description:base.field_res_users_company_name
msgid "Company Name"
msgstr "Nom de la personne morale"
#. module: base
#: model:ir.model.fields,field_description:base.field_res_partner_commercial_company_name
#: model:ir.model.fields,field_description:base.field_res_users_commercial_company_name
msgid "Company Name Entity"
msgstr "Nom commercial de la personne morale"
#. module: base
#: model:ir.actions.act_window,name:base.ir_property_form
#: model:ir.ui.menu,name:base.menu_ir_property_form_all
msgid "Company Properties"
msgstr "Propriétés de la personne morale"
#. module: base
#: model:ir.model.fields,field_description:base.field_res_company_rml_header1
msgid "Company Tagline"
msgstr "Slogan de la personne morale"
#. module: base
#: model:ir.model.fields,field_description:base.field_res_partner_company_type
#: model:ir.model.fields,field_description:base.field_res_users_company_type
msgid "Company Type"
msgstr "Type de personne morale"
#. module: base
#: model:ir.ui.view,arch_db:base.view_users_form
msgid "Current Company"
msgstr "Personne morale Courante"
#. module: base
#: model:ir.ui.view,arch_db:base.view_partner_form
msgid "Create company"
msgstr "Créer une personne morale"
#. module: base
#: model:ir.ui.view,arch_db:base.view_users_form
#: model:res.groups,name:base.group_multi_company
msgid "Multi Companies"
msgstr "Multi Personnes Morales"
#. module: base
#: model:ir.model.fields,field_description:base.field_res_users_companies_count
msgid "Number of Companies"
msgstr "Nombe de personnes morales"
#. module: base
#: model:ir.model.fields,field_description:base.field_res_company_parent_id
msgid "Parent Company"
msgstr "Personne morale mère"
#. module: base
#: model:ir.model.fields,field_description:base.field_res_partner_parent_id
#: model:ir.model.fields,field_description:base.field_res_users_parent_id
msgid "Related Company"
msgstr "Personne morale liée"
#. module: base
#: model:ir.model.fields,help:base.field_res_users_company_id
msgid "The company this user is currently working for."
msgstr "La personne morale pour laquelle l'utilisateur travaille actuellement."
#. module: base
#: model:ir.model.fields,help:base.field_ir_act_client_tag
msgid ""
"An arbitrary string, interpreted by the client according to its own needs "
"and wishes. There is no central tag repository across clients."
msgstr ""
"Une chaîne de caractères arbitraire, interprétée par le contact en fonction "
"de ses besoins et de ses souhaits. Il n'y a pas de centralisation des "
"catégories attribuées aux contacts."
#. module: base
#: model:ir.model.fields,field_description:base.field_res_partner_category_child_ids
msgid "Child Tags"
msgstr "Catégories filles"
#. module: base
#: model:ir.actions.act_window,help:base.action_partner_category_form
msgid "Click to create a new partner tag."
msgstr "Cliquer pour créer une nouvelle catégorie de partenaire."
#. module: base
#: model:ir.ui.view,arch_db:base.view_partner_category_form
msgid "Contact Tag"
msgstr "Catégorie de contact"
#. module: base
#: model:ir.actions.act_window,name:base.action_partner_category_form
#: model:ir.ui.view,arch_db:base.view_partner_category_list
msgid "Contact Tags"
msgstr "Catégories de contact"
#. module: base
#: code:addons/base/res/res_partner.py:87
#, python-format
msgid "Error ! You can not create recursive tags."
msgstr "Erreur ! On ne peut pas créer de catégories récursives."
#. module: base
#: model:ir.actions.act_window,help:base.action_partner_category_form
msgid ""
"Manage partner tags to better classify them for tracking and analysis purposes.\n"
" A partner may have several categories and categories have a hierarchical structure: a partner with a category has also the parent category."
msgstr ""
"Gère les catégories de tiers afin de mieux les classer à des fins de suivi et d'analyse.\n"
"Un partenaire peut avoir plusieurs catégories et les catégories ont une structure hiérarchique : un partenaire avec une catégories a également les catégories parentes."
#. module: base
#: model:ir.model,name:base.model_res_partner_category
msgid "Partner Tags"
msgstr "Catégories du contact"
#. module: base
#: model:ir.ui.view,arch_db:base.view_res_partner_filter
msgid "Tag"
msgstr "Catégorie"
#. module: base
#: model:ir.model.fields,field_description:base.field_res_partner_category_name
msgid "Tag Name"
msgstr "Nom de la catégorie"
#. module: base
#: model:ir.model.fields,field_description:base.field_res_partner_category_id_970
#: model:ir.model.fields,field_description:base.field_res_users_category_id
msgid "Tags"
msgstr "Catégories"
#. module: base
#: model:ir.ui.view,arch_db:base.view_partner_form
msgid "Tags..."
msgstr "Catégories..."

View File

@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-01 14:19+0000\n"
"PO-Revision-Date: 2017-05-01 14:19+0000\n"
"POT-Creation-Date: 2016-07-21 13:17+0000\n"
"PO-Revision-Date: 2016-07-21 13:17+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -25,8 +25,3 @@ msgstr ""
msgid "GOLEM user"
msgstr ""
#. module: golem_base
#: model:ir.ui.menu,name:golem_base.membership_products_menu
msgid "Membership Products"
msgstr ""

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@ -17,7 +17,7 @@ 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/>.
-->
<odoo>
<openerp>
<data noupdate="0">
<!-- Groups -->
<record id="group_golem_user" model="res.groups">
@ -26,9 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
ref="base.module_category_golem"/>
<field name="implied_ids"
eval="[(4,
[ref('base.group_user'),
ref('base.group_partner_manager'),
ref('account.group_account_invoice')])]"/>
[ref('base.group_user'), ref('account.group_account_invoice')])]"/>
</record>
<record id="group_golem_manager" model="res.groups">
<field name="name">GOLEM Manager</field>
@ -36,16 +34,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<field name="implied_ids" eval="[(4, ref('group_golem_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
<!-- Hide Default Articles Menu for all except root -->
<record id="account.menu_finance_payables" model="ir.ui.menu">
<field name="groups_id"
eval="[(6, 0, [ref('base.group_erp_manager')])]" />
</record>
<!-- Membership products only for managers -->
<record id="membership.menu_membership_products" model="ir.ui.menu">
<field name="groups_id"
eval="[(4, ref('golem_base.group_golem_manager'))]" />
</record>
<!-- Members Analysis for managers only -->
<record id="membership.menu_report_membership" model="ir.ui.menu">
<field name="groups_id"
eval="[(6, 0, [ref('golem_base.group_golem_manager')])]" />
</record>
</data>
<!-- Adapt base security access -->
<record id="ir_filters_golem_manager_all_rights_rule" model="ir.rule">
<field name="name">ir.filters.golem.manager.all.rights</field>
<field name="model_id" ref="base.model_ir_filters"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4, ref('golem_base.group_golem_manager'))]"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_unlink" eval="True"/>
</record>
</odoo>
</openerp>

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
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/>.
-->
<odoo>
<data noupdate="0">
<!-- Membership products only for managers -->
<menuitem name="Configuration"
id="membership.menu_marketing_config_association"
parent="membership.menu_association" sequence="100" />
<menuitem id="membership_products_menu"
action="membership.action_membership_products"
parent="membership.menu_marketing_config_association" sequence="20"
groups="golem_base.group_golem_manager" />
<!-- Members Analysis for managers only -->
<record id="membership.menu_report_membership" model="ir.ui.menu">
<field name="groups_id"
eval="[(6, 0, [ref('golem_base.group_golem_manager')])]" />
</record>
</data>
</odoo>

View File

@ -18,13 +18,14 @@
{
'name': 'GOLEM families',
'summary': 'GOLEM Members Families',
'version': '10.0.2.1.1',
'description': ''' Non-profit french MJC members families management ''',
'version': '0.2',
'category': 'GOLEM',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',
'application': False,
'installable': True,
'depends': ['golem_member'],
'data': ['security/ir.model.access.csv', 'views/golem_family_views.xml',
'views/golem_member_views.xml', 'views/res_partner_views.xml']
'data': ['security/ir.model.access.csv', 'views/golem_family_view.xml',
'views/golem_member_view.xml', 'views/res_partner_view.xml']
}

View File

@ -4,219 +4,240 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-29 14:59+0000\n"
"PO-Revision-Date: 2018-01-29 14:59+0000\n"
"POT-Creation-Date: 2016-07-11 18:06+0000\n"
"PO-Revision-Date: 2016-07-11 18:06+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_tree
#: view:golem.family:golem_family.family_tree
msgid "# Members"
msgstr "# de membres"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
msgid "0000000000"
msgstr "0000000000"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
msgid "Address"
msgstr "Adresse"
msgstr "Addresse"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_search
#: view:golem.family:golem_family.view_filter
msgid "By city"
msgstr "Par ville"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_city
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_city
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_city
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_city
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
#: field:golem.family,city:0
msgid "City"
msgstr "Ville"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
msgid "Communication"
msgstr "Communication"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_count
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_count
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_count
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_count
#: field:golem.family,count:0
msgid "Count"
msgstr "Nombre"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_country_id
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_country_id
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_country_id
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_country_id
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
#: field:golem.family,country_id:0
msgid "Country"
msgstr "Pays"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_create_uid
#: model:ir.model.fields,field_description:golem_family.field_golem_family_role_create_uid
#: field:golem.family,create_uid:0
#: field:golem.family.role,create_uid:0
msgid "Created by"
msgstr "Créé par"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_create_date
#: model:ir.model.fields,field_description:golem_family.field_golem_family_role_create_date
#: field:golem.family,create_date:0
#: field:golem.family.role,create_date:0
msgid "Created on"
msgstr "Créé le"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_display_name
#: model:ir.model.fields,field_description:golem_family.field_golem_family_role_display_name
#: help:golem.family,message_last_post:0
msgid "Date of the last message posted on the record."
msgstr "Date du dernier message posté sur l'enregistrement."
#. module: golem_family
#: field:golem.family,display_name:0
#: field:golem.family.role,display_name:0
msgid "Display Name"
msgstr "Nom affiché"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_email
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_email
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_email
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_email
#: field:golem.family,email:0
msgid "Email"
msgstr "Courriel"
msgstr "Email"
#. module: golem_family
#: model:ir.ui.menu,name:golem_family.golem_family_menu
#: model:ir.ui.menu,name:golem_family.golem_family_menu_list
#: model:ir.ui.menu,name:golem_family.family_menu_list
msgid "Families"
msgstr "Familles"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_id
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_id
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_id
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
#: field:golem.member,family_id:0
#: field:res.partner,family_id:0
msgid "Family"
msgstr "Famille"
#. module: golem_family
#: code:addons/golem_family/models/golem_family.py:48
#: code:addons/golem_family/models/golem_family.py:82
#: field:golem.member,family_count:0
#: field:res.partner,family_count:0
msgid "Family Count"
msgstr "Somme des membres de la famille"
#. module: golem_family
#: code:addons/golem_family/models/golem_family.py:33
#: code:addons/golem_family/models/golem_family.py:46
#, python-format
msgid "Family Members"
msgstr "Membres de la famille"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
msgid "Family form"
msgstr "Family form"
#: model:ir.ui.menu,name:golem_family.family_role_menu_list
msgid "Family Roles"
msgstr "Rôles familiaux"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: view:golem.family:golem_family.view_form
msgid "Family members"
msgstr "Famille"
msgstr "Membres de la famille"
#. module: golem_family
#: sql_constraint:golem.family.role:0
msgid "Family role must be unique."
msgstr "Les rôles familiaux doivent être uniques."
#. module: golem_family
#: field:golem.family,message_follower_ids:0
msgid "Followers"
msgstr "Abonnés"
#. module: golem_family
#: model:ir.model,name:golem_family.model_golem_family
msgid "GOLEM Family Entity"
msgstr "Famille"
msgstr "GOLEM : famille"
#. module: golem_family
#: model:ir.actions.act_window,name:golem_family.golem_family_action_list
#: model:ir.actions.act_window,name:golem_family.family_action_list
msgid "GOLEM Family List"
msgstr "Liste des familles"
msgstr "GOLEM : liste des familles"
#. module: golem_family
#: model:ir.model,name:golem_family.model_golem_family_role
msgid "GOLEM Family Role"
msgstr "Rôle dans la famille"
#. module: golem_family
#: model:ir.actions.act_window,name:golem_family.golem_family_role_action
#: model:ir.actions.act_window,name:golem_family.family_role_action
msgid "GOLEM Family Role List"
msgstr "Liste des rôles familiaux"
msgstr "GOLEM : liste des rôles familiaux"
#. module: golem_family
#: model:ir.model,name:golem_family.model_golem_member
msgid "GOLEM Member"
msgstr "Adhérent"
msgstr "GOLEM : Adhérent"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_search
#: model:ir.model,name:golem_family.model_golem_family_role
msgid "GOLEM Member Family Role"
msgstr "GOLEM : rôle du membre de la famille"
#. module: golem_family
#: view:golem.family:golem_family.view_filter
msgid "Group By"
msgstr "Grouper par"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_id
#: model:ir.model.fields,field_description:golem_family.field_golem_family_role_id
#: help:golem.family,message_summary:0
msgid "Holds the Chatter summary (number of messages, ...). This summary is directly in html format in order to be inserted in kanban views."
msgstr "Contient le résumé des discussions (nombre de message...). Ce résumé peut être directement inséré dans les vues par cartes."
#. module: golem_family
#: field:golem.family,id:0
#: field:golem.family.role,id:0
msgid "ID"
msgstr "ID"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family___last_update
#: model:ir.model.fields,field_description:golem_family.field_golem_family_role___last_update
#: help:golem.family,message_unread:0
msgid "If checked new messages require your attention."
msgstr "Si coché, les nouveaux messages vous seront notifiés."
#. module: golem_family
#: field:golem.family,message_is_follower:0
msgid "Is a Follower"
msgstr "Is a Follower"
#. module: golem_family
#: field:golem.family,message_last_post:0
msgid "Last Message Date"
msgstr "Last Message Date"
#. module: golem_family
#: field:golem.family,__last_update:0
#: field:golem.family.role,__last_update:0
msgid "Last Modified on"
msgstr "Dernière Modification le"
msgstr "Dernière modification le"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_role_write_uid
#: model:ir.model.fields,field_description:golem_family.field_golem_family_write_uid
#: field:golem.family,write_uid:0
#: field:golem.family.role,write_uid:0
msgid "Last Updated by"
msgstr "Dernière mise à jour par"
msgstr "Dernière modification par"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_role_write_date
#: model:ir.model.fields,field_description:golem_family.field_golem_family_write_date
#: field:golem.family,write_date:0
#: field:golem.family.role,write_date:0
msgid "Last Updated on"
msgstr "Dernière mise à jour le"
msgstr "Dernière modification le"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_member_ids
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_member_ids
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_member_ids
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_member_ids
#: field:golem.family,member_ids:0
msgid "Members"
msgstr "Adhérents"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_mobile
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_mobile
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_mobile
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_mobile
#: field:golem.family,message_ids:0
msgid "Messages"
msgstr "Messages"
#. module: golem_family
#: help:golem.family,message_ids:0
msgid "Messages and communication history"
msgstr "Messages historique des communications"
#. module: golem_family
#: field:golem.family,mobile:0
msgid "Mobile"
msgstr "Mobile"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_name
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: view:golem.family:golem_family.view_form
#: field:golem.family,name:0
msgid "Name"
msgstr "Nom"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_note
#: field:golem.family,note:0
msgid "Note"
msgstr "Note"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: view:golem.family:golem_family.view_form
msgid "Others"
msgstr "Autres"
@ -226,108 +247,81 @@ msgid "Partner"
msgstr "Partenaire"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_phone
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_phone
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_phone
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_phone
#: field:golem.family,phone:0
msgid "Phone"
msgstr "Téléphone"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
msgid "Please save new member before assigning a family."
msgstr "Merci de sauvegarder la fiche du nouveau membre avant de pouvoir lui assigner une famille."
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: view:golem.family:golem_family.view_form
msgid "Put an internal note..."
msgstr "Écrivez une note interne..."
msgstr "Rédigez une note interne..."
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_role_name
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_role
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_role
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_role
#: field:golem.member,family_role:0
#: field:golem.family.role,name:0
#: field:res.partner,family_role:0
msgid "Role"
msgstr "Role"
msgstr "Rôle"
#. module: golem_family
#: model:ir.ui.menu,name:golem_family.golem_family_role_menu
msgid "Roles"
msgstr "Roles"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_state_id
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_state_id
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_state_id
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_state_id
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
#: field:golem.family,state_id:0
msgid "State"
msgstr "Région"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_street
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_street
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_street
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_street
#: field:golem.family,street:0
msgid "Street"
msgstr "Rue"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
msgid "Street..."
msgstr "Rue..."
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_street2
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_street2
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_street2
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_street2
#: field:golem.family,street2:0
msgid "Street2"
msgstr "Complément de rue"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_website
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_website
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_website
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_website
#: field:golem.family,message_summary:0
msgid "Summary"
msgstr "Résumé"
#. module: golem_family
#: field:golem.family,message_unread:0
msgid "Unread Messages"
msgstr "Messages non lus"
#. module: golem_family
#: field:golem.family,website:0
msgid "Website"
msgstr "Site Web"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
msgid "ZIP"
msgstr "Code postal"
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_zip
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_zip
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_zip
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_zip
#: field:golem.family,zip:0
msgid "Zip"
msgstr "Code postal"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
msgid "e.g. www.odoo.com"
msgstr "e.g. www.yaltik.com"
msgstr "par exemple www.yaltik.com"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.res_partner_form_inherit_golem_family
#: view:golem.member:golem_family.golem_member_family_smartbtn_add
#: view:res.partner:golem_family.res_partner_family_smartbtn_add
msgid "family members"
msgstr "Famille"
msgstr "famille"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_kanban
msgid "members"
msgstr "membres"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
msgid "name@example.org"
msgstr "name@example.org"
msgstr "nom@exemple.ext"

View File

@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-29 09:03+0000\n"
"PO-Revision-Date: 2018-01-29 09:03+0000\n"
"POT-Creation-Date: 2016-07-11 18:06+0000\n"
"PO-Revision-Date: 2016-07-11 18:06+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -16,124 +16,107 @@ msgstr ""
"Plural-Forms: \n"
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_tree
#: view:golem.family:golem_family.family_tree
msgid "# Members"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
msgid "0000000000"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
msgid "Address"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_search
#: view:golem.family:golem_family.view_filter
msgid "By city"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_city
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_city
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_city
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_city
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
#: field:golem.family,city:0
msgid "City"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
msgid "Communication"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_count
#: field:golem.family,count:0
msgid "Count"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_country_id
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_country_id
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_country_id
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_country_id
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
#: field:golem.family,country_id:0
msgid "Country"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_create_uid
#: model:ir.model.fields,field_description:golem_family.field_golem_family_role_create_uid
#: field:golem.family,create_uid:0
#: field:golem.family.role,create_uid:0
msgid "Created by"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_create_date
#: model:ir.model.fields,field_description:golem_family.field_golem_family_role_create_date
#: field:golem.family,create_date:0
#: field:golem.family.role,create_date:0
msgid "Created on"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_display_name
#: model:ir.model.fields,field_description:golem_family.field_golem_family_role_display_name
#: help:golem.family,message_last_post:0
msgid "Date of the last message posted on the record."
msgstr ""
#. module: golem_family
#: field:golem.family,display_name:0
#: field:golem.family.role,display_name:0
msgid "Display Name"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_email
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_email
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_email
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_email
#: field:golem.family,email:0
msgid "Email"
msgstr ""
#. module: golem_family
#: model:ir.ui.menu,name:golem_family.golem_family_menu
#: model:ir.ui.menu,name:golem_family.golem_family_menu_list
#: model:ir.ui.menu,name:golem_family.family_menu_list
msgid "Families"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_id
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_member
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_id
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_member
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_id
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_member
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_family_search_inherit_golem_membership
#: view:golem.family:golem_family.view_form
#: field:golem.member,family_id:0
#: field:res.partner,family_id:0
msgid "Family"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_count
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_count
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_count
#: field:golem.member,family_count:0
#: field:res.partner,family_count:0
msgid "Family Count"
msgstr ""
#. module: golem_family
#: code:addons/golem_family/models/golem_family.py:49
#: code:addons/golem_family/models/golem_family.py:84
#: code:addons/golem_family/models/golem_family.py:33
#: code:addons/golem_family/models/golem_family.py:46
#, python-format
msgid "Family Members"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
msgid "Family form"
#: model:ir.ui.menu,name:golem_family.family_role_menu_list
msgid "Family Roles"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
msgid "Family members"
msgstr ""
@ -142,23 +125,23 @@ msgstr ""
msgid "Family role must be unique."
msgstr ""
#. module: golem_family
#: field:golem.family,message_follower_ids:0
msgid "Followers"
msgstr ""
#. module: golem_family
#: model:ir.model,name:golem_family.model_golem_family
msgid "GOLEM Family Entity"
msgstr ""
#. module: golem_family
#: model:ir.actions.act_window,name:golem_family.golem_family_action_list
#: model:ir.actions.act_window,name:golem_family.family_action_list
msgid "GOLEM Family List"
msgstr ""
#. module: golem_family
#: model:ir.model,name:golem_family.model_golem_family_role
msgid "GOLEM Family Role"
msgstr ""
#. module: golem_family
#: model:ir.actions.act_window,name:golem_family.golem_family_role_action
#: model:ir.actions.act_window,name:golem_family.family_role_action
msgid "GOLEM Family Role List"
msgstr ""
@ -168,62 +151,92 @@ msgid "GOLEM Member"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_search
#: model:ir.model,name:golem_family.model_golem_family_role
msgid "GOLEM Member Family Role"
msgstr ""
#. module: golem_family
#: view:golem.family:golem_family.view_filter
msgid "Group By"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_id
#: model:ir.model.fields,field_description:golem_family.field_golem_family_role_id
#: help:golem.family,message_summary:0
msgid "Holds the Chatter summary (number of messages, ...). This summary is directly in html format in order to be inserted in kanban views."
msgstr ""
#. module: golem_family
#: field:golem.family,id:0
#: field:golem.family.role,id:0
msgid "ID"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family___last_update
#: model:ir.model.fields,field_description:golem_family.field_golem_family_role___last_update
#: help:golem.family,message_unread:0
msgid "If checked new messages require your attention."
msgstr ""
#. module: golem_family
#: field:golem.family,message_is_follower:0
msgid "Is a Follower"
msgstr ""
#. module: golem_family
#: field:golem.family,message_last_post:0
msgid "Last Message Date"
msgstr ""
#. module: golem_family
#: field:golem.family,__last_update:0
#: field:golem.family.role,__last_update:0
msgid "Last Modified on"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_role_write_uid
#: model:ir.model.fields,field_description:golem_family.field_golem_family_write_uid
#: field:golem.family,write_uid:0
#: field:golem.family.role,write_uid:0
msgid "Last Updated by"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_role_write_date
#: model:ir.model.fields,field_description:golem_family.field_golem_family_write_date
#: field:golem.family,write_date:0
#: field:golem.family.role,write_date:0
msgid "Last Updated on"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_member_ids
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_member_ids
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_member_ids
#: field:golem.family,member_ids:0
msgid "Members"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_mobile
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_mobile
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_mobile
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_mobile
#: field:golem.family,message_ids:0
msgid "Messages"
msgstr ""
#. module: golem_family
#: help:golem.family,message_ids:0
msgid "Messages and communication history"
msgstr ""
#. module: golem_family
#: field:golem.family,mobile:0
msgid "Mobile"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_name
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: view:golem.family:golem_family.view_form
#: field:golem.family,name:0
msgid "Name"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_note
#: field:golem.family,note:0
msgid "Note"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: view:golem.family:golem_family.view_form
msgid "Others"
msgstr ""
@ -233,104 +246,81 @@ msgid "Partner"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_phone
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_phone
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_phone
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_phone
#: field:golem.family,phone:0
msgid "Phone"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: view:golem.family:golem_family.view_form
msgid "Put an internal note..."
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_role_name
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_role
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_role
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_role
#: field:golem.member,family_role:0
#: field:golem.family.role,name:0
#: field:res.partner,family_role:0
msgid "Role"
msgstr ""
#. module: golem_family
#: model:ir.ui.menu,name:golem_family.golem_family_role_menu
msgid "Roles"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_state_id
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_state_id
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_state_id
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_state_id
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
#: field:golem.family,state_id:0
msgid "State"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_street
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_street
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_street
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_street
#: field:golem.family,street:0
msgid "Street"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
msgid "Street..."
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_street2
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_street2
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_street2
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_street2
#: field:golem.family,street2:0
msgid "Street2"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_website
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_website
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_website
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_website
#: field:golem.family,message_summary:0
msgid "Summary"
msgstr ""
#. module: golem_family
#: field:golem.family,message_unread:0
msgid "Unread Messages"
msgstr ""
#. module: golem_family
#: field:golem.family,website:0
msgid "Website"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
msgid "ZIP"
msgstr ""
#. module: golem_family
#: model:ir.model.fields,field_description:golem_family.field_golem_family_zip
#: model:ir.model.fields,field_description:golem_family.field_golem_member_family_zip
#: model:ir.model.fields,field_description:golem_family.field_res_partner_family_zip
#: model:ir.model.fields,field_description:golem_family.field_res_users_family_zip
#: field:golem.family,zip:0
msgid "Zip"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
msgid "e.g. www.odoo.com"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.res_partner_form_inherit_golem_family
#: view:golem.member:golem_family.golem_member_family_smartbtn_add
#: view:res.partner:golem_family.res_partner_family_smartbtn_add
msgid "family members"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_kanban
msgid "members"
msgstr ""
#. module: golem_family
#: model:ir.ui.view,arch_db:golem_family.golem_family_form
#: model:ir.ui.view,arch_db:golem_family.golem_member_form_inherit_golem_family
#: view:golem.family:golem_family.view_form
msgid "name@example.org"
msgstr ""

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -15,35 +15,20 @@
# 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/>.
""" GOLEM Families """
from odoo import models, fields, api, _
from openerp import models, fields, api, _
class ResPartner(models.Model):
""" Partner adaptations """
_inherit = 'res.partner'
family_member_ids = fields.One2many(related='family_id.member_ids')
family_street = fields.Char(related='family_id.street')
family_street2 = fields.Char(related='family_id.street2')
family_zip = fields.Char(related='family_id.zip')
family_city = fields.Char(related='family_id.city')
family_state_id = fields.Many2one(related='family_id.state_id')
family_country_id = fields.Many2one(related='family_id.country_id')
family_phone = fields.Char(related='family_id.phone')
family_mobile = fields.Char(related='family_id.mobile')
family_email = fields.Char(related='family_id.email')
family_website = fields.Char(related='family_id.website')
_description = 'GOLEM Partner Family'
family_id = fields.Many2one('golem.family', string='Family', index=True)
family_role = fields.Many2one('golem.family.role', string='Role',
index=True)
family_count = fields.Integer(related='family_id.count')
family_count = fields.Integer('Family Count', related='family_id.count')
@api.multi
def button_family_members(self):
""" Go to family view, from partner """
self.ensure_one()
return {'name': _('Family Members'),
'type': 'ir.actions.act_window',
@ -51,43 +36,28 @@ class ResPartner(models.Model):
'view_mode': 'form',
'res_id': self.family_id.id}
@api.onchange('family_id')
def onchange_family(self):
""" Sets as family address if there was no precedence """
for member in self:
if member.family_id and not any((member.lastname, member.street, \
member.street2, member.zip, member.city)):
member.update({'lastname': member.family_id.name,
'street': member.family_id.street,
'street2': member.family_id.street2,
'zip': member.family_id.zip,
'city': member.family_id.city})
class GolemMember(models.Model):
""" Member adaptations """
_inherit = 'golem.member'
@api.onchange('family_id')
def onchange_family(self):
""" Sets lastname as family name if there was no precedence """
for member in self:
if not member.lastname:
member.lastname = member.family_id.name
for p in self:
if not p.lastname:
p.lastname = self.family_id.name
@api.multi
def button_family_members(self):
""" Go to family view, from member """
self.ensure_one()
member = self[0]
return {'name': _('Family Members'),
'type': 'ir.actions.act_window',
'res_model': 'golem.family',
'view_mode': 'form',
'res_id': member.family_id.id}
'res_id': self.family_id.id}
class GolemFamily(models.Model):
""" GOLEM Family Entity """
_name = 'golem.family'
_description = 'GOLEM Family Entity'
_inherit = 'mail.thread'
@ -96,44 +66,33 @@ class GolemFamily(models.Model):
def _get_default_nationality_id(self):
return self.env.ref('base.main_company').country_id
name = fields.Char(index=True, required=True)
street = fields.Char()
street2 = fields.Char()
zip = fields.Char()
city = fields.Char()
name = fields.Char('Name', index=True, required=True)
street = fields.Char('Street')
street2 = fields.Char('Street2')
zip = fields.Char('Zip')
city = fields.Char('City')
state_id = fields.Many2one('res.country.state', 'State',
ondelete='restrict')
country_id = fields.Many2one('res.country', 'Country',
ondelete='restrict',
default=_get_default_nationality_id)
phone = fields.Char()
mobile = fields.Char()
email = fields.Char()
website = fields.Char()
phone = fields.Char('Phone')
mobile = fields.Char('Mobile')
email = fields.Char('Email')
website = fields.Char('Website')
member_ids = fields.One2many('res.partner', 'family_id', 'Members',
domain=[('is_company', '=', False)])
note = fields.Text()
count = fields.Integer(compute='_compute_count', store=True)
note = fields.Text('Note')
count = fields.Integer('Count', compute='_compute_count', store=True)
@api.one
@api.depends('member_ids')
def _compute_count(self):
for family in self:
family.count = len(family.member_ids)
self.count = len(self.member_ids)
@api.onchange('member_ids')
def onchange_members(self):
""" Sets as member address if there was no precedence """
for family in self:
if family.member_ids and not any((family.street, family.street2,\
family.zip, family.city)):
family.update({'street': family.member_ids[0].street,
'street2': family.member_ids[0].street2,
'zip': family.member_ids[0].zip,
'city': family.member_ids[0].city})
class GolemFamilyRole(models.Model):
""" GOLEM Family Role """
_name = 'golem.family.role'
_description = 'GOLEM Family Role'
_sql_constraints = [('golem_family_role_name_uniq',

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@ -17,21 +17,19 @@ 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/>.
-->
<odoo>
<openerp>
<data>
<!-- Forms -->
<record id="golem_family_form" model="ir.ui.view">
<record id="view_form" model="ir.ui.view">
<field name="name">GOLEM Family Form</field>
<field name="model">golem.family</field>
<field name="arch" type="xml">
<form>
<sheet>
<div colspan="2"
style="background-color: #ccc; color: #fff; font-size: 150%; font-weight: bold; padding: 0.5%; text-align: center; margin-bottom: 1%;">Family form</div>
<group>
<div class="oe_title">
<h1>
<label for="name" string="Family" class="oe_edit_only" />
<label for="name" string="Family" />
<field name="name" class="oe_inline" placeholder="Name" />
</h1>
</div>
@ -66,8 +64,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</group>
<notebook>
<page string="Family members">
<field name="member_ids" context="{'default_family_id': active_id}">
<tree delete="false">
<field name="member_ids" widget="many2many">
<tree>
<field name="name" />
<field name="family_role" />
<field name="phone" />
@ -91,67 +89,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</field>
</record>
<!-- Kanban -->
<record model="ir.ui.view" id="golem_family_kanban">
<field name="name">GOLEM Family Kanban view</field>
<field name="model">golem.family</field>
<field name="arch" type="xml">
<kanban>
<field name="count" />
<field name="name" />
<field name="email" />
<field name="phone" />
<field name="mobile" />
<field name="city" />
<field name="country_id" />
<field name="member_ids" />
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_vignette oe_semantic_html_override">
<div class="oe_kanban_details">
<h4 class="oe_partner_heading">
<a type="open"><field name="name" /></a>
</h4>
<div class="oe_kanban_partner_links" />
<ul>
<li t-if="record.city.raw_value and !record.country_id.raw_value">
<field name="city" />
</li>
<li t-if="!record.city.raw_value and record.country_id.raw_value">
<field name="country_id" />
</li>
<li t-if="record.city.raw_value and record.country_id.raw_value">
<field name="city" />, <field name="country_id" />
</li>
<li t-if="record.phone.raw_value or record.mobile.raw_value">
<a t-attf-href="tel:#{record.phone.raw_value}">
<field name="phone" />
</a>
<a t-attf-href="tel:#{record.mobile.raw_value}">
<field name="mobile" />
</a>
</li>
<li t-if="record.email.raw_value">
<a t-attf-href="mailto:#{record.email.raw_value}">
<field name="email" />
</a>
</li>
</ul>
<field name="count" /> members <span t-if="record.count != 0"> :
<t t-foreach="record.member_ids.raw_value" t-as="member">
<t t-esc="member.name" />
</t>
</span>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<!-- Trees -->
<record id="golem_family_tree" model="ir.ui.view">
<record id="family_tree" model="ir.ui.view">
<field name="name">Family list</field>
<field name="model">golem.family</field>
<field name="arch" type="xml">
@ -164,7 +103,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</tree>
</field>
</record>
<record id="golem_family_role_tree" model="ir.ui.view">
<record id="family_role_tree" model="ir.ui.view">
<field name="name">Family Role List</field>
<field name="model">golem.family.role</field>
<field name="arch" type="xml">
@ -175,7 +114,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</record>
<!-- Searches -->
<record id="golem_family_search" model="ir.ui.view">
<record id="view_filter" model="ir.ui.view">
<field name="name">GOLEM Family Filters</field>
<field name="model">golem.family</field>
<field name="arch" type="xml">
@ -195,21 +134,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</record>
<!-- Actions -->
<act_window id="golem_family_action_list" name="GOLEM Family List"
res_model="golem.family" view_mode="kanban,tree,form" />
<act_window id="golem_family_role_action" name="GOLEM Family Role List"
<act_window id="family_action_list" name="GOLEM Family List"
res_model="golem.family" view_mode="tree,form" />
<act_window id="family_role_action" name="GOLEM Family Role List"
res_model="golem.family.role" view_mode="tree" />
<!-- Menus -->
<menuitem id="golem_family_menu" name="Families"
sequence="17" groups="golem_base.group_golem_user"
web_icon="golem_family,static/description/icon.png" />
<menuitem id="golem_family_menu_list" name="Families"
parent="golem_family_menu" action="golem_family_action_list" sequence="1"
groups="golem_base.group_golem_user" />
<menuitem id="golem_family_role_menu" name="Roles"
parent="golem_family_menu" action="golem_family_role_action" sequence="5"
<menuitem id="family_menu_list" name="Families"
parent="membership.menu_membership" action="family_action_list"
sequence="10" groups="golem_base.group_golem_user" />
<menuitem id="family_role_menu_list" name="Family Roles"
parent="base.menu_marketing_config_association"
action="family_role_action" sequence="3"
groups="golem_base.group_golem_manager" />
</data>
</odoo>
</openerp>

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
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/>.
-->
<openerp>
<data>
<!-- Form -->
<record model="ir.ui.view" id="golem_member_family_smartbtn_add">
<field name="name">Add family management smart button</field>
<field name="model">golem.member</field>
<field name="inherit_id" ref="golem_member.view_form" />
<field name="arch" type="xml">
<div name="buttons" position="inside">
<button class="oe_inline oe_stat_button" type="object"
name="button_family_members" icon="fa-users"
attrs="{'invisible': [('family_id', '=', False)]}">
<field string="family members" name="family_count"
widget="statinfo" />
</button>
</div>
<field name="lastname" position="before">
<field name="family_id" />
<field name="family_role" />
</field>
</field>
</record>
</data>
</openerp>

View File

@ -1,104 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
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/>.
-->
<odoo>
<data>
<!-- Form -->
<record model="ir.ui.view" id="golem_member_form_inherit_golem_family">
<field name="name">Member form adaptations</field>
<field name="model">golem.member</field>
<field name="inherit_id" ref="golem_member.golem_member_form" />
<field name="arch" type="xml">
<field name="lastname" position="before">
<field name="id" invisible="1" />
<field name="partner_id" invisible="1" />
<p class="oe_grey" colspan="2"
attrs="{'invisible': [('id', '!=', False)]}">
Please save new member before assigning a family.
</p>
<field name="family_id"
attrs="{'readonly': [('id', '=', False)]}"
context="{'default_member_ids': [(4, partner_id, False)]}" />
<field name="family_role"
attrs="{'readonly': [('id', '=', False)]}" />
</field>
<page name="other_page" position="before">
<page string="Family"
attrs="{'invisible': [('family_id', '=', False)]}">
<group>
<group string="Address">
<group>
<field name="family_street" placeholder="Street..." />
<field name="family_street2" />
<field name="family_zip" placeholder="ZIP" />
<field name="family_city" placeholder="City" />
</group>
<group>
<field name="family_state_id" class="oe_no_button"
placeholder="State" />
<field name="family_country_id" placeholder="Country"
class="oe_no_button" />
</group>
</group>
</group>
<group>
<group string="Communication">
<group>
<field name="family_phone" placeholder="0000000000"
widget="phonefr" />
<field name="family_mobile" placeholder="0000000000"
widget="phonefr" />
</group>
<group>
<field name="family_email" widget="email"
placeholder="name@example.org" />
<field name="family_website" widget="url"
placeholder="e.g. www.odoo.com"/>
</group>
</group>
</group>
<field name="family_member_ids"
context="{'default_family_id': active_id}">
<tree delete="false">
<field name="name" />
<field name="family_role" />
<field name="phone" />
<field name="mobile" />
<field name="email" widget="email" />
</tree>
</field>
</page>
</page>
</field>
</record>
<!-- Searches -->
<record model="ir.ui.view" id="golem_member_search_inherit_golem_family">
<field name="name">GOLEM Member search adaptations</field>
<field name="model">golem.member</field>
<field name="inherit_id" ref="golem_member.golem_member_search" />
<field name="arch" type="xml">
<field name="name" position="after">
<field name="family_id" />
</field>
</field>
</record>
</data>
</odoo>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@ -17,15 +17,15 @@ 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/>.
-->
<odoo>
<openerp>
<data>
<!-- Form -->
<record model="ir.ui.view" id="res_partner_form_inherit_golem_family">
<field name="name">Partner form adaptations</field>
<record model="ir.ui.view" id="res_partner_family_smartbtn_add">
<field name="name">Add family management smart button</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml">
<div name="button_box" position="inside">
<div name="buttons" position="inside">
<button class="oe_inline oe_stat_button" type="object"
name="button_family_members" icon="fa-users"
attrs="{'invisible': [('family_id', '=', False)]}">
@ -36,8 +36,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</field>
</record>
<record model="ir.ui.view" id="partner_firstname_inherit_golem_family_role">
<field name="name">Partner form adaptations</field>
<record model="ir.ui.view" id="res_partner_family_role_add">
<field name="name">Add family role into res.partner form</field>
<field name="model">res.partner</field>
<field name="inherit_id"
ref="partner_firstname.view_partner_form_firstname" />
@ -52,4 +52,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</record>
</data>
</odoo>
</openerp>

View File

@ -18,7 +18,9 @@
{
'name': 'GOLEM members minor and family',
'summary': 'GOLEM non-profit members family + minor management',
'version': '10.0.1.0.0',
'description': 'Non-profit french MJC members family update to minor '
'management',
'version': '0.1',
'category': 'GOLEM',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -15,15 +15,12 @@
# 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/>.
""" GOLEM Family Minor glue module"""
from odoo import models, fields
from openerp import models, fields
LEGAL_DMN = "['&', ('family_id', '=', family_id), ('id', '!=', partner_id)]"
class GolemMember(models.Model):
""" Member adaptations """
_inherit = 'golem.member'
legal_guardian_ids = fields.Many2many(domain=LEGAL_DMN)

View File

@ -18,17 +18,15 @@
{
'name': 'GOLEM non-profit members',
'summary': 'Extends Odoo contacts for MJC',
'version': '10.0.1.0.0',
'description': 'Non-profit french MJC members management',
'version': '0.1',
'category': 'GOLEM',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',
'application': True,
'installable': True,
'depends': ['golem_base', 'golem_activity', 'golem_season',
'odoo_partner_merge'],
'data': ['views/golem_member_views.xml',
'views/res_partner_views.xml',
'views/golem_member_numberconfig_views.xml',
'data/golem_member_numberconfig_data.xml',
'security/ir.model.access.csv']
'depends': ['golem_base', 'golem_activity', 'golem_season'],
'data': ['views/golem_member_view.xml', 'views/members_menu.xml',
'views/res_partner_view.xml', 'views/number_config.xml',
'data/number_config.xml', 'security/ir.model.access.csv']
}

View File

@ -17,17 +17,15 @@ 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/>.
-->
<odoo>
<openerp>
<data noupdate="1">
<function model="ir.config_parameter" name="set_param"
eval="('golem_numberconfig_isautomatic', '1')" />
<function model="ir.config_parameter" name="set_param"
eval="('golem_numberconfig_isperseason', '1')" />
<function model="ir.config_parameter" name="set_param"
eval="('golem_numberconfig_isfornewmembersonly', '0')" />
<function model="ir.config_parameter" name="set_param"
eval="('golem_numberconfig_prefix', '')" />
<function model="ir.config_parameter" name="set_param"
eval="('golem_number_counter', '0')" />
</data>
</odoo>
</openerp>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
#
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
@ -15,24 +15,17 @@
# 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/>.
""" GOLEM Members """
import logging
from odoo import models, fields, api, _
from odoo.exceptions import UserError
_LOGGER = logging.getLogger(__name__)
from openerp import models, fields, api, _
class ResPartner(models.Model):
""" GOLEM Member partner adaptations """
_inherit = 'res.partner'
@api.model
def _get_default_nationality_id(self):
return self.env.ref('base.main_company').country_id
nationality_id = fields.Many2one('res.country', 'Nationality',
default=_get_default_nationality_id)
nationality_id = fields.Many2one(default=_get_default_nationality_id)
country_id = fields.Many2one(default=_get_default_nationality_id)
# Gender overwriting : no need for 'other' choice
@ -40,53 +33,31 @@ class ResPartner(models.Model):
member_id = fields.One2many('golem.member', 'partner_id', 'GOLEM Member',
readonly=True)
is_member = fields.Boolean('Is member', compute='_compute_is_member')
member_number = fields.Char('Member number', related='member_id.number')
@api.depends('member_id')
def _compute_is_member(self):
""" Computes is member """
for partner in self:
partner.is_member = len(partner.member_id) > 0
@api.multi
def view_member(self):
""" Go to member form """
self.ensure_one()
if self[0].member_id:
return {'type': 'ir.actions.act_window',
'res_model': 'golem.member',
'view_mode': 'form',
'res_id': self[0].member_id.id}
@api.multi
def create_golem_member(self):
""" Member creation from partner form """
self.ensure_one()
gm_obj = self.env['golem.member']
gm_obj.create({'partner_id': self[0].id})
gm = self.env['golem.member']
gm.create({'partner_id': self.id})
return True
class GolemMember(models.Model):
""" GOLEM Member model """
_name = 'golem.member'
_description = 'GOLEM Member'
_inherit = 'mail.thread'
_inherits = {'res.partner': 'partner_id'}
_sql_constraints = [('golem_member_number_manual_uniq',
'UNIQUE (number_manual)',
_('This member number has already been used.'))]
partner_id = fields.Many2one('res.partner', required=True, index=True,
partner_id = fields.Many2one('res.partner', required=True,
ondelete='cascade')
@api.model
def _default_season(self):
""" Get default season """
domain = [('is_default', '=', True)]
return self.env['golem.season'].search(domain, limit=1)
return self.env['golem.season'].search(domain)
number_name = fields.Char('Member computed name', compute='_compute_number_name')
number = fields.Char('Member number', store=True, readonly=True)
number_manual = fields.Char('Manual number', size=50, index=True,
help='Manual number overwriting automatic '
@ -99,125 +70,104 @@ class GolemMember(models.Model):
required=True, default=_default_season,
ondelete='restrict')
is_current = fields.Boolean('Current user?', default=False, readonly=True,
store=True, compute='compute_is_current')
store=True, compute='_compute_is_current')
is_number_manual = fields.Boolean('Is number manual?', store=False,
compute='_compute_is_number_manual')
image_permission = fields.Boolean('Image permission?', default=True)
@api.onchange('country_id')
def _onchange_country_id(self):
member = self[0]
if member.country_id:
return {
'domain': {'state_id': [('country_id', '=', member.country_id.id)]}
}
else:
return {'domain': {'state_id': []}}
_sql_constraints = [('golem_member_number_manual_uniq',
'UNIQUE (number_manual)',
_('This member number has already been used.'))]
@api.depends('number', 'name')
def _compute_number_name(self):
""" Computes a name composed with number and name """
for member in self:
if member.name:
member.number_name = u'{} - {}'.format(member.number, member.name)
else:
member.number_name = u''
@api.multi
@api.one
@api.depends('season_ids')
def compute_is_current(self):
def _compute_is_current(self):
""" Computes is current according to seasons """
default_s = self._default_season()
for member in self:
member.is_current = default_s in member.season_ids
self.is_current = default_s in self.season_ids
@api.multi
@api.one
@api.depends('number')
def _compute_is_number_manual(self):
conf = self.env['ir.config_parameter']
is_num_man = (conf.get_param('golem_numberconfig_isautomatic') == '0')
self.write({'is_number_manual': is_num_man})
self.is_number_manual = is_num_man
@api.multi
def generate_number_perseason(self):
@api.one
def _generate_number_perseason(self):
""" Number generation in case of per season configuration """
res = None
conf = self.env['ir.config_parameter']
member_number_obj = self.env['golem.member.number']
for member in self:
for season in member.season_ids:
for s in member.season_ids:
domain = ['&',
('member_id', '=', member.id),
('season_id', '=', season.id)]
member_num = member_number_obj.search(domain)
if not member_num:
season.write({'member_counter': season.member_counter})
('season_id', '=', s.id)]
member_num = self.env['golem.member.number']
mn = member_num.search(domain)
if not mn:
s.member_counter += 1
s.write({'member_counter': s.member_counter})
pkey = 'golem_numberconfig_prefix'
pfx = conf.get_param(pkey, '')
number = u'{}{}'.format(pfx, unicode(season.member_counter))
pfx = conf.get_param(pkey)
number = pfx + str(s.member_counter)
data = {'member_id': member.id,
'season_id': season.id,
'season_id': s.id,
'number': number}
member_num = member_number_obj.create(data)
season.member_counter += 1
if season.is_default:
res = member_num.number
mn = member_num.create(data)
if s.is_default:
res = mn.number
return res
@api.multi
def generate_number_global(self):
@api.one
def _generate_number_global(self):
""" Number generation in case of global configuration """
self.ensure_one()
conf = self.env['ir.config_parameter']
domain = ['&',
('member_id', '=', self[0].id),
('member_id', '=', self.id),
('season_id', '=', None)]
member_number_obj = self.env['golem.member.number']
member_num = member_number_obj.search(domain)
if not member_num:
last = int(conf.get_param('golem_number_counter', 1))
pfx = conf.get_param('golem_numberconfig_prefix', '')
number = pfx + str(last)
data = {'member_id': self[0].id,
'season_id': None,
'number': number}
member_num = member_number_obj.create(data)
member_num = self.env['golem.member.number']
mn = member_num.search(domain)
if not mn:
last = int(conf.get_param('golem_number_counter', 0))
last += 1
conf.set_param('golem_number_counter', str(last))
else:
member_num = member_num[0]
return member_num.number
pfx = conf.get_param('golem_numberconfig_prefix')
number = pfx + str(last)
data = {'member_id': self.id,
'season_id': None,
'number': number}
mn = member_num.create(data)
return mn.number
@api.multi
def generate_number(self):
@api.one
def _generate_number(self):
""" Computes number according to pre-existing number and chosen
seasons """
self.ensure_one()
conf = self.env['ir.config_parameter']
isauto = conf.get_param('golem_numberconfig_isautomatic') == '1'
isperseason = conf.get_param('golem_numberconfig_isperseason') == '1'
isfornew = conf.get_param('golem_numberconfig_isfornewmembersonly') == '1'
for member in self:
if not isauto or (isfornew and member.number_manual):
member.number = member.number_manual
if conf.get_param('golem_numberconfig_isautomatic') == '0':
self.number = self.number_manual
else:
if conf.get_param('golem_numberconfig_isperseason') == '1':
mn = self._generate_number_perseason()
else:
if isperseason:
member.number = member.generate_number_perseason()
else:
member.number = member.generate_number_global()
mn = self._generate_number_global()
if mn:
self.number = mn[0]
@api.model
@api.returns('self', lambda rec: rec.id)
def create(self, values):
""" Number generation after creation """
new_member = super(GolemMember, self).create(values)
new_member.generate_number()
new_member._generate_number()
return new_member
@api.multi
def write(self, values):
""" Number generation after updates """
res = super(GolemMember, self).write(values)
if 'season_ids' in values or 'number_manual' in values:
self.generate_number()
self._generate_number()
return res
@ -234,11 +184,10 @@ class GolemMemberNumber(models.Model):
auto_join=True)
number = fields.Char('Number', index=True, readonly=True)
@api.multi
@api.one
@api.depends('season_id')
def _compute_name(self):
for number in self:
number.name = number.season_id.name
self.name = self.season_id.name
class GolemNumberConfig(models.TransientModel):
@ -268,56 +217,21 @@ class GolemNumberConfig(models.TransientModel):
string='Per season number?',
default=_default_is_per_season)
prefix = fields.Char('Optional prefix', default=_default_prefix)
number_from = fields.Integer('First number', default=1,
help='Number starting from, default to 1')
@api.multi
def apply_config(self):
""" Apply new configuration """
self.ensure_one()
conf = self.env['ir.config_parameter']
conf.set_param('golem_numberconfig_isautomatic', self.is_automatic)
conf.set_param('golem_numberconfig_isperseason', self.is_per_season)
conf.set_param('golem_numberconfig_prefix', self.prefix or '')
if self.number_from:
_LOGGER.warning('New number_from %s', self.number_from)
conf.set_param('golem_number_counter', unicode(self.number_from))
self.env['golem.season'].search([]).write({
'member_counter': self.number_from
})
@api.multi
def apply_nocompute(self):
""" Apply new configuration only for new members (keep old numbers) """
self.ensure_one()
self.apply_config()
conf = self.env['ir.config_parameter']
conf.set_param('golem_numberconfig_isfornewmembersonly', '1')
@api.multi
def apply_recompute(self):
""" Recomputes all member numbers according to new configuration """
self.ensure_one()
self.apply_config()
conf = self.env['ir.config_parameter']
conf.set_param('golem_numberconfig_isfornewmembersonly', '0')
conf.set_param('golem_number_counter', '0')
self.env['golem.member.number'].search([]).unlink()
self.env['golem.season'].search([]).write({
'member_counter': int(self.number_from)
})
self.env['golem.member'].search([]).generate_number()
class MergePartnerAutomatic(models.TransientModel):
""" Merge Partner Automatic adaptations """
_inherit = 'base.partner.merge.automatic.wizard'
@api.multi
def action_merge(self):
""" Merge adaptations : warn if there is a member """
for merge in self:
for partner in merge.partner_ids:
if partner.member_id:
emsg = _('GOLEM Members merge has not been implemented yet. '
'Please only merge partners, not members, or delete '
'GOLEM Members manually before merging.')
raise UserError(emsg)
return super(MergePartnerAutomatic, self).action_merge()
self.env['golem.season'].search([]).write({'member_counter': 0})
self.env['golem.member'].search([])._generate_number()

View File

@ -1,4 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_golem_member_user,Access GOLEM Member User,model_golem_member,golem_base.group_golem_user,1,1,1,1
access_golem_member_season_user,Access GOLEM Member Season User,model_golem_member_number,golem_base.group_golem_user,1,1,1,1
access_ir_config_parameter_manager,Access IR Config Parameter Manager,base.model_ir_config_parameter,golem_base.group_golem_manager,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_golem_member_user Access GOLEM Member User model_golem_member golem_base.group_golem_user 1 1 1 1
3 access_golem_member_season_user Access GOLEM Member Season User model_golem_member_number golem_base.group_golem_user 1 1 1 1
access_ir_config_parameter_manager Access IR Config Parameter Manager base.model_ir_config_parameter golem_base.group_golem_manager 1 1 1 1

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -15,19 +15,15 @@
# 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/>.
""" GOLEM member testing """
from odoo import exceptions
from odoo.tests.common import TransactionCase
from openerp import exceptions
from openerp.tests.common import TransactionCase
# from psycopg2 import IntegrityError
class GolemMemberTestCase(TransactionCase):
""" GOLEM member testing """
def setUp(self, *args, **kwargs):
""" Bootstrap season and members """
super(GolemMemberTestCase, self).setUp(*args, **kwargs)
def setUp(self):
super(GolemMemberTestCase, self).setUp()
self.member_numberconfig_model = self.env['golem.member.numberconfig']
season_mdl = self.env['golem.season'].sudo()
self.season_current = season_mdl.create({'name': u'Current'})
@ -41,10 +37,10 @@ class GolemMemberTestCase(TransactionCase):
def test_member_creation_noname(self):
""" Test creation of member without needed parameters """
with self.assertRaises(exceptions.ValidationError) as exc_cm:
with self.assertRaises(exceptions.ValidationError) as cm:
self.member_model.create({})
self.assertIn('Error(s) with partner', exc_cm.exception.args[0])
self.assertEqual('No name is set.', exc_cm.exception.args[1])
self.assertIn('Error(s) with partner', cm.exception.args[0])
self.assertEqual('No name is set.', cm.exception.args[1])
def test_current_season(self):
""" Test if default season if fixed according to setUp and if users
@ -70,7 +66,7 @@ class GolemMemberTestCase(TransactionCase):
# self.assertIn('duplicate key value violates unique constraint',
# cm.exception.args[0])
def test_member_numbers_auto_season(self):
def test_member_numbers_auto_perseason(self):
""" Tests per season automatic member number generation + prefix """
conf = self.member_numberconfig_model.create({'is_automatic': '1',
'is_per_season': '1',
@ -78,31 +74,10 @@ class GolemMemberTestCase(TransactionCase):
conf.apply_recompute()
self.assertEqual(self.member1.number, u'M1')
self.assertEqual(self.member2.number, u'M2')
self.member2.season_ids += self.season_next
self.assertEqual(self.member2.number, u'M2')
self.season_next.do_default_season()
self.assertTrue(self.member2.is_current)
self.assertEqual(self.member2.number, u'M1')
self.assertFalse(self.member1.is_current)
self.assertFalse(self.member1.number)
def test_mnumbers_auto_season_from(self):
""" Tests per season automatic member number + number_from """
conf = self.member_numberconfig_model.create({'is_automatic': '1',
'is_per_season': '1',
'prefix': False,
'number_from': 100})
conf.apply_recompute()
self.assertEqual(self.member1.number, u'100')
self.assertEqual(self.member2.number, u'101')
self.member2.season_ids += self.season_next
self.assertEqual(self.member2.number, u'101')
self.season_next.do_default_season()
self.assertTrue(self.member2.is_current)
self.assertEqual(self.member2.number, u'100')
self.assertFalse(self.member1.is_current)
self.assertFalse(self.member1.number)
def test_member_numbers_auto_global(self):
@ -116,65 +91,3 @@ class GolemMemberTestCase(TransactionCase):
'firstname': 'Buddy',
'season_ids': [self.season_next]})
self.assertEqual(new_m.number, u'3')
def test_mnumbers_auto_global_from(self):
""" Tests global automatic member number generation + number_from """
conf = self.member_numberconfig_model.create({'is_automatic': '1',
'is_per_season': '0',
'number_from': 50})
conf.apply_recompute()
self.assertEqual(self.member1.number, u'50')
self.assertEqual(self.member2.number, u'51')
new_m = self.member_model.create({'lastname': 'NEW',
'firstname': 'Buddy',
'season_ids': [self.season_next]})
self.assertEqual(new_m.number, u'52')
def test_mnumbers_manual_to_auto(self):
""" Tests generation change withtout whole recompute """
conf = self.member_numberconfig_model.create({'is_automatic': '0'})
conf.apply_recompute()
self.assertFalse(self.member1.number)
self.member1.number_manual = u'M01'
self.assertEqual(self.member1.number_manual, self.member1.number)
# Without number_from
conf = self.member_numberconfig_model.create({'is_automatic': '1',
'is_per_season': '0',
'prefix': False})
conf.apply_nocompute()
self.assertEqual(self.member1.number, u'M01')
new_m = self.member_model.create({'lastname': 'NEW',
'firstname': 'Dewie',
'season_ids': [self.season_current]})
new_m2 = self.member_model.create({'lastname': 'NEW',
'firstname': 'Dowa',
'season_ids': [self.season_current]})
self.assertEqual(new_m.number, u'1')
self.assertEqual(new_m2.number, u'2')
# With number_from
conf = self.member_numberconfig_model.create({'is_automatic': '1',
'is_per_season': '0',
'prefix': False,
'number_from': 50})
conf.apply_nocompute()
self.assertEqual(self.member1.number, u'M01')
new_m = self.member_model.create({'lastname': 'NEW',
'firstname': 'Buddy',
'season_ids': [self.season_current]})
new_m2 = self.member_model.create({'lastname': 'NEW',
'firstname': 'Bobby',
'season_ids': [self.season_current]})
self.assertEqual(new_m.number, u'50')
self.assertEqual(new_m2.number, u'51')
# After season changing
self.season_next.do_default_season()
self.assertEqual(self.member1.number, u'M01')
self.assertEqual(new_m.number, u'50')
self.member1.season_ids += self.season_next
self.assertEqual(self.member1.number, u'M01')
new_m3 = self.member_model.create({'lastname': 'NEW',
'firstname': 'Barny',
'season_ids': [self.season_current]})
self.assertEqual(new_m3.number, u'52')

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@ -17,24 +17,21 @@ 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/>.
-->
<odoo>
<openerp>
<data>
<!-- Forms -->
<record id="golem_member_form" model="ir.ui.view">
<record id="view_form" model="ir.ui.view">
<field name="name">GOLEM Member Form</field>
<field name="model">golem.member</field>
<field name="arch" type="xml">
<form>
<sheet>
<div colspan="2"
style="background-color: #ccc; color: #fff; font-size: 150%; font-weight: bold; padding: 0.5%; text-align: center; margin-bottom: 1%;">Member form</div>
<group>
<div class="oe_title">
<h1>
<field name="image" widget="image" class="oe_left oe_avatar"
options="{'preview_image': 'image_medium', 'size': [90, 90]}" />
<field name="number_name" class="oe_inline" readonly="True"
style="margin-left: 2%" />
<field name="name" class="oe_inline" readonly="True" />
</h1>
</div>
<div class="oe_right oe_button_box" name="buttons" />
@ -84,16 +81,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<field name="mobile" placeholder="0000000000"
widget="phonefr" />
<field name="pictures_agreement"/>
<field name="opt_out_sms" />
</group>
<group>
<field name="email" widget="email"
placeholder="name@example.org" />
<label for="opt_out" string="Out of mailings?" />
<field name="opt_out" nolabel="1" />
</group>
<group>
<field name="opt_out_sms" />
<field name="website" widget="url"
placeholder="e.g. www.odoo.com"/>
<field name="image_permission" />
</group>
</group>
</page>
@ -112,80 +108,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</field>
</record>
<!-- Kanban -->
<record model="ir.ui.view" id="golem_member_kanban">
<field name="name">GOLEM Member Kanban view</field>
<field name="model">golem.member</field>
<field name="arch" type="xml">
<kanban>
<field name="is_company" />
<field name="image" />
<field name="color" />
<field name="display_name" />
<field name="title" />
<field name="email" />
<field name="phone" />
<field name="mobile" />
<field name="city" />
<field name="country_id" />
<field name="number" />
<field name="season_ids" />
<field name="category_id"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_vignette oe_semantic_html_override">
<div class="o_kanban_image">
<img t-if="record.image.raw_value"
t-att-src="'data:image/png;base64,'+ record.image.raw_value"/>
<t t-if="!record.image.raw_value">
<img t-if="record.is_company.raw_value === true"
t-att-src='_s + "/base/static/src/img/company_image.png"'/>
<img t-if="record.is_company.raw_value === false"
t-att-src='_s + "/base/static/src/img/avatar.png"'/>
</t>
</div>
<div class="oe_kanban_details">
<h4 class="oe_partner_heading">
<a type="open"><field name="display_name" /></a>
(N° <field name="number" />)
</h4>
<div class="oe_kanban_partner_categories" />
<div class="oe_kanban_partner_links" />
<field name="season_ids" />
<ul>
<li t-if="record.city.raw_value and !record.country_id.raw_value">
<field name="city" />
</li>
<li t-if="!record.city.raw_value and record.country_id.raw_value">
<field name="country_id" />
</li>
<li t-if="record.city.raw_value and record.country_id.raw_value">
<field name="city" />, <field name="country_id" />
</li>
<li t-if="record.phone.raw_value or record.mobile.raw_value">
<a t-attf-href="tel:#{record.phone.raw_value}">
<field name="phone" />
</a>
<a t-attf-href="tel:#{record.mobile.raw_value}">
<field name="mobile" />
</a>
</li>
<li t-if="record.email.raw_value">
<a t-attf-href="mailto:#{record.email.raw_value}">
<field name="email" />
</a>
</li>
</ul>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<!-- Trees -->
<record model="ir.ui.view" id="golem_member_tree">
<record model="ir.ui.view" id="view_tree">
<field name="name">GOLEM Member Tree/List</field>
<field name="model">golem.member</field>
<field name="arch" type="xml">
@ -202,7 +126,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</record>
<!-- Searches -->
<record id="golem_member_search" model="ir.ui.view">
<record id="view_filter" model="ir.ui.view">
<field name="name">GOLEM Member Filters</field>
<field name="model">golem.member</field>
<field name="arch" type="xml">
@ -231,7 +155,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</record>
<!-- Graphs -->
<record model="ir.ui.view" id="golem_member_graph">
<record model="ir.ui.view" id="view_graph_golem_member">
<field name="name">GOLEM Member Graph</field>
<field name="model">golem.member</field>
<field name="arch" type="xml">
@ -242,26 +166,29 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</record>
<!-- Actions -->
<act_window id="golem_member_action"
<act_window id="action"
name="GOLEM Members"
res_model="golem.member"
view_mode="kanban,tree,form,graph"
context="{'search_default_season_default': True}" />
<act_window id="res_partner_category_action" name="GOLEM Members Tags"
<record model="ir.actions.act_window.view"
id="view_kanban">
<field name="view_mode">kanban</field>
<field name="view_id" ref="base.res_partner_kanban_view"/>
<field name="act_window_id" ref="action"/>
</record>
<act_window id="tags_action_list" name="GOLEM Members Tags"
res_model="res.partner.category" view_mode="tree,form" />
<!-- Menu items -->
<!-- Deactivate classic membership list -->
<record id="membership.menu_membership" model="ir.ui.menu">
<field name="active">0</field>
</record>
<!-- Add new menu items -->
<menuitem id="golem_members_menu" name="Members"
parent="membership.menu_association" sequence="5"
action="golem_member_action" groups="golem_base.group_golem_user" />
<menuitem id="res_partner_category_menu" name="Member Tags"
parent="membership.menu_marketing_config_association" sequence="10"
action="res_partner_category_action"
groups="golem_base.group_golem_manager" />
<menuitem id="golem_members_menu" name="GOLEM Members"
parent="membership.menu_membership" sequence="5"
action="action" groups="golem_base.group_golem_user" />
<menuitem id="golem_members_contacts" name="Contacts"
parent="membership.menu_membership" sequence="20"
action="contacts.action_contacts" groups="golem_base.group_golem_user" />
<menuitem id="golem_members_menu_tags" name="Member Tags"
parent="base.menu_marketing_config_association" sequence="10"
action="tags_action_list" groups="golem_base.group_golem_manager" />
</data>
</odoo>
</openerp>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
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/>.
-->
<openerp>
<data noupdate="1">
<delete id="membership.menu_members" model="ir.ui.menu" />
</data>
</openerp>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@ -17,11 +17,11 @@ 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/>.
-->
<odoo>
<openerp>
<data>
<!-- Forms -->
<record id="golem_member_numberconfig_form" model="ir.ui.view">
<record id="numberconfig_form" model="ir.ui.view">
<field name="name">GOLEM Member number configuration</field>
<field name="model">golem.member.numberconfig</field>
<field name="arch" type="xml">
@ -33,12 +33,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
attrs="{'invisible': [('is_automatic', '=', '0')]}"/>
<field name="prefix"
attrs="{'invisible': [('is_automatic', '=', '0')]}"/>
<field name="number_from"
attrs="{'invisible': [('is_automatic', '=', '0')]}"/>
</group>
</sheet>
<footer>
<button type="object" name="apply_nocompute"
<button type="object" name="apply_config"
string="Apply for new members" />
<button type="object" name="apply_recompute"
string="Apply and recompute all member numbers"
@ -52,14 +50,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</record>
<!-- Actions -->
<act_window id="golem_member_numberconfig_action"
<act_window id="numberconfig_action"
name="GOLEM Member Number Config" res_model="golem.member.numberconfig"
view_mode="form" target="new" />
<!-- Menus -->
<menuitem
id="golem_member_numberconfig_menu"
action="golem_member_numberconfig_action"
parent="membership.menu_marketing_config_association" sequence="1"
id="numberconfig_menu" action="numberconfig_action"
parent="base.menu_marketing_config_association" sequence="3"
groups="golem_base.group_golem_manager" />
</data>
</odoo>
</openerp>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@ -17,26 +17,19 @@ 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/>.
-->
<odoo>
<openerp>
<data>
<!-- Forms -->
<record model="ir.ui.view" id="res_partner_form_inherit_golem_member">
<record model="ir.ui.view" id="member_add">
<field name="name">Add information on linked member or member creation into main form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml">
<div name="button_box" position="before">
<div colspan="2"
style="background-color: #ccc; color: #fff; font-size: 150%; font-weight: bold; padding: 0.5%; text-align: center; margin-bottom: 1%;">Contact form</div>
</div>
<h1 position="after">
<label for="member_id"
attrs="{'invisible': ['|', ('is_company', '=', True),
('member_id', '=', False)]}" />
<field name="member_id" invisible="1" />
<button name="view_member" string="Go to member form" type="object"
class="oe_link"
<field name="member_id" widget="many2one" readonly="True"
attrs="{'invisible': ['|', ('is_company', '=', True),
('member_id', '=', False)]}" />
<button type="object" name="create_golem_member"
@ -47,25 +40,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</field>
</record>
<!-- Kanban -->
<record model="ir.ui.view" id="res_partner_kanban_inherit_golem_member">
<field name="name">Partner Kanban adaptations</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.res_partner_kanban_view" />
<field name="arch" type="xml">
<field name="type" position="after">
<field name="is_member" />
</field>
<xpath expr="//div[@class='oe_kanban_global_click o_res_partner_kanban']"
position="inside">
<hr style="clear: both; background-color: #ecffe2; height: 10%; margin: 2% 0 0 0;"
title="Is member" t-if="!!record.is_member.raw_value" />
</xpath>
</field>
</record>
<!-- Trees -->
<record model="ir.ui.view" id="res_partner_tree_inherit_golem_member">
<record model="ir.ui.view" id="member_tree">
<field name="name">Add member number to tree</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_tree" />
@ -77,7 +53,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</record>
<!-- Searches -->
<record model="ir.ui.view" id="res_partner_search_inherit_golem_member">
<record model="ir.ui.view" id="member_number_search">
<field name="name">Partner GOLEM Member Number search</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter" />
@ -89,4 +65,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</record>
</data>
</odoo>
</openerp>

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Michel Dessenne <michel@yaltik.com>
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# 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/>.
from . import models

View File

@ -1,30 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Michel Dessenne <michel@yaltik.com>
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# 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/>.
{
'name': 'GOLEM members account',
'summary': 'GOLEM non-profit members account',
'version': '10.0.1.0.1',
'category': 'GOLEM',
'author': 'Fabien Bourgeois, Michel Dessenne',
'license': 'AGPL-3',
'application': False,
'installable': True,
'depends': ['account', 'golem_member'],
'data': ['views/golem_member_views.xml']
}

View File

@ -1,51 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * golem_member_account
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-12 17:49+0000\n"
"PO-Revision-Date: 2018-02-12 17:49+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: golem_member_account
#: model:ir.ui.view,arch_db:golem_member_account.golem_member_form_inherit_golem_member_account
msgid "<span class=\"o_stat_text\">Invoiced</span>"
msgstr "<span class=\"o_stat_text\">Facturé</span>"
#. module: golem_member_account
#: selection:golem.member,last_payment_state:0
msgid "Checked"
msgstr "Validé"
#. module: golem_member_account
#: selection:golem.member,last_payment_state:0
msgid "Draft"
msgstr "Brouillon"
#. module: golem_member_account
#: model:ir.model,name:golem_member_account.model_golem_member
msgid "GOLEM Member"
msgstr "Adhérent"
#. module: golem_member_account
#: model:ir.model.fields,field_description:golem_member_account.field_golem_member_last_payment_state
msgid "Last payment state"
msgstr "État du dernier paiement"
#. module: golem_member_account
#: selection:golem.member,last_payment_state:0
msgid "Posted"
msgstr "Comptabilisé"
#. module: golem_member_account
#: selection:golem.member,last_payment_state:0
msgid "Reconciled"
msgstr "Lettré"

View File

@ -1,52 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * golem_member_account
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-12 17:50+0000\n"
"PO-Revision-Date: 2018-02-12 17:50+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: golem_member_account
#: model:ir.ui.view,arch_db:golem_member_account.golem_member_form_inherit_golem_member_account
msgid "<span class=\"o_stat_text\">Invoiced</span>"
msgstr ""
#. module: golem_member_account
#: selection:golem.member,last_payment_state:0
msgid "Checked"
msgstr ""
#. module: golem_member_account
#: selection:golem.member,last_payment_state:0
msgid "Draft"
msgstr ""
#. module: golem_member_account
#: model:ir.model,name:golem_member_account.model_golem_member
msgid "GOLEM Member"
msgstr ""
#. module: golem_member_account
#: model:ir.model.fields,field_description:golem_member_account.field_golem_member_last_payment_state
msgid "Last payment state"
msgstr ""
#. module: golem_member_account
#: selection:golem.member,last_payment_state:0
msgid "Posted"
msgstr ""
#. module: golem_member_account
#: selection:golem.member,last_payment_state:0
msgid "Reconciled"
msgstr ""

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Michel Dessenne <michel@yaltik.com>
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# 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/>.
from . import golem_member

View File

@ -1,65 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright 2018 Michel Dessenne <michel@yaltik.com>
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# 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/>.
""" GOLEM Member adaptations """
from odoo import models, fields, api
class GolemMember(models.Model):
""" GOLEM Member adaptations """
_inherit = 'golem.member'
last_payment_state = fields.Selection([('draft', 'Draft'),
('posted', 'Posted'),
('checked', 'Checked'),
('reconciled', 'Reconciled')],
compute='_compute_last_payment_state')
@api.multi
def open_partner_invoices(self):
""" Open member invoices """
self.ensure_one()
return {'type': 'ir.actions.act_window',
'name': 'Invoices',
'res_model': 'account.invoice',
'view_mode': 'tree,form',
'context': {'search_default_partner_id': self[0].partner_id.id,
'default_partner_id': self[0].partner_id.id}}
@api.depends('invoice_ids')
def _compute_last_payment_state(self):
""" Computes last invoice payment state : check last invoice, then more
recent payment and retrieve its state """
for member in self:
if member.invoice_ids:
invoice_ids = member.invoice_ids.filtered(lambda inv: inv.state in ('open', 'paid'))
invoice_ids = invoice_ids.sorted(key=lambda r: r.date_invoice, reverse=True)
payment_ids = invoice_ids[0].payment_ids if invoice_ids else False
if payment_ids:
payment_ids = payment_ids.sorted(lambda r: r.payment_date, reverse=True)
today = fields.Date.today()
last_payment_id = None
for payment in payment_ids:
if payment.payment_date < today:
last_payment_id = payment
break
if last_payment_id:
member.last_payment_state = last_payment_id.state
return
member.state_last_invoice = False

View File

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Michel Dessenne <michel@yaltik.com>
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
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/>.
-->
<odoo>
<data>
<!-- Forms -->
<record model="ir.ui.view" id="golem_member_form_inherit_golem_member_account">
<field name="name">GOLEM Member Form adaptations</field>
<field name="model">golem.member</field>
<field name="inherit_id" ref="golem_member.golem_member_form" />
<field name="arch" type="xml">
<div name="buttons" position="inside">
<button type="object" class="oe_stat_button" id="invoice_button"
icon="fa-pencil-square-o" name="open_partner_invoices"
context="{'default_partner_id': active_id}">
<div class="o_form_field o_stat_info">
<span class="o_stat_value">
<field name="total_invoiced" widget='monetary'
options="{'currency_field': 'currency_id'}"/>
</span>
<span class="o_stat_text">Invoiced</span>
</div>
</button>
</div>
<field name="comment" position="before">
<field name="last_payment_state" />
<field name="currency_id" invisible="1" />
</field>
</field>
</record>
</data>
</odoo>

View File

@ -15,4 +15,4 @@
# 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/>.
from . import models
from . import golem_member

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -18,12 +18,13 @@
{
'name': 'GOLEM Member Family Quotient',
'summary': 'GOLEM Members Family Quotients',
'version': '10.0.1.0.0',
'description': ''' Non-profit french MJC members family quotient ''',
'version': '0.1',
'category': 'GOLEM',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',
'application': False,
'installable': True,
'depends': ['golem_member'],
'data': ['views/golem_member_views.xml']
'data': ['golem_member_view.xml']
}

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -15,12 +15,10 @@
# 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/>.
""" GOLEM Member Family Quotient """
from openerp import models, fields
from odoo import models, fields
class GolemMember(models.Model):
""" GOLEM Member adaptations """
_inherit = 'golem.member'
caf_number = fields.Char('CAF Number')

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
@ -17,14 +17,13 @@ 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/>.
-->
<odoo>
<openerp>
<data>
<!-- Form -->
<record model="ir.ui.view" id="golem_member_form_inherit_familyquotient">
<record model="ir.ui.view" id="qf_form">
<field name="name">Add QF to main form</field>
<field name="model">golem.member</field>
<field name="inherit_id" ref="golem_member.golem_member_form" />
<field name="inherit_id" ref="golem_member.view_form" />
<field name="arch" type="xml">
<field name="number" position="after">
<field name="caf_number" />
@ -34,10 +33,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</record>
<!-- Searches -->
<record model="ir.ui.view" id="golem_member_search_inherit_familyquotient">
<record model="ir.ui.view" id="skills_search">
<field name="name">Add Skills Search and Filter</field>
<field name="model">golem.member</field>
<field name="inherit_id" ref="golem_member.golem_member_search" />
<field name="inherit_id" ref="golem_member.view_filter" />
<field name="arch" type="xml">
<field name="email" position="after">
<field name="caf_number" />
@ -46,4 +45,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</record>
</data>
</odoo>
</openerp>

View File

@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-01 20:55+0000\n"
"PO-Revision-Date: 2017-05-01 20:55+0000\n"
"POT-Creation-Date: 2016-07-07 10:35+0000\n"
"PO-Revision-Date: 2016-07-07 10:35+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -17,17 +17,17 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: golem_member_familyquotient
#: model:ir.model.fields,field_description:golem_member_familyquotient.field_golem_member_caf_number
#: field:golem.member,caf_number:0
msgid "CAF Number"
msgstr "Numéro CAF"
#. module: golem_member_familyquotient
#: model:ir.model.fields,field_description:golem_member_familyquotient.field_golem_member_qf
#: field:golem.member,qf:0
msgid "Family Quotient"
msgstr "Quotient familial"
#. module: golem_member_familyquotient
#: model:ir.model,name:golem_member_familyquotient.model_golem_member
msgid "GOLEM Member"
msgstr "Adhérent"
msgstr "GOLEM : adhérent"

View File

@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-01 20:54+0000\n"
"PO-Revision-Date: 2017-05-01 20:54+0000\n"
"POT-Creation-Date: 2016-07-07 10:34+0000\n"
"PO-Revision-Date: 2016-07-07 10:34+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -16,12 +16,12 @@ msgstr ""
"Plural-Forms: \n"
#. module: golem_member_familyquotient
#: model:ir.model.fields,field_description:golem_member_familyquotient.field_golem_member_caf_number
#: field:golem.member,caf_number:0
msgid "CAF Number"
msgstr ""
#. module: golem_member_familyquotient
#: model:ir.model.fields,field_description:golem_member_familyquotient.field_golem_member_qf
#: field:golem.member,qf:0
msgid "Family Quotient"
msgstr ""

View File

@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# 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/>.
from . import golem_member

Some files were not shown because too many files have changed in this diff Show More