Skip to content

Instantly share code, notes, and snippets.

@ofelix03
Last active June 15, 2021 10:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ofelix03/4456ad56b85586b661269a808de6d351 to your computer and use it in GitHub Desktop.
Save ofelix03/4456ad56b85586b661269a808de6d351 to your computer and use it in GitHub Desktop.
Odoo v12 to v14: Technical Changes Note

Accounts

  • account.register.payments model (in v12) renamed to account.payment.register (v13 & v14)

  • _compute_reconciled_invoice_ids(...) model (v12 & v13) renamed to _compute_stat_buttons_from_reconciliation(...) (v14)*

  • account.asset.asset (v10) model renamed to account.asset(in v12 upwards) and moved from core addons to enterprise [module: account_asset]

  • communication" field on account.payment has been removed in v14

@sirquist
Copy link

sirquist commented Feb 8, 2021

Fields default_debit_account_id and default_credit_account_id on account.journal model has been changed to payment_debit_account_id and payment_credit_account_id respectively

@ofelix03
Copy link
Author

ofelix03 commented Apr 6, 2021

customer and supplier fields removed from res.partner

@idadzie
Copy link

idadzie commented Apr 7, 2021

customer and supplier fields removed from res.partner

Make use of res_partner_search_mode context.

<!-- For Customers -->
<field name="partner_id" context="{'res_partner_search_mode': 'customer'}" />

<!-- For Suppliers -->
<field name="partner_id" context="{'res_partner_search_mode': 'supplier'}" />

and for *.py

def mymethod(self):
    partner_search_mode = self.env.context.get('res_partner_search_mode')
    ...

@ofelix03
Copy link
Author

ofelix03 commented Apr 13, 2021

type field on mail.message model renamed to message_type

@sirquist
Copy link

sirquist commented Apr 13, 2021

The function _create_payment_entry in account.payment model has been replaced with _prepare_move_line_default_vals

@ofelix03
Copy link
Author

ofelix03 commented Apr 13, 2021

payment_date field on account.payment model renamed to date
NOTE:
There is no reference found for the date field definition on the account.payment model or it's inherit and inherits models.
We are still researching on where this date field was defined.
date field is not being persisted in the database, hence can not be used in Pentaho reports

communication field on account.payment removed

@ofelix03
Copy link
Author

ofelix03 commented Apr 14, 2021

post() method on account.payment model renamed to action_post()
cancel() method on account.payment model renamed to action_cancel()

@kwaku-pistis
Copy link

The external id on form view invoice_form for the model account.move is renamed to view_move_form

@ofelix03
Copy link
Author

track_visiblity attribute renamed to tracking taking a boolean value

@ofelix03
Copy link
Author

All compute methods must have the prefix _compute

@ofelix03
Copy link
Author

ofelix03 commented May 25, 2021

DEPRECATED: methods decorated with @api.onchnage() no longer return domain filters

@ofelix03
Copy link
Author

<report> tag deprecated. Use <record> element instead

Example of what to use

<record id="action_report_saleorder" model="ir.actions.report">
    <field name="name">Quotation / Order</field>
    <field name="model">sale.order</field>
    <field name="report_type">qweb-pdf</field>
    <field name="report_name">sale.report_saleorder</field>
    <field name="report_file">sale.report_saleorder</field>
    <field name="print_report_name">(object.state in ('draft', 'sent') and 'Quotation - %s' % (object.name)) or 'Order - %s' % (object.name)</field>
    <field name="binding_model_id" ref="model_sale_order"/>
    <field name="binding_type">report</field>
</record>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment