Search 1.9 billion lines of Odoo code on GitHub

recording_external_revenue

Author: Numigi
License: LGPL-3
Branch: majouda-patch-1
Repository: Numigi/odoo-entertainment-addons
Dependencies: account, decimal_precision, musical_catalog, product_musical_relation, queue_job, recording, recording_analytic, and recording_platform
Languages: PO File (392, 14.0%), Python (1233, 44.1%), XML (1093, 39.1%), and reStructuredText (80, 2.9%)
Other branches: 12.0, 14.0, 46419, TA#42861b-jjbreard, TA#46416, TA#46417, TA#46722---manage_decimals, TA#48251---multi_currency_fix, and TA#50141
Other repositories: ERPLibre/odoo-entertainment-addons, SanteLibre/odoo-entertainment-addons, jason156/odoo-entertainment-addons, and jbreard/odoo-entertainment-addons

<h1 class="title">Recording External Revenue</h1> <p>This module allows to import revenues from external music platforms such as Apple Music, Sound Exchange or Spotify.</p> <div class="contents topic" id="table-of-contents"> <p class="topic-title">Table of Contents</p> <ul class="simple"> <li><a class="reference internal" href="#overview" id="id1">Overview</a><ul> <li><a class="reference internal" href="#raw-data" id="id2">Raw Data</a></li> <li><a class="reference internal" href="#revenues" id="id3">Revenues</a></li> </ul> </li> <li><a class="reference internal" href="#conversion" id="id4">Conversion</a><ul> <li><a class="reference internal" href="#queue-jobs" id="id5">Queue Jobs</a></li> <li><a class="reference internal" href="#converted-revenues" id="id6">Converted Revenues</a></li> </ul> </li> <li><a class="reference internal" href="#mapping" id="id7">Mapping</a><ul> <li><a class="reference internal" href="#mapping-tables" id="id8">Mapping Tables</a></li> <li><a class="reference internal" href="#mapping-of-products" id="id9">Mapping of Products</a></li> <li><a class="reference internal" href="#mapping-of-recordings" id="id10">Mapping of Recordings</a></li> </ul> </li> <li><a class="reference internal" href="#contributors" id="id11">Contributors</a></li> <li><a class="reference internal" href="#more-information" id="id12">More information</a></li> </ul> </div> <a name="overview"></a> <h2><a class="toc-backref" href="#id1">Overview</a></h2> <a name="raw-data"></a> <h3><a class="toc-backref" href="#id2">Raw Data</a></h3> <p>The module defines a new model recording.external.revenue.raw.</p> <img alt="static/description/raw_data_list.png" src="static/description/raw_data_list.png" /> <p>This model is used to easily upload revenues into Odoo (as csv or xls files). It is designed to limit manipulations of data outside of Odoo.</p> <p>It contains mostly dates, strings and numeric fields. It has only one many2one field (company_id) used for multi-company support.</p> <a name="revenues"></a> <h3><a class="toc-backref" href="#id3">Revenues</a></h3> <p>The module defines another model recording.external.revenue.</p> <img alt="static/description/revenue_list.png" src="static/description/revenue_list.png" /> <p>After raw data entries are imported in Odoo, they can be converted into (real) revenues.</p> <p>Basic string fields of raw revenues are mapped into many2one values.</p> <a name="conversion"></a> <h2><a class="toc-backref" href="#id4">Conversion</a></h2> <p>The conversion of raw entries into revenues is done by clicking on <code>Convert Revenues</code>.</p> <img alt="static/description/convert_raw_revenues_button.png" src="static/description/convert_raw_revenues_button.png" /> <a name="queue-jobs"></a> <h3><a class="toc-backref" href="#id5">Queue Jobs</a></h3> <p>The conversion is done using queue jobs.</p> <p>One job is created per revenue.</p> <img alt="static/description/queue_job_list.png" src="static/description/queue_job_list.png" /> <p>If a job fails, the error message will be logged inside the job.</p> <img alt="static/description/queue_job_fail_message.png" src="static/description/queue_job_fail_message.png" /> <p>Above, the problem is a missing tax mapping entry for the label <code>TPS</code>.</p> <a name="converted-revenues"></a> <h3><a class="toc-backref" href="#id6">Converted Revenues</a></h3> <p>After the jobs have succeeded, the revenues will appear under <code>Recording / External Revenues / Revenues</code>.</p> <img alt="static/description/revenue_list_after_conversion.png" src="static/description/revenue_list_after_conversion.png" /> <p>Note that in our example, for 3 lines of raw data, 2 lines of revenues were created.</p> <p>The reason is that the system attempts to group the raw data entries together.</p> <p>Inside the form view of a revenue, a smart button allows to display the raw data lines related to this revenue.</p> <img alt="static/description/revenue_raw_data_smart_button.png" src="static/description/revenue_raw_data_smart_button.png" /> <img alt="static/description/revenue_related_raw_data_lines.png" src="static/description/revenue_related_raw_data_lines.png" /> <a name="mapping"></a> <h2><a class="toc-backref" href="#id7">Mapping</a></h2> <p>Here is the detail of how the raw data are converted into revenues.</p> <a name="mapping-tables"></a> <h3><a class="toc-backref" href="#id8">Mapping Tables</a></h3> <p>The module defines mapping tables for fields converted with a simple key -&gt; value logic.</p> <p>These fields include:</p> <ul class="simple"> <li>Country</li> <li>Country States / Provinces</li> <li>Currencies</li> <li>Partner</li> <li>Recording Platforms</li> <li>Recording Subplatforms</li> <li>Taxes</li> </ul> <p>The mapping tables for each field can be found under the <code>Mapping</code> menu.</p> <img alt="static/description/mapping_menu.png" src="static/description/mapping_menu.png" /> <p>Below is the mapping table for countries.</p> <img alt="static/description/country_mapping.png" src="static/description/country_mapping.png" /> <p>If a raw data entry contains the string <code>CA</code> in its <code>Country</code> field, the country of the converted revenue would be <code>Canada</code>.</p> <img alt="static/description/raw_revenue_ca.png" src="static/description/raw_revenue_ca.png" /> <img alt="static/description/converted_revenue_canada.png" src="static/description/converted_revenue_canada.png" /> <a name="mapping-of-products"></a> <h3><a class="toc-backref" href="#id9">Mapping of Products</a></h3> <p>Products are mapped using a more specialized logic.</p> <img alt="static/description/raw_revenue_product_references.png" src="static/description/raw_revenue_product_references.png" /> <ol class="arabic"> <li><p class="first">If the product reference is filled, it will be used to find a product with a matching internal reference (default_code).</p> <blockquote> <img alt="static/description/product_default_code.png" src="static/description/product_default_code.png" /> </blockquote> </li> <li><p class="first">Otherwise, if the external catalog reference is filled, it will be used to find the product.</p> <blockquote> <img alt="static/description/product_catalog_reference.png" src="static/description/product_catalog_reference.png" /> </blockquote> </li> <li><p class="first">Otherwise, the type of revenue will be used to find a matching product.</p> <blockquote> <img alt="static/description/revenue_type_mapping.png" src="static/description/revenue_type_mapping.png" /> <img alt="static/description/revenue_type_mapping_streaming.png" src="static/description/revenue_type_mapping_streaming.png" /> </blockquote> </li> </ol> <a name="mapping-of-recordings"></a> <h3><a class="toc-backref" href="#id10">Mapping of Recordings</a></h3> <p>Recordings are also mapped using a specialized logic.</p> <ol class="arabic"> <li><p class="first">If the product mapped at the previous section is related to a record, this record will be used.</p> <blockquote> <img alt="static/description/product_recording_relation.png" src="static/description/product_recording_relation.png" /> </blockquote> </li> <li><p class="first">Otherwise, if the ISRC is given, it will be used to identify the record.</p> </li> <li><p class="first">Otherwise, if the UPC code is given, it will be used.</p> </li> <li><p class="first">Otherwise, if the external catalog reference is given, it will be used.</p> <blockquote> <img alt="static/description/raw_revenue_recording_references.png" src="static/description/raw_revenue_recording_references.png" /> <img alt="static/description/recording_references.png" src="static/description/recording_references.png" /> </blockquote> </li> </ol> <p>Since version 1.0.1, amount fields on gross income allows 5 decimal, on the other hand, the converted income remains on 2 decimal places.</p> <a name="contributors"></a> <h2><a class="toc-backref" href="#id11">Contributors</a></h2> <ul class="simple"> <li>Numigi (tm) and all its contributors (<a class="reference external" href="https://bit.ly/numigiens">https://bit.ly/numigiens</a>)</li> </ul> <a name="more-information"></a> <h2><a class="toc-backref" href="#id12">More information</a></h2> <ul class="simple"> <li>Meet us at <a class="reference external" href="https://bit.ly/numigi-com">https://bit.ly/numigi-com</a></li> </ul>