Skip to content

Commit 3761e53

Browse files
committed
[IMP] condominium: cl-35
1 parent 3dd8a67 commit 3761e53

File tree

2 files changed

+4
-42
lines changed

2 files changed

+4
-42
lines changed

condominium/data/ir_actions_server.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ for line in property_id.x_owner_ids:
203203
owner = line.x_owner
204204
owner_id = owner.id
205205
if not line.x_end_date: property_id.write({'x_current_owner': owner_id})
206-
if owner: account = analytic_account.search([('x_property', '=', property_id.id), ('partner_id', '=', owner_id)], limit=1)
206+
account = analytic_account.search([('x_property', '=', property_id.id), ('partner_id', '=', owner_id)], limit=1)
207207
if not account and owner_id:
208208
line['x_account'] = analytic_account.create({'name': f"{property_id.x_name} - {owner.name}", 'x_property': property_id.id, 'partner_id': owner_id, 'x_owner_line': line.id}).id
209209
]]> </field>
@@ -292,7 +292,7 @@ else:
292292
periods_valid = bool(period_start) == bool(period_end)
293293
294294
if record.x_distribution_key.x_based_on == "Shares" and periods_valid:
295-
x_ratios = record.sudo().x_distribution_key.x_ratio_ids
295+
x_ratios = record.x_distribution_key.x_ratio_ids
296296
297297
for ratio in x_ratios.filtered(lambda l: l.x_ratio != 0):
298298
for account in ratio.x_property_ratios.x_account_ids:

condominium/data/ir_ui_view.xml

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,48 +1360,10 @@
13601360
<field name="name">x_distribution_key.search.condominium</field>
13611361
<field name="type">search</field>
13621362
</record>
1363-
<record id="view_account_invoice_filter_inherits" model="ir.ui.view">
1364-
<field name="arch" type="xml">
1365-
<data>
1366-
<xpath expr="/search[1]/filter[3]" position="replace"/>
1367-
<xpath expr="/search[1]/group[1]/filter[2]" position="replace"/>
1368-
<xpath expr="/search[1]/group[1]/filter[2]" position="after">
1369-
<filter name="distribution_key_group_by" string="Distribution Key" context="{'group_by': 'x_distribution_key'}"/>
1370-
</xpath>
1371-
<xpath expr="/search[1]/group[1]/filter[2]" position="replace"/>
1372-
<xpath expr="/search[1]/field[1]" position="after">
1373-
<field name="x_distribution_key"/>
1374-
</xpath>
1375-
<xpath expr="/search[1]/filter[2]" position="attributes">
1376-
<attribute name="domain">[("x_distribution_key", "=", False)]</attribute>
1377-
</xpath>
1378-
<xpath expr="/search[1]/filter[2]" position="after">
1379-
<filter name="filter_with_distribution" string="With distribution"/>
1380-
</xpath>
1381-
<xpath expr="/search[1]/filter[2]" position="attributes">
1382-
<attribute name="domain">[("x_distribution_key", "=", False)]</attribute>
1383-
</xpath>
1384-
<xpath expr="/search[1]/filter[3]" position="attributes">
1385-
<attribute name="domain">[("x_is_distributed", "=", True)]</attribute>
1386-
</xpath>
1387-
<xpath expr="/search[1]/filter[2]" position="attributes">
1388-
<attribute name="domain">[("x_is_distributed", "=", False)]</attribute>
1389-
</xpath>
1390-
<xpath expr="/search[1]/filter[3]" position="replace"/>
1391-
</data>
1392-
</field>
1393-
<field name="mode">extension</field>
1394-
<field name="inherit_id" ref="account.view_account_invoice_filter"/>
1395-
<field name="active" eval="True"/>
1396-
<field name="model">account.move</field>
1397-
<field name="name">account.move.search.condominium</field>
1398-
<field name="priority">1600</field>
1399-
<field name="type">search</field>
1400-
</record>
14011363
<record id="account_move_custom_form_view" model="ir.ui.view">
14021364
<field name="arch" type="xml">
14031365
<data>
1404-
<xpath expr="//form[1]/sheet[1]/notebook[1]" position="inside">
1366+
<xpath expr="//form/sheet/notebook" position="inside">
14051367
<page string="Distribution" name="distribution_page" invisible="False">
14061368
<group name="distribution_group">
14071369
<group name="distribution_group_left" string="Distribution">
@@ -1412,7 +1374,7 @@
14121374
</group>
14131375
</page>
14141376
</xpath>
1415-
<xpath expr="//button[@name='action_cancel_peppol_documents']" position="after">
1377+
<xpath expr="//form/header" position="inside">
14161378
<button string="Distribute Costs" name="%(distribute_costs)d" type="action"/>
14171379
</xpath>
14181380
<xpath expr="//field[@name='x_period_start']" position="attributes">

0 commit comments

Comments
 (0)