Commit Graph
11 Commits
Author SHA1 Message Date
Raphael Collet f7d5d11238 [IMP] core: do not add magic and inherited fields on abstract models
Magic and inherited fields are not really useful on abstract models.
The _inherits specification is used anyway by models that inherit from
those abstract models.

The main goal of this change is to prepare a refactoring of models where
fields are no longer duplicated on the registry classes, but fields
defined on classes are used directly.  But this new design cannot be
applied to all fields: a field being overridden simply cannot be used
directly.  This branch improves the situation by avoiding unnecessary
field overridings.

closes odoo/odoo#69372

Related: odoo/upgrade#2409
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-04-22 08:59:36 +00:00
Victor Feyens caeda18bec [IMP] base, various: support batch creation
Done for res.partner.bank, res.company and board models. Some override may
have been ignored because heavily linked to business code (like company
in stock).

See merge commit for more details.

Task ID-2330149
COM PR odoo/odoo#61246
ENT PR odoo/enterprise#14561
2020-12-03 10:18:36 +00:00
Adrian Torres 52f5528cfb [REF] *: replace deprecated pycompat helpers for builtins
This commit replaces calls to pycompat helpers that were intended for
python 2 <-> python 3 interoperability for python 3 builtins, as python
2 is no longer officially supported by Odoo.

This includes:
    * calls to imap/izip/ifilter replaced by map/zip/filter
    * uses of text_type replaced by str
    * uses of unichr replaced by chr
    * calls to implements_to_string, implements_iterator removed
    * string_types and integer_types replaced by str, int respectively
    * calls to to_native replaced by calls to to_text

This is done in preparation to the removal of these deprecated helpers
in the following commit.
2018-11-29 09:28:17 +00:00
Aaron Bohy 1d92bb410d [REF] board: don't patch FormView in place anymore
Instead, create a new BoardView (in JS only) instead, referenced by
specifying js_class="board" on the fly on the root node of the
arch of the board view.

This ensures that the dashboard addon doesn't impact the FormView,
and this is necessary to ensure that the next commit doesn't break
anything.
2018-04-13 12:09:01 +02:00
Xavier Morel a5e21f69e7 [FIX] P3: view arch should be text-'encoded' XML 2017-08-20 23:25:54 +02:00
Xavier Morel 7dd062f835 [FIX] P3: text model types
* remove references to basestring & unicode (use relevant pycompat
  helpers)
* remove some str calls (either entirely or replaced by relevant
  helper, either text or native)
* use better API to avoid unnecessary conversions
* remove some XML declarations in views
2017-08-20 23:25:54 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Raphael Collet f825f415f8 [FIX] registry: ensure that all non-abstract models have a table (#14194)
After modifying the database schema, if some models do not have a table/view,
attempt to recreate it by calling their method `init()`, following inter-model
dependencies.

Fix the model `board.board` by making it an abstract model.

Add the missing model dependencies on report `crm.partner.report.assign` to make
it depend on report `account.invoice.report`.
2016-11-10 13:50:04 +01:00
dut-odoo 7e72de3f2e [MIG] board: migrated to new API 2016-07-05 13:34:12 +02:00
dut-odoo bf0b752817 [REM] board: remove dead code
No longer called, call was removed in #11172.
2016-07-05 13:17:48 +02:00
dut-odoo 3174dcd047 [MOV] board: Moved/Renamed files as per new API guidelines 2016-07-05 13:17:48 +02:00