mirror of
https://github.com/bringout/odoomates.git
synced 2026-04-18 03:32:06 +02:00
fix: 19.0 compatibility for accounting_pdf_reports, om_account_budget, om_recurring_payments
- Convert attrs dict to inline attributes (invisible/readonly/required)
- Convert states attribute to invisible conditions
- Remove deprecated numbercall from ir.cron
- Remove deprecated domain from account.budget.post
- Fix group assignments in security XML
- Fix search view group-by references
🤖 assisted by claude
This commit is contained in:
parent
348f7abe95
commit
5e769f4b39
9 changed files with 44 additions and 69 deletions
|
|
@ -22,15 +22,15 @@
|
|||
</group>
|
||||
<notebook>
|
||||
<page string="Report"
|
||||
attrs="{'invisible': [('type','not in',['accounts','account_type', 'account_report'])]}">
|
||||
invisible="type not in ('accounts', 'account_type', 'account_report')">
|
||||
<group>
|
||||
<field name="display_detail"
|
||||
attrs="{'invisible': [('type','not in',['accounts','account_type'])]}"/>
|
||||
invisible="type not in ('accounts', 'account_type')"/>
|
||||
<field name="account_report_id"
|
||||
attrs="{'invisible': [('type', '!=', 'account_report')]}"/>
|
||||
invisible="type != 'account_report'"/>
|
||||
</group>
|
||||
<field name="account_ids" attrs="{'invisible': [('type', '!=', 'accounts')]}"/>
|
||||
<field name="account_type_ids" attrs="{'invisible': [('type', '!=', 'account_type')]}"/>
|
||||
<field name="account_ids" invisible="type != 'accounts'"/>
|
||||
<field name="account_type_ids" invisible="type != 'account_type'"/>
|
||||
</page>
|
||||
<page string="Childrens">
|
||||
<field name="children_ids" nolabel="1">
|
||||
|
|
@ -64,10 +64,10 @@
|
|||
<field name="type"/>
|
||||
<field name="account_report_id"/>
|
||||
<filter string="Reports" name="filter_parent_id" domain="[('parent_id','=', False)]"/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter name="parent_report" string="Parent Report" domain=""
|
||||
<group>
|
||||
<filter name="parent_report" string="Parent Report"
|
||||
context="{'group_by':'parent_id'}"/>
|
||||
<filter name="report_type" string="Report Type" domain="[]" context="{'group_by':'type'}"/>
|
||||
<filter name="report_type" string="Report Type" context="{'group_by':'type'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
|
|
|||
|
|
@ -78,18 +78,18 @@
|
|||
</field>
|
||||
<field name="target_move" position="after">
|
||||
<field name="enable_filter"/>
|
||||
<field name="debit_credit" attrs="{'invisible': [('enable_filter','=',True)]}"/>
|
||||
<field name="debit_credit" invisible="enable_filter == True"/>
|
||||
</field>
|
||||
<field name="journal_ids" position="after">
|
||||
<notebook tabpos="up" colspan="4">
|
||||
<page string="Comparison" name="comparison" attrs="{'invisible': [('enable_filter','=',False)]}">
|
||||
<page string="Comparison" name="comparison" invisible="enable_filter == False">
|
||||
<group>
|
||||
<field name="label_filter" attrs="{'required': [('enable_filter', '=', True)]}"/>
|
||||
<field name="label_filter" required="enable_filter == True"/>
|
||||
<field name="filter_cmp"/>
|
||||
</group>
|
||||
<group string="Dates" attrs="{'invisible':[('filter_cmp', '!=', 'filter_date')]}">
|
||||
<field name="date_from_cmp" attrs="{'required':[('filter_cmp', '=', 'filter_date')]}"/>
|
||||
<field name="date_to_cmp" attrs="{'required':[('filter_cmp', '=', 'filter_date')]}"/>
|
||||
<group string="Dates" invisible="filter_cmp != 'filter_date'">
|
||||
<field name="date_from_cmp" required="filter_cmp == 'filter_date'"/>
|
||||
<field name="date_to_cmp" required="filter_cmp == 'filter_date'"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
|
|
|
|||
|
|
@ -40,23 +40,6 @@
|
|||
action="action_account_partner_ledger_menu"
|
||||
groups="account.group_account_invoice"/>
|
||||
|
||||
<!-- Add to Partner Print button -->
|
||||
<record id="action_partner_report_partnerledger" model="ir.actions.act_window">
|
||||
<field name="name">Balance Statement (Partner Ledger)</field>
|
||||
<field name="res_model">account.report.partner.ledger</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="account_report_partner_ledger_view" />
|
||||
<field name="target">new</field>
|
||||
<field name="binding_model_id" ref="base.model_res_partner" />
|
||||
<field name="binding_type">report</field>
|
||||
<field name="context">{
|
||||
'default_partner_ids':active_ids,
|
||||
'default_target_move': 'posted',
|
||||
'default_result_selection': 'customer_supplier',
|
||||
'default_reconciled': True,
|
||||
'hide_partner':1,
|
||||
}</field>
|
||||
<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
|
||||
</record>
|
||||
<!-- Partner Print button binding removed for 19.0 compatibility -->
|
||||
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -13,8 +13,7 @@ class AccountBudgetPost(models.Model):
|
|||
_description = "Budgetary Position"
|
||||
|
||||
name = fields.Char('Name', required=True)
|
||||
account_ids = fields.Many2many('account.account', 'account_budget_rel', 'budget_id', 'account_id', 'Accounts',
|
||||
domain=[('deprecated', '=', False)])
|
||||
account_ids = fields.Many2many('account.account', 'account_budget_rel', 'budget_id', 'account_id', 'Accounts')
|
||||
company_id = fields.Many2one('res.company', 'Company', required=True, default=lambda self: self.env.company)
|
||||
|
||||
def _check_account_ids(self, vals):
|
||||
|
|
|
|||
|
|
@ -23,13 +23,7 @@
|
|||
<field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>
|
||||
</record>
|
||||
|
||||
<record model="res.users" id="base.user_root">
|
||||
<field eval="[(4,ref('analytic.group_analytic_accounting'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record model="res.users" id="base.user_admin">
|
||||
<field eval="[(4,ref('analytic.group_analytic_accounting'))]" name="groups_id"/>
|
||||
</record>
|
||||
<!-- Analytic accounting group assignment removed for 19.0 - managed by account module -->
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -65,34 +65,34 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Budget">
|
||||
<header>
|
||||
<button string="Confirm" name="action_budget_confirm" states="draft" type="object"
|
||||
<button string="Confirm" name="action_budget_confirm" invisible="state != 'draft'" type="object"
|
||||
class="oe_highlight"/>
|
||||
<button string="Approve" name="action_budget_validate" states="confirm" type="object"
|
||||
<button string="Approve" name="action_budget_validate" invisible="state != 'confirm'" type="object"
|
||||
class="oe_highlight"/>
|
||||
<button string="Done" name="action_budget_done" states="validate" type="object"
|
||||
<button string="Done" name="action_budget_done" invisible="state != 'validate'" type="object"
|
||||
class="oe_highlight"/>
|
||||
<button string="Reset to Draft" name="action_budget_draft" states="cancel" type="object"/>
|
||||
<button string="Cancel Budget" name="action_budget_cancel" states="confirm,validate" type="object"/>
|
||||
<button string="Reset to Draft" name="action_budget_draft" invisible="state != 'cancel'" type="object"/>
|
||||
<button string="Cancel Budget" name="action_budget_cancel" invisible="state not in ('confirm', 'validate')" type="object"/>
|
||||
<field name="state" widget="statusbar" />
|
||||
</header>
|
||||
<sheet string="Budget">
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1>
|
||||
<field name="name" attrs="{'readonly':[('state','!=','draft')]}" placeholder="Budget Name"/>
|
||||
<field name="name" readonly="state != 'draft'" placeholder="Budget Name"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="user_id" attrs="{'readonly':[('state','!=','draft')]}"/>
|
||||
<field name="user_id" readonly="state != 'draft'"/>
|
||||
</group>
|
||||
<group>
|
||||
<label for="date_from" string="Period"/>
|
||||
<div>
|
||||
<field name="date_from" class="oe_inline"
|
||||
attrs="{'readonly':[('state','!=','draft')]}"/>
|
||||
readonly="state != 'draft'"/>
|
||||
-
|
||||
<field name="date_to" class="oe_inline" attrs="{'readonly':[('state','!=','draft')]}"
|
||||
<field name="date_to" class="oe_inline" readonly="state != 'draft'"
|
||||
nolabel="1"/>
|
||||
</div>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
||||
|
|
@ -102,7 +102,7 @@
|
|||
<page string="Budget Lines">
|
||||
<field name="crossovered_budget_line"
|
||||
context="{'default_date_from': date_from,'default_date_to': date_to}" colspan="4"
|
||||
nolabel="1" attrs="{'readonly':[('state','!=','draft')]}">
|
||||
nolabel="1" readonly="state != 'draft'">
|
||||
<list string="Budget Lines" decoration-success="is_above_budget and planned_amount > 0" decoration-danger="is_above_budget and planned_amount < 0" editable="bottom">
|
||||
<field name="general_budget_id"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
|
|
@ -300,28 +300,28 @@
|
|||
<field name="currency_id" invisible="1"/>
|
||||
<field name="crossovered_budget_state" invisible="1"/>
|
||||
<field name="crossovered_budget_id"
|
||||
attrs="{'readonly':[('crossovered_budget_state','!=','draft')]}"/>
|
||||
readonly="crossovered_budget_state != 'draft'"/>
|
||||
<field name="analytic_account_id"
|
||||
attrs="{'readonly':[('crossovered_budget_state','!=','draft')]}"/>
|
||||
readonly="crossovered_budget_state != 'draft'"/>
|
||||
<field name="general_budget_id"
|
||||
attrs="{'readonly':[('crossovered_budget_state','!=','draft')]}"/>
|
||||
readonly="crossovered_budget_state != 'draft'"/>
|
||||
<field name="date_from"
|
||||
attrs="{'readonly':[('crossovered_budget_state','!=','draft')]}"/>
|
||||
readonly="crossovered_budget_state != 'draft'"/>
|
||||
<field name="date_to"
|
||||
attrs="{'readonly':[('crossovered_budget_state','!=','draft')]}"/>
|
||||
readonly="crossovered_budget_state != 'draft'"/>
|
||||
<field name="paid_date"
|
||||
attrs="{'readonly':[('crossovered_budget_state','!=','draft')]}"/>
|
||||
readonly="crossovered_budget_state != 'draft'"/>
|
||||
<field name="planned_amount"
|
||||
attrs="{'readonly':[('crossovered_budget_state','!=','draft')]}"/>
|
||||
readonly="crossovered_budget_state != 'draft'"/>
|
||||
<field name="practical_amount"
|
||||
attrs="{'readonly':[('crossovered_budget_state','!=','draft')]}"/>
|
||||
readonly="crossovered_budget_state != 'draft'"/>
|
||||
<field name="theoritical_amount"
|
||||
attrs="{'readonly':[('crossovered_budget_state','!=','draft')]}"/>
|
||||
readonly="crossovered_budget_state != 'draft'"/>
|
||||
<field name="percentage" widget="percentage"
|
||||
attrs="{'readonly':[('crossovered_budget_state','!=','draft')]}"/>
|
||||
readonly="crossovered_budget_state != 'draft'"/>
|
||||
<field name="company_id" options="{'no_create': True}"
|
||||
groups="base.group_multi_company"
|
||||
attrs="{'readonly':[('crossovered_budget_state','!=','draft')]}"/>
|
||||
readonly="crossovered_budget_state != 'draft'"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
<field name="code">model.action_generate_payment()</field>
|
||||
<field name='interval_number'>1</field>
|
||||
<field name='interval_type'>days</field>
|
||||
<field name="numbercall">-1</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Recurring Payment">
|
||||
<header>
|
||||
<button name="action_done" states="draft" string="Done" type="object"
|
||||
<button name="action_done" invisible="state != 'draft'" string="Done" type="object"
|
||||
class="oe_highlight"/>
|
||||
<button name="action_draft" states="done" string="Set To Draft"
|
||||
<button name="action_draft" invisible="state != 'done'" string="Set To Draft"
|
||||
type="object"/>
|
||||
<field name="state" widget="statusbar"/>
|
||||
</header>
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
<group>
|
||||
<group>
|
||||
<h1>
|
||||
<field name="name" attrs="{'invisible': [('name','=', False)]}"/>
|
||||
<field name="name" invisible="not name"/>
|
||||
</h1>
|
||||
</group>
|
||||
</group>
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
<field name="state" widget="badge"/>
|
||||
<button name="action_create_payment" type="object"
|
||||
string="Create Payment"
|
||||
attrs="{'invisible': [('state', '=', 'done')]}"/>
|
||||
invisible="state == 'done'"/>
|
||||
</list>
|
||||
<form string="Recurring Payment Line" edit="0">
|
||||
<group>
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Recurring Template">
|
||||
<header>
|
||||
<button name="action_done" states="draft" string="Confirm" type="object" class="oe_highlight"/>
|
||||
<button name="action_draft" states="done" string="Set To Draft" type="object"/>
|
||||
<button name="action_done" invisible="state != 'draft'" string="Confirm" type="object" class="oe_highlight"/>
|
||||
<button name="action_draft" invisible="state != 'done'" string="Set To Draft" type="object"/>
|
||||
<field name="state" widget="statusbar"/>
|
||||
</header>
|
||||
<sheet>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue