work on sales flow

This commit is contained in:
sonal arora
2020-09-06 11:48:16 +05:30
parent c6c3d2bee4
commit f74c57a32a
3 changed files with 16 additions and 8 deletions

View File

@@ -6,7 +6,7 @@ from odoo import api, fields, models, SUPERUSER_ID, _
PURCHASE_REQUISITION_STATES = [
('draft', 'New'),
('approval', 'Pending PC Validation'),
('approval', 'Submitted To PC'),
('validate_by_pc','Validated By PC'),
('manager_approval','Submitted To MGT'),
('approved','Approved By MGT'),
@@ -19,12 +19,22 @@ PURCHASE_REQUISITION_STATES = [
class purchase_requisition(models.Model):
_inherit = "purchase.requisition"
def _check_store_keeper(self):
has_vle_group = self.env.user.has_group(
'csc_administrator.group_vle_level')
self.state_blanket_order = self.state
state = fields.Selection(PURCHASE_REQUISITION_STATES,
'Status', tracking=True, required=True,
copy=False, default='draft')
state_blanket_order = fields.Selection(PURCHASE_REQUISITION_STATES, compute='_set_state')
# store_keeper_visibility = fields.Boolean("Visibility",default='_check_store_keeper')
# @api.depends('state')
# def _check_store_keeper(self):
# self.state_blanket_order = self.state
@api.depends('state')
def _set_state(self):