Merge pull request #2194 from expsa/fix_issues_inexpenses
Fix issues in expenses and accounting
This commit is contained in:
commit
6eb9480588
|
|
@ -6,7 +6,7 @@
|
|||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='ref']" position="before">
|
||||
<xpath expr="//field[@name='payment_reference']" position="before">
|
||||
<field name="seq" readonly="1" force_save="1"/>
|
||||
</xpath>
|
||||
</field>
|
||||
|
|
|
|||
|
|
@ -58,9 +58,9 @@ class AccountMove(models.Model):
|
|||
def action_submit_expenses(self):
|
||||
for record in self:
|
||||
if record.analytic_account_id.is_analytic_budget:
|
||||
if record.state == 'draft':
|
||||
record.write({'state': 'confirm'})
|
||||
elif record.state == 'confirm' and not record.is_approve:
|
||||
# if record.state == 'draft':
|
||||
# record.write({'state': 'confirm'})
|
||||
if record.state == 'confirm' and not record.is_approve:
|
||||
raise UserError(_('Please Check Budget First'))
|
||||
elif record.state == 'confirm' and record.is_approve:
|
||||
break
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@
|
|||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='invoice_date']" position="after">
|
||||
<field name="is_petty_paid" readonly="1"/>
|
||||
<field name="petty_employee_id" readonly="1"/>
|
||||
<field name="is_petty_paid" readonly="1" attrs="{'invisible': [('move_type', '!=','in_invoice')]}"/>
|
||||
<field name="petty_employee_id" readonly="1" attrs="{'invisible': [('move_type', '!=','in_invoice')]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
|||
Loading…
Reference in New Issue