mirror of
https://github.com/bringout/odoomates.git
synced 2026-04-23 14:52:08 +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
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue