Browse Source

[MIG] contract_recurring_analytic_distribution: Migration to 10.0

pull/106/head
cubells 7 years ago
committed by Pedro M. Baeza
parent
commit
5b62aa6943
  1. 5
      contract_recurring_analytic_distribution/README.rst
  2. 1
      contract_recurring_analytic_distribution/__init__.py
  3. 4
      contract_recurring_analytic_distribution/__manifest__.py
  4. 2
      contract_recurring_analytic_distribution/models/__init__.py
  5. 5
      contract_recurring_analytic_distribution/models/account_analytic_account.py
  6. 463
      contract_recurring_analytic_distribution/static/description/icon.svg
  7. 36
      contract_recurring_analytic_distribution/tests/test_contract_recurring_distribution.py
  8. 1
      oca_dependencies.txt

5
contract_recurring_analytic_distribution/README.rst

@ -18,7 +18,7 @@ invoice recurring lines that you want.
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/110/9.0
:target: https://runbot.odoo-community.org/runbot/110/10.0
Bug Tracker
===========
@ -34,6 +34,7 @@ Credits
Contributors
------------
* Tecnativa (https://www.tecnativa.com)
* Pedro M. Baeza <pedro.baeza@tecnativa.com>
* Vicent Cubells <vicent.cubells@tecnativa.com>
@ -41,7 +42,7 @@ Icon
----
* https://openclipart.org/detail/125071/pie-graph
* Subicon made by `Freepik <http://www.flaticon.com/authors/freepik>_ from
* Subicon made by `Freepik <http://www.flaticon.com/authors/freepik>`_ from
www.flaticon.com
Maintainer

1
contract_recurring_analytic_distribution/__init__.py

@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
# Copyright 2015 Tecnativa - Pedro M. Baeza
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from . import models

4
contract_recurring_analytic_distribution/__openerp__.py → contract_recurring_analytic_distribution/__manifest__.py

@ -5,11 +5,11 @@
{
'name': 'Analytic plans on contracts recurring invoices',
'version': '9.0.1.0.0',
'version': '10.0.1.0.0',
'category': 'Contract Management',
'author': 'Tecnativa, '
'Odoo Community Association (OCA)',
'website': 'http://www.tecnativa.com',
'website': 'https://github.com/OCA/contract/',
'license': 'AGPL-3',
'depends': [
'account_analytic_distribution',

2
contract_recurring_analytic_distribution/models/__init__.py

@ -2,4 +2,4 @@
# Copyright 2015 Tecnativa - Pedro M. Baeza
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from . import account_analytic_invoice_line
from . import account_analytic_account

5
contract_recurring_analytic_distribution/models/account_analytic_invoice_line.py → contract_recurring_analytic_distribution/models/account_analytic_account.py

@ -3,7 +3,7 @@
# Copyright 2017 Tecnativa - Vicent Cubells
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import models, fields, api
from odoo import api, fields, models
class AccountAnalyticAccount(models.Model):
@ -26,5 +26,6 @@ class AccountAnalyticInvoiceLine(models.Model):
analytic_distribution_id = fields.Many2one(
comodel_name='account.analytic.distribution',
string='Analytic Distribution', oldname='analytics_id',
string='Analytic Distribution',
oldname='analytics_id',
)

463
contract_recurring_analytic_distribution/static/description/icon.svg

@ -1,463 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg2"
sodipodi:docname="icon.svg"
viewBox="0 0 128 128"
version="1.1"
inkscape:version="0.91 r"
width="128"
height="128"
inkscape:export-filename="icon.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs4">
<linearGradient
id="linearGradient4306">
<stop
id="stop4308"
style="stop-color:#dedc37"
offset="0" />
<stop
id="stop4310"
style="stop-color:#f8fa8d"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3727">
<stop
id="stop3729"
style="stop-color:#f3f360"
offset="0" />
<stop
id="stop3731"
style="stop-color:#cbc630"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3717">
<stop
id="stop3719"
style="stop-color:#e4e240"
offset="0" />
<stop
id="stop3725"
style="stop-color:#d4d237"
offset=".47047" />
<stop
id="stop3721"
style="stop-color:#f8f44e"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3590">
<stop
id="stop3592"
style="stop-color:#b8b852"
offset="0" />
<stop
id="stop3594"
style="stop-color:#dbd649"
offset="1" />
</linearGradient>
<filter
inkscape:menu-tooltip="In and out glow with a possible offset and colorizable flood"
inkscape:menu="Shadows and Glows"
inkscape:label="Cutout Glow"
style="color-interpolation-filters:sRGB;"
id="filter3869">
<feOffset
dy="3"
dx="3"
id="feOffset3871" />
<feGaussianBlur
stdDeviation="3"
result="blur"
id="feGaussianBlur3873" />
<feFlood
flood-color="rgb(0,0,0)"
flood-opacity="1"
result="flood"
id="feFlood3875" />
<feComposite
in="flood"
in2="SourceGraphic"
operator="in"
result="composite"
id="feComposite3877" />
<feBlend
in="blur"
in2="composite"
mode="normal"
id="feBlend3879" />
</filter>
<linearGradient
inkscape:collect="always"
x1="634.97"
y1="631.64"
x2="389.52"
gradientUnits="userSpaceOnUse"
y2="484.49"
id="linearGradient3838">
<stop
offset="0"
style="stop-color:#008000"
id="stop3834" />
<stop
offset="1"
style="stop-color:#4dc149"
id="stop3836" />
</linearGradient>
<filter
color-interpolation-filters="sRGB"
inkscape:collect="always"
id="filter3848">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.82001295"
id="feGaussianBlur3850" />
</filter>
<filter
color-interpolation-filters="sRGB"
inkscape:collect="always"
id="filter3852">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="1.4036521"
id="feGaussianBlur3854" />
</filter>
<radialGradient
inkscape:collect="always"
r="92.316"
gradientTransform="matrix(0.5983,1.4589,-1.4017,0.57484,1052,-556.35)"
cx="539.69"
cy="573.48"
gradientUnits="userSpaceOnUse"
id="radialGradient3872">
<stop
offset="0"
style="stop-color:#64b668"
id="stop3866" />
<stop
offset="1"
style="stop-color:#008900"
id="stop3868" />
</radialGradient>
<linearGradient
inkscape:collect="always"
x1="437.5"
y1="567.07"
gradientTransform="matrix(1.01,0,0,1.01,-4.45,-5.9654)"
x2="441.79"
gradientUnits="userSpaceOnUse"
y2="623.33"
id="linearGradient3880">
<stop
offset="0"
style="stop-color:#008000"
id="stop3876" />
<stop
offset="1"
style="stop-color:#005900"
id="stop3878" />
</linearGradient>
<filter
color-interpolation-filters="sRGB"
inkscape:collect="always"
id="filter3882">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.6119445"
id="feGaussianBlur3884" />
</filter>
<filter
color-interpolation-filters="sRGB"
inkscape:collect="always"
id="filter3886">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.2080926"
id="feGaussianBlur3888" />
</filter>
<linearGradient
inkscape:collect="always"
x1="503.69"
y1="665.51"
x2="382.36"
gradientUnits="userSpaceOnUse"
y2="536.71"
id="linearGradient3896">
<stop
offset="0"
style="stop-color:#ff0000"
id="stop3892" />
<stop
offset="1"
style="stop-color:#ff3537"
id="stop3894" />
</linearGradient>
<filter
color-interpolation-filters="sRGB"
inkscape:collect="always"
id="filter3898">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.68751219"
id="feGaussianBlur3900" />
</filter>
<linearGradient
inkscape:collect="always"
x1="319.87"
y1="631.94"
x2="459.97"
gradientUnits="userSpaceOnUse"
y2="748.04"
id="linearGradient3908">
<stop
offset="0"
style="stop-color:#ff0000"
id="stop3904" />
<stop
offset="1"
style="stop-color:#a20000"
id="stop3906" />
</linearGradient>
<filter
color-interpolation-filters="sRGB"
inkscape:collect="always"
id="filter3910">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.70507812"
id="feGaussianBlur3912" />
</filter>
</defs>
<sodipodi:namedview
id="base"
bordercolor="#666666"
inkscape:pageshadow="2"
inkscape:window-y="24"
pagecolor="#ffffff"
inkscape:window-height="1056"
inkscape:window-maximized="1"
inkscape:zoom="7.0646457"
inkscape:window-x="65"
showgrid="false"
borderopacity="1.0"
inkscape:current-layer="layer1"
inkscape:cx="66.991441"
inkscape:cy="62.957804"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1855"
inkscape:pageopacity="0.0"
inkscape:document-units="px" />
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer"
transform="translate(-319.71,-475.23)">
<g
id="g3620"
transform="matrix(2.2116072,0,0,2.2116072,-246.9006,-632.55508)">
<path
style="fill:#ffffff"
sodipodi:nodetypes="sssssssss"
inkscape:connector-curvature="0"
d="m 298.70134,500.89595 -38.10593,0 c -2.4922,0 -4.39684,1.9053 -4.39684,4.39684 l 0,38.10527 c 0,2.4922 1.90464,4.39749 4.39684,4.39749 l 38.10593,0 c 2.49154,0 4.39683,-1.90529 4.39683,-4.39749 l 0,-38.10527 c 0,-2.49154 -1.90529,-4.39684 -4.39683,-4.39684 z"
id="path3618" />
<path
id="path3497"
d="m 298.70134,500.89595 -38.10593,0 c -2.4922,0 -4.39684,1.9053 -4.39684,4.39684 l 0,38.10527 c 0,2.4922 1.90464,4.39749 4.39684,4.39749 l 38.10593,0 c 2.49154,0 4.39683,-1.90529 4.39683,-4.39749 l 0,-38.10527 c 0,-2.49154 -1.90529,-4.39684 -4.39683,-4.39684 z m 1.4643,42.50211 c 0,0.88068 -0.58624,1.46561 -1.4643,1.46561 l -38.10593,0 c -0.87937,0 -1.46561,-0.58624 -1.46561,-1.46561 l 0,-38.10527 c 0,-0.88002 0.58624,-1.46561 1.46561,-1.46561 l 38.10593,0 c 0.88002,0 1.4643,0.58624 1.4643,1.46561 l 0,38.10527 z"
inkscape:connector-curvature="0" />
<path
id="path3499"
d="m 291.81296,519.06955 0.14787,-0.73216 c 0.14721,-0.43968 -0.14787,-0.87936 -0.58625,-1.02527 -0.43968,-0.14722 -0.88002,0.14722 -1.02593,0.58625 l -0.14721,0.73215 c -0.87937,-0.14656 -1.61218,0 -1.75874,0.43968 l -3.51812,13.33642 4.54274,1.17184 3.51682,-13.33642 c 0.14721,-0.29378 -0.29247,-0.87937 -1.17118,-1.17249 z"
inkscape:connector-curvature="0" />
<path
id="path3501"
d="m 294.01138,520.09548 c -0.14787,0 -0.441,0.14721 -0.441,0.29246 l -1.75873,6.59526 0.7328,0.14722 1.75874,-6.59526 c 0.001,-0.14656 0.001,-0.43968 -0.29181,-0.43968 z"
inkscape:connector-curvature="0" />
<path
id="path3503"
d="m 286.24363,536.80411 c 0,0 1.17249,-1.02593 2.05251,-1.90529 l -2.93057,-0.73346 c 0.29116,1.17314 0.87806,2.63875 0.87806,2.63875 z"
inkscape:connector-curvature="0" />
<path
id="path3505"
d="m 285.36361,536.07065 -0.29247,0 c -0.73281,0 -1.46496,0.14722 -4.39749,0.14722 -0.29247,0 -0.58625,-0.14722 -0.88003,-0.43969 -0.43902,-0.29312 -0.7328,-0.58624 -1.31905,-0.58624 l 0,0 c -0.43968,0 -0.88002,0.29247 -1.90529,0.73215 -0.43969,0.29312 -1.17249,0.58625 -1.46562,0.73346 0,-0.14787 0,-0.58624 0.14657,-0.73346 0.14721,-0.58624 0.14721,-1.17183 0,-1.4643 -0.14657,-0.14722 -0.29247,-0.14722 -0.43969,-0.14722 l 0,0 c -0.87937,0 -1.75873,1.02528 -2.78466,1.90464 -0.58494,0.5869 -1.31775,1.31906 -1.61087,1.31906 l 0,0 c -0.29312,-0.43969 0.73281,-2.4922 1.02593,-3.3696 0.58625,-1.46562 0.87937,-1.75874 0.43969,-2.05252 -0.14722,-0.14721 -0.29313,-0.14721 -0.73281,0 -0.58625,0.43969 -1.31905,1.02462 -1.9053,1.75874 -1.31905,1.17183 -2.6381,2.49285 -3.66403,2.05186 -0.14721,-0.14657 -0.43968,0 -0.58624,0.14917 -0.14657,0.14722 0,0.43969 0.14721,0.5856 1.46496,0.73215 2.93057,-0.73347 4.54275,-2.19777 0.43968,-0.29247 0.7328,-0.73215 1.17249,-1.02462 -0.14657,0.14656 -0.14657,0.29247 -0.29313,0.43968 -0.87936,1.9053 -1.46495,3.3696 -1.02527,4.10307 0.14656,0.14721 0.29312,0.29115 0.58624,0.29115 l 0,0 c 0.58625,0 1.31971,-0.73215 2.19842,-1.61151 0.73281,-0.73347 1.46562,-1.46562 2.05186,-1.61283 0,0.14721 0,0.43968 -0.14656,0.73346 -0.14722,0.58624 -0.14722,1.17183 0,1.46561 0.14591,0.14329 0.29247,0.29051 0.43903,0.29051 0.43968,0 1.02593,-0.29247 1.9053,-0.87937 0.43968,-0.29378 1.31905,-0.73346 1.46561,-0.73346 l 0,0 c 0.29247,0 0.58624,0.14721 0.87937,0.43968 0.29312,0.29378 0.7328,0.58625 1.31905,0.58625 3.07713,0 3.66534,0 4.54274,-0.14657 l 0.29312,0 c 0.14657,0 0.29247,-0.14721 0.29247,-0.44099 6.6e-4,-0.29116 0.29378,-0.29116 6.6e-4,-0.29116 z"
inkscape:connector-curvature="0" />
<rect
id="rect3507"
height="2.9312253"
width="29.312252"
y="510.569"
x="264.99225" />
<rect
id="rect3509"
height="2.9305711"
width="18.467373"
y="516.43146"
x="264.99225" />
<rect
id="rect3511"
height="2.9312253"
width="18.467373"
y="523.75952"
x="264.99225" />
</g>
<g
id="g3513"
transform="matrix(0.65429135,0,0,0.65429135,252.06849,472.60499)" />
<g
id="g3515"
transform="matrix(0.65429135,0,0,0.65429135,252.06849,472.60499)" />
<g
id="g3517"
transform="matrix(0.65429135,0,0,0.65429135,252.06849,472.60499)" />
<g
id="g3519"
transform="matrix(0.65429135,0,0,0.65429135,252.06849,472.60499)" />
<g
id="g3521"
transform="matrix(0.65429135,0,0,0.65429135,252.06849,472.60499)" />
<g
id="g3523"
transform="matrix(0.65429135,0,0,0.65429135,252.06849,472.60499)" />
<g
id="g3525"
transform="matrix(0.65429135,0,0,0.65429135,252.06849,472.60499)" />
<g
id="g3527"
transform="matrix(0.65429135,0,0,0.65429135,252.06849,472.60499)" />
<g
id="g3529"
transform="matrix(0.65429135,0,0,0.65429135,252.06849,472.60499)" />
<g
id="g3531"
transform="matrix(0.65429135,0,0,0.65429135,252.06849,472.60499)" />
<g
id="g3533"
transform="matrix(0.65429135,0,0,0.65429135,252.06849,472.60499)" />
<g
id="g3535"
transform="matrix(0.65429135,0,0,0.65429135,252.06849,472.60499)" />
<g
id="g3537"
transform="matrix(0.65429135,0,0,0.65429135,252.06849,472.60499)" />
<g
id="g3539"
transform="matrix(0.65429135,0,0,0.65429135,252.06849,472.60499)" />
<g
id="g3541"
transform="matrix(0.65429135,0,0,0.65429135,252.06849,472.60499)" />
<g
id="g3951"
transform="matrix(1.0408634,0,0,1.0408634,202.38498,-56.437759)">
<path
transform="matrix(0.17391897,0,0,0.17391897,113.56733,503.31436)"
d="m 361.55,582.99 -0.3189,52.177 167.41,-24.24 0.12626,-53.004 z"
inkscape:connector-curvature="0"
style="fill:url(#linearGradient3880);filter:url(#filter3882)"
sodipodi:nodetypes="ccccc"
id="path3769" />
<path
sodipodi:start="2.8912232"
sodipodi:end="1.6163158"
sodipodi:cx="511.42856"
sodipodi:cy="558.07648"
transform="matrix(0.19132826,0,0,0.14711806,107.51199,518.39331)"
d="m 359.18527,586.74607 a 157.14285,115.71429 0 0 1 67.56356,-126.14595 157.14285,115.71429 0 0 1 183.85291,7.71681 157.14285,115.71429 0 0 1 47.65992,130.9822 157.14285,115.71429 0 0 1 -153.98369,74.37177 l 7.15059,-115.59442 z"
sodipodi:type="arc"
style="fill:url(#linearGradient3838);filter:url(#filter3852)"
sodipodi:ry="115.71429"
sodipodi:rx="157.14285"
id="path2999" />
<path
transform="matrix(0.17391897,0,0,0.17391897,113.56733,503.31436)"
d="m 519.14,708.32 c 17.065,0.44011 34.171,-0.539 50.721,-2.9353 74.561,-10.796 125.24,-47.545 129.72,-88.817 l 0.2525,0 0,-2.9353 0,-6.2809 0,-46.239 c -2.3396,42.453 -53.653,80.701 -129.97,91.752 -16.55,2.3963 -33.656,3.3754 -50.721,2.9353 z"
inkscape:connector-curvature="0"
style="fill:url(#radialGradient3872);filter:url(#filter3848)"
sodipodi:nodetypes="cscccccscc"
id="rect3771" />
<path
transform="matrix(0.17391897,0,0,0.17391897,113.56733,503.31436)"
d="m 356.44,610.74 0.15782,0 c -0.0187,8.0612 1.738,16.258 5.4288,24.429 l 0.15781,-0.0315 0,-24.398 0,-24.461 0,-3.6612 -0.15781,0.0315 c -3.7744,-8.3563 -5.5225,-16.735 -5.4217,-24.973 z"
inkscape:connector-curvature="0"
style="fill:#339c34;filter:url(#filter3886)"
sodipodi:nodetypes="cccccccccc"
id="path3813" />
<path
sodipodi:start="1.6103913"
sodipodi:end="2.891152"
sodipodi:cx="511.42856"
sodipodi:cy="558.07648"
transform="matrix(0.19132826,0,0,0.14711806,99.424239,525.92035)"
d="M 505.20812,673.70007 A 157.14285,115.71429 0 0 1 359.18804,586.75405 l 152.24052,-28.67757 z"
sodipodi:type="arc"
style="fill:url(#linearGradient3896);filter:url(#filter3898)"
sodipodi:ry="115.71429"
sodipodi:rx="157.14285"
id="path3824" />
<path
transform="matrix(0.17391897,0,0,0.17391897,113.56733,503.31436)"
d="m 314.09,627.03 0.5625,49.531 c 18.756,41.512 83.443,71.116 159.06,72.812 l 0.0625,-49.938 -0.15625,-0.0625 c -75.01,-1.7 -139.24,-30.86 -158.53,-71.87 l -1,-0.46875 z"
inkscape:connector-curvature="0"
style="fill:url(#linearGradient3908);filter:url(#filter3910)"
id="path3826" />
</g>
</g>
<metadata
id="metadata499">
<rdf:RDF>
<cc:Work>
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<cc:license
rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" />
<dc:publisher>
<cc:Agent
rdf:about="http://openclipart.org/">
<dc:title>Openclipart</dc:title>
</cc:Agent>
</dc:publisher>
<dc:title>Pile of Golden Coins</dc:title>
<dc:date>2010-04-09T03:27:45</dc:date>
<dc:description>A pile of hypothetical golden coins, drawn in Inkscape.</dc:description>
<dc:source>https://openclipart.org/detail/43969/pile-of-golden-coins-by-j_alves</dc:source>
<dc:creator>
<cc:Agent>
<dc:title>J_Alves</dc:title>
</cc:Agent>
</dc:creator>
<dc:subject>
<rdf:Bag>
<rdf:li>coin</rdf:li>
<rdf:li>currency</rdf:li>
<rdf:li>gold</rdf:li>
<rdf:li>money</rdf:li>
<rdf:li>thaler</rdf:li>
</rdf:Bag>
</dc:subject>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/publicdomain/zero/1.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
</cc:License>
</rdf:RDF>
</metadata>
</svg>

36
contract_recurring_analytic_distribution/tests/test_contract_recurring_distribution.py

@ -3,49 +3,49 @@
# Copyright 2017 Tecnativa - Vicent Cubells
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
import openerp.tests.common as common
import odoo.tests.common as common
class TestContractRecurringDistribution(common.SavepointCase):
@classmethod
def setUpClass(cls):
super(TestContractRecurringDistribution, cls).setUpClass()
cls.partner = cls.env['res.partner'].create({'name': 'Test'})
cls.product = cls.env['product.product'].create({
@common.at_install(False)
@common.post_install(True)
class TestContractRecurringDistribution(common.HttpCase):
def setUp(self):
super(TestContractRecurringDistribution, self).setUp()
self.partner = self.env['res.partner'].create({'name': 'Test'})
self.product = self.env['product.product'].create({
'name': 'Test product',
})
cls.account1 = cls.env['account.analytic.account'].create({
self.account1 = self.env['account.analytic.account'].create({
'name': 'Test account #1',
})
cls.account2 = cls.env['account.analytic.account'].create({
self.account2 = self.env['account.analytic.account'].create({
'name': 'Test account #2',
})
cls.uom = cls.env.ref('product.product_uom_hour')
cls.contract = cls.env['account.analytic.account'].create({
self.uom = self.env.ref('product.product_uom_hour')
self.contract = self.env['account.analytic.account'].create({
'name': 'Test contract',
'partner_id': cls.partner.id,
'type': 'contract',
'partner_id': self.partner.id,
'recurring_invoices': 1,
'recurring_interval': 1,
'recurring_invoice_line_ids': [
(0, 0, {'quantity': 2.0,
'price_unit': 100.0,
'name': 'Test',
'product_id': cls.product.id,
'uom_id': cls.uom.id})],
'product_id': self.product.id,
'uom_id': self.uom.id})],
})
cls.distribution = cls.env['account.analytic.distribution'].create({
self.distribution = self.env['account.analytic.distribution'].create({
'name': 'Test distribution',
'rule_ids': [
(0, 0, {
'sequence': 10,
'percent': 75.00,
'analytic_account_id': cls.account1.id,
'analytic_account_id': self.account1.id,
}),
(0, 0, {
'sequence': 20,
'percent': 25.00,
'analytic_account_id': cls.account2.id,
'analytic_account_id': self.account2.id,
}),
]
})

1
oca_dependencies.txt

@ -1,3 +1,4 @@
account-analytic
bank-payment
sale-workflow
web
Loading…
Cancel
Save