-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] condominium: PR review changes
- Loading branch information
Showing
24 changed files
with
137 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<odoo> | ||
<record id="base_automation_1" model="base.automation"> | ||
<field name="name">Set Condominiums on Partner</field> | ||
<field name="model_id" ref="units_property_model"/> | ||
<field name="trigger">on_create_or_write</field> | ||
</record> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,39 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<odoo> | ||
<record id="ir_act_server_691" model="ir.actions.server"> | ||
<record id="ir_act_server_split_per_property" model="ir.actions.server"> | ||
<field name="name">Split per Property</field> | ||
<field name="state">code</field> | ||
<field name="model_id" ref="sale.model_sale_order"/> | ||
<field name="code"><![CDATA[for property in record.partner_id.x_condominium_units_ids: | ||
record['state'] = 'cancel' | ||
new_so = record.copy() | ||
new_so['x_source_sales_order'] = record.id | ||
new_so['partner_id'] = property.x_partner_id.id | ||
new_so['x_property_id'] = property | ||
for sol in new_so.order_line: | ||
sol['price_unit'] = sol.price_unit * property.x_area_percent]]> | ||
</field> | ||
<field name="code"><![CDATA[ | ||
for property in record.partner_id.x_condominium_units_ids: | ||
record['state'] = 'cancel' | ||
new_so = record.copy() | ||
new_so['x_source_sales_order'] = record.id | ||
new_so['partner_id'] = property.x_partner_id.id | ||
new_so['x_property_id'] = property | ||
for sol in new_so.order_line: | ||
sol['price_unit'] = sol.price_unit * property.x_area_percent | ||
]]></field> | ||
</record> | ||
<record id="ir_act_server_749" model="ir.actions.server"> | ||
<field name="name">Confirm</field> | ||
<field name="state">code</field> | ||
<field name="model_id" ref="sale.model_sale_order"/> | ||
<field name="binding_model_id" ref="sale.model_sale_order"/> | ||
<field name="code"><![CDATA[for so in records: | ||
so.action_confirm()]]></field> | ||
<field name="code"><![CDATA[ | ||
for so in records: | ||
so.action_confirm() | ||
]]></field> | ||
</record> | ||
<record id="ir_act_server_757" model="ir.actions.server"> | ||
<field name="name">Execute Code</field> | ||
<field name="state">code</field> | ||
<field name="base_automation_id" ref="base_automation_1"/> | ||
<field name="model_id" ref="units_property_model"/> | ||
<field name="code"><![CDATA[for unit in records: | ||
condominiums_ids = unit.x_partner_id.x_units_owner_ids.x_condominium_id | ||
unit.x_partner_id['x_condominiums_ids'] = [(6, 0, condominiums_ids.ids)]]]></field> | ||
<field name="code"><![CDATA[ | ||
for unit in records: | ||
condominiums_ids = unit.x_partner_id.x_units_owner_ids.x_condominium_id | ||
unit.x_partner_id['x_condominiums_ids'] = [(6, 0, condominiums_ids.ids)] | ||
]]></field> | ||
</record> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.