Browse Source

[PORT] porting improvement from v9

from https://github.com/coopiteasy/vertical-cooperative/pull/93
pull/94/head
houssine 5 years ago
parent
commit
4ff5c0fe49
  1. 2
      easy_my_coop/__manifest__.py
  2. 1
      easy_my_coop/models/operation_request.py
  3. 5
      easy_my_coop/views/operation_request_view.xml

2
easy_my_coop/__manifest__.py

@ -6,7 +6,7 @@
{
"name": "Easy My Coop",
"summary": "Manage your cooperative shares",
"version": "12.0.3.0.1",
"version": "12.0.3.0.2",
"depends": [
"base",
"web",

1
easy_my_coop/models/operation_request.py

@ -336,6 +336,7 @@ class OperationRequest(models.Model):
effective_date = self.effective_date
else:
effective_date = self.get_date_now()
self.effective_date = effective_date
sub_request = self.env["subscription.request"]
self.validate()

5
easy_my_coop/views/operation_request_view.xml

@ -7,6 +7,7 @@
<tree string="Operation requests"
colors="green:state in ('approved'); blue:state in ('draft');grey: state in ('done')">
<field name="request_date"/>
<field name="effective_date"/>
<field name="partner_id"/>
<field name="operation_type"/>
<field name="quantity"/>
@ -49,13 +50,13 @@
<field name="operation_type"
attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="receiver_not_member"
attrs="{'invisible':[('operation_type','!=','transfer')]}"/>
attrs="{'invisible':[('operation_type','!=','transfer')], 'readonly':[('state','!=','draft')]}"/>
<field name="partner_id"
options="{'no_create':True}"
attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="partner_id_to"
options="{'no_create':True}"
attrs="{'invisible':['|',('operation_type','!=','transfer'), ('receiver_not_member','=',True)]}"/>
attrs="{'invisible':['|',('operation_type','!=','transfer'), ('receiver_not_member','=',True)], 'readonly':[('state','!=','draft')]}"/>
</group>
<group>
<field name="user_id"/>

Loading…
Cancel
Save