The main change is we use SO and not analytic account anymore to reinvoice expense. When encoding an expense, each employee can directly set the SO to allow re-invoicing the expense to a client. Before this commit, this was done by determining the SO based on the Analytic Account (magically) on the expense. This solution is less confusing and more explicit for the end user. This commit also bring usability improvements to improve user experience during this flow: - better expense product view - access group on menu items - ...
20 lines
738 B
XML
20 lines
738 B
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<data noupdate="1">
|
|
|
|
<!-- Required simply to set SO on expense before submitting. Used to avoid crash on name_get/name_search -->
|
|
<record id="sale_order_rule_expense_user" model="ir.rule">
|
|
<field name="name">Expense Employee can read confirmed SO</field>
|
|
<field ref="sale.model_sale_order" name="model_id"/>
|
|
<field name="domain_force">[('state', '=', 'sale')]</field>
|
|
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
|
|
<field name="perm_read" eval="True"/>
|
|
<field name="perm_write" eval="False"/>
|
|
<field name="perm_create" eval="False"/>
|
|
<field name="perm_unlink" eval="False"/>
|
|
</record>
|
|
|
|
</data>
|
|
</odoo>
|