Merge pull request #342 from expsa/dev_odex25_accounting
Dev odex25 accounting
This commit is contained in:
commit
faf784899a
|
|
@ -3,14 +3,14 @@
|
|||
<data>
|
||||
<record id="group_budget_user" model="res.groups">
|
||||
<field name="name">Budget User</field>
|
||||
<field name="category_id" ref="base.module_category_accounting_and_finance"/>
|
||||
<!-- <field name="category_id" ref="base.module_category_accounting_and_finance"/>-->
|
||||
<field name="implied_ids" eval="[(4, ref('analytic.group_analytic_accounting')),
|
||||
(4, ref('account.group_account_user'))]"/>
|
||||
</record>
|
||||
|
||||
<record id="group_department_manager_budget" model="res.groups">
|
||||
<field name="name">Budget Department Manager</field>
|
||||
<field name="category_id" ref="base.module_category_accounting_and_finance"/>
|
||||
<!-- <field name="category_id" ref="base.module_category_accounting_and_finance"/>-->
|
||||
<field name="implied_ids" eval="[(4, ref('account_budget_custom.group_budget_user'))]"/>
|
||||
|
||||
<!-- <field name="implied_ids" eval="[(4, ref('analytic.group_analytic_accounting')),(4, ref('account.group_account_user'))]"/> -->
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
<record id="group_manager_budget" model="res.groups">
|
||||
<field name="name">Budget Executive Director</field>
|
||||
<field name="category_id" ref="base.module_category_accounting_and_finance"/>
|
||||
<!-- <field name="category_id" ref="base.module_category_accounting_and_finance"/>-->
|
||||
<field name="implied_ids" eval="[(4, ref('account_budget_custom.group_budget_user'))]"/>
|
||||
</record>
|
||||
|
||||
|
|
|
|||
|
|
@ -249,12 +249,11 @@ class AccountPayment(models.Model):
|
|||
|
||||
def action_post(self):
|
||||
''' update petty cash expenses state '''
|
||||
if self.payment_petty_cash_id:
|
||||
self.payment_petty_cash_id.write({'state': 'done'})
|
||||
if self.petty_cash_id:
|
||||
self.petty_cash_id.write({'is_paid': True})
|
||||
print("petty_cash_remaining",self.petty_cash_id.petty_cash_remaining)
|
||||
print("amount",self.amount)
|
||||
for rec in self:
|
||||
if rec.payment_petty_cash_id:
|
||||
rec.payment_petty_cash_id.write({'state': 'done'})
|
||||
if rec.petty_cash_id:
|
||||
rec.petty_cash_id.write({'is_paid': True})
|
||||
return super().action_post()
|
||||
|
||||
def _prepare_move_line_default_vals(self, write_off_line_vals=None):
|
||||
|
|
|
|||
Loading…
Reference in New Issue