• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OCA / openupgradelib / 260
0%

Build:
DEFAULT BRANCH: master
Ran 21 Jan 2017 03:04PM UTC
Jobs 4
Files 4
Run time 4min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
260

Pull #66

travis-ci

web-flow
[ADD] convert_binary_field_to_attachment

This method converts the 8.0 binary fields to attachments like Odoo 9.0
makes with the new attachment=True attribute. For base module, it has to be
called on post-migration script, as ir.attachment is not yet loaded. For
the rest of the modules, it can be called in pre-migration, using the same
name for the field and column.

This method also removes after the conversion the source column for
avoiding data duplication.

This is done through Odoo ORM, because there's a lot of logic associated
with guessing MIME type, format and length, file saving in store...
that is doesn't worth to recreate it via SQL as there's not too much
performance problem.

:param env: Odoo environment
:param field_spec: A dictionary with a tuple as key with:

* ORM model name as first element.
* SQL table name as second element.

and as dictionary values a tuple with:

* field name to be converted as attachment as first element.
* SQL column name that contains actual data as second element. If
  the second element is None, then the column name is taken
  calling `get_legacy_name` method.
Pull Request #66: [ADD] convert_binary_field_to_attachment

141 of 493 relevant lines covered (28.6%)

1.09 hits per line

Jobs
ID Job ID Ran Files Coverage
1 260.1 21 Jan 2017 03:04PM UTC 0
26.17
Travis Job 260.1
2 260.2 21 Jan 2017 03:04PM UTC 0
26.17
Travis Job 260.2
3 260.3 21 Jan 2017 03:09PM UTC 0
28.4
Travis Job 260.3
5 260.5 21 Jan 2017 03:05PM UTC 0
28.6
Travis Job 260.5
Source Files on build 260
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #260
  • Pull Request #66
  • PR Base - master (#257)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc