-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[12.0][IMP] Improved code as per @mayank's comment added undefine par…
…tner and set to customer_id.
- Loading branch information
1 parent
29deb3e
commit 61276df
Showing
6 changed files
with
45 additions
and
1 deletion.
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
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,25 @@ | ||
<odoo> | ||
<!-- Undefine Receivable Account --> | ||
<record id="undefine_receivable_account" model="account.account"> | ||
<field name="name">Undefine Receivable Account</field> | ||
<field name="code">100101</field> | ||
<field name="user_type_id" ref="account.data_account_type_receivable"/> | ||
<field name="reconcile">True</field> | ||
</record> | ||
|
||
<!-- Undefine Payable Account --> | ||
<record id="undefine_payable_account" model="account.account"> | ||
<field name="name">Undefine Payable Account</field> | ||
<field name="code">100102</field> | ||
<field name="user_type_id" ref="account.data_account_type_payable"/> | ||
<field name="reconcile">True</field> | ||
</record> | ||
|
||
<!-- Undefine Customer to set in customer_id field --> | ||
<record id="undefined_customer" model="res.partner"> | ||
<field name="name">Undefine</field> | ||
<field name="property_account_receivable_id" ref="undefine_receivable_account"/> | ||
<field name="property_account_payable_id" ref="undefine_payable_account"/> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright (C) 2019 Open Source Integrators | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
|
||
def pre_init_hook(cr): | ||
cr.execute("""ALTER TABLE "fsm_location" ADD "customer_id" INT;""") | ||
cr.execute("""UPDATE "fsm_location" SET customer_id = owner_id | ||
WHERE customer_id IS NULL;""") |
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