Skip to content

Commit

Permalink
[ADD] purchase_request: improve ui interface.
Browse files Browse the repository at this point in the history
Add button to tree view of purchase request lines to allow to generate RFQ without clicking in action button.
Define correct group to field analytic_tag_ids from group_analytic_accounting to group_analytic_tags.
Add button to form view of purchase request lines to allow to generate RFQ without clikcing in action button.
Allow to show the print button in purchase requests, the report existed but it didn't have the binding model.
  • Loading branch information
alan196 committed Jul 20, 2023
1 parent bd492e6 commit 8d1ec66
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
25 changes: 20 additions & 5 deletions purchase_request/views/purchase_request_line_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
decoration-muted="cancelled == True"
decoration-info="request_state in ('draft', 'to_approve')"
>
<header>
<button
name="%(action_purchase_request_line_make_purchase_order)d"
string="Create RFQ"
type="action"
class="oe_highlight"
/>
</header>
<field name="request_id" />
<field
name="request_state"
Expand Down Expand Up @@ -46,7 +54,7 @@
/>
<field
name="analytic_tag_ids"
groups="analytic.group_analytic_accounting"
groups="analytic.group_analytic_tags"
widget="many2many_tags"
/>
<field name="supplier_id" />
Expand All @@ -69,6 +77,13 @@
<field name="arch" type="xml">
<form string="Purchase Request Line" create="false" duplicate="false">
<header>
<button
name="%(action_purchase_request_line_make_purchase_order)d"
string="Create RFQ"
type="action"
class="oe_highlight"
attrs="{'invisible': [('request_state', '!=', 'approved')]}"
/>
<field name="request_state" widget="statusbar" />
</header>
<sheet>
Expand Down Expand Up @@ -136,9 +151,9 @@
/>
<field
name="analytic_tag_ids"
groups="analytic.group_analytic_accounting"
widget="many2many_tags"
groups="analytic.group_analytic_tags"
attrs="{'readonly': [('is_editable','=', False)]}"
widget="many2many_tags"
/>
<field
name="date_required"
Expand Down Expand Up @@ -589,9 +604,9 @@
/>
<field
name="analytic_tag_ids"
widget="many2many_tags"
groups="analytic.group_analytic_accounting"
groups="analytic.group_analytic_tags"
attrs="{'readonly': [('is_editable','=', False)]}"
widget="many2many_tags"
/>
<field
name="date_required"
Expand Down
2 changes: 2 additions & 0 deletions purchase_request/views/purchase_request_report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
<field name="report_type">qweb-pdf</field>
<field name="report_name">purchase_request.report_purchase_request</field>
<field name="report_file">purchase_request.report_purchase_request</field>
<field name="binding_model_id" ref="purchase_request.model_purchase_request" />
<field name="binding_type">report</field>
</record>
</odoo>
2 changes: 1 addition & 1 deletion purchase_request/views/purchase_request_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
/>
<field
name="analytic_tag_ids"
groups="analytic.group_analytic_accounting"
groups="analytic.group_analytic_tags"
widget="many2many_tags"
/>
<field name="date_required" />
Expand Down

0 comments on commit 8d1ec66

Please sign in to comment.