Skip to content

Commit

Permalink
[FIX] sale_timesheet: visibility attrs on Sale Order button
Browse files Browse the repository at this point in the history
This is a fix of this fix: odoo#73239

As the button has been moved to another module, the attrs were less coherent with the current (sale_timesheet) module.
An inheritance was made to add the correct attrs when this module is installed.

opw-2530161

closes odoo#74192

X-original-commit: 4ea0cdd
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Signed-off-by: prro-odoo <proose@users.noreply.github.com>
  • Loading branch information
proose committed Jul 26, 2021
1 parent 1eeab1e commit e865961
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions addons/sale_timesheet/views/project_task_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<xpath expr="//button[@name='%(project.action_project_task_burndown_chart_report)d']" position="after">
<button string="Costs / Revenues" class="oe_stat_button" type="object" name="action_view_timesheet" icon="fa-puzzle-piece" attrs="{'invisible': [('allow_billable', '=', False)]}" groups="project.group_project_manager"/>
</xpath>
<xpath expr="//button[@name='action_view_so']" position="attributes">
<attribute name="attrs">{'invisible': ['|', ('allow_billable', '=', False), ('sale_order_id', '=', False)]}</attribute>
</xpath>
<xpath expr="//header" position="inside">
<button name="action_make_billable" string="Create Sales Order" type="object" attrs="{'invisible': [('display_create_order', '=', False)]}" groups="sales_team.group_sale_salesman"/>
</xpath>
Expand Down

0 comments on commit e865961

Please sign in to comment.