Browse Source

[IMP] add status and source field and default value to trace from where

a subscription request has been created
pull/1/head
houssine 7 years ago
parent
commit
0ea59cc854
  1. 4
      easy_my_coop/models/coop.py
  2. 6
      easy_my_coop/view/operation_request_view.xml

4
easy_my_coop/models/coop.py

@ -125,6 +125,7 @@ class subscription_request(models.Model):
state = fields.Selection([('draft','Draft'),
('block','Blocked'),
('done','Done'),
('transfer','Transfer'),
('cancelled','Cancelled'),
('paid','paid')],
string='State',required=True, default="draft")
@ -175,7 +176,8 @@ class subscription_request(models.Model):
help="Keep empty to use the current date", copy=False)
source = fields.Selection([('website','Website'),
('crm','CRM'),
('manual','Manual')], string="Source", default="website")
('manual','Manual'),
('operation','Operation')], string="Source", default="website")
_order = "id desc"
# declare this function in order to be overriden

6
easy_my_coop/view/operation_request_view.xml

@ -48,7 +48,7 @@
</group>
</group>
<group>
<field name="subscription_request" attrs="{'invisible':['|',('operation_type','!=','transfer'),('receiver_not_member','=',False)]}" context="{'default_is_operation': True, 'default_share_product_id': share_product_id}">
<field name="subscription_request" attrs="{'invisible':['|',('operation_type','!=','transfer'),('receiver_not_member','=',False)]}" context="{'default_is_operation': True, 'default_ordered_parts':quantity,'default_share_product_id': share_product_id, 'default_state':'transfer','default_source':'operation'}">
<tree>
<field name="name"/>
<field name="no_registre"/>
@ -79,6 +79,10 @@
<field name="lang"/>
<field name="validated"/>
<field name="skip_control_ng"/>
<field name="ordered_parts" invisible="True"/>
<field name="source" invisible="True"/>
<field name="state" invisible="True"/>
<field name="share_product_id" invisible="True"/>
</group>
</group>
</sheet>

Loading…
Cancel
Save