security group updated
This commit is contained in:
parent
b916b0feea
commit
06286495ce
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<data noupdate="0">
|
<data noupdate="0">
|
||||||
<record id="group_proforma_sales" model="res.groups">
|
<record id="group_proforma_sales_dashboard" model="res.groups">
|
||||||
<field name="name">Samashti Dashboard </field>
|
<field name="name">Samashti Dashboard </field>
|
||||||
<field name="category_id" ref="base.module_category_hidden"/>
|
<field name="category_id" ref="base.module_category_hidden"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
|
||||||
|
|
@ -10,5 +10,5 @@
|
||||||
<menuitem id="samashti_dashboard_root"
|
<menuitem id="samashti_dashboard_root"
|
||||||
name="Overview"
|
name="Overview"
|
||||||
action="samashti_action_dashboards"
|
action="samashti_action_dashboards"
|
||||||
sequence="-100" groups="base.group_user"/>
|
sequence="-100" groups="dashboard.group_proforma_sales_dashboard"/>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
@ -10,9 +10,9 @@ class StockPicking(models.Model):
|
||||||
def _action_done(self):
|
def _action_done(self):
|
||||||
res = super(StockPicking, self)._action_done()
|
res = super(StockPicking, self)._action_done()
|
||||||
for rec in self:
|
for rec in self:
|
||||||
if rec.purchase_id and rec.picking_type_id.code == 'incoming':
|
if rec.picking_type_id.code == 'incoming':
|
||||||
grn = self.env['grn'].search([('picking_id', '=', rec.id)])
|
grn = self.env['grn'].search([('picking_id', '=', rec.id)])
|
||||||
if not grn:
|
if not grn and rec.purchase_id:
|
||||||
grn_data = {
|
grn_data = {
|
||||||
'vendor_id':rec.partner_id.id,
|
'vendor_id':rec.partner_id.id,
|
||||||
'date':fields.Datetime.now(),
|
'date':fields.Datetime.now(),
|
||||||
|
|
@ -32,7 +32,10 @@ class StockPicking(models.Model):
|
||||||
new_grn.picking_id = rec
|
new_grn.picking_id = rec
|
||||||
new_grn.state = 'done'
|
new_grn.state = 'done'
|
||||||
rec.purchase_id.grn_ids |= new_grn
|
rec.purchase_id.grn_ids |= new_grn
|
||||||
elif grn and grn.state != 'done':
|
if grn and grn.state != 'done':
|
||||||
|
for line in rec.move_ids:
|
||||||
|
if line.quantity != grn.grn_line_ids.filtered(lambda x:x.product_id == line.product_id).quantity:
|
||||||
|
grn.grn_line_ids.filtered(lambda x: x.product_id == line.product_id).quantity = line.quantity
|
||||||
grn.state = 'done'
|
grn.state = 'done'
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue