Skip to content

Commit

Permalink
[MIG] donation_base: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
esteveblanch committed Aug 15, 2024
1 parent b5d3e07 commit 1b2da34
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 41 deletions.
2 changes: 1 addition & 1 deletion donation_base/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
"name": "Donation Base",
"version": "16.0.2.0.0",
"version": "17.0.1.0.0",
"category": "Accounting",
"license": "AGPL-3",
"summary": "Base module for donations",
Expand Down
8 changes: 4 additions & 4 deletions donation_base/data/donation_mail_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<field name="partner_to">{{object.partner_id.id}}</field>
<field name="model_id" ref="donation_base.model_donation_tax_receipt" />
<field name="auto_delete" eval="False" />
<field name="report_template" ref="report_donation_tax_receipt" />
<field
name="report_name"
>{{object.company_id.name.replace(' ', '_')}}-Tax_Receipt_{{(object.number or '').replace('/','_')}}</field>
<field name="lang">{{object.partner_id.lang}}</field>
name="report_template_ids"
eval="[(4, ref('donation_base.report_donation_tax_receipt'))]"
/>
<field name="lang">{{object.partner_id.lang}}</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Expand Down
24 changes: 0 additions & 24 deletions donation_base/migrations/16.0.2.0.0/pre-migration.py

This file was deleted.

2 changes: 1 addition & 1 deletion donation_base/models/donation_tax_receipt.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def action_send_tax_receipt(self):
layout_xmlid = "donation_base.tax_receipt_email_template"
ctx = dict(
default_model=self._name,
default_res_id=self.id,
default_res_ids=[self.id],
default_use_template=bool(template),
default_template_id=template.id,
default_composition_mode="comment",
Expand Down
4 changes: 2 additions & 2 deletions donation_base/views/donation_tax_receipt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
options="{'datepicker': {'warn_future': true}}"
/>
<field name="print_date" />
<field name="currency_id" invisible="1" />
<field name="currency_id" column_invisible="1" />
<field name="amount" />
<field name="company_id" groups="base.group_multi_company" />
</group>
Expand Down Expand Up @@ -68,7 +68,7 @@
optional="show"
/>
<field name="amount" />
<field name="currency_id" invisible="1" />
<field name="currency_id" column_invisible="1" />
<field name="print_date" optional="show" />
<field
name="company_id"
Expand Down
4 changes: 2 additions & 2 deletions donation_base/views/product.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
<field name="inherit_id" ref="product.product_template_form_view" />
<field name="arch" type="xml">
<field name="detailed_type" position="after">
<!-- unfortunately, Odoo doesn't accept 'not like' in attrs -->
<!-- unfortunately, Python doesn't accept 'not like' -->
<field
name="tax_receipt_ok"
attrs="{'invisible': [('detailed_type', 'not in', ('donation', 'donation_in_kind_service', 'donation_in_kind_consu'))]}"
invisible="detailed_type not in ('donation', 'donation_in_kind_service', 'donation_in_kind_consu')"
/>
</field>
</field>
Expand Down
11 changes: 4 additions & 7 deletions donation_base/views/res_partner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<field name="name">Donation Tax Receipts</field>
<field name="res_model">donation.tax.receipt</field>
<field name="view_mode">tree,form,graph,pivot</field>
<field name="context">{'search_default_partner_id': active_id}</field>
<field name="context">{'search_default_partner_id': id}</field>
</record>
<record id="view_partner_property_form" model="ir.ui.view">
<field name="name">donation.tax.receipt.res.partner.form</field>
Expand All @@ -21,19 +21,16 @@
expr="//group[@name='fiscal_information']/field[@name='property_account_position_id']"
position="after"
>
<field
name="tax_receipt_option"
attrs="{'invisible': [('parent_id', '!=', False)]}"
/>
<field name="donor_rank" invisible="1" />
<field name="tax_receipt_option" invisible="parent_id != False" />
<field name="donor_rank" column_invisible="1" />
</xpath>
<xpath expr="//div[@name='button_box']" position="inside">
<button
id="donation_tax_receipt_button"
class="oe_stat_button"
type="action"
name="%(donation_base.partner_tax_receipt_action)d"
attrs="{'invisible': [('parent_id', '!=', False)]}"
invisible="parent_id != False"
icon="fa-file-text"
groups="account.group_account_invoice,account.group_account_readonly"
>
Expand Down

0 comments on commit 1b2da34

Please sign in to comment.