security group updated
This commit is contained in:
parent
b916b0feea
commit
06286495ce
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<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="category_id" ref="base.module_category_hidden"/>
|
||||
</record>
|
||||
|
|
|
|||
|
|
@ -10,5 +10,5 @@
|
|||
<menuitem id="samashti_dashboard_root"
|
||||
name="Overview"
|
||||
action="samashti_action_dashboards"
|
||||
sequence="-100" groups="base.group_user"/>
|
||||
sequence="-100" groups="dashboard.group_proforma_sales_dashboard"/>
|
||||
</odoo>
|
||||
|
|
@ -10,9 +10,9 @@ class StockPicking(models.Model):
|
|||
def _action_done(self):
|
||||
res = super(StockPicking, self)._action_done()
|
||||
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)])
|
||||
if not grn:
|
||||
if not grn and rec.purchase_id:
|
||||
grn_data = {
|
||||
'vendor_id':rec.partner_id.id,
|
||||
'date':fields.Datetime.now(),
|
||||
|
|
@ -32,7 +32,10 @@ class StockPicking(models.Model):
|
|||
new_grn.picking_id = rec
|
||||
new_grn.state = 'done'
|
||||
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'
|
||||
return res
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue