[IMP][QUa]GOLEM Member Account enhancements : styles, tree removal (perf), renamings, copyright notices...
This commit is contained in:
parent
bfa9298cef
commit
bf8fc34b6b
@ -1,6 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
|
# 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
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Affero General Public License as
|
# it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
|
# 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
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Affero General Public License as
|
# it under the terms of the GNU Affero General Public License as
|
||||||
@ -17,13 +18,13 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': 'GOLEM members account',
|
'name': 'GOLEM members account',
|
||||||
'summary': 'GOLEM non-profit members account management',
|
'summary': 'GOLEM non-profit members account',
|
||||||
'version': '10.0.1.0.0',
|
'version': '10.0.1.0.1',
|
||||||
'category': 'GOLEM',
|
'category': 'GOLEM',
|
||||||
'author': 'Fabien Bourgeois, Michel Dessenne',
|
'author': 'Fabien Bourgeois, Michel Dessenne',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'application': True,
|
'application': False,
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'depends': ['account', 'golem_base', 'golem_member'],
|
'depends': ['account', 'golem_member'],
|
||||||
'data': ['views/golem_member_views.xml']
|
'data': ['views/golem_member_views.xml']
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Odoo Server 10.0\n"
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2018-02-12 15:36+0000\n"
|
"POT-Creation-Date: 2018-02-12 17:49+0000\n"
|
||||||
"PO-Revision-Date: 2018-02-12 15:36+0000\n"
|
"PO-Revision-Date: 2018-02-12 17:49+0000\n"
|
||||||
"Last-Translator: <>\n"
|
"Last-Translator: <>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -16,17 +16,17 @@ msgstr ""
|
|||||||
"Plural-Forms: \n"
|
"Plural-Forms: \n"
|
||||||
|
|
||||||
#. module: golem_member_account
|
#. module: golem_member_account
|
||||||
#: model:ir.ui.view,arch_db:golem_member_account.golem_member_account_form_inherit_golem_member
|
#: model:ir.ui.view,arch_db:golem_member_account.golem_member_form_inherit_golem_member_account
|
||||||
msgid "<span class=\"o_stat_text\">Invoiced</span>"
|
msgid "<span class=\"o_stat_text\">Invoiced</span>"
|
||||||
msgstr "<span class=\"o_stat_text\">Facturé</span>"
|
msgstr "<span class=\"o_stat_text\">Facturé</span>"
|
||||||
|
|
||||||
#. module: golem_member_account
|
#. module: golem_member_account
|
||||||
#: selection:golem.member,state_last_invoice:0
|
#: selection:golem.member,last_payment_state:0
|
||||||
msgid "Checked"
|
msgid "Checked"
|
||||||
msgstr "Validé"
|
msgstr "Validé"
|
||||||
|
|
||||||
#. module: golem_member_account
|
#. module: golem_member_account
|
||||||
#: selection:golem.member,state_last_invoice:0
|
#: selection:golem.member,last_payment_state:0
|
||||||
msgid "Draft"
|
msgid "Draft"
|
||||||
msgstr "Brouillon"
|
msgstr "Brouillon"
|
||||||
|
|
||||||
@ -36,21 +36,16 @@ msgid "GOLEM Member"
|
|||||||
msgstr "Adhérent"
|
msgstr "Adhérent"
|
||||||
|
|
||||||
#. module: golem_member_account
|
#. module: golem_member_account
|
||||||
#: model:ir.model,name:golem_member_account.model_account_invoice
|
#: model:ir.model.fields,field_description:golem_member_account.field_golem_member_last_payment_state
|
||||||
msgid "Invoice"
|
msgid "Last payment state"
|
||||||
msgstr "Facture"
|
msgstr "État du dernier paiement"
|
||||||
|
|
||||||
#. module: golem_member_account
|
#. module: golem_member_account
|
||||||
#: selection:golem.member,state_last_invoice:0
|
#: selection:golem.member,last_payment_state:0
|
||||||
msgid "Posted"
|
msgid "Posted"
|
||||||
msgstr "Publié"
|
msgstr "Comptabilisé"
|
||||||
|
|
||||||
#. module: golem_member_account
|
#. module: golem_member_account
|
||||||
#: selection:golem.member,state_last_invoice:0
|
#: selection:golem.member,last_payment_state:0
|
||||||
msgid "Reconciled"
|
msgid "Reconciled"
|
||||||
msgstr "Rapproché"
|
msgstr "Lettré"
|
||||||
|
|
||||||
#. module: golem_member_account
|
|
||||||
#: model:ir.model.fields,field_description:golem_member_account.field_golem_member_state_last_invoice
|
|
||||||
msgid "State last invoice"
|
|
||||||
msgstr "Etat de la drenière facture"
|
|
||||||
|
@ -6,8 +6,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Odoo Server 10.0\n"
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2018-02-12 15:36+0000\n"
|
"POT-Creation-Date: 2018-02-12 17:50+0000\n"
|
||||||
"PO-Revision-Date: 2018-02-12 15:36+0000\n"
|
"PO-Revision-Date: 2018-02-12 17:50+0000\n"
|
||||||
"Last-Translator: <>\n"
|
"Last-Translator: <>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -16,17 +16,17 @@ msgstr ""
|
|||||||
"Plural-Forms: \n"
|
"Plural-Forms: \n"
|
||||||
|
|
||||||
#. module: golem_member_account
|
#. module: golem_member_account
|
||||||
#: model:ir.ui.view,arch_db:golem_member_account.golem_member_account_form_inherit_golem_member
|
#: model:ir.ui.view,arch_db:golem_member_account.golem_member_form_inherit_golem_member_account
|
||||||
msgid "<span class=\"o_stat_text\">Invoiced</span>"
|
msgid "<span class=\"o_stat_text\">Invoiced</span>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member_account
|
#. module: golem_member_account
|
||||||
#: selection:golem.member,state_last_invoice:0
|
#: selection:golem.member,last_payment_state:0
|
||||||
msgid "Checked"
|
msgid "Checked"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member_account
|
#. module: golem_member_account
|
||||||
#: selection:golem.member,state_last_invoice:0
|
#: selection:golem.member,last_payment_state:0
|
||||||
msgid "Draft"
|
msgid "Draft"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -36,22 +36,17 @@ msgid "GOLEM Member"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member_account
|
#. module: golem_member_account
|
||||||
#: model:ir.model,name:golem_member_account.model_account_invoice
|
#: model:ir.model.fields,field_description:golem_member_account.field_golem_member_last_payment_state
|
||||||
msgid "Invoice"
|
msgid "Last payment state"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member_account
|
#. module: golem_member_account
|
||||||
#: selection:golem.member,state_last_invoice:0
|
#: selection:golem.member,last_payment_state:0
|
||||||
msgid "Posted"
|
msgid "Posted"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member_account
|
#. module: golem_member_account
|
||||||
#: selection:golem.member,state_last_invoice:0
|
#: selection:golem.member,last_payment_state:0
|
||||||
msgid "Reconciled"
|
msgid "Reconciled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member_account
|
|
||||||
#: model:ir.model.fields,field_description:golem_member_account.field_golem_member_state_last_invoice
|
|
||||||
msgid "State last invoice"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
|
# 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
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Affero General Public License as
|
# it under the terms of the GNU Affero General Public License as
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
|
# 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
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Affero General Public License as
|
# it under the terms of the GNU Affero General Public License as
|
||||||
@ -15,38 +16,34 @@
|
|||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
""" GOLEM Members """
|
""" GOLEM Member adaptations """
|
||||||
|
|
||||||
import logging
|
|
||||||
from odoo import models, fields, api, _
|
|
||||||
from odoo.exceptions import UserError
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
from odoo import models, fields, api
|
||||||
|
|
||||||
|
|
||||||
class GolemMember(models.Model):
|
class GolemMember(models.Model):
|
||||||
""" GOLEM Member adaptations """
|
""" GOLEM Member adaptations """
|
||||||
_inherit = 'golem.member'
|
_inherit = 'golem.member'
|
||||||
|
|
||||||
|
last_payment_state = fields.Selection([('draft', 'Draft'),
|
||||||
|
('posted', 'Posted'),
|
||||||
|
('checked', 'Checked'),
|
||||||
|
('reconciled', 'Reconciled')],
|
||||||
|
compute='_compute_last_payment_state')
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def open_partner_invoices(self):
|
def open_partner_invoices(self):
|
||||||
""" Open invoices member """
|
""" Open member invoices """
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
return {'type': 'ir.actions.act_window',
|
return {'type': 'ir.actions.act_window',
|
||||||
'name': 'Invoices',
|
'name': 'Invoices',
|
||||||
'res_model': 'account.invoice',
|
'res_model': 'account.invoice',
|
||||||
'view_mode': 'tree,form',
|
'view_mode': 'tree,form',
|
||||||
'context': {'search_default_partner_id': self.partner_id.id,
|
'context': {'search_default_partner_id': self[0].partner_id.id,
|
||||||
'default_partner_id': self.partner_id.id}}
|
'default_partner_id': self[0].partner_id.id}}
|
||||||
|
|
||||||
state_last_invoice = fields.Selection([('draft', 'Draft'),
|
|
||||||
('posted', 'Posted'),
|
|
||||||
('checked', 'Checked'),
|
|
||||||
('reconciled', 'Reconciled')],
|
|
||||||
compute='_compute_state_of_last_invoice')
|
|
||||||
|
|
||||||
@api.depends('invoice_ids')
|
@api.depends('invoice_ids')
|
||||||
def _compute_state_of_last_invoice(self):
|
def _compute_last_payment_state(self):
|
||||||
""" Computes last invoice payment state : check last invoice, then more
|
""" Computes last invoice payment state : check last invoice, then more
|
||||||
recent payment and retrieve its state """
|
recent payment and retrieve its state """
|
||||||
for member in self:
|
for member in self:
|
||||||
@ -63,6 +60,6 @@ class GolemMember(models.Model):
|
|||||||
last_payment_id = payment
|
last_payment_id = payment
|
||||||
break
|
break
|
||||||
if last_payment_id:
|
if last_payment_id:
|
||||||
member.state_last_invoice = last_payment_id.state
|
member.last_payment_state = last_payment_id.state
|
||||||
return
|
return
|
||||||
member.state_last_invoice = False
|
member.state_last_invoice = False
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
|
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
|
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
|
it under the terms of the GNU Affero General Public License as published by
|
||||||
@ -19,41 +20,29 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
<!-- Forms -->
|
<!-- Forms -->
|
||||||
<record model="ir.ui.view" id="golem_member_account_form_inherit_golem_member">
|
<record model="ir.ui.view" id="golem_member_form_inherit_golem_member_account">
|
||||||
<field name="name">GOLEM Member account Form</field>
|
<field name="name">GOLEM Member Form adaptations</field>
|
||||||
<field name="model">golem.member</field>
|
<field name="model">golem.member</field>
|
||||||
<field name="inherit_id" ref="golem_member.golem_member_form" />
|
<field name="inherit_id" ref="golem_member.golem_member_form" />
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<div class="oe_title" position="after">
|
<div name="buttons" position="inside">
|
||||||
<div class="oe_button_box" name="button_box">
|
|
||||||
<button type="object" class="oe_stat_button" id="invoice_button"
|
<button type="object" class="oe_stat_button" id="invoice_button"
|
||||||
icon="fa-pencil-square-o" name="open_partner_invoices"
|
icon="fa-pencil-square-o" name="open_partner_invoices"
|
||||||
attrs="{'invisible': [('free_member', '=', True)]}"
|
|
||||||
context="{'default_partner_id': active_id}">
|
context="{'default_partner_id': active_id}">
|
||||||
<div class="o_form_field o_stat_info">
|
<div class="o_form_field o_stat_info">
|
||||||
<span class="o_stat_value">
|
<span class="o_stat_value">
|
||||||
<field name="total_invoiced" widget='monetary' options="{'currency_field': 'currency_id'}"/></span>
|
<field name="total_invoiced" widget='monetary'
|
||||||
|
options="{'currency_field': 'currency_id'}"/>
|
||||||
|
</span>
|
||||||
<span class="o_stat_text">Invoiced</span>
|
<span class="o_stat_text">Invoiced</span>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<field name="comment" position="before">
|
||||||
<field name="season_ids" position="before">
|
<field name="last_payment_state" />
|
||||||
<field name="state_last_invoice" />
|
<field name="currency_id" invisible="1" />
|
||||||
<field name="currency_id" invisible="1"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- Trees -->
|
|
||||||
<record model="ir.ui.view" id="golem_member_account_tree_inherit_golem_member">
|
|
||||||
<field name="name">GOLEM Member account tree</field>
|
|
||||||
<field name="model">golem.member</field>
|
|
||||||
<field name="inherit_id" ref="golem_member.golem_member_tree" />
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="contact_address" position="after">
|
|
||||||
<field name="state_last_invoice" />
|
|
||||||
</field>
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
Loading…
Reference in New Issue
Block a user