Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion my_compassion/controllers/my2_gifts.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ def render_donation_page(self, type="fund", **kwargs):
("my_compassion_donation_type", "=", type),
]

my_compassion_gifts = request.env["product.template"].search(domain)
my_compassion_gifts = request.env["product.template"].search(
domain, order="sequence"
)
return request.render(
"my_compassion.my2_gifts_page",
{
Expand Down
10 changes: 10 additions & 0 deletions my_compassion/views/product_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,14 @@
</xpath>
</field>
</record>
<record id="product_template_tree_view_my_compassion_order" model="ir.ui.view">
<field name="name">product.template.tree.my.compassion.order</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_tree_view" />
<field name="arch" type="xml">
<xpath expr="//tree" position="attributes">
<attribute name="default_order">sequence, default_code, name</attribute>
</xpath>
</field>
</record>
</odoo>