Browse Source

[FIX] task 0039 : Access right for user

pull/14/head
Thibault Francois 8 years ago
parent
commit
af42bd8f53
  1. 1
      beesdoo_pos/models/beesdoo_pos.py
  2. 2
      beesdoo_pos/security/ir.model.access.csv

1
beesdoo_pos/models/beesdoo_pos.py

@ -54,6 +54,7 @@ class BeescoopPosPartner(models.Model):
@api.multi @api.multi
def get_balance_and_eater(self): def get_balance_and_eater(self):
self.ensure_one() self.ensure_one()
self = self.sudo()
account_id = self.property_account_receivable_id.id account_id = self.property_account_receivable_id.id
move_lines = self.env['account.move.line'].search([('account_id', '=', account_id), ('partner_id', '=', self.id)]) move_lines = self.env['account.move.line'].search([('account_id', '=', account_id), ('partner_id', '=', self.id)])
credit = sum([m.credit for m in move_lines]) credit = sum([m.credit for m in move_lines])

2
beesdoo_pos/security/ir.model.access.csv

@ -2,4 +2,4 @@
"bill_value_read_all","Read All","beesdoo_pos.model_bill_value","","True","False","False","False" "bill_value_read_all","Read All","beesdoo_pos.model_bill_value","","True","False","False","False"
"bill_value_accountant_all","All Comptable","beesdoo_pos.model_bill_value","account.group_account_user","True","True","True","True" "bill_value_accountant_all","All Comptable","beesdoo_pos.model_bill_value","account.group_account_user","True","True","True","True"
"bill_value_pos_manager_all","All POS manager","beesdoo_pos.model_bill_value","point_of_sale.group_pos_manager","True","True","True","True" "bill_value_pos_manager_all","All POS manager","beesdoo_pos.model_bill_value","point_of_sale.group_pos_manager","True","True","True","True"
"account_bank_statement_cashbox POS responsible Export","account.bank.statement.cashbox POS responsible Export","account.model_account_bank_statement_cashbox","point_of_sale.group_pos_manager","True","True","True","False"
"account_bank_statement_cashbox POS user","account.bank.statement.cashbox POS User","account.model_account_bank_statement_cashbox","point_of_sale.group_pos_user","True","True","True","False"
Loading…
Cancel
Save