[TYPO]GOLEM Resource : better meaning for reject/validate

This commit is contained in:
Fabien BOURGEOIS 2018-02-18 16:42:29 +01:00
parent 8c59738e3b
commit 3fbb3fe187
4 changed files with 5 additions and 5 deletions

View File

@ -20,7 +20,7 @@
'name': 'GOLEM non-profit resources',
'summary': 'GOLEM resources management',
'description': ''' GOLEM resources management ''',
'version': '10.0.1.3.0',
'version': '10.0.1.4.0',
'category': 'GOLEM',
'author': 'Youssef El Ouahby, Fabien Bourgeois',
'license': 'AGPL-3',

View File

@ -54,7 +54,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<group>
<field name="name" />
<field name="type_id" />
<field name="product_tmpl_id" options="{'no_create': true}" />
<field name="product_tmpl_id" options="{'no_create': True}" />
</group>
<group>
<field name="validation_required" />

View File

@ -28,9 +28,9 @@ class GolemReservationRejectionWizard(models.TransientModel):
reason = fields.Text(required=True)
@api.multi
def validate(self):
def reject(self):
""" Sets reservation status to rejected and add reason """
self.ensure_one()
rejection = self[0]
rejection.reservation_id.write({'status': 'rejected',
rejection.reservation_id.write({'state': 'rejected',
'rejection_reason': rejection.reason})

View File

@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<field name="reason" />
</group>
<footer>
<button name="validate" string="Validate" type="object"
<button name="reject" string="Reject" type="object"
class="oe_highlight" />
<button string="Cancel" class="oe_link" special="cancel" />
</footer>