From 6e39c2d6f010baf0ef1a39aed102b23d458abb22 Mon Sep 17 00:00:00 2001
From: "Adrien Peiffer (ACSONE)"
Date: Thu, 3 Dec 2015 13:38:55 +0100
Subject: [PATCH 01/26] Rename pos_analytic_config to pos_analytic_by_config
---
pos_analytic_by_config/README.rst | 59 ++++++++++++++
pos_analytic_by_config/__init__.py | 4 +
pos_analytic_by_config/__openerp__.py | 22 +++++
pos_analytic_by_config/models/__init__.py | 5 ++
pos_analytic_by_config/models/pos_config.py | 13 +++
pos_analytic_by_config/models/pos_order.py | 13 +++
.../static/description/icon.png | Bin 0 -> 9455 bytes
pos_analytic_by_config/tests/__init__.py | 2 +
.../tests/test_pos_analytic_by_config.py | 75 ++++++++++++++++++
.../views/pos_config_view.xml | 15 ++++
10 files changed, 208 insertions(+)
create mode 100644 pos_analytic_by_config/README.rst
create mode 100644 pos_analytic_by_config/__init__.py
create mode 100644 pos_analytic_by_config/__openerp__.py
create mode 100644 pos_analytic_by_config/models/__init__.py
create mode 100644 pos_analytic_by_config/models/pos_config.py
create mode 100644 pos_analytic_by_config/models/pos_order.py
create mode 100644 pos_analytic_by_config/static/description/icon.png
create mode 100644 pos_analytic_by_config/tests/__init__.py
create mode 100644 pos_analytic_by_config/tests/test_pos_analytic_by_config.py
create mode 100644 pos_analytic_by_config/views/pos_config_view.xml
diff --git a/pos_analytic_by_config/README.rst b/pos_analytic_by_config/README.rst
new file mode 100644
index 0000000000..a29e9f3295
--- /dev/null
+++ b/pos_analytic_by_config/README.rst
@@ -0,0 +1,59 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
+ :alt: License: AGPL-3
+
+===================
+POS Analytic Config
+===================
+
+This module allows to use analytic account defined on POS configuration
+for invoices and accounting entries generated from POS orders.
+
+Configuration
+=============
+
+To configure this module, you need to:
+
+* Go to Point of Sale > Configuration > Point of Sales
+* Open an existing or create a new one
+* You can put an analytic account on the current point of sale (pos.config)
+
+Usage
+=====
+
+.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
+ :alt: Try me on Runbot
+ :target: https://runbot.odoo-community.org/runbot/87/8.0
+
+For further information, please visit:
+
+ * https://www.odoo.com/forum/help-1
+
+Bug Tracker
+===========
+
+Bugs are tracked on `GitHub Issues `_.
+In case of trouble, please check there if your issue has already been reported.
+If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
+`here `_.
+
+Credits
+=======
+
+Contributors
+------------
+
+* Adrien Peiffer
+
+Maintainer
+----------
+
+.. image:: https://odoo-community.org/logo.png
+ :alt: Odoo Community Association
+ :target: https://odoo-community.org
+
+This module is maintained by the OCA.
+
+OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
+
+To contribute to this module, please visit http://odoo-community.org.
diff --git a/pos_analytic_by_config/__init__.py b/pos_analytic_by_config/__init__.py
new file mode 100644
index 0000000000..1ed91cf880
--- /dev/null
+++ b/pos_analytic_by_config/__init__.py
@@ -0,0 +1,4 @@
+# -*- coding: utf-8 -*-
+# © 2015 ACSONE SA/NV ()
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+from . import models
diff --git a/pos_analytic_by_config/__openerp__.py b/pos_analytic_by_config/__openerp__.py
new file mode 100644
index 0000000000..a7f4f0c1c0
--- /dev/null
+++ b/pos_analytic_by_config/__openerp__.py
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+# © 2015 ACSONE SA/NV ()
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+{
+ 'name': "POS Analytic Config",
+
+ 'summary': """Use analytic account defined on
+ POS configuration for POS orders""",
+ 'author': 'ACSONE SA/NV,'
+ 'Odoo Community Association (OCA)',
+ 'website': "http://acsone.eu",
+ 'category': 'Point Of Sale, Accounting',
+ 'version': '8.0.1.0.0',
+ 'license': 'AGPL-3',
+ 'depends': [
+ 'point_of_sale',
+ ],
+
+ 'data': [
+ 'views/pos_config_view.xml',
+ ],
+}
diff --git a/pos_analytic_by_config/models/__init__.py b/pos_analytic_by_config/models/__init__.py
new file mode 100644
index 0000000000..722d957733
--- /dev/null
+++ b/pos_analytic_by_config/models/__init__.py
@@ -0,0 +1,5 @@
+# -*- coding: utf-8 -*-
+# © 2015 ACSONE SA/NV ()
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+from . import pos_config
+from . import pos_order
diff --git a/pos_analytic_by_config/models/pos_config.py b/pos_analytic_by_config/models/pos_config.py
new file mode 100644
index 0000000000..269941b2f1
--- /dev/null
+++ b/pos_analytic_by_config/models/pos_config.py
@@ -0,0 +1,13 @@
+# -*- coding: utf-8 -*-
+# © 2015 ACSONE SA/NV ()
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields
+
+
+class PosConfig(models.Model):
+ _inherit = 'pos.config'
+
+ account_analytic_id = fields.Many2one(
+ comodel_name='account.analytic.account', string='Analytic Account',
+ domain=[('type', '!=', 'view')])
diff --git a/pos_analytic_by_config/models/pos_order.py b/pos_analytic_by_config/models/pos_order.py
new file mode 100644
index 0000000000..ff1570bd1e
--- /dev/null
+++ b/pos_analytic_by_config/models/pos_order.py
@@ -0,0 +1,13 @@
+# -*- coding: utf-8 -*-
+# © 2015 ACSONE SA/NV ()
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, api
+
+
+class PosOrder(models.Model):
+ _inherit = 'pos.order'
+
+ @api.model
+ def _prepare_analytic_account(self, line):
+ return line.order_id.session_id.config_id.account_analytic_id.id
diff --git a/pos_analytic_by_config/static/description/icon.png b/pos_analytic_by_config/static/description/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d
GIT binary patch
literal 9455
zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~!
zVpnB`o+K7|Al`Q_U;eD$B
zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA
z6`?GZymC;dCPk~rBS%eCb`5OLr;RUZ;D`}um=H)BfVIq%7VhiMr)_#G0N#zrNH|__
zc+blN2UAB0=617@>_u;MPHN;P;N#YoE=)R#i$k_`UAA>WWCcEVMh~L_
zj--gtp&|K1#58Yz*AHCTMziU1Jzt_jG0I@qAOHsk$2}yTmVkBp_eHuY$A9)>P6o~I
z%aQ?!(GqeQ-Y+b0I(m9pwgi(IIZZzsbMv+9w{PFtd_<_(LA~0H(xz{=FhLB@(1&qHA5EJw1>>=%q2f&^X>IQ{!GJ4e9U
z&KlB)z(84HmNgm2hg2C0>WM{E(DdPr+EeU_N@57;PC2&DmGFW_9kP&%?X4}+xWi)(
z;)z%wI5>D4a*5XwD)P--sPkoY(a~WBw;E~AW`Yue4kFa^LM3X`8x|}ZUeMnqr}>kH
zG%WWW>3ml$Yez?i%)2pbKPI7?5o?hydokgQyZsNEr{a|mLdt;X2TX(#B1j35xPnPW
z*bMSSOauW>o;*=kO8ojw91VX!qoOQb)zHJ!odWB}d+*K?#sY_jqPdg{Sm2HdYzdEx
zOGVPhVRTGPtv0o}RfVP;Nd(|CB)I;*t&QO8h
zFfekr30S!-LHmV_Su-W+rEwYXJ^;6&3|L$mMC8*bQptyOo9;>Qb9Q9`ySe3%V$A*9
zeKEe+b0{#KWGp$F+tga)0RtI)nhMa-K@JS}2krK~n8vJ=Ngm?R!9G<~RyuU0d?nz#
z-5EK$o(!F?hmX*2Yt6+coY`6jGbb7tF#6nHA
zuKk=GGJ;ZwON1iAfG$E#Y7MnZVmrY|j0eVI(DN_MNFJmyZ|;w4tf@=CCDZ#5N_0K=
z$;R~bbk?}TpfDjfB&aiQ$VA}s?P}xPERJG{kxk5~R`iRS(SK5d+Xs9swCozZISbnS
zk!)I0>t=A<-^z(cmSFz3=jZ23u13X><0b)P)^1T_))Kr`e!-pb#q&J*Q`p+B6la%C
zuVl&0duN<;uOsB3%T9Fp8t{ED108)`y_~Hnd9AUX7h-H?jVuU|}My+C=TjH(jKz
zqMVr0re3S$H@t{zI95qa)+Crz*5Zj}Ao%4Z><+W(nOZd?gDnfNBC3>M8WE61$So|P
zVvqH0SNtDTcsUdzaMDpT=Ty0pDHHNL@Z0w$Y`XO
z2M-_r1S+GaH%pz#Uy0*w$Vdl=X=rQXEzO}d6J^R6zjM1u&c9vYLvLp?W7w(?np9x1
zE_0JSAJCPB%i7p*Wvg)pn5T`8k3-uR?*NT|J`eS#_#54p>!p(mLDvmc-3o0mX*mp_
zN*AeS<>#^-{S%W<*mz^!X$w_2dHWpcJ6^j64qFBft-o}o_Vx80o0>}Du;>kLts;$8
zC`7q$QI(dKYG`Wa8#wl@V4jVWBRGQ@1dr-hstpQL)Tl+aqVpGpbSfN>5i&QMXfiZ>
zaA?T1VGe?rpQ@;+pkrVdd{klI&jVS@I5_iz!=UMpTsa~mBga?1r}aRBm1WS;TT*s0f0lY=JBl66Upy)-k4J}lh=P^8(SXk~0xW=T9v*B|gzIhN
z>qsO7dFd~mgxAy4V?&)=5ieYq?zi?ZEoj)&2o)RLy=@hbCRcfT5jigwtQGE{L*8<@Yd{zg;CsL5mvzfDY}P-wos_6PfprFVaeqNE%h
zKZhLtcQld;ZD+>=nqN~>GvROfueSzJD&BE*}XfU|H&(FssBqY=hPCt`d
zH?@s2>I(|;fcW&YM6#V#!kUIP8$Nkdh0A(bEVj``-AAyYgwY~jB
zT|I7Bf@%;7aL7Wf4dZ%VqF$eiaC38OV6oy3Z#TER2G+fOCd9Iaoy6aLYbPTN{XRPz
z;U!V|vBf%H!}52L2gH_+j;`bTcQRXB+y9onc^wLm5wi3-Be}U>k_u>2Eg$=k!(l@I
zcCg+flakT2Nej3i0yn+g+}%NYb?ta;R?(g5SnwsQ49U8Wng8d|{B+lyRcEDvR3+`O{zfmrmvFrL6acVP%yG98X
zo&+VBg@px@i)%o?dG(`T;n*$S5*rnyiR#=wW}}GsAcfyQpE|>a{=$Hjg=-*_K;UtD
z#z-)AXwSRY?OPefw^iI+
z)AXz#PfEjlwTes|_{sB?4(O@fg0AJ^g8gP}ex9Ucf*@_^J(s_5jJV}c)s$`Myn|Kd
z$6>}#q^n{4vN@+Os$m7KV+`}c%4)4pv@06af4-x5#wj!KKb%caK{A&Y#Rfs
z-po?Dcb1({W=6FKIUirH&(yg=*6aLCekcKwyfK^JN5{wcA3nhO(o}SK#!CINhI`-I
z1)6&n7O&ZmyFMuNwvEic#IiOAwNkR=u5it{B9n2sAJV5pNhar=j5`*N!Na;c7g!l$
z3aYBqUkqqTJ=Re-;)s!EOeij=7SQZ3Hq}ZRds%IM*PtM$wV
z@;rlc*NRK7i3y5BETSKuumEN`Xu_8GP1Ri=OKQ$@I^ko8>H6)4rjiG5{VBM>B|%`&&s^)jS|-_95&yc=GqjNo{zFkw%%HHhS~e=s
zD#sfS+-?*t|J!+ozP6KvtOl!R)@@-z24}`9{QaVLD^9VCSR2b`b!KC#o;Ki<+wXB6
zx3&O0LOWcg4&rv4QG0)4yb}7BFSEg~=IR5#ZRj8kg}dS7_V&^%#Do==#`u
zpy6{ox?jWuR(;pg+f@mT>#HGWHAJRRDDDv~@(IDw&R>9643kK#HN`!1vBJHnC+RM&yIh8{gG2q
zA%e*U3|N0XSRa~oX-3EAneep)@{h2vvd3Xvy$7og(sayr@95+e6~Xvi1tUqnIxoIH
zVWo*OwYElb#uyW{Imam6f2rGbjR!Y3`#gPqkv57dB6K^wRGxc9B(t|aYDGS=m$&S!NmCtrMMaUg(c
zc2qC=2Z`EEFMW-me5B)24AqF*bV5Dr-M5ig(l-WPS%CgaPzs6p_gnCIvTJ=Y<6!gT
zVt@AfYCzjjsMEGi=rDQHo0yc;HqoRNnNFeWZgcm?f;cp(6CNylj36DoL(?TS7eU#+
z7&mfr#y))+CJOXQKUMZ7QIdS9@#-}7y2K1{8)cCt0~-X0O!O?Qx#E4Og+;A2SjalQ
zs7r?qn0H044=sDN$SRG$arw~n=+T_DNdSrarmu)V6@|?1-ZB#hRn`uilTGPJ@fqEy
zGt(f0B+^JDP&f=r{#Y_wi#AVDf-y!RIXU^0jXsFpf>=Ji*TeqSY!H~AMbJdCGLhC)
zn7Rx+sXw6uYj;WRYrLd^5IZq@6JI1C^YkgnedZEYy<&4(z%Q$5yv#Boo{AH8n$a
zhb4Y3PWdr269&?V%uI$xMcUrMzl=;w<_nm*qr=c3Rl@i5wWB;e-`t7D&c-mcQl7x!
zZWB`UGcw=Y2=}~wzrfLx=uet<;m3~=8I~ZRuzvMQUQdr+yTV|ATf1Uuomr__nDf=X
zZ3WYJtHp_ri(}SQAPjv+Y+0=fH4krOP@S&=zZ-t1jW1o@}z;xk8
z(Nz1co&El^HK^NrhVHa-_;&88vTU>_J33=%{if;BEY*J#1n59=07jrGQ#IP>@u#3A
z;!q+E1Rj3ZJ+!4bq9F8PXJ@yMgZL;>&gYA0%_Kbi8?S=XGM~dnQZQ!yBSgcZhY96H
zrWnU;k)qy`rX&&xlDyA%(a1Hhi5CWkmg(`Gb%m(HKi-7Z!LKGRP_B8@`7&hdDy5n=
z`OIxqxiVfX@OX1p(mQu>0Ai*v_cTMiw4qRt3~NBvr9oBy0)r>w3p~V0SCm=An6@3n)>@z!|o-$HvDK
z|3D2ZMJkLE5loMKl6R^ez@Zz%S$&mbeoqH5`Bb){Ei21q&VP)hWS2tjShfFtGE+$z
zzCR$P#uktu+#!w)cX!lWN1XU%K-r=s{|j?)Akf@q#3b#{6cZCuJ~gCxuMXRmI$nGtnH+-h
z+GEi!*X=AP<|fG`1>MBdTb?28JYc=fGvAi2I<$B(rs$;eoJCyR6_bc~p!XR@O-+sD
z=eH`-ye})I5ic1eL~TDmtfJ|8`0VJ*Yr=hNCd)G1p2MMz4C3^Mj?7;!w|Ly%JqmuW
zlIEW^Ft%z?*|fpXda>Jr^1noFZEwFgVV%|*XhH@acv8rdGxeEX{M$(vG{Zw+x(ei@
zmfXb22}8-?Fi`vo-YVrTH*C?a8%M=Hv9MqVH7H^J$KsD?>!SFZ;ZsvnHr_gn=7acz
z#W?0eCdVhVMWN12VV^$>WlQ?f;P^{(&pYTops|btm6aj>_Uz+hqpGwB)vWp0Cf5y<
zft8-je~nn?W11plq}N)4A{l8I7$!ks_x$PXW-2XaRFswX_BnF{R#6YIwMhAgd5F9X
zGmwdadS6(a^fjHtXg8=l?Rc0Sm%hk6E9!5cLVloEy4eh(=FwgP`)~I^5~pBEWo+F6
zSf2ncyMurJN91#cJTy_u8Y}@%!bq1RkGC~-bV@SXRd4F{R-*V`bS+6;W5vZ(&+I<9$;-V|eNfLa5n-6%
z2(}&uGRF;p92eS*sE*oR$@pexaqr*meB)VhmIg@h{uzkk$9~qh#cHhw#>O%)b@+(|
z^IQgqzuj~Sk(J;swEM-3TrJAPCq9k^^^`q{IItKBRXYe}e0Tdr=Huf7da3$l4PdpwWDop%^}n;dD#K4s#DYA8SHZ
z&1!riV4W4R7R#C))JH1~axJ)RYnM$$lIR%6fIVA@zV{XVyx}C+a-Dt8Y9M)^KU0+H
zR4IUb2CJ{Hg>CuaXtD50jB(_Tcx=Z$^WYu2u5kubqmwp%drJ6
z?Fo40g!Qd<-l=TQxqHEOuPX0;^z7iX?Ke^a%XT<13TA^5`4Xcw6D@Ur&VT&CUe0d}
z1GjOVF1^L@>O)l@?bD~$wzgf(nxX1OGD8fEV?TdJcZc2KoUe|oP1#=$$7ee|xbY)A
zDZq+cuTpc(fFdj^=!;{k03C69lMQ(|>uhRfRu%+!k&YOi-3|1QKB
z
z?n?eq1XP>p-IM$Z^C;2L3itnbJZAip*Zo0aw2bs8@(s^~*8T9go!%dHcAz2lM;`yp
zD=7&xjFV$S&5uDaiScyD?B-i1ze`+CoRtz`Wn+Zls4&}MO{@N!ufrzjG$B79)Y2d3tBk&)TxUTw@QS0TEL_?njX|@vq?Uz(nBFK5Pq7*xj#u*R&i|?7+6#
z+|r_n#SW&LXhtheZdah{ZVoqwyT{D>MC3nkFF#N)xLi{p7J1jXlmVeb;cP5?e(=f#
zuT7fvjSbjS781v?7{)-X3*?>tq?)Yd)~|1{BDS(pqC
zC}~H#WXlkUW*H5CDOo<)#x7%RY)A;ShGhI5s*#cRDA8YgqG(HeKDx+#(ZQ?386dv!
zlXCO)w91~Vw4AmOcATuV653fa9R$fyK8ul%rG
z-wfS
zihugoZyr38Im?Zuh6@RcF~t1anQu7>#lPpb#}4cOA!EM11`%f*07RqOVkmX{p~KJ9
z^zP;K#|)$`^Rb{rnHGH{~>1(fawV0*Z#)}M`m8-?ZJV<+e}s9wE#
z)l&az?w^5{)`S(%MRzxdNqrs1n*-=jS^_jqE*5XDrA0+VE`5^*p3CuM<&dZEeCjoz
zR;uu_H9ZPZV|fQq`Cyw4nscrVwi!fE6ciMmX$!_hN7uF;jjKG)d2@aC4ropY)8etW=xJvni)8eHi`H$%#zn^WJ5NLc-rqk|u&&4Z6fD_m&JfSI1Bvb?b<*n&sfl0^t
z=HnmRl`XrFvMKB%9}>PaA`m-fK6a0(8=qPkWS5bb4=v?XcWi&hRY?O5HdulRi4?fN
zlsJ*N-0Qw+Yic@s0(2uy%F@ib;GjXt01Fmx5XbRo6+n|pP(&nodMoap^z{~q
ziEeaUT@Mxe3vJSfI6?uLND(CNr=#^W<1b}jzW58bIfyWTDle$mmS(|x-0|2UlX+9k
zQ^EX7Nw}?EzVoBfT(-LT|=9N@^hcn-_p&sqG
z&*oVs2JSU+N4ZD`FhCAWaS;>|wH2G*Id|?pa#@>tyxX`+4HyIArWDvVrX)2WAOQff
z0qyHu&-S@i^MS-+j--!pr4fPBj~_8({~e1bfcl0wI1kaoN>mJL6KUPQm5N7lB(ui1
zE-o%kq)&djzWJ}ob<-GfDlkB;F31j-VHKvQUGQ3sp`CwyGJk_i!y^sD0fqC@$9|jO
zOqN!r!8-p==F@ZVP=U$qSpY(gQ0)59P1&t@y?5rvg<}E+GB}26NYPp4f2YFQrQtot5mn3wu_qprZ=>Ig-$
zbW26Ws~IgY>}^5w`vTB(G`PTZaDiGBo5o(tp)qli|NeV(
z@H_=R8V39rt5J5YB2Ky?4eJJ#b`_iBe2ot~6%7mLt5t8Vwi^Jy7|jWXqa3amOIoRb
zOr}WVFP--DsS`1WpN%~)t3R!arKF^Q$e12KEqU36AWwnCBICpH4XCsfnyrHr>$I$4
z!DpKX$OKLWarN7nv@!uIA+~RNO)l$$w}p(;b>mx8pwYvu;dD_unryX_NhT8*Tj>BTrTTL&!?O+%Rv;b?B??gSzdp?6Uug9{
zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx}
z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov
zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22
zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq
zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t<
z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k
z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp
z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{}
zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N
Xviia!U7SGha1wx#SCgwmn*{w2TRX*I
literal 0
HcmV?d00001
diff --git a/pos_analytic_by_config/tests/__init__.py b/pos_analytic_by_config/tests/__init__.py
new file mode 100644
index 0000000000..8586e31cf4
--- /dev/null
+++ b/pos_analytic_by_config/tests/__init__.py
@@ -0,0 +1,2 @@
+# -*- coding: utf-8 -*-
+from . import test_pos_analytic_by_config
diff --git a/pos_analytic_by_config/tests/test_pos_analytic_by_config.py b/pos_analytic_by_config/tests/test_pos_analytic_by_config.py
new file mode 100644
index 0000000000..0600d19e84
--- /dev/null
+++ b/pos_analytic_by_config/tests/test_pos_analytic_by_config.py
@@ -0,0 +1,75 @@
+# -*- coding: utf-8 -*-
+# © 2015 ACSONE SA/NV ()
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp.tests import common
+
+
+class TestPosAnalyticConfig(common.TransactionCase):
+
+ def setUp(self):
+ super(TestPosAnalyticConfig, self).setUp()
+ self.pos_order_obj = self.env['pos.order']
+ self.pos_conig_obj = self.env['pos.config']
+ self.pos_session_obj = self.env['pos.session']
+ self.aml_obj = self.env['account.move.line']
+ self.inv_line_obj = self.env['account.invoice.line']
+ self.main_config = self.env.ref('point_of_sale.pos_config_main')
+ self.aa_01 = self.env.ref('account.analytic_root')
+ self.customer_01 = self.env.ref('base.res_partner_2')
+ self.product_01 =\
+ self.env.ref('point_of_sale.perrier_50cl')
+ self.payment_method_01 = self.env.ref('account.bank_journal')
+ self.aml_analytic_domain =\
+ [('product_id', '=', self.product_01.id),
+ ('analytic_account_id', '=', self.aa_01.id)]
+ self.inv_analytic_domain =\
+ [('product_id', '=', self.product_01.id),
+ ('account_analytic_id', '=', self.aa_01.id)]
+
+ def common_test(self):
+ self.main_config.account_analytic_id = self.aa_01
+ # I create and open a new session
+ self.session_01 = self.pos_session_obj.create(
+ {'config_id': self.main_config.id})
+ ctx = self.env.context.copy()
+ # context is updated in open_cb
+ # -> Need to call with old api to give unfrozen context
+ self.registry['pos.session'].open_cb(
+ self.cr, self.uid, [self.session_01.id], context=ctx)
+ # I create a new order
+ order_vals = {
+ 'session_id': self.session_01.id,
+ 'partner_id': self.customer_01.id,
+ 'lines': [(0, 0, {'product_id': self.product_01.id,
+ 'price_unit': 10.0,
+ })]
+ }
+ self.order_01 = self.pos_order_obj.create(order_vals)
+ # I pay the created order
+ payment_data = {'amount': 10,
+ 'journal': self.payment_method_01.id}
+ self.pos_order_obj.add_payment(self.order_01.id, payment_data)
+ if self.order_01.test_paid():
+ self.order_01.signal_workflow('paid')
+
+ def test_order_simple_receipt(self):
+ self.common_test()
+ aml = self.aml_obj.search(self.aml_analytic_domain)
+ # I check that there isn't lines with the analytic account in this test
+ self.assertEqual(len(aml.ids), 0)
+ self.session_01.signal_workflow('close')
+ # I check that there is a journal item with the config analytic account
+ aml = self.aml_obj.search(self.aml_analytic_domain)
+ self.assertEqual(len(aml.ids), 1)
+
+ def test_order_invoice(self):
+ self.common_test()
+ lines = self.inv_line_obj.search(self.inv_analytic_domain)
+ self.order_01.action_invoice()
+ # I check that there isn't lines with the analytic account in this test
+ self.assertEqual(len(lines.ids), 0)
+ lines = self.inv_line_obj.search(self.inv_analytic_domain)
+ # I check that there is an invoice line
+ # with the config analytic account
+ self.assertEqual(len(lines.ids), 1)
diff --git a/pos_analytic_by_config/views/pos_config_view.xml b/pos_analytic_by_config/views/pos_config_view.xml
new file mode 100644
index 0000000000..45c0594559
--- /dev/null
+++ b/pos_analytic_by_config/views/pos_config_view.xml
@@ -0,0 +1,15 @@
+
+
+
+
+ pos.config.form.view (pos_analytic_by_config)
+ pos.config
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From 6975e4b346b6dac42589c9ecea85598f2bec37d9 Mon Sep 17 00:00:00 2001
From: OCA Transbot
Date: Fri, 5 Aug 2016 18:20:54 -0400
Subject: [PATCH 02/26] OCA Transbot updated translations from Transifex
---
pos_analytic_by_config/i18n/ca.po | 29 +++++++++++++++++++++++++++
pos_analytic_by_config/i18n/de.po | 29 +++++++++++++++++++++++++++
pos_analytic_by_config/i18n/el_GR.po | 29 +++++++++++++++++++++++++++
pos_analytic_by_config/i18n/en.po | 26 ++++++++++++++++++++++++
pos_analytic_by_config/i18n/es.po | 29 +++++++++++++++++++++++++++
pos_analytic_by_config/i18n/es_MX.po | 29 +++++++++++++++++++++++++++
pos_analytic_by_config/i18n/fi.po | 29 +++++++++++++++++++++++++++
pos_analytic_by_config/i18n/fr.po | 30 ++++++++++++++++++++++++++++
pos_analytic_by_config/i18n/pt_BR.po | 29 +++++++++++++++++++++++++++
pos_analytic_by_config/i18n/sk_SK.po | 29 +++++++++++++++++++++++++++
pos_analytic_by_config/i18n/sl.po | 29 +++++++++++++++++++++++++++
pos_analytic_by_config/i18n/zh_CN.po | 30 ++++++++++++++++++++++++++++
12 files changed, 347 insertions(+)
create mode 100644 pos_analytic_by_config/i18n/ca.po
create mode 100644 pos_analytic_by_config/i18n/de.po
create mode 100644 pos_analytic_by_config/i18n/el_GR.po
create mode 100644 pos_analytic_by_config/i18n/en.po
create mode 100644 pos_analytic_by_config/i18n/es.po
create mode 100644 pos_analytic_by_config/i18n/es_MX.po
create mode 100644 pos_analytic_by_config/i18n/fi.po
create mode 100644 pos_analytic_by_config/i18n/fr.po
create mode 100644 pos_analytic_by_config/i18n/pt_BR.po
create mode 100644 pos_analytic_by_config/i18n/sk_SK.po
create mode 100644 pos_analytic_by_config/i18n/sl.po
create mode 100644 pos_analytic_by_config/i18n/zh_CN.po
diff --git a/pos_analytic_by_config/i18n/ca.po b/pos_analytic_by_config/i18n/ca.po
new file mode 100644
index 0000000000..69060fbc86
--- /dev/null
+++ b/pos_analytic_by_config/i18n/ca.po
@@ -0,0 +1,29 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * pos_analytic_by_config
+#
+# Translators:
+# Carles Antoli , 2017
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-01-13 23:06+0000\n"
+"PO-Revision-Date: 2017-01-13 23:06+0000\n"
+"Last-Translator: Carles Antoli , 2017\n"
+"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: ca\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: pos_analytic_by_config
+#: field:pos.config,account_analytic_id:0
+msgid "Analytic Account"
+msgstr "Compte analític"
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale"
+msgstr ""
diff --git a/pos_analytic_by_config/i18n/de.po b/pos_analytic_by_config/i18n/de.po
new file mode 100644
index 0000000000..6a361e8740
--- /dev/null
+++ b/pos_analytic_by_config/i18n/de.po
@@ -0,0 +1,29 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * pos_analytic_by_config
+#
+# Translators:
+# Rudolf Schnapka , 2017
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-01-20 23:05+0000\n"
+"PO-Revision-Date: 2017-01-20 23:05+0000\n"
+"Last-Translator: Rudolf Schnapka , 2017\n"
+"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: de\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: pos_analytic_by_config
+#: field:pos.config,account_analytic_id:0
+msgid "Analytic Account"
+msgstr "Kostenstelle"
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale"
+msgstr "Verkaufsstelle"
diff --git a/pos_analytic_by_config/i18n/el_GR.po b/pos_analytic_by_config/i18n/el_GR.po
new file mode 100644
index 0000000000..23c05e3713
--- /dev/null
+++ b/pos_analytic_by_config/i18n/el_GR.po
@@ -0,0 +1,29 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * pos_analytic_by_config
+#
+# Translators:
+# Kostas Goutoudis , 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-09-30 22:27+0000\n"
+"PO-Revision-Date: 2016-09-30 22:27+0000\n"
+"Last-Translator: Kostas Goutoudis , 2016\n"
+"Language-Team: Greek (Greece) (https://www.transifex.com/oca/teams/23907/el_GR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: el_GR\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: pos_analytic_by_config
+#: field:pos.config,account_analytic_id:0
+msgid "Analytic Account"
+msgstr "Αναλυτικός Λογαριασμός"
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale"
+msgstr ""
diff --git a/pos_analytic_by_config/i18n/en.po b/pos_analytic_by_config/i18n/en.po
new file mode 100644
index 0000000000..8c1281b762
--- /dev/null
+++ b/pos_analytic_by_config/i18n/en.po
@@ -0,0 +1,26 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * pos_analytic_by_config
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-07-30 09:13+0000\n"
+"PO-Revision-Date: 2016-07-30 09:13+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: pos_analytic_by_config
+#: field:pos.config,account_analytic_id:0
+msgid "Analytic Account"
+msgstr "Analytic Account"
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale"
+msgstr "Point of Sale"
diff --git a/pos_analytic_by_config/i18n/es.po b/pos_analytic_by_config/i18n/es.po
new file mode 100644
index 0000000000..fc3bfc9f8a
--- /dev/null
+++ b/pos_analytic_by_config/i18n/es.po
@@ -0,0 +1,29 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * pos_analytic_by_config
+#
+# Translators:
+# OCA Transbot , 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-08-15 17:04+0000\n"
+"PO-Revision-Date: 2016-08-15 17:04+0000\n"
+"Last-Translator: OCA Transbot , 2016\n"
+"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: es\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: pos_analytic_by_config
+#: field:pos.config,account_analytic_id:0
+msgid "Analytic Account"
+msgstr "Cuenta analítica"
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale"
+msgstr ""
diff --git a/pos_analytic_by_config/i18n/es_MX.po b/pos_analytic_by_config/i18n/es_MX.po
new file mode 100644
index 0000000000..27e4ff79e2
--- /dev/null
+++ b/pos_analytic_by_config/i18n/es_MX.po
@@ -0,0 +1,29 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * pos_analytic_by_config
+#
+# Translators:
+# Juan González , 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-12-03 13:34+0000\n"
+"PO-Revision-Date: 2016-12-03 13:34+0000\n"
+"Last-Translator: Juan González , 2016\n"
+"Language-Team: Spanish (Mexico) (https://www.transifex.com/oca/teams/23907/es_MX/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: es_MX\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: pos_analytic_by_config
+#: field:pos.config,account_analytic_id:0
+msgid "Analytic Account"
+msgstr "Cuenta analítica"
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale"
+msgstr ""
diff --git a/pos_analytic_by_config/i18n/fi.po b/pos_analytic_by_config/i18n/fi.po
new file mode 100644
index 0000000000..b96f1d47b3
--- /dev/null
+++ b/pos_analytic_by_config/i18n/fi.po
@@ -0,0 +1,29 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * pos_analytic_by_config
+#
+# Translators:
+# OCA Transbot , 2017
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-04-06 02:55+0000\n"
+"PO-Revision-Date: 2017-04-06 02:55+0000\n"
+"Last-Translator: OCA Transbot , 2017\n"
+"Language-Team: Finnish (https://www.transifex.com/oca/teams/23907/fi/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: fi\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: pos_analytic_by_config
+#: field:pos.config,account_analytic_id:0
+msgid "Analytic Account"
+msgstr "Analyyttinen tili"
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale"
+msgstr ""
diff --git a/pos_analytic_by_config/i18n/fr.po b/pos_analytic_by_config/i18n/fr.po
new file mode 100644
index 0000000000..37ced32cab
--- /dev/null
+++ b/pos_analytic_by_config/i18n/fr.po
@@ -0,0 +1,30 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * pos_analytic_by_config
+#
+# Translators:
+# OCA Transbot , 2016
+# Zwygart , 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-09-30 22:27+0000\n"
+"PO-Revision-Date: 2016-09-30 22:27+0000\n"
+"Last-Translator: Zwygart , 2016\n"
+"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: fr\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. module: pos_analytic_by_config
+#: field:pos.config,account_analytic_id:0
+msgid "Analytic Account"
+msgstr "Compte analytique"
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale"
+msgstr "Point de vente"
diff --git a/pos_analytic_by_config/i18n/pt_BR.po b/pos_analytic_by_config/i18n/pt_BR.po
new file mode 100644
index 0000000000..c3f6004570
--- /dev/null
+++ b/pos_analytic_by_config/i18n/pt_BR.po
@@ -0,0 +1,29 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * pos_analytic_by_config
+#
+# Translators:
+# OCA Transbot , 2017
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-04-06 02:55+0000\n"
+"PO-Revision-Date: 2017-04-06 02:55+0000\n"
+"Last-Translator: OCA Transbot , 2017\n"
+"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: pt_BR\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. module: pos_analytic_by_config
+#: field:pos.config,account_analytic_id:0
+msgid "Analytic Account"
+msgstr "Conta analítica"
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale"
+msgstr ""
diff --git a/pos_analytic_by_config/i18n/sk_SK.po b/pos_analytic_by_config/i18n/sk_SK.po
new file mode 100644
index 0000000000..ed823f9e6e
--- /dev/null
+++ b/pos_analytic_by_config/i18n/sk_SK.po
@@ -0,0 +1,29 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * pos_analytic_by_config
+#
+# Translators:
+# OCA Transbot , 2017
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-04-06 02:55+0000\n"
+"PO-Revision-Date: 2017-04-06 02:55+0000\n"
+"Last-Translator: OCA Transbot , 2017\n"
+"Language-Team: Slovak (Slovakia) (https://www.transifex.com/oca/teams/23907/sk_SK/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: sk_SK\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+
+#. module: pos_analytic_by_config
+#: field:pos.config,account_analytic_id:0
+msgid "Analytic Account"
+msgstr "Analytický účet"
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale"
+msgstr ""
diff --git a/pos_analytic_by_config/i18n/sl.po b/pos_analytic_by_config/i18n/sl.po
new file mode 100644
index 0000000000..1fc4a7cb18
--- /dev/null
+++ b/pos_analytic_by_config/i18n/sl.po
@@ -0,0 +1,29 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * pos_analytic_by_config
+#
+# Translators:
+# Matjaž Mozetič , 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-07-30 09:13+0000\n"
+"PO-Revision-Date: 2016-07-30 09:13+0000\n"
+"Last-Translator: Matjaž Mozetič , 2016\n"
+"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: sl\n"
+"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
+
+#. module: pos_analytic_by_config
+#: field:pos.config,account_analytic_id:0
+msgid "Analytic Account"
+msgstr "Analitični konto"
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale"
+msgstr "POS Prodajna točka"
diff --git a/pos_analytic_by_config/i18n/zh_CN.po b/pos_analytic_by_config/i18n/zh_CN.po
new file mode 100644
index 0000000000..c583f48b34
--- /dev/null
+++ b/pos_analytic_by_config/i18n/zh_CN.po
@@ -0,0 +1,30 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * pos_analytic_by_config
+#
+# Translators:
+# ITGeeker , 2017
+# liAnGjiA , 2017
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-04-06 02:55+0000\n"
+"PO-Revision-Date: 2017-04-06 02:55+0000\n"
+"Last-Translator: liAnGjiA , 2017\n"
+"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/zh_CN/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: zh_CN\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#. module: pos_analytic_by_config
+#: field:pos.config,account_analytic_id:0
+msgid "Analytic Account"
+msgstr "核算科目"
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale"
+msgstr "POS"
From a667f5e07ea8eaa3bcfcdff2549013d711f2792b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Pigeon?=
Date: Mon, 8 May 2017 15:26:57 +0200
Subject: [PATCH 03/26] [MIG][10.0] pos_analytic_by_config
---
pos_analytic_by_config/README.rst | 85 ++--
pos_analytic_by_config/__init__.py | 3 -
.../{__openerp__.py => __manifest__.py} | 11 +-
pos_analytic_by_config/i18n/ca.po | 29 +-
pos_analytic_by_config/i18n/de.po | 34 +-
pos_analytic_by_config/i18n/el_GR.po | 32 +-
pos_analytic_by_config/i18n/es.po | 39 +-
pos_analytic_by_config/i18n/es_MX.po | 32 +-
pos_analytic_by_config/i18n/fi.po | 29 +-
pos_analytic_by_config/i18n/fr.po | 34 +-
.../i18n/pos_analytic_by_config.pot | 46 ++
pos_analytic_by_config/i18n/pt_BR.po | 32 +-
pos_analytic_by_config/i18n/sk_SK.po | 32 +-
pos_analytic_by_config/i18n/sl.po | 37 +-
pos_analytic_by_config/i18n/zh_CN.po | 37 +-
pos_analytic_by_config/models/__init__.py | 4 +-
.../models/account_invoice.py | 19 +
pos_analytic_by_config/models/pos_config.py | 11 +-
pos_analytic_by_config/models/pos_order.py | 13 +-
.../readme/CONTRIBUTORS.rst | 8 +
pos_analytic_by_config/readme/DESCRIPTION.rst | 2 +
pos_analytic_by_config/readme/USAGE.rst | 5 +
.../static/description/index.html | 438 ++++++++++++++++++
pos_analytic_by_config/tests/__init__.py | 1 -
.../tests/test_pos_analytic_by_config.py | 112 +++--
.../views/pos_config_view.xml | 38 +-
26 files changed, 981 insertions(+), 182 deletions(-)
rename pos_analytic_by_config/{__openerp__.py => __manifest__.py} (66%)
create mode 100644 pos_analytic_by_config/i18n/pos_analytic_by_config.pot
create mode 100644 pos_analytic_by_config/models/account_invoice.py
create mode 100644 pos_analytic_by_config/readme/CONTRIBUTORS.rst
create mode 100644 pos_analytic_by_config/readme/DESCRIPTION.rst
create mode 100644 pos_analytic_by_config/readme/USAGE.rst
create mode 100644 pos_analytic_by_config/static/description/index.html
diff --git a/pos_analytic_by_config/README.rst b/pos_analytic_by_config/README.rst
index a29e9f3295..fd77a5ad22 100644
--- a/pos_analytic_by_config/README.rst
+++ b/pos_analytic_by_config/README.rst
@@ -1,59 +1,90 @@
-.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
- :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
- :alt: License: AGPL-3
-
===================
POS Analytic Config
===================
+.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! This file is generated by oca-gen-addon-readme !!
+ !! changes will be overwritten. !!
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
+ :target: https://odoo-community.org/page/development-status
+ :alt: Beta
+.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
+ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
+ :alt: License: AGPL-3
+.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--analytic-lightgray.png?logo=github
+ :target: https://github.com/OCA/account-analytic/tree/11.0/pos_analytic_by_config
+ :alt: OCA/account-analytic
+.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
+ :target: https://translation.odoo-community.org/projects/account-analytic-11-0/account-analytic-11-0-pos_analytic_by_config
+ :alt: Translate me on Weblate
+.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
+ :target: https://runbot.odoo-community.org/runbot/87/11.0
+ :alt: Try me on Runbot
+
+|badge1| |badge2| |badge3| |badge4| |badge5|
+
This module allows to use analytic account defined on POS configuration
for invoices and accounting entries generated from POS orders.
-Configuration
-=============
+**Table of contents**
-To configure this module, you need to:
-
-* Go to Point of Sale > Configuration > Point of Sales
-* Open an existing or create a new one
-* You can put an analytic account on the current point of sale (pos.config)
+.. contents::
+ :local:
Usage
=====
-.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
- :alt: Try me on Runbot
- :target: https://runbot.odoo-community.org/runbot/87/8.0
-
-For further information, please visit:
+To configure this module, you need to:
- * https://www.odoo.com/forum/help-1
+* Go to Point of Sale > Configuration > Point of Sales
+* Open an existing or create a new one
+* You can put an analytic account on the current point of sale (pos.config)
Bug Tracker
===========
-Bugs are tracked on `GitHub Issues `_.
+Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
-If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
-`here `_.
+If you spotted it first, help us smashing it by providing a detailed and welcomed
+`feedback `_.
+
+Do not contact contributors directly about support or help with technical issues.
Credits
=======
+Authors
+~~~~~~~
+
+* ACSONE SA/NV
+
Contributors
-------------
+~~~~~~~~~~~~
-* Adrien Peiffer
+* `ACSONE SA/NV `_
-Maintainer
-----------
+ * Adrien Peiffer
+ * Cédric Pigeon
+
+* `Tecnativa `_
+
+ * David Vidal
+
+Maintainers
+~~~~~~~~~~~
+
+This module is maintained by the OCA.
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
-This module is maintained by the OCA.
+OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
-OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
+This module is part of the `OCA/account-analytic `_ project on GitHub.
-To contribute to this module, please visit http://odoo-community.org.
+You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/pos_analytic_by_config/__init__.py b/pos_analytic_by_config/__init__.py
index 1ed91cf880..0650744f6b 100644
--- a/pos_analytic_by_config/__init__.py
+++ b/pos_analytic_by_config/__init__.py
@@ -1,4 +1 @@
-# -*- coding: utf-8 -*-
-# © 2015 ACSONE SA/NV ()
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models
diff --git a/pos_analytic_by_config/__openerp__.py b/pos_analytic_by_config/__manifest__.py
similarity index 66%
rename from pos_analytic_by_config/__openerp__.py
rename to pos_analytic_by_config/__manifest__.py
index a7f4f0c1c0..375e6cc487 100644
--- a/pos_analytic_by_config/__openerp__.py
+++ b/pos_analytic_by_config/__manifest__.py
@@ -1,21 +1,18 @@
-# -*- coding: utf-8 -*-
-# © 2015 ACSONE SA/NV ()
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+# Copyright 2015 ACSONE SA/NV
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
'name': "POS Analytic Config",
-
'summary': """Use analytic account defined on
POS configuration for POS orders""",
'author': 'ACSONE SA/NV,'
'Odoo Community Association (OCA)',
- 'website': "http://acsone.eu",
+ 'website': "https://github.com/OCA/account-analytic",
'category': 'Point Of Sale, Accounting',
- 'version': '8.0.1.0.0',
+ 'version': '11.0.1.0.0',
'license': 'AGPL-3',
'depends': [
'point_of_sale',
],
-
'data': [
'views/pos_config_view.xml',
],
diff --git a/pos_analytic_by_config/i18n/ca.po b/pos_analytic_by_config/i18n/ca.po
index 69060fbc86..9217eb5579 100644
--- a/pos_analytic_by_config/i18n/ca.po
+++ b/pos_analytic_by_config/i18n/ca.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_analytic_by_config
-#
+#
# Translators:
# Carles Antoli , 2017
msgid ""
@@ -12,18 +12,39 @@ msgstr ""
"PO-Revision-Date: 2017-01-13 23:06+0000\n"
"Last-Translator: Carles Antoli , 2017\n"
"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n"
+"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: ca\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: pos_analytic_by_config
-#: field:pos.config,account_analytic_id:0
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "Compte analític"
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account for this config."
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account that these orders link to"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
+msgid "Invoice Line"
+msgstr ""
+
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale"
+msgid "Point of Sale Orders"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "pos.config"
msgstr ""
diff --git a/pos_analytic_by_config/i18n/de.po b/pos_analytic_by_config/i18n/de.po
index 6a361e8740..727e580602 100644
--- a/pos_analytic_by_config/i18n/de.po
+++ b/pos_analytic_by_config/i18n/de.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_analytic_by_config
-#
+#
# Translators:
# Rudolf Schnapka , 2017
msgid ""
@@ -12,18 +12,42 @@ msgstr ""
"PO-Revision-Date: 2017-01-20 23:05+0000\n"
"Last-Translator: Rudolf Schnapka , 2017\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
+"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: pos_analytic_by_config
-#: field:pos.config,account_analytic_id:0
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "Kostenstelle"
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account for this config."
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account that these orders link to"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
+msgid "Invoice Line"
+msgstr ""
+
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale"
-msgstr "Verkaufsstelle"
+msgid "Point of Sale Orders"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "pos.config"
+msgstr ""
+
+#~ msgid "Point of Sale"
+#~ msgstr "Verkaufsstelle"
diff --git a/pos_analytic_by_config/i18n/el_GR.po b/pos_analytic_by_config/i18n/el_GR.po
index 23c05e3713..62f038aa4d 100644
--- a/pos_analytic_by_config/i18n/el_GR.po
+++ b/pos_analytic_by_config/i18n/el_GR.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_analytic_by_config
-#
+#
# Translators:
# Kostas Goutoudis , 2016
msgid ""
@@ -11,19 +11,41 @@ msgstr ""
"POT-Creation-Date: 2016-09-30 22:27+0000\n"
"PO-Revision-Date: 2016-09-30 22:27+0000\n"
"Last-Translator: Kostas Goutoudis , 2016\n"
-"Language-Team: Greek (Greece) (https://www.transifex.com/oca/teams/23907/el_GR/)\n"
+"Language-Team: Greek (Greece) (https://www.transifex.com/oca/teams/23907/"
+"el_GR/)\n"
+"Language: el_GR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: el_GR\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: pos_analytic_by_config
-#: field:pos.config,account_analytic_id:0
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "Αναλυτικός Λογαριασμός"
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account for this config."
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account that these orders link to"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
+msgid "Invoice Line"
+msgstr ""
+
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale"
+msgid "Point of Sale Orders"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "pos.config"
msgstr ""
diff --git a/pos_analytic_by_config/i18n/es.po b/pos_analytic_by_config/i18n/es.po
index fc3bfc9f8a..02e3362320 100644
--- a/pos_analytic_by_config/i18n/es.po
+++ b/pos_analytic_by_config/i18n/es.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_analytic_by_config
-#
+#
# Translators:
# OCA Transbot , 2016
msgid ""
@@ -9,21 +9,46 @@ msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-15 17:04+0000\n"
-"PO-Revision-Date: 2016-08-15 17:04+0000\n"
-"Last-Translator: OCA Transbot , 2016\n"
+"PO-Revision-Date: 2020-08-03 15:59+0000\n"
+"Last-Translator: FranciscoFactorLibre \n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
+"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: es\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 3.10\n"
#. module: pos_analytic_by_config
-#: field:pos.config,account_analytic_id:0
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "Cuenta analítica"
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account for this config."
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account that these orders link to"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
+msgid "Invoice Line"
+msgstr ""
+
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale"
+msgid "Point of Sale Orders"
msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "pos.config"
+msgstr ""
+
+#~ msgid "Point of Sale"
+#~ msgstr "Punto de venta"
diff --git a/pos_analytic_by_config/i18n/es_MX.po b/pos_analytic_by_config/i18n/es_MX.po
index 27e4ff79e2..8e0e4b0877 100644
--- a/pos_analytic_by_config/i18n/es_MX.po
+++ b/pos_analytic_by_config/i18n/es_MX.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_analytic_by_config
-#
+#
# Translators:
# Juan González , 2016
msgid ""
@@ -11,19 +11,41 @@ msgstr ""
"POT-Creation-Date: 2016-12-03 13:34+0000\n"
"PO-Revision-Date: 2016-12-03 13:34+0000\n"
"Last-Translator: Juan González , 2016\n"
-"Language-Team: Spanish (Mexico) (https://www.transifex.com/oca/teams/23907/es_MX/)\n"
+"Language-Team: Spanish (Mexico) (https://www.transifex.com/oca/teams/23907/"
+"es_MX/)\n"
+"Language: es_MX\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: es_MX\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: pos_analytic_by_config
-#: field:pos.config,account_analytic_id:0
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "Cuenta analítica"
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account for this config."
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account that these orders link to"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
+msgid "Invoice Line"
+msgstr ""
+
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale"
+msgid "Point of Sale Orders"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "pos.config"
msgstr ""
diff --git a/pos_analytic_by_config/i18n/fi.po b/pos_analytic_by_config/i18n/fi.po
index b96f1d47b3..f892868986 100644
--- a/pos_analytic_by_config/i18n/fi.po
+++ b/pos_analytic_by_config/i18n/fi.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_analytic_by_config
-#
+#
# Translators:
# OCA Transbot , 2017
msgid ""
@@ -12,18 +12,39 @@ msgstr ""
"PO-Revision-Date: 2017-04-06 02:55+0000\n"
"Last-Translator: OCA Transbot , 2017\n"
"Language-Team: Finnish (https://www.transifex.com/oca/teams/23907/fi/)\n"
+"Language: fi\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: fi\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: pos_analytic_by_config
-#: field:pos.config,account_analytic_id:0
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "Analyyttinen tili"
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account for this config."
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account that these orders link to"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
+msgid "Invoice Line"
+msgstr ""
+
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale"
+msgid "Point of Sale Orders"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "pos.config"
msgstr ""
diff --git a/pos_analytic_by_config/i18n/fr.po b/pos_analytic_by_config/i18n/fr.po
index 37ced32cab..e7c6c4407f 100644
--- a/pos_analytic_by_config/i18n/fr.po
+++ b/pos_analytic_by_config/i18n/fr.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_analytic_by_config
-#
+#
# Translators:
# OCA Transbot , 2016
# Zwygart , 2016
@@ -13,18 +13,42 @@ msgstr ""
"PO-Revision-Date: 2016-09-30 22:27+0000\n"
"Last-Translator: Zwygart , 2016\n"
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
+"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: pos_analytic_by_config
-#: field:pos.config,account_analytic_id:0
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "Compte analytique"
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account for this config."
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account that these orders link to"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
+msgid "Invoice Line"
+msgstr ""
+
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale"
-msgstr "Point de vente"
+msgid "Point of Sale Orders"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "pos.config"
+msgstr ""
+
+#~ msgid "Point of Sale"
+#~ msgstr "Point de vente"
diff --git a/pos_analytic_by_config/i18n/pos_analytic_by_config.pot b/pos_analytic_by_config/i18n/pos_analytic_by_config.pot
new file mode 100644
index 0000000000..854522f6a7
--- /dev/null
+++ b/pos_analytic_by_config/i18n/pos_analytic_by_config.pot
@@ -0,0 +1,46 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * pos_analytic_by_config
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 11.0\n"
+"Report-Msgid-Bugs-To: \n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: pos_analytic_by_config
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account for this config."
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account that these orders link to"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
+msgid "Invoice Line"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale Orders"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "pos.config"
+msgstr ""
+
diff --git a/pos_analytic_by_config/i18n/pt_BR.po b/pos_analytic_by_config/i18n/pt_BR.po
index c3f6004570..9675df71cf 100644
--- a/pos_analytic_by_config/i18n/pt_BR.po
+++ b/pos_analytic_by_config/i18n/pt_BR.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_analytic_by_config
-#
+#
# Translators:
# OCA Transbot , 2017
msgid ""
@@ -11,19 +11,41 @@ msgstr ""
"POT-Creation-Date: 2017-04-06 02:55+0000\n"
"PO-Revision-Date: 2017-04-06 02:55+0000\n"
"Last-Translator: OCA Transbot , 2017\n"
-"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n"
+"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/"
+"teams/23907/pt_BR/)\n"
+"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: pos_analytic_by_config
-#: field:pos.config,account_analytic_id:0
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "Conta analítica"
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account for this config."
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account that these orders link to"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
+msgid "Invoice Line"
+msgstr ""
+
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale"
+msgid "Point of Sale Orders"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "pos.config"
msgstr ""
diff --git a/pos_analytic_by_config/i18n/sk_SK.po b/pos_analytic_by_config/i18n/sk_SK.po
index ed823f9e6e..8ba08499b4 100644
--- a/pos_analytic_by_config/i18n/sk_SK.po
+++ b/pos_analytic_by_config/i18n/sk_SK.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_analytic_by_config
-#
+#
# Translators:
# OCA Transbot , 2017
msgid ""
@@ -11,19 +11,41 @@ msgstr ""
"POT-Creation-Date: 2017-04-06 02:55+0000\n"
"PO-Revision-Date: 2017-04-06 02:55+0000\n"
"Last-Translator: OCA Transbot , 2017\n"
-"Language-Team: Slovak (Slovakia) (https://www.transifex.com/oca/teams/23907/sk_SK/)\n"
+"Language-Team: Slovak (Slovakia) (https://www.transifex.com/oca/teams/23907/"
+"sk_SK/)\n"
+"Language: sk_SK\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: sk_SK\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
#. module: pos_analytic_by_config
-#: field:pos.config,account_analytic_id:0
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "Analytický účet"
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account for this config."
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account that these orders link to"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
+msgid "Invoice Line"
+msgstr ""
+
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale"
+msgid "Point of Sale Orders"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "pos.config"
msgstr ""
diff --git a/pos_analytic_by_config/i18n/sl.po b/pos_analytic_by_config/i18n/sl.po
index 1fc4a7cb18..12ad67a0c5 100644
--- a/pos_analytic_by_config/i18n/sl.po
+++ b/pos_analytic_by_config/i18n/sl.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_analytic_by_config
-#
+#
# Translators:
# Matjaž Mozetič , 2016
msgid ""
@@ -12,18 +12,43 @@ msgstr ""
"PO-Revision-Date: 2016-07-30 09:13+0000\n"
"Last-Translator: Matjaž Mozetič , 2016\n"
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
+"Language: sl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: sl\n"
-"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
+"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
+"%100==4 ? 2 : 3);\n"
#. module: pos_analytic_by_config
-#: field:pos.config,account_analytic_id:0
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "Analitični konto"
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account for this config."
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account that these orders link to"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
+msgid "Invoice Line"
+msgstr ""
+
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale"
-msgstr "POS Prodajna točka"
+msgid "Point of Sale Orders"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "pos.config"
+msgstr ""
+
+#~ msgid "Point of Sale"
+#~ msgstr "POS Prodajna točka"
diff --git a/pos_analytic_by_config/i18n/zh_CN.po b/pos_analytic_by_config/i18n/zh_CN.po
index c583f48b34..e65641fa04 100644
--- a/pos_analytic_by_config/i18n/zh_CN.po
+++ b/pos_analytic_by_config/i18n/zh_CN.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_analytic_by_config
-#
+#
# Translators:
# ITGeeker , 2017
# liAnGjiA , 2017
@@ -12,19 +12,44 @@ msgstr ""
"POT-Creation-Date: 2017-04-06 02:55+0000\n"
"PO-Revision-Date: 2017-04-06 02:55+0000\n"
"Last-Translator: liAnGjiA , 2017\n"
-"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/zh_CN/)\n"
+"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/"
+"zh_CN/)\n"
+"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#. module: pos_analytic_by_config
-#: field:pos.config,account_analytic_id:0
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "核算科目"
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account for this config."
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account that these orders link to"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
+msgid "Invoice Line"
+msgstr ""
+
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale"
-msgstr "POS"
+msgid "Point of Sale Orders"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "pos.config"
+msgstr ""
+
+#~ msgid "Point of Sale"
+#~ msgstr "POS"
diff --git a/pos_analytic_by_config/models/__init__.py b/pos_analytic_by_config/models/__init__.py
index 722d957733..47a7cf53ba 100644
--- a/pos_analytic_by_config/models/__init__.py
+++ b/pos_analytic_by_config/models/__init__.py
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-# © 2015 ACSONE SA/NV ()
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+from . import account_invoice
from . import pos_config
from . import pos_order
diff --git a/pos_analytic_by_config/models/account_invoice.py b/pos_analytic_by_config/models/account_invoice.py
new file mode 100644
index 0000000000..241daab278
--- /dev/null
+++ b/pos_analytic_by_config/models/account_invoice.py
@@ -0,0 +1,19 @@
+# Copyright 2020 Tecnativa - David Vidal
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+from odoo import api, models
+
+
+class AccountInvoiceLine(models.Model):
+ _inherit = 'account.invoice.line'
+
+ @api.onchange('product_id')
+ def _onchange_product_id(self):
+ account_analytic_id = self.account_analytic_id
+ res = super()._onchange_product_id()
+ if not self.env.context.get('pos_analytic') or not account_analytic_id:
+ return res
+ # Odoo triggers an onchange on the product_id when creating an invoice.
+ # This may cause an incompatibility with product_analytic
+ if self.account_analytic_id != account_analytic_id:
+ self.account_analytic_id = account_analytic_id
+ return res
diff --git a/pos_analytic_by_config/models/pos_config.py b/pos_analytic_by_config/models/pos_config.py
index 269941b2f1..04f95d2876 100644
--- a/pos_analytic_by_config/models/pos_config.py
+++ b/pos_analytic_by_config/models/pos_config.py
@@ -1,13 +1,10 @@
-# -*- coding: utf-8 -*-
-# © 2015 ACSONE SA/NV ()
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-
-from openerp import models, fields
+# Copyright 2015 ACSONE SA/NV
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+from odoo import models, fields
class PosConfig(models.Model):
_inherit = 'pos.config'
account_analytic_id = fields.Many2one(
- comodel_name='account.analytic.account', string='Analytic Account',
- domain=[('type', '!=', 'view')])
+ comodel_name='account.analytic.account', string='Analytic Account')
diff --git a/pos_analytic_by_config/models/pos_order.py b/pos_analytic_by_config/models/pos_order.py
index ff1570bd1e..12921c9baf 100644
--- a/pos_analytic_by_config/models/pos_order.py
+++ b/pos_analytic_by_config/models/pos_order.py
@@ -1,8 +1,7 @@
-# -*- coding: utf-8 -*-
-# © 2015 ACSONE SA/NV ()
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-
-from openerp import models, api
+# Copyright 2015 ACSONE SA/NV
+# Copyright 2020 Tecnativa - David Vidal
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+from odoo import models, api
class PosOrder(models.Model):
@@ -11,3 +10,7 @@ class PosOrder(models.Model):
@api.model
def _prepare_analytic_account(self, line):
return line.order_id.session_id.config_id.account_analytic_id.id
+
+ def action_pos_order_invoice(self):
+ self_ctx = self.with_context(pos_analytic=True)
+ return super(PosOrder, self_ctx).action_pos_order_invoice()
diff --git a/pos_analytic_by_config/readme/CONTRIBUTORS.rst b/pos_analytic_by_config/readme/CONTRIBUTORS.rst
new file mode 100644
index 0000000000..5048143807
--- /dev/null
+++ b/pos_analytic_by_config/readme/CONTRIBUTORS.rst
@@ -0,0 +1,8 @@
+* `ACSONE SA/NV `_
+
+ * Adrien Peiffer
+ * Cédric Pigeon
+
+* `Tecnativa `_
+
+ * David Vidal
diff --git a/pos_analytic_by_config/readme/DESCRIPTION.rst b/pos_analytic_by_config/readme/DESCRIPTION.rst
new file mode 100644
index 0000000000..9c7f2ccb71
--- /dev/null
+++ b/pos_analytic_by_config/readme/DESCRIPTION.rst
@@ -0,0 +1,2 @@
+This module allows to use analytic account defined on POS configuration
+for invoices and accounting entries generated from POS orders.
diff --git a/pos_analytic_by_config/readme/USAGE.rst b/pos_analytic_by_config/readme/USAGE.rst
new file mode 100644
index 0000000000..30dc861cb7
--- /dev/null
+++ b/pos_analytic_by_config/readme/USAGE.rst
@@ -0,0 +1,5 @@
+To configure this module, you need to:
+
+* Go to Point of Sale > Configuration > Point of Sales
+* Open an existing or create a new one
+* You can put an analytic account on the current point of sale (pos.config)
diff --git a/pos_analytic_by_config/static/description/index.html b/pos_analytic_by_config/static/description/index.html
new file mode 100644
index 0000000000..a92b898851
--- /dev/null
+++ b/pos_analytic_by_config/static/description/index.html
@@ -0,0 +1,438 @@
+
+
+
+
+
+
+POS Analytic Config
+
+
+
+
+
POS Analytic Config
+
+
+
+
This module allows to use analytic account defined on POS configuration
+for invoices and accounting entries generated from POS orders.
+
Table of contents
+
+
+
+
To configure this module, you need to:
+
+Go to Point of Sale > Configuration > Point of Sales
+Open an existing or create a new one
+You can put an analytic account on the current point of sale (pos.config)
+
+
+
+
+
Bugs are tracked on GitHub Issues .
+In case of trouble, please check there if your issue has already been reported.
+If you spotted it first, help us smashing it by providing a detailed and welcomed
+feedback .
+
Do not contact contributors directly about support or help with technical issues.
+
+
+
+
+
+
+
+
This module is maintained by the OCA.
+
+
OCA, or the Odoo Community Association, is a nonprofit organization whose
+mission is to support the collaborative development of Odoo features and
+promote its widespread use.
+
This module is part of the OCA/account-analytic project on GitHub.
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute .
+
+
+
+
+
diff --git a/pos_analytic_by_config/tests/__init__.py b/pos_analytic_by_config/tests/__init__.py
index 8586e31cf4..c2cfede05e 100644
--- a/pos_analytic_by_config/tests/__init__.py
+++ b/pos_analytic_by_config/tests/__init__.py
@@ -1,2 +1 @@
-# -*- coding: utf-8 -*-
from . import test_pos_analytic_by_config
diff --git a/pos_analytic_by_config/tests/test_pos_analytic_by_config.py b/pos_analytic_by_config/tests/test_pos_analytic_by_config.py
index 0600d19e84..c23c60c30b 100644
--- a/pos_analytic_by_config/tests/test_pos_analytic_by_config.py
+++ b/pos_analytic_by_config/tests/test_pos_analytic_by_config.py
@@ -1,75 +1,71 @@
-# -*- coding: utf-8 -*-
-# © 2015 ACSONE SA/NV ()
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+# Copyright 2015 ACSONE SA/NV
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+from odoo.tests import common
-from openerp.tests import common
+class TestPosAnalyticConfig(common.SavepointCase):
-class TestPosAnalyticConfig(common.TransactionCase):
-
- def setUp(self):
- super(TestPosAnalyticConfig, self).setUp()
- self.pos_order_obj = self.env['pos.order']
- self.pos_conig_obj = self.env['pos.config']
- self.pos_session_obj = self.env['pos.session']
- self.aml_obj = self.env['account.move.line']
- self.inv_line_obj = self.env['account.invoice.line']
- self.main_config = self.env.ref('point_of_sale.pos_config_main')
- self.aa_01 = self.env.ref('account.analytic_root')
- self.customer_01 = self.env.ref('base.res_partner_2')
- self.product_01 =\
- self.env.ref('point_of_sale.perrier_50cl')
- self.payment_method_01 = self.env.ref('account.bank_journal')
- self.aml_analytic_domain =\
- [('product_id', '=', self.product_01.id),
- ('analytic_account_id', '=', self.aa_01.id)]
- self.inv_analytic_domain =\
- [('product_id', '=', self.product_01.id),
- ('account_analytic_id', '=', self.aa_01.id)]
-
- def common_test(self):
- self.main_config.account_analytic_id = self.aa_01
- # I create and open a new session
- self.session_01 = self.pos_session_obj.create(
- {'config_id': self.main_config.id})
- ctx = self.env.context.copy()
- # context is updated in open_cb
- # -> Need to call with old api to give unfrozen context
- self.registry['pos.session'].open_cb(
- self.cr, self.uid, [self.session_01.id], context=ctx)
- # I create a new order
+ @classmethod
+ def setUpClass(cls):
+ super().setUpClass()
+ cls.aml_obj = cls.env['account.move.line']
+ cls.inv_line_obj = cls.env['account.invoice.line']
+ cls.main_config = cls.env.ref('point_of_sale.pos_config_main')
+ cls.aa_01 = cls.env['account.analytic.account'].create({
+ 'name': 'Test Analytic Account',
+ })
+ cls.customer_01 = cls.env['res.partner'].create({
+ 'name': 'Mr. Odoo',
+ })
+ cls.product_01 = cls.env['product.product'].create({
+ 'name': 'Test product',
+ })
+ cls.aml_analytic_domain = [
+ ('product_id', '=', cls.product_01.id),
+ ('analytic_account_id', '=', cls.aa_01.id),
+ ]
+ cls.inv_analytic_domain = [
+ ('product_id', '=', cls.product_01.id),
+ ('account_analytic_id', '=', cls.aa_01.id),
+ ]
+ cls.main_config.account_analytic_id = cls.aa_01
+ cls.session_01 = cls.env['pos.session'].create(
+ {'config_id': cls.main_config.id})
+ cls.session_01.action_pos_session_open()
order_vals = {
- 'session_id': self.session_01.id,
- 'partner_id': self.customer_01.id,
- 'lines': [(0, 0, {'product_id': self.product_01.id,
- 'price_unit': 10.0,
- })]
+ 'session_id': cls.session_01.id,
+ 'partner_id': cls.customer_01.id,
+ 'lines': [(0, 0, {
+ 'product_id': cls.product_01.id,
+ 'price_unit': 10.0,
+ })],
+ }
+ cls.order_01 = cls.env['pos.order'].create(order_vals)
+ payment_data = {
+ 'amount': 10,
+ 'journal': cls.main_config.journal_ids[0].id,
+ 'partner_id': cls.order_01.partner_id.id,
}
- self.order_01 = self.pos_order_obj.create(order_vals)
- # I pay the created order
- payment_data = {'amount': 10,
- 'journal': self.payment_method_01.id}
- self.pos_order_obj.add_payment(self.order_01.id, payment_data)
- if self.order_01.test_paid():
- self.order_01.signal_workflow('paid')
+ cls.order_01.add_payment(payment_data)
+ cls.order_01.action_pos_order_paid()
def test_order_simple_receipt(self):
- self.common_test()
+ """Simple ticket"""
aml = self.aml_obj.search(self.aml_analytic_domain)
- # I check that there isn't lines with the analytic account in this test
+ # There aren't lines with the analytic account yet
self.assertEqual(len(aml.ids), 0)
- self.session_01.signal_workflow('close')
- # I check that there is a journal item with the config analytic account
+ self.session_01.action_pos_session_closing_control()
+ self.session_01.action_pos_session_close()
+ # There they are
aml = self.aml_obj.search(self.aml_analytic_domain)
self.assertEqual(len(aml.ids), 1)
def test_order_invoice(self):
- self.common_test()
+ """Ticket with invoice"""
lines = self.inv_line_obj.search(self.inv_analytic_domain)
- self.order_01.action_invoice()
- # I check that there isn't lines with the analytic account in this test
+ self.order_01.action_pos_order_invoice()
+ # There aren't lines with the analytic account yet
self.assertEqual(len(lines.ids), 0)
lines = self.inv_line_obj.search(self.inv_analytic_domain)
- # I check that there is an invoice line
- # with the config analytic account
+ # There they are
self.assertEqual(len(lines.ids), 1)
diff --git a/pos_analytic_by_config/views/pos_config_view.xml b/pos_analytic_by_config/views/pos_config_view.xml
index 45c0594559..964fd5cf1a 100644
--- a/pos_analytic_by_config/views/pos_config_view.xml
+++ b/pos_analytic_by_config/views/pos_config_view.xml
@@ -1,15 +1,25 @@
-
-
-
- pos.config.form.view (pos_analytic_by_config)
- pos.config
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+ pos.config
+
+
+
+
+
+
+
+ Analytic Account that these orders link to
+
+
+
+
+
+
+
+
+
+
+
From 774d467e553190f46a9d5bd44535007aa276562d Mon Sep 17 00:00:00 2001
From: david
Date: Mon, 17 Aug 2020 07:30:34 +0200
Subject: [PATCH 04/26] [MIG] pos_analytic_by_config: Migration to 12.0
---
pos_analytic_by_config/README.rst | 16 ++++++---
pos_analytic_by_config/__manifest__.py | 4 ++-
pos_analytic_by_config/i18n/ca.po | 16 ++++-----
pos_analytic_by_config/i18n/de.po | 16 ++++-----
pos_analytic_by_config/i18n/el_GR.po | 16 ++++-----
pos_analytic_by_config/i18n/es.po | 16 ++++-----
pos_analytic_by_config/i18n/es_MX.po | 16 ++++-----
pos_analytic_by_config/i18n/fi.po | 16 ++++-----
pos_analytic_by_config/i18n/fr.po | 16 ++++-----
.../i18n/pos_analytic_by_config.pot | 18 +++++-----
pos_analytic_by_config/i18n/pt_BR.po | 16 ++++-----
pos_analytic_by_config/i18n/sk_SK.po | 16 ++++-----
pos_analytic_by_config/i18n/sl.po | 16 ++++-----
pos_analytic_by_config/i18n/zh_CN.po | 16 ++++-----
pos_analytic_by_config/readme/ROADMAP.rst | 1 +
.../static/description/index.html | 34 ++++++++++++-------
.../tests/test_pos_analytic_by_config.py | 7 ++++
17 files changed, 140 insertions(+), 116 deletions(-)
create mode 100644 pos_analytic_by_config/readme/ROADMAP.rst
diff --git a/pos_analytic_by_config/README.rst b/pos_analytic_by_config/README.rst
index fd77a5ad22..689cce20e4 100644
--- a/pos_analytic_by_config/README.rst
+++ b/pos_analytic_by_config/README.rst
@@ -14,13 +14,13 @@ POS Analytic Config
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--analytic-lightgray.png?logo=github
- :target: https://github.com/OCA/account-analytic/tree/11.0/pos_analytic_by_config
+ :target: https://github.com/OCA/account-analytic/tree/12.0/pos_analytic_by_config
:alt: OCA/account-analytic
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/account-analytic-11-0/account-analytic-11-0-pos_analytic_by_config
+ :target: https://translation.odoo-community.org/projects/account-analytic-12-0/account-analytic-12-0-pos_analytic_by_config
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/87/11.0
+ :target: https://runbot.odoo-community.org/runbot/87/12.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -42,13 +42,18 @@ To configure this module, you need to:
* Open an existing or create a new one
* You can put an analytic account on the current point of sale (pos.config)
+Known issues / Roadmap
+======================
+
+* Add `account_analytic_id` in `pos.order` so we can use it in reports.
+
Bug Tracker
===========
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -59,6 +64,7 @@ Authors
~~~~~~~
* ACSONE SA/NV
+* Tecnativa
Contributors
~~~~~~~~~~~~
@@ -85,6 +91,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-This module is part of the `OCA/account-analytic `_ project on GitHub.
+This module is part of the `OCA/account-analytic `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/pos_analytic_by_config/__manifest__.py b/pos_analytic_by_config/__manifest__.py
index 375e6cc487..52de8a178b 100644
--- a/pos_analytic_by_config/__manifest__.py
+++ b/pos_analytic_by_config/__manifest__.py
@@ -1,14 +1,16 @@
# Copyright 2015 ACSONE SA/NV
+# Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
'name': "POS Analytic Config",
'summary': """Use analytic account defined on
POS configuration for POS orders""",
'author': 'ACSONE SA/NV,'
+ 'Tecnativa, '
'Odoo Community Association (OCA)',
'website': "https://github.com/OCA/account-analytic",
'category': 'Point Of Sale, Accounting',
- 'version': '11.0.1.0.0',
+ 'version': '12.0.1.0.0',
'license': 'AGPL-3',
'depends': [
'point_of_sale',
diff --git a/pos_analytic_by_config/i18n/ca.po b/pos_analytic_by_config/i18n/ca.po
index 9217eb5579..0889f8d9e3 100644
--- a/pos_analytic_by_config/i18n/ca.po
+++ b/pos_analytic_by_config/i18n/ca.po
@@ -19,18 +19,18 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: pos_analytic_by_config
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__account_analytic_id
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "Compte analític"
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account for this config."
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account that these orders link to"
msgstr ""
@@ -40,11 +40,11 @@ msgid "Invoice Line"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale Orders"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "Point of Sale Configuration"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_config
-msgid "pos.config"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale Orders"
msgstr ""
diff --git a/pos_analytic_by_config/i18n/de.po b/pos_analytic_by_config/i18n/de.po
index 727e580602..419fd25a0d 100644
--- a/pos_analytic_by_config/i18n/de.po
+++ b/pos_analytic_by_config/i18n/de.po
@@ -19,18 +19,18 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: pos_analytic_by_config
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__account_analytic_id
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "Kostenstelle"
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account for this config."
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account that these orders link to"
msgstr ""
@@ -40,13 +40,13 @@ msgid "Invoice Line"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale Orders"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "Point of Sale Configuration"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_config
-msgid "pos.config"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale Orders"
msgstr ""
#~ msgid "Point of Sale"
diff --git a/pos_analytic_by_config/i18n/el_GR.po b/pos_analytic_by_config/i18n/el_GR.po
index 62f038aa4d..589b1ccdfc 100644
--- a/pos_analytic_by_config/i18n/el_GR.po
+++ b/pos_analytic_by_config/i18n/el_GR.po
@@ -20,18 +20,18 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: pos_analytic_by_config
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__account_analytic_id
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "Αναλυτικός Λογαριασμός"
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account for this config."
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account that these orders link to"
msgstr ""
@@ -41,11 +41,11 @@ msgid "Invoice Line"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale Orders"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "Point of Sale Configuration"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_config
-msgid "pos.config"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale Orders"
msgstr ""
diff --git a/pos_analytic_by_config/i18n/es.po b/pos_analytic_by_config/i18n/es.po
index 02e3362320..4e36dc0c5c 100644
--- a/pos_analytic_by_config/i18n/es.po
+++ b/pos_analytic_by_config/i18n/es.po
@@ -20,18 +20,18 @@ msgstr ""
"X-Generator: Weblate 3.10\n"
#. module: pos_analytic_by_config
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__account_analytic_id
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "Cuenta analítica"
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account for this config."
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account that these orders link to"
msgstr ""
@@ -41,13 +41,13 @@ msgid "Invoice Line"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale Orders"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "Point of Sale Configuration"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_config
-msgid "pos.config"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale Orders"
msgstr ""
#~ msgid "Point of Sale"
diff --git a/pos_analytic_by_config/i18n/es_MX.po b/pos_analytic_by_config/i18n/es_MX.po
index 8e0e4b0877..5d1553d617 100644
--- a/pos_analytic_by_config/i18n/es_MX.po
+++ b/pos_analytic_by_config/i18n/es_MX.po
@@ -20,18 +20,18 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: pos_analytic_by_config
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__account_analytic_id
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "Cuenta analítica"
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account for this config."
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account that these orders link to"
msgstr ""
@@ -41,11 +41,11 @@ msgid "Invoice Line"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale Orders"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "Point of Sale Configuration"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_config
-msgid "pos.config"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale Orders"
msgstr ""
diff --git a/pos_analytic_by_config/i18n/fi.po b/pos_analytic_by_config/i18n/fi.po
index f892868986..40983e81b0 100644
--- a/pos_analytic_by_config/i18n/fi.po
+++ b/pos_analytic_by_config/i18n/fi.po
@@ -19,18 +19,18 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: pos_analytic_by_config
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__account_analytic_id
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "Analyyttinen tili"
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account for this config."
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account that these orders link to"
msgstr ""
@@ -40,11 +40,11 @@ msgid "Invoice Line"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale Orders"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "Point of Sale Configuration"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_config
-msgid "pos.config"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale Orders"
msgstr ""
diff --git a/pos_analytic_by_config/i18n/fr.po b/pos_analytic_by_config/i18n/fr.po
index e7c6c4407f..aa2142dfe6 100644
--- a/pos_analytic_by_config/i18n/fr.po
+++ b/pos_analytic_by_config/i18n/fr.po
@@ -20,18 +20,18 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: pos_analytic_by_config
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__account_analytic_id
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "Compte analytique"
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account for this config."
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account that these orders link to"
msgstr ""
@@ -41,13 +41,13 @@ msgid "Invoice Line"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale Orders"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "Point of Sale Configuration"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_config
-msgid "pos.config"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale Orders"
msgstr ""
#~ msgid "Point of Sale"
diff --git a/pos_analytic_by_config/i18n/pos_analytic_by_config.pot b/pos_analytic_by_config/i18n/pos_analytic_by_config.pot
index 854522f6a7..9bb0e05d2e 100644
--- a/pos_analytic_by_config/i18n/pos_analytic_by_config.pot
+++ b/pos_analytic_by_config/i18n/pos_analytic_by_config.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 11.0\n"
+"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
@@ -14,18 +14,18 @@ msgstr ""
"Plural-Forms: \n"
#. module: pos_analytic_by_config
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__account_analytic_id
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account for this config."
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account that these orders link to"
msgstr ""
@@ -35,12 +35,12 @@ msgid "Invoice Line"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale Orders"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "Point of Sale Configuration"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_config
-msgid "pos.config"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale Orders"
msgstr ""
diff --git a/pos_analytic_by_config/i18n/pt_BR.po b/pos_analytic_by_config/i18n/pt_BR.po
index 9675df71cf..b438f85beb 100644
--- a/pos_analytic_by_config/i18n/pt_BR.po
+++ b/pos_analytic_by_config/i18n/pt_BR.po
@@ -20,18 +20,18 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: pos_analytic_by_config
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__account_analytic_id
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "Conta analítica"
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account for this config."
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account that these orders link to"
msgstr ""
@@ -41,11 +41,11 @@ msgid "Invoice Line"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale Orders"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "Point of Sale Configuration"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_config
-msgid "pos.config"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale Orders"
msgstr ""
diff --git a/pos_analytic_by_config/i18n/sk_SK.po b/pos_analytic_by_config/i18n/sk_SK.po
index 8ba08499b4..192c4054b7 100644
--- a/pos_analytic_by_config/i18n/sk_SK.po
+++ b/pos_analytic_by_config/i18n/sk_SK.po
@@ -20,18 +20,18 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
#. module: pos_analytic_by_config
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__account_analytic_id
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "Analytický účet"
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account for this config."
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account that these orders link to"
msgstr ""
@@ -41,11 +41,11 @@ msgid "Invoice Line"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale Orders"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "Point of Sale Configuration"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_config
-msgid "pos.config"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale Orders"
msgstr ""
diff --git a/pos_analytic_by_config/i18n/sl.po b/pos_analytic_by_config/i18n/sl.po
index 12ad67a0c5..416c369d21 100644
--- a/pos_analytic_by_config/i18n/sl.po
+++ b/pos_analytic_by_config/i18n/sl.po
@@ -20,18 +20,18 @@ msgstr ""
"%100==4 ? 2 : 3);\n"
#. module: pos_analytic_by_config
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__account_analytic_id
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "Analitični konto"
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account for this config."
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account that these orders link to"
msgstr ""
@@ -41,13 +41,13 @@ msgid "Invoice Line"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale Orders"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "Point of Sale Configuration"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_config
-msgid "pos.config"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale Orders"
msgstr ""
#~ msgid "Point of Sale"
diff --git a/pos_analytic_by_config/i18n/zh_CN.po b/pos_analytic_by_config/i18n/zh_CN.po
index e65641fa04..5b6621b1da 100644
--- a/pos_analytic_by_config/i18n/zh_CN.po
+++ b/pos_analytic_by_config/i18n/zh_CN.po
@@ -21,18 +21,18 @@ msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n"
#. module: pos_analytic_by_config
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config_account_analytic_id
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__account_analytic_id
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
msgstr "核算科目"
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account for this config."
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account that these orders link to"
msgstr ""
@@ -42,13 +42,13 @@ msgid "Invoice Line"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale Orders"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "Point of Sale Configuration"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_config
-msgid "pos.config"
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale Orders"
msgstr ""
#~ msgid "Point of Sale"
diff --git a/pos_analytic_by_config/readme/ROADMAP.rst b/pos_analytic_by_config/readme/ROADMAP.rst
new file mode 100644
index 0000000000..473a47bc57
--- /dev/null
+++ b/pos_analytic_by_config/readme/ROADMAP.rst
@@ -0,0 +1 @@
+* Add `account_analytic_id` in `pos.order` so we can use it in reports.
diff --git a/pos_analytic_by_config/static/description/index.html b/pos_analytic_by_config/static/description/index.html
index a92b898851..66e6d863f5 100644
--- a/pos_analytic_by_config/static/description/index.html
+++ b/pos_analytic_by_config/static/description/index.html
@@ -367,18 +367,19 @@ POS Analytic Config
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module allows to use analytic account defined on POS configuration
for invoices and accounting entries generated from POS orders.
Table of contents
Usage
-Bug Tracker
-Credits
@@ -392,24 +393,31 @@
You can put an analytic account on the current point of sale (pos.config)
+
+
+
+Add account_analytic_id in pos.order so we can use it in reports.
+
+
-
+
Bugs are tracked on GitHub Issues .
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback .
+
feedback .
Do not contact contributors directly about support or help with technical issues.
-
+
-
+
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-
This module is part of the OCA/account-analytic project on GitHub.
+
This module is part of the OCA/account-analytic project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute .
diff --git a/pos_analytic_by_config/tests/test_pos_analytic_by_config.py b/pos_analytic_by_config/tests/test_pos_analytic_by_config.py
index c23c60c30b..f09d3c0b0f 100644
--- a/pos_analytic_by_config/tests/test_pos_analytic_by_config.py
+++ b/pos_analytic_by_config/tests/test_pos_analytic_by_config.py
@@ -37,8 +37,15 @@ def setUpClass(cls):
'partner_id': cls.customer_01.id,
'lines': [(0, 0, {
'product_id': cls.product_01.id,
+ 'qty': 1,
'price_unit': 10.0,
+ 'price_subtotal': 10,
+ 'price_subtotal_incl': 10,
})],
+ 'amount_total': 10.0,
+ 'amount_tax': 0.0,
+ 'amount_paid': 10.0,
+ 'amount_return': 0.0,
}
cls.order_01 = cls.env['pos.order'].create(order_vals)
payment_data = {
From 7096d5cfd666891ad05114971e9da5f6d928b312 Mon Sep 17 00:00:00 2001
From: david
Date: Tue, 12 Jan 2021 12:06:53 +0100
Subject: [PATCH 05/26] [FIX] pos_analytic_by_config tests
Avoid localization issues
---
pos_analytic_by_config/__manifest__.py | 2 +-
.../tests/test_pos_analytic_by_config.py | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/pos_analytic_by_config/__manifest__.py b/pos_analytic_by_config/__manifest__.py
index 52de8a178b..e2cbf66ca4 100644
--- a/pos_analytic_by_config/__manifest__.py
+++ b/pos_analytic_by_config/__manifest__.py
@@ -10,7 +10,7 @@
'Odoo Community Association (OCA)',
'website': "https://github.com/OCA/account-analytic",
'category': 'Point Of Sale, Accounting',
- 'version': '12.0.1.0.0',
+ 'version': '12.0.1.0.1',
'license': 'AGPL-3',
'depends': [
'point_of_sale',
diff --git a/pos_analytic_by_config/tests/test_pos_analytic_by_config.py b/pos_analytic_by_config/tests/test_pos_analytic_by_config.py
index f09d3c0b0f..d52ef9a875 100644
--- a/pos_analytic_by_config/tests/test_pos_analytic_by_config.py
+++ b/pos_analytic_by_config/tests/test_pos_analytic_by_config.py
@@ -10,7 +10,19 @@ def setUpClass(cls):
super().setUpClass()
cls.aml_obj = cls.env['account.move.line']
cls.inv_line_obj = cls.env['account.invoice.line']
+ cls.pricelist = cls.env['product.pricelist'].create({
+ 'name': 'Test pricelist',
+ 'item_ids': [(0, 0, {
+ 'applied_on': '3_global',
+ 'compute_price': 'formula',
+ 'base': 'list_price',
+ })]
+ })
cls.main_config = cls.env.ref('point_of_sale.pos_config_main')
+ cls.main_config.write({
+ 'available_pricelist_ids': [(6, 0, cls.pricelist.ids)],
+ 'pricelist_id': cls.pricelist.id,
+ })
cls.aa_01 = cls.env['account.analytic.account'].create({
'name': 'Test Analytic Account',
})
From c9036acd732504348246a94a8fd3fc6c7b6eb42f Mon Sep 17 00:00:00 2001
From: david
Date: Mon, 5 Apr 2021 10:01:52 +0200
Subject: [PATCH 06/26] [IMP] pos_analytic_by_config: black, isort, prettier
---
pos_analytic_by_config/__manifest__.py | 24 ++--
.../models/account_invoice.py | 6 +-
pos_analytic_by_config/models/pos_config.py | 7 +-
pos_analytic_by_config/models/pos_order.py | 4 +-
.../tests/test_pos_analytic_by_config.py | 108 ++++++++++--------
.../views/pos_config_view.xml | 14 +--
6 files changed, 85 insertions(+), 78 deletions(-)
diff --git a/pos_analytic_by_config/__manifest__.py b/pos_analytic_by_config/__manifest__.py
index e2cbf66ca4..ba3e168a76 100644
--- a/pos_analytic_by_config/__manifest__.py
+++ b/pos_analytic_by_config/__manifest__.py
@@ -2,20 +2,14 @@
# Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
- 'name': "POS Analytic Config",
- 'summary': """Use analytic account defined on
+ "name": "POS Analytic Config",
+ "summary": """Use analytic account defined on
POS configuration for POS orders""",
- 'author': 'ACSONE SA/NV,'
- 'Tecnativa, '
- 'Odoo Community Association (OCA)',
- 'website': "https://github.com/OCA/account-analytic",
- 'category': 'Point Of Sale, Accounting',
- 'version': '12.0.1.0.1',
- 'license': 'AGPL-3',
- 'depends': [
- 'point_of_sale',
- ],
- 'data': [
- 'views/pos_config_view.xml',
- ],
+ "author": "ACSONE SA/NV," "Tecnativa, " "Odoo Community Association (OCA)",
+ "website": "https://github.com/OCA/account-analytic",
+ "category": "Point Of Sale, Accounting",
+ "version": "13.0.1.0.1",
+ "license": "AGPL-3",
+ "depends": ["point_of_sale"],
+ "data": ["views/pos_config_view.xml"],
}
diff --git a/pos_analytic_by_config/models/account_invoice.py b/pos_analytic_by_config/models/account_invoice.py
index 241daab278..78e84677ca 100644
--- a/pos_analytic_by_config/models/account_invoice.py
+++ b/pos_analytic_by_config/models/account_invoice.py
@@ -4,13 +4,13 @@
class AccountInvoiceLine(models.Model):
- _inherit = 'account.invoice.line'
+ _inherit = "account.invoice.line"
- @api.onchange('product_id')
+ @api.onchange("product_id")
def _onchange_product_id(self):
account_analytic_id = self.account_analytic_id
res = super()._onchange_product_id()
- if not self.env.context.get('pos_analytic') or not account_analytic_id:
+ if not self.env.context.get("pos_analytic") or not account_analytic_id:
return res
# Odoo triggers an onchange on the product_id when creating an invoice.
# This may cause an incompatibility with product_analytic
diff --git a/pos_analytic_by_config/models/pos_config.py b/pos_analytic_by_config/models/pos_config.py
index 04f95d2876..e200db9354 100644
--- a/pos_analytic_by_config/models/pos_config.py
+++ b/pos_analytic_by_config/models/pos_config.py
@@ -1,10 +1,11 @@
# Copyright 2015 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import models, fields
+from odoo import fields, models
class PosConfig(models.Model):
- _inherit = 'pos.config'
+ _inherit = "pos.config"
account_analytic_id = fields.Many2one(
- comodel_name='account.analytic.account', string='Analytic Account')
+ comodel_name="account.analytic.account", string="Analytic Account"
+ )
diff --git a/pos_analytic_by_config/models/pos_order.py b/pos_analytic_by_config/models/pos_order.py
index 12921c9baf..a623a5633e 100644
--- a/pos_analytic_by_config/models/pos_order.py
+++ b/pos_analytic_by_config/models/pos_order.py
@@ -1,11 +1,11 @@
# Copyright 2015 ACSONE SA/NV
# Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import models, api
+from odoo import api, models
class PosOrder(models.Model):
- _inherit = 'pos.order'
+ _inherit = "pos.order"
@api.model
def _prepare_analytic_account(self, line):
diff --git a/pos_analytic_by_config/tests/test_pos_analytic_by_config.py b/pos_analytic_by_config/tests/test_pos_analytic_by_config.py
index d52ef9a875..09f35dd89a 100644
--- a/pos_analytic_by_config/tests/test_pos_analytic_by_config.py
+++ b/pos_analytic_by_config/tests/test_pos_analytic_by_config.py
@@ -4,66 +4,78 @@
class TestPosAnalyticConfig(common.SavepointCase):
-
@classmethod
def setUpClass(cls):
super().setUpClass()
- cls.aml_obj = cls.env['account.move.line']
- cls.inv_line_obj = cls.env['account.invoice.line']
- cls.pricelist = cls.env['product.pricelist'].create({
- 'name': 'Test pricelist',
- 'item_ids': [(0, 0, {
- 'applied_on': '3_global',
- 'compute_price': 'formula',
- 'base': 'list_price',
- })]
- })
- cls.main_config = cls.env.ref('point_of_sale.pos_config_main')
- cls.main_config.write({
- 'available_pricelist_ids': [(6, 0, cls.pricelist.ids)],
- 'pricelist_id': cls.pricelist.id,
- })
- cls.aa_01 = cls.env['account.analytic.account'].create({
- 'name': 'Test Analytic Account',
- })
- cls.customer_01 = cls.env['res.partner'].create({
- 'name': 'Mr. Odoo',
- })
- cls.product_01 = cls.env['product.product'].create({
- 'name': 'Test product',
- })
+ cls.aml_obj = cls.env["account.move.line"]
+ cls.inv_line_obj = cls.env["account.invoice.line"]
+ cls.pricelist = cls.env["product.pricelist"].create(
+ {
+ "name": "Test pricelist",
+ "item_ids": [
+ (
+ 0,
+ 0,
+ {
+ "applied_on": "3_global",
+ "compute_price": "formula",
+ "base": "list_price",
+ },
+ )
+ ],
+ }
+ )
+ cls.main_config = cls.env.ref("point_of_sale.pos_config_main")
+ cls.main_config.write(
+ {
+ "available_pricelist_ids": [(6, 0, cls.pricelist.ids)],
+ "pricelist_id": cls.pricelist.id,
+ }
+ )
+ cls.aa_01 = cls.env["account.analytic.account"].create(
+ {"name": "Test Analytic Account"}
+ )
+ cls.customer_01 = cls.env["res.partner"].create({"name": "Mr. Odoo"})
+ cls.product_01 = cls.env["product.product"].create({"name": "Test product"})
cls.aml_analytic_domain = [
- ('product_id', '=', cls.product_01.id),
- ('analytic_account_id', '=', cls.aa_01.id),
+ ("product_id", "=", cls.product_01.id),
+ ("analytic_account_id", "=", cls.aa_01.id),
]
cls.inv_analytic_domain = [
- ('product_id', '=', cls.product_01.id),
- ('account_analytic_id', '=', cls.aa_01.id),
+ ("product_id", "=", cls.product_01.id),
+ ("account_analytic_id", "=", cls.aa_01.id),
]
cls.main_config.account_analytic_id = cls.aa_01
- cls.session_01 = cls.env['pos.session'].create(
- {'config_id': cls.main_config.id})
+ cls.session_01 = cls.env["pos.session"].create(
+ {"config_id": cls.main_config.id}
+ )
cls.session_01.action_pos_session_open()
order_vals = {
- 'session_id': cls.session_01.id,
- 'partner_id': cls.customer_01.id,
- 'lines': [(0, 0, {
- 'product_id': cls.product_01.id,
- 'qty': 1,
- 'price_unit': 10.0,
- 'price_subtotal': 10,
- 'price_subtotal_incl': 10,
- })],
- 'amount_total': 10.0,
- 'amount_tax': 0.0,
- 'amount_paid': 10.0,
- 'amount_return': 0.0,
+ "session_id": cls.session_01.id,
+ "partner_id": cls.customer_01.id,
+ "lines": [
+ (
+ 0,
+ 0,
+ {
+ "product_id": cls.product_01.id,
+ "qty": 1,
+ "price_unit": 10.0,
+ "price_subtotal": 10,
+ "price_subtotal_incl": 10,
+ },
+ )
+ ],
+ "amount_total": 10.0,
+ "amount_tax": 0.0,
+ "amount_paid": 10.0,
+ "amount_return": 0.0,
}
- cls.order_01 = cls.env['pos.order'].create(order_vals)
+ cls.order_01 = cls.env["pos.order"].create(order_vals)
payment_data = {
- 'amount': 10,
- 'journal': cls.main_config.journal_ids[0].id,
- 'partner_id': cls.order_01.partner_id.id,
+ "amount": 10,
+ "journal": cls.main_config.journal_ids[0].id,
+ "partner_id": cls.order_01.partner_id.id,
}
cls.order_01.add_payment(payment_data)
cls.order_01.action_pos_order_paid()
diff --git a/pos_analytic_by_config/views/pos_config_view.xml b/pos_analytic_by_config/views/pos_config_view.xml
index 964fd5cf1a..7c78008b00 100644
--- a/pos_analytic_by_config/views/pos_config_view.xml
+++ b/pos_analytic_by_config/views/pos_config_view.xml
@@ -1,15 +1,16 @@
-
-
+
-
pos.config
-
+
-
+
-
+
Analytic Account that these orders link to
@@ -21,5 +22,4 @@
-
From 581961eb8f0c908ef159d8be6dd9b6c11959f9cf Mon Sep 17 00:00:00 2001
From: david
Date: Mon, 5 Apr 2021 12:54:00 +0200
Subject: [PATCH 07/26] [MIG] pos_analytic_by_config: Migration to 13.0
---
pos_analytic_by_config/README.rst | 14 ++-
pos_analytic_by_config/__manifest__.py | 7 +-
pos_analytic_by_config/i18n/de.po | 3 -
pos_analytic_by_config/i18n/es.po | 3 -
pos_analytic_by_config/i18n/fr.po | 3 -
.../i18n/pos_analytic_by_config.pot | 14 ++-
pos_analytic_by_config/i18n/sl.po | 3 -
pos_analytic_by_config/i18n/zh_CN.po | 3 -
pos_analytic_by_config/models/__init__.py | 3 +-
...ccount_invoice.py => account_move_line.py} | 12 +-
pos_analytic_by_config/models/pos_order.py | 15 ++-
pos_analytic_by_config/models/pos_session.py | 39 ++++++
pos_analytic_by_config/readme/ROADMAP.rst | 4 +
.../static/description/index.html | 10 +-
.../tests/test_pos_analytic_by_config.py | 119 +++++++++++-------
15 files changed, 163 insertions(+), 89 deletions(-)
rename pos_analytic_by_config/models/{account_invoice.py => account_move_line.py} (57%)
create mode 100644 pos_analytic_by_config/models/pos_session.py
diff --git a/pos_analytic_by_config/README.rst b/pos_analytic_by_config/README.rst
index 689cce20e4..92f9d02b08 100644
--- a/pos_analytic_by_config/README.rst
+++ b/pos_analytic_by_config/README.rst
@@ -14,13 +14,13 @@ POS Analytic Config
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--analytic-lightgray.png?logo=github
- :target: https://github.com/OCA/account-analytic/tree/12.0/pos_analytic_by_config
+ :target: https://github.com/OCA/account-analytic/tree/13.0/pos_analytic_by_config
:alt: OCA/account-analytic
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/account-analytic-12-0/account-analytic-12-0-pos_analytic_by_config
+ :target: https://translation.odoo-community.org/projects/account-analytic-13-0/account-analytic-13-0-pos_analytic_by_config
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/87/12.0
+ :target: https://runbot.odoo-community.org/runbot/87/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -46,6 +46,10 @@ Known issues / Roadmap
======================
* Add `account_analytic_id` in `pos.order` so we can use it in reports.
+* In `13.0` the session reconciliation has been refactored and thus the journal
+ items are now very simplified. There's no product detail now, so we won't
+ be able to analyze that level of detail anymore. For invoices it remains as it
+ was.
Bug Tracker
===========
@@ -53,7 +57,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -91,6 +95,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-This module is part of the `OCA/account-analytic `_ project on GitHub.
+This module is part of the `OCA/account-analytic `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/pos_analytic_by_config/__manifest__.py b/pos_analytic_by_config/__manifest__.py
index ba3e168a76..577bcd0d57 100644
--- a/pos_analytic_by_config/__manifest__.py
+++ b/pos_analytic_by_config/__manifest__.py
@@ -3,12 +3,11 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "POS Analytic Config",
- "summary": """Use analytic account defined on
- POS configuration for POS orders""",
- "author": "ACSONE SA/NV," "Tecnativa, " "Odoo Community Association (OCA)",
+ "summary": "Use analytic account defined on POS configuration for POS orders",
+ "author": "ACSONE SA/NV, Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-analytic",
"category": "Point Of Sale, Accounting",
- "version": "13.0.1.0.1",
+ "version": "13.0.1.0.0",
"license": "AGPL-3",
"depends": ["point_of_sale"],
"data": ["views/pos_config_view.xml"],
diff --git a/pos_analytic_by_config/i18n/de.po b/pos_analytic_by_config/i18n/de.po
index 419fd25a0d..edb745b9cc 100644
--- a/pos_analytic_by_config/i18n/de.po
+++ b/pos_analytic_by_config/i18n/de.po
@@ -48,6 +48,3 @@ msgstr ""
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
msgid "Point of Sale Orders"
msgstr ""
-
-#~ msgid "Point of Sale"
-#~ msgstr "Verkaufsstelle"
diff --git a/pos_analytic_by_config/i18n/es.po b/pos_analytic_by_config/i18n/es.po
index 4e36dc0c5c..6fc56df7db 100644
--- a/pos_analytic_by_config/i18n/es.po
+++ b/pos_analytic_by_config/i18n/es.po
@@ -49,6 +49,3 @@ msgstr ""
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
msgid "Point of Sale Orders"
msgstr ""
-
-#~ msgid "Point of Sale"
-#~ msgstr "Punto de venta"
diff --git a/pos_analytic_by_config/i18n/fr.po b/pos_analytic_by_config/i18n/fr.po
index aa2142dfe6..6badf7c162 100644
--- a/pos_analytic_by_config/i18n/fr.po
+++ b/pos_analytic_by_config/i18n/fr.po
@@ -49,6 +49,3 @@ msgstr ""
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
msgid "Point of Sale Orders"
msgstr ""
-
-#~ msgid "Point of Sale"
-#~ msgstr "Point de vente"
diff --git a/pos_analytic_by_config/i18n/pos_analytic_by_config.pot b/pos_analytic_by_config/i18n/pos_analytic_by_config.pot
index 9bb0e05d2e..b861f41176 100644
--- a/pos_analytic_by_config/i18n/pos_analytic_by_config.pot
+++ b/pos_analytic_by_config/i18n/pos_analytic_by_config.pot
@@ -1,12 +1,12 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * pos_analytic_by_config
+# * pos_analytic_by_config
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 12.0\n"
+"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
-"Last-Translator: <>\n"
+"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -30,8 +30,8 @@ msgid "Analytic Account that these orders link to"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
-msgid "Invoice Line"
+#: model:ir.model,name:pos_analytic_by_config.model_account_move_line
+msgid "Journal Item"
msgstr ""
#. module: pos_analytic_by_config
@@ -44,3 +44,7 @@ msgstr ""
msgid "Point of Sale Orders"
msgstr ""
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_session
+msgid "Point of Sale Session"
+msgstr ""
diff --git a/pos_analytic_by_config/i18n/sl.po b/pos_analytic_by_config/i18n/sl.po
index 416c369d21..5440cbd885 100644
--- a/pos_analytic_by_config/i18n/sl.po
+++ b/pos_analytic_by_config/i18n/sl.po
@@ -49,6 +49,3 @@ msgstr ""
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
msgid "Point of Sale Orders"
msgstr ""
-
-#~ msgid "Point of Sale"
-#~ msgstr "POS Prodajna točka"
diff --git a/pos_analytic_by_config/i18n/zh_CN.po b/pos_analytic_by_config/i18n/zh_CN.po
index 5b6621b1da..4c728ce71d 100644
--- a/pos_analytic_by_config/i18n/zh_CN.po
+++ b/pos_analytic_by_config/i18n/zh_CN.po
@@ -50,6 +50,3 @@ msgstr ""
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
msgid "Point of Sale Orders"
msgstr ""
-
-#~ msgid "Point of Sale"
-#~ msgstr "POS"
diff --git a/pos_analytic_by_config/models/__init__.py b/pos_analytic_by_config/models/__init__.py
index 47a7cf53ba..adf0538545 100644
--- a/pos_analytic_by_config/models/__init__.py
+++ b/pos_analytic_by_config/models/__init__.py
@@ -1,3 +1,4 @@
-from . import account_invoice
+from . import account_move_line
from . import pos_config
from . import pos_order
+from . import pos_session
diff --git a/pos_analytic_by_config/models/account_invoice.py b/pos_analytic_by_config/models/account_move_line.py
similarity index 57%
rename from pos_analytic_by_config/models/account_invoice.py
rename to pos_analytic_by_config/models/account_move_line.py
index 78e84677ca..81c3a7b773 100644
--- a/pos_analytic_by_config/models/account_invoice.py
+++ b/pos_analytic_by_config/models/account_move_line.py
@@ -3,17 +3,17 @@
from odoo import api, models
-class AccountInvoiceLine(models.Model):
- _inherit = "account.invoice.line"
+class AccountMoveLine(models.Model):
+ _inherit = "account.move.line"
@api.onchange("product_id")
def _onchange_product_id(self):
- account_analytic_id = self.account_analytic_id
+ analytic_account_id = self.analytic_account_id
res = super()._onchange_product_id()
- if not self.env.context.get("pos_analytic") or not account_analytic_id:
+ if not self.env.context.get("pos_analytic") or not analytic_account_id:
return res
# Odoo triggers an onchange on the product_id when creating an invoice.
# This may cause an incompatibility with product_analytic
- if self.account_analytic_id != account_analytic_id:
- self.account_analytic_id = account_analytic_id
+ if self.analytic_account_id != analytic_account_id:
+ self.analytic_account_id = analytic_account_id
return res
diff --git a/pos_analytic_by_config/models/pos_order.py b/pos_analytic_by_config/models/pos_order.py
index a623a5633e..e6e219730d 100644
--- a/pos_analytic_by_config/models/pos_order.py
+++ b/pos_analytic_by_config/models/pos_order.py
@@ -1,15 +1,22 @@
# Copyright 2015 ACSONE SA/NV
# Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import api, models
+from odoo import models
class PosOrder(models.Model):
_inherit = "pos.order"
- @api.model
- def _prepare_analytic_account(self, line):
- return line.order_id.session_id.config_id.account_analytic_id.id
+ def _prepare_invoice_line(self, line):
+ """The method that allowed to add the analytic account to the invoice lines
+ has been dropped in v13. Fortunately we can add it easily with this
+ prepare method.
+ """
+ res = super()._prepare_invoice_line(line)
+ analytic_account = line.order_id.session_id.config_id.account_analytic_id
+ if analytic_account:
+ res.update({"analytic_account_id": analytic_account.id})
+ return res
def action_pos_order_invoice(self):
self_ctx = self.with_context(pos_analytic=True)
diff --git a/pos_analytic_by_config/models/pos_session.py b/pos_analytic_by_config/models/pos_session.py
new file mode 100644
index 0000000000..b515902e18
--- /dev/null
+++ b/pos_analytic_by_config/models/pos_session.py
@@ -0,0 +1,39 @@
+# Copyright 2021 Tecnativa - David Vidal
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+from odoo import models
+
+
+class PosSession(models.Model):
+ _inherit = "pos.session"
+
+ def _credit_amounts(
+ self,
+ partial_move_line_vals,
+ amount,
+ amount_converted,
+ force_company_currency=False,
+ ):
+ """We only want the analyitic account set in the sales items from the account
+ move. This is called from `_get_sale_vals` but from other credit methods
+ as well. To ensure that only sales items get the analytic account we flag
+ the context from the former method with the proper analytic account id.
+ """
+ account_analytic_id = self.env.context.get("account_analytic_id")
+ if account_analytic_id:
+ partial_move_line_vals.update({"analytic_account_id": account_analytic_id})
+ return super()._credit_amounts(
+ partial_move_line_vals, amount, amount_converted, force_company_currency
+ )
+
+ def _get_sale_vals(self, key, amount, amount_converted):
+ """The method that allowed to add the analytic account to the sales items
+ has been dropped in v13, so we have to add it in the moment the sales
+ items values are prepared.
+ """
+ account_analytic_id = self.config_id.account_analytic_id
+ if account_analytic_id:
+ return super(
+ PosSession,
+ self.with_context(account_analytic_id=account_analytic_id.id),
+ )._get_sale_vals(key, amount, amount_converted)
+ return self._get_sale_vals(key, amount, amount_converted)
diff --git a/pos_analytic_by_config/readme/ROADMAP.rst b/pos_analytic_by_config/readme/ROADMAP.rst
index 473a47bc57..0e11a3b531 100644
--- a/pos_analytic_by_config/readme/ROADMAP.rst
+++ b/pos_analytic_by_config/readme/ROADMAP.rst
@@ -1 +1,5 @@
* Add `account_analytic_id` in `pos.order` so we can use it in reports.
+* In `13.0` the session reconciliation has been refactored and thus the journal
+ items are now very simplified. There's no product detail now, so we won't
+ be able to analyze that level of detail anymore. For invoices it remains as it
+ was.
diff --git a/pos_analytic_by_config/static/description/index.html b/pos_analytic_by_config/static/description/index.html
index 66e6d863f5..4d28446e6a 100644
--- a/pos_analytic_by_config/static/description/index.html
+++ b/pos_analytic_by_config/static/description/index.html
@@ -367,7 +367,7 @@ POS Analytic Config
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module allows to use analytic account defined on POS configuration
for invoices and accounting entries generated from POS orders.
Table of contents
@@ -397,6 +397,10 @@
Add account_analytic_id in pos.order so we can use it in reports.
+In 13.0 the session reconciliation has been refactored and thus the journal
+items are now very simplified. There’s no product detail now, so we won’t
+be able to analyze that level of detail anymore. For invoices it remains as it
+was.
@@ -404,7 +408,7 @@
Bugs are tracked on GitHub Issues .
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback .
+
feedback .
Do not contact contributors directly about support or help with technical issues.
@@ -437,7 +441,7 @@
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-
This module is part of the OCA/account-analytic project on GitHub.
+
This module is part of the OCA/account-analytic project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute .
diff --git a/pos_analytic_by_config/tests/test_pos_analytic_by_config.py b/pos_analytic_by_config/tests/test_pos_analytic_by_config.py
index 09f35dd89a..9ecf865ea0 100644
--- a/pos_analytic_by_config/tests/test_pos_analytic_by_config.py
+++ b/pos_analytic_by_config/tests/test_pos_analytic_by_config.py
@@ -1,5 +1,6 @@
# Copyright 2015 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+from odoo import fields
from odoo.tests import common
@@ -8,7 +9,6 @@ class TestPosAnalyticConfig(common.SavepointCase):
def setUpClass(cls):
super().setUpClass()
cls.aml_obj = cls.env["account.move.line"]
- cls.inv_line_obj = cls.env["account.invoice.line"]
cls.pricelist = cls.env["product.pricelist"].create(
{
"name": "Test pricelist",
@@ -37,66 +37,93 @@ def setUpClass(cls):
)
cls.customer_01 = cls.env["res.partner"].create({"name": "Mr. Odoo"})
cls.product_01 = cls.env["product.product"].create({"name": "Test product"})
- cls.aml_analytic_domain = [
- ("product_id", "=", cls.product_01.id),
- ("analytic_account_id", "=", cls.aa_01.id),
- ]
- cls.inv_analytic_domain = [
- ("product_id", "=", cls.product_01.id),
- ("account_analytic_id", "=", cls.aa_01.id),
- ]
cls.main_config.account_analytic_id = cls.aa_01
+ cls.main_config.invoice_journal_id = cls.main_config.journal_id
cls.session_01 = cls.env["pos.session"].create(
{"config_id": cls.main_config.id}
)
cls.session_01.action_pos_session_open()
+ payment_methods = cls.session_01.payment_method_ids
+ account_receivable_id = (
+ cls.env.user.partner_id.property_account_receivable_id.id
+ )
order_vals = {
- "session_id": cls.session_01.id,
- "partner_id": cls.customer_01.id,
- "lines": [
- (
- 0,
- 0,
- {
- "product_id": cls.product_01.id,
- "qty": 1,
- "price_unit": 10.0,
- "price_subtotal": 10,
- "price_subtotal_incl": 10,
- },
- )
- ],
- "amount_total": 10.0,
- "amount_tax": 0.0,
- "amount_paid": 10.0,
- "amount_return": 0.0,
- }
- cls.order_01 = cls.env["pos.order"].create(order_vals)
- payment_data = {
- "amount": 10,
- "journal": cls.main_config.journal_ids[0].id,
- "partner_id": cls.order_01.partner_id.id,
+ "id": "test-id-pos_analytic_by_config",
+ "data": {
+ "creation_date": "2021-04-05 12:00:00",
+ "sequence_number": 1,
+ "user_id": 1,
+ "name": "Order test-id-pos_analytic_by_config",
+ "uid": "test-id-pos_analytic_by_config",
+ "partner_id": cls.customer_01.id,
+ "pricelist_id": cls.pricelist.id,
+ "fiscal_position_id": False,
+ "pos_session_id": cls.session_01.id,
+ "lines": [
+ (
+ 0,
+ 0,
+ {
+ "product_id": cls.product_01.id,
+ "qty": 1,
+ "price_unit": 10.0,
+ "price_subtotal": 10,
+ "price_subtotal_incl": 10,
+ },
+ )
+ ],
+ "amount_total": 10.0,
+ "amount_tax": 0.0,
+ "amount_paid": 10.0,
+ "amount_return": 0.0,
+ "statement_ids": [
+ [
+ 0,
+ 0,
+ {
+ "journal_id": cls.main_config.journal_id.id,
+ "amount": 10,
+ "name": fields.Datetime.now(),
+ "account_id": account_receivable_id,
+ "statement_id": cls.session_01.statement_ids[0].id,
+ "payment_method_id": payment_methods.filtered(
+ lambda pm: pm.is_cash_count
+ and not pm.split_transactions
+ )[0].id,
+ },
+ ]
+ ],
+ },
}
- cls.order_01.add_payment(payment_data)
- cls.order_01.action_pos_order_paid()
+ order = cls.env["pos.order"].create_from_ui([order_vals])
+ cls.pos_order = cls.env["pos.order"].browse(order[0]["id"])
+ cls.income_account = cls.session_01._prepare_line(cls.pos_order.lines)[
+ "income_account_id"
+ ]
def test_order_simple_receipt(self):
- """Simple ticket"""
- aml = self.aml_obj.search(self.aml_analytic_domain)
+ """Simple tickets are grouped by account in single move lines"""
+ aml_domain = [
+ ("account_id", "=", self.income_account),
+ ("analytic_account_id", "=", self.aa_01.id),
+ ]
# There aren't lines with the analytic account yet
- self.assertEqual(len(aml.ids), 0)
+ self.assertFalse(self.aml_obj.search(aml_domain))
self.session_01.action_pos_session_closing_control()
- self.session_01.action_pos_session_close()
# There they are
- aml = self.aml_obj.search(self.aml_analytic_domain)
- self.assertEqual(len(aml.ids), 1)
+ self.assertEqual(len(self.aml_obj.search(aml_domain)), 1)
def test_order_invoice(self):
- """Ticket with invoice"""
- lines = self.inv_line_obj.search(self.inv_analytic_domain)
- self.order_01.action_pos_order_invoice()
+ """Tickets with invoice are posted prior to session reconcilation"""
+ aml_domain = [
+ ("account_id", "=", self.income_account),
+ ("product_id", "=", self.product_01.id),
+ ("analytic_account_id", "=", self.aa_01.id),
+ ]
+ lines = self.aml_obj.search(aml_domain)
# There aren't lines with the analytic account yet
self.assertEqual(len(lines.ids), 0)
- lines = self.inv_line_obj.search(self.inv_analytic_domain)
+ self.pos_order.action_pos_order_invoice()
+ lines = self.aml_obj.search(aml_domain)
# There they are
self.assertEqual(len(lines.ids), 1)
From 6a06bb8eaba4ecfe3091d625c2c5dcd6770e1088 Mon Sep 17 00:00:00 2001
From: xavier-bouquiaux
Date: Thu, 27 May 2021 10:49:45 +0200
Subject: [PATCH 08/26] [14.0][MIG] pos_analytic_by_config
---
pos_analytic_by_config/README.rst | 11 ++++----
pos_analytic_by_config/__manifest__.py | 2 +-
.../i18n/pos_analytic_by_config.pot | 26 ++++++++++++++++++-
pos_analytic_by_config/models/pos_session.py | 2 +-
.../readme/CONTRIBUTORS.rst | 1 +
.../static/description/index.html | 7 ++---
6 files changed, 38 insertions(+), 11 deletions(-)
diff --git a/pos_analytic_by_config/README.rst b/pos_analytic_by_config/README.rst
index 92f9d02b08..2768b8ab37 100644
--- a/pos_analytic_by_config/README.rst
+++ b/pos_analytic_by_config/README.rst
@@ -14,13 +14,13 @@ POS Analytic Config
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--analytic-lightgray.png?logo=github
- :target: https://github.com/OCA/account-analytic/tree/13.0/pos_analytic_by_config
+ :target: https://github.com/OCA/account-analytic/tree/14.0/pos_analytic_by_config
:alt: OCA/account-analytic
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/account-analytic-13-0/account-analytic-13-0-pos_analytic_by_config
+ :target: https://translation.odoo-community.org/projects/account-analytic-14-0/account-analytic-14-0-pos_analytic_by_config
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/87/13.0
+ :target: https://runbot.odoo-community.org/runbot/87/14.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -57,7 +57,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -77,6 +77,7 @@ Contributors
* Adrien Peiffer
* Cédric Pigeon
+ * Xavier Bouquiaux
* `Tecnativa `_
@@ -95,6 +96,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-This module is part of the `OCA/account-analytic `_ project on GitHub.
+This module is part of the `OCA/account-analytic `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/pos_analytic_by_config/__manifest__.py b/pos_analytic_by_config/__manifest__.py
index 577bcd0d57..ef5aa718b9 100644
--- a/pos_analytic_by_config/__manifest__.py
+++ b/pos_analytic_by_config/__manifest__.py
@@ -7,7 +7,7 @@
"author": "ACSONE SA/NV, Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-analytic",
"category": "Point Of Sale, Accounting",
- "version": "13.0.1.0.0",
+ "version": "14.0.1.0.0",
"license": "AGPL-3",
"depends": ["point_of_sale"],
"data": ["views/pos_config_view.xml"],
diff --git a/pos_analytic_by_config/i18n/pos_analytic_by_config.pot b/pos_analytic_by_config/i18n/pos_analytic_by_config.pot
index b861f41176..ea10562e1c 100644
--- a/pos_analytic_by_config/i18n/pos_analytic_by_config.pot
+++ b/pos_analytic_by_config/i18n/pos_analytic_by_config.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 13.0\n"
+"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -29,11 +29,35 @@ msgstr ""
msgid "Analytic Account that these orders link to"
msgstr ""
+#. module: pos_analytic_by_config
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_account_move_line__display_name
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__display_name
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_order__display_name
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_session__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_account_move_line__id
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__id
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_order__id
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_session__id
+msgid "ID"
+msgstr ""
+
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_account_move_line
msgid "Journal Item"
msgstr ""
+#. module: pos_analytic_by_config
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_account_move_line____last_update
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config____last_update
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_order____last_update
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_session____last_update
+msgid "Last Modified on"
+msgstr ""
+
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_config
msgid "Point of Sale Configuration"
diff --git a/pos_analytic_by_config/models/pos_session.py b/pos_analytic_by_config/models/pos_session.py
index b515902e18..bf6b728db4 100644
--- a/pos_analytic_by_config/models/pos_session.py
+++ b/pos_analytic_by_config/models/pos_session.py
@@ -36,4 +36,4 @@ def _get_sale_vals(self, key, amount, amount_converted):
PosSession,
self.with_context(account_analytic_id=account_analytic_id.id),
)._get_sale_vals(key, amount, amount_converted)
- return self._get_sale_vals(key, amount, amount_converted)
+ return super()._get_sale_vals(key, amount, amount_converted)
diff --git a/pos_analytic_by_config/readme/CONTRIBUTORS.rst b/pos_analytic_by_config/readme/CONTRIBUTORS.rst
index 5048143807..df6ad55e23 100644
--- a/pos_analytic_by_config/readme/CONTRIBUTORS.rst
+++ b/pos_analytic_by_config/readme/CONTRIBUTORS.rst
@@ -2,6 +2,7 @@
* Adrien Peiffer
* Cédric Pigeon
+ * Xavier Bouquiaux
* `Tecnativa `_
diff --git a/pos_analytic_by_config/static/description/index.html b/pos_analytic_by_config/static/description/index.html
index 4d28446e6a..811d408093 100644
--- a/pos_analytic_by_config/static/description/index.html
+++ b/pos_analytic_by_config/static/description/index.html
@@ -367,7 +367,7 @@ POS Analytic Config
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module allows to use analytic account defined on POS configuration
for invoices and accounting entries generated from POS orders.
Table of contents
@@ -408,7 +408,7 @@
Bugs are tracked on GitHub Issues .
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback .
+feedback .
Do not contact contributors directly about support or help with technical issues.
From 053277ba4f21aba10533f4bc31565371adbcec5d Mon Sep 17 00:00:00 2001
From: Noel estudillo
Date: Mon, 21 Mar 2022 10:32:51 +0000
Subject: [PATCH 09/26] Translated using Weblate (Catalan)
Currently translated at 100.0% (6 of 6 strings)
Translation: account-analytic-14.0/account-analytic-14.0-pos_analytic_by_config
Translate-URL: https://translation.odoo-community.org/projects/account-analytic-14-0/account-analytic-14-0-pos_analytic_by_config/ca/
---
pos_analytic_by_config/i18n/ca.po | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/pos_analytic_by_config/i18n/ca.po b/pos_analytic_by_config/i18n/ca.po
index 0889f8d9e3..58a9961c0b 100644
--- a/pos_analytic_by_config/i18n/ca.po
+++ b/pos_analytic_by_config/i18n/ca.po
@@ -9,14 +9,15 @@ msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-13 23:06+0000\n"
-"PO-Revision-Date: 2017-01-13 23:06+0000\n"
-"Last-Translator: Carles Antoli , 2017\n"
+"PO-Revision-Date: 2022-03-21 13:17+0000\n"
+"Last-Translator: Noel estudillo \n"
"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 4.3.2\n"
#. module: pos_analytic_by_config
#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__account_analytic_id
@@ -27,24 +28,24 @@ msgstr "Compte analític"
#. module: pos_analytic_by_config
#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account for this config."
-msgstr ""
+msgstr "Compte analític per a aquesta configuració."
#. module: pos_analytic_by_config
#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account that these orders link to"
-msgstr ""
+msgstr "Compte analític al qual enllacen aquestes comandes"
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
msgid "Invoice Line"
-msgstr ""
+msgstr "Línia de factura"
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_config
msgid "Point of Sale Configuration"
-msgstr ""
+msgstr "Configuració del punt de venda"
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
msgid "Point of Sale Orders"
-msgstr ""
+msgstr "Comandes al punt de venda"
From 2960264202d7dbdfbc41b32ce128320246078d85 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Douglas=20Cust=C3=B3dio?=
Date: Mon, 31 Oct 2022 17:49:44 +0000
Subject: [PATCH 10/26] Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (6 of 6 strings)
Translation: account-analytic-14.0/account-analytic-14.0-pos_analytic_by_config
Translate-URL: https://translation.odoo-community.org/projects/account-analytic-14-0/account-analytic-14-0-pos_analytic_by_config/pt_BR/
---
pos_analytic_by_config/i18n/en.po | 26 --------------------------
pos_analytic_by_config/i18n/pt_BR.po | 21 +++++++++++----------
2 files changed, 11 insertions(+), 36 deletions(-)
delete mode 100644 pos_analytic_by_config/i18n/en.po
diff --git a/pos_analytic_by_config/i18n/en.po b/pos_analytic_by_config/i18n/en.po
deleted file mode 100644
index 8c1281b762..0000000000
--- a/pos_analytic_by_config/i18n/en.po
+++ /dev/null
@@ -1,26 +0,0 @@
-# Translation of Odoo Server.
-# This file contains the translation of the following modules:
-# * pos_analytic_by_config
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Odoo Server 8.0\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-07-30 09:13+0000\n"
-"PO-Revision-Date: 2016-07-30 09:13+0000\n"
-"Last-Translator: <>\n"
-"Language-Team: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: \n"
-"Plural-Forms: \n"
-
-#. module: pos_analytic_by_config
-#: field:pos.config,account_analytic_id:0
-msgid "Analytic Account"
-msgstr "Analytic Account"
-
-#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_pos_order
-msgid "Point of Sale"
-msgstr "Point of Sale"
diff --git a/pos_analytic_by_config/i18n/pt_BR.po b/pos_analytic_by_config/i18n/pt_BR.po
index b438f85beb..eb5f5f336a 100644
--- a/pos_analytic_by_config/i18n/pt_BR.po
+++ b/pos_analytic_by_config/i18n/pt_BR.po
@@ -9,15 +9,16 @@ msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-06 02:55+0000\n"
-"PO-Revision-Date: 2017-04-06 02:55+0000\n"
-"Last-Translator: OCA Transbot , 2017\n"
-"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/"
-"teams/23907/pt_BR/)\n"
+"PO-Revision-Date: 2022-10-31 20:44+0000\n"
+"Last-Translator: Douglas Custódio \n"
+"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/"
+"23907/pt_BR/)\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"Plural-Forms: nplurals=2; plural=n > 1;\n"
+"X-Generator: Weblate 4.14.1\n"
#. module: pos_analytic_by_config
#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__account_analytic_id
@@ -28,24 +29,24 @@ msgstr "Conta analítica"
#. module: pos_analytic_by_config
#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account for this config."
-msgstr ""
+msgstr "Conta Analítica para essa config."
#. module: pos_analytic_by_config
#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account that these orders link to"
-msgstr ""
+msgstr "Conta analítica que essas ordem estão vinculadas"
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
msgid "Invoice Line"
-msgstr ""
+msgstr "Linha da Fatura"
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_config
msgid "Point of Sale Configuration"
-msgstr ""
+msgstr "Configuração do Ponto de Venda"
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
msgid "Point of Sale Orders"
-msgstr ""
+msgstr "Pedido do Ponto de Venda"
From bebc31aebe00fc47636ddc896884c52d7945e6dd Mon Sep 17 00:00:00 2001
From: Rachid Al Assir
Date: Tue, 14 Feb 2023 14:34:20 +0000
Subject: [PATCH 11/26] Added translation using Weblate (Arabic)
---
pos_analytic_by_config/i18n/ar.po | 76 +++++++++++++++++++++++++++++++
1 file changed, 76 insertions(+)
create mode 100644 pos_analytic_by_config/i18n/ar.po
diff --git a/pos_analytic_by_config/i18n/ar.po b/pos_analytic_by_config/i18n/ar.po
new file mode 100644
index 0000000000..128069b233
--- /dev/null
+++ b/pos_analytic_by_config/i18n/ar.po
@@ -0,0 +1,76 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * pos_analytic_by_config
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 14.0\n"
+"Report-Msgid-Bugs-To: \n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"Language: ar\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
+"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
+
+#. module: pos_analytic_by_config
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__account_analytic_id
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account for this config."
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
+msgid "Analytic Account that these orders link to"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_account_move_line__display_name
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__display_name
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_order__display_name
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_session__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_account_move_line__id
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__id
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_order__id
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_session__id
+msgid "ID"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_account_move_line
+msgid "Journal Item"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_account_move_line____last_update
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config____last_update
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_order____last_update
+#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_session____last_update
+msgid "Last Modified on"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_config
+msgid "Point of Sale Configuration"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_order
+msgid "Point of Sale Orders"
+msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_session
+msgid "Point of Sale Session"
+msgstr ""
From 0ae812ab156eaa893222c92033ad7110197fc76e Mon Sep 17 00:00:00 2001
From: Rachid Al Assir
Date: Tue, 14 Feb 2023 14:36:59 +0000
Subject: [PATCH 12/26] Translated using Weblate (Arabic)
Currently translated at 100.0% (10 of 10 strings)
Translation: account-analytic-14.0/account-analytic-14.0-pos_analytic_by_config
Translate-URL: https://translation.odoo-community.org/projects/account-analytic-14-0/account-analytic-14-0-pos_analytic_by_config/ar/
---
pos_analytic_by_config/i18n/ar.po | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/pos_analytic_by_config/i18n/ar.po b/pos_analytic_by_config/i18n/ar.po
index 128069b233..cb45ad5c18 100644
--- a/pos_analytic_by_config/i18n/ar.po
+++ b/pos_analytic_by_config/i18n/ar.po
@@ -6,7 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2023-02-14 17:23+0000\n"
+"Last-Translator: Rachid Al Assir \n"
"Language-Team: none\n"
"Language: ar\n"
"MIME-Version: 1.0\n"
@@ -14,22 +15,23 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
+"X-Generator: Weblate 4.14.1\n"
#. module: pos_analytic_by_config
#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__account_analytic_id
#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account"
-msgstr ""
+msgstr "الحساب التحليلي"
#. module: pos_analytic_by_config
#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account for this config."
-msgstr ""
+msgstr "حساب تحليلي لهذا التكوين."
#. module: pos_analytic_by_config
#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account that these orders link to"
-msgstr ""
+msgstr "الحساب التحليلي الذي ترتبط به هذه الطلبات"
#. module: pos_analytic_by_config
#: model:ir.model.fields,field_description:pos_analytic_by_config.field_account_move_line__display_name
@@ -37,7 +39,7 @@ msgstr ""
#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_order__display_name
#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_session__display_name
msgid "Display Name"
-msgstr ""
+msgstr "الاسم المعروض"
#. module: pos_analytic_by_config
#: model:ir.model.fields,field_description:pos_analytic_by_config.field_account_move_line__id
@@ -45,12 +47,12 @@ msgstr ""
#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_order__id
#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_session__id
msgid "ID"
-msgstr ""
+msgstr "المُعرف"
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_account_move_line
msgid "Journal Item"
-msgstr ""
+msgstr "عنصر اليومية"
#. module: pos_analytic_by_config
#: model:ir.model.fields,field_description:pos_analytic_by_config.field_account_move_line____last_update
@@ -58,19 +60,19 @@ msgstr ""
#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_order____last_update
#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_session____last_update
msgid "Last Modified on"
-msgstr ""
+msgstr "آخر تعديل في"
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_config
msgid "Point of Sale Configuration"
-msgstr ""
+msgstr "إعدادات نقطة البيع"
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
msgid "Point of Sale Orders"
-msgstr ""
+msgstr "أوامر نقطة البيع"
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_session
msgid "Point of Sale Session"
-msgstr ""
+msgstr "جلسة نقطة البيع"
From 7f0c208800375d540d0c1b24570770c0de9170aa Mon Sep 17 00:00:00 2001
From: Ricardoalso
Date: Mon, 22 May 2023 11:56:32 +0200
Subject: [PATCH 13/26] [MIG] pos_analytic_by_config: Migration to 15.0
---
pos_analytic_by_config/README.rst | 10 +++----
pos_analytic_by_config/__manifest__.py | 2 +-
pos_analytic_by_config/i18n/ar.po | 2 +-
.../i18n/pos_analytic_by_config.pot | 26 +------------------
.../static/description/index.html | 6 ++---
.../tests/test_pos_analytic_by_config.py | 6 ++++-
6 files changed, 16 insertions(+), 36 deletions(-)
diff --git a/pos_analytic_by_config/README.rst b/pos_analytic_by_config/README.rst
index 2768b8ab37..8b0425b1b1 100644
--- a/pos_analytic_by_config/README.rst
+++ b/pos_analytic_by_config/README.rst
@@ -14,13 +14,13 @@ POS Analytic Config
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--analytic-lightgray.png?logo=github
- :target: https://github.com/OCA/account-analytic/tree/14.0/pos_analytic_by_config
+ :target: https://github.com/OCA/account-analytic/tree/15.0/pos_analytic_by_config
:alt: OCA/account-analytic
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/account-analytic-14-0/account-analytic-14-0-pos_analytic_by_config
+ :target: https://translation.odoo-community.org/projects/account-analytic-15-0/account-analytic-15-0-pos_analytic_by_config
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/87/14.0
+ :target: https://runbot.odoo-community.org/runbot/87/15.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -57,7 +57,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -96,6 +96,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-This module is part of the `OCA/account-analytic `_ project on GitHub.
+This module is part of the `OCA/account-analytic `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/pos_analytic_by_config/__manifest__.py b/pos_analytic_by_config/__manifest__.py
index ef5aa718b9..1601cb2017 100644
--- a/pos_analytic_by_config/__manifest__.py
+++ b/pos_analytic_by_config/__manifest__.py
@@ -7,7 +7,7 @@
"author": "ACSONE SA/NV, Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-analytic",
"category": "Point Of Sale, Accounting",
- "version": "14.0.1.0.0",
+ "version": "15.0.1.0.0",
"license": "AGPL-3",
"depends": ["point_of_sale"],
"data": ["views/pos_config_view.xml"],
diff --git a/pos_analytic_by_config/i18n/ar.po b/pos_analytic_by_config/i18n/ar.po
index cb45ad5c18..76e729df61 100644
--- a/pos_analytic_by_config/i18n/ar.po
+++ b/pos_analytic_by_config/i18n/ar.po
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 14.0\n"
+"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-02-14 17:23+0000\n"
"Last-Translator: Rachid Al Assir \n"
diff --git a/pos_analytic_by_config/i18n/pos_analytic_by_config.pot b/pos_analytic_by_config/i18n/pos_analytic_by_config.pot
index ea10562e1c..4aaf9e26b6 100644
--- a/pos_analytic_by_config/i18n/pos_analytic_by_config.pot
+++ b/pos_analytic_by_config/i18n/pos_analytic_by_config.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 14.0\n"
+"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -29,35 +29,11 @@ msgstr ""
msgid "Analytic Account that these orders link to"
msgstr ""
-#. module: pos_analytic_by_config
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_account_move_line__display_name
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__display_name
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_order__display_name
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_session__display_name
-msgid "Display Name"
-msgstr ""
-
-#. module: pos_analytic_by_config
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_account_move_line__id
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__id
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_order__id
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_session__id
-msgid "ID"
-msgstr ""
-
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_account_move_line
msgid "Journal Item"
msgstr ""
-#. module: pos_analytic_by_config
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_account_move_line____last_update
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config____last_update
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_order____last_update
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_session____last_update
-msgid "Last Modified on"
-msgstr ""
-
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_config
msgid "Point of Sale Configuration"
diff --git a/pos_analytic_by_config/static/description/index.html b/pos_analytic_by_config/static/description/index.html
index 811d408093..bf70cc290d 100644
--- a/pos_analytic_by_config/static/description/index.html
+++ b/pos_analytic_by_config/static/description/index.html
@@ -367,7 +367,7 @@ POS Analytic Config
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module allows to use analytic account defined on POS configuration
for invoices and accounting entries generated from POS orders.
Table of contents
@@ -408,7 +408,7 @@
Bugs are tracked on GitHub Issues .
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback .
+feedback .
Do not contact contributors directly about support or help with technical issues.
@@ -442,7 +442,7 @@
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-
This module is part of the OCA/account-analytic project on GitHub.
+
This module is part of the OCA/account-analytic project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute .
diff --git a/pos_analytic_by_config/tests/test_pos_analytic_by_config.py b/pos_analytic_by_config/tests/test_pos_analytic_by_config.py
index 9ecf865ea0..79bfa50b70 100644
--- a/pos_analytic_by_config/tests/test_pos_analytic_by_config.py
+++ b/pos_analytic_by_config/tests/test_pos_analytic_by_config.py
@@ -4,7 +4,7 @@
from odoo.tests import common
-class TestPosAnalyticConfig(common.SavepointCase):
+class TestPosAnalyticConfig(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
@@ -109,6 +109,9 @@ def test_order_simple_receipt(self):
]
# There aren't lines with the analytic account yet
self.assertFalse(self.aml_obj.search(aml_domain))
+ self.session_01.total_payments_amount = 0
+ self.main_config.journal_id.type = "sale"
+ self.pos_order.action_pos_order_invoice()
self.session_01.action_pos_session_closing_control()
# There they are
self.assertEqual(len(self.aml_obj.search(aml_domain)), 1)
@@ -120,6 +123,7 @@ def test_order_invoice(self):
("product_id", "=", self.product_01.id),
("analytic_account_id", "=", self.aa_01.id),
]
+ self.main_config.journal_id.type = "sale"
lines = self.aml_obj.search(aml_domain)
# There aren't lines with the analytic account yet
self.assertEqual(len(lines.ids), 0)
From 9e73a008eefd6d6e6c8a7720257d1b8f0120e9ad Mon Sep 17 00:00:00 2001
From: Ivorra78
Date: Fri, 28 Jul 2023 18:50:59 +0000
Subject: [PATCH 14/26] Translated using Weblate (Spanish)
Currently translated at 100.0% (6 of 6 strings)
Translation: account-analytic-15.0/account-analytic-15.0-pos_analytic_by_config
Translate-URL: https://translation.odoo-community.org/projects/account-analytic-15-0/account-analytic-15-0-pos_analytic_by_config/es/
---
pos_analytic_by_config/i18n/es.po | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/pos_analytic_by_config/i18n/es.po b/pos_analytic_by_config/i18n/es.po
index 6fc56df7db..97e2b0e990 100644
--- a/pos_analytic_by_config/i18n/es.po
+++ b/pos_analytic_by_config/i18n/es.po
@@ -9,15 +9,15 @@ msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-15 17:04+0000\n"
-"PO-Revision-Date: 2020-08-03 15:59+0000\n"
-"Last-Translator: FranciscoFactorLibre \n"
+"PO-Revision-Date: 2023-07-28 21:09+0000\n"
+"Last-Translator: Ivorra78 \n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.10\n"
+"X-Generator: Weblate 4.17\n"
#. module: pos_analytic_by_config
#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__account_analytic_id
@@ -28,24 +28,24 @@ msgstr "Cuenta analítica"
#. module: pos_analytic_by_config
#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account for this config."
-msgstr ""
+msgstr "Cuenta analítica para esta configuración."
#. module: pos_analytic_by_config
#: model_terms:ir.ui.view,arch_db:pos_analytic_by_config.view_pos_config_form
msgid "Analytic Account that these orders link to"
-msgstr ""
+msgstr "Cuenta analítica relacionada con estos pedidos"
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
msgid "Invoice Line"
-msgstr ""
+msgstr "Línea de Factura"
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_config
msgid "Point of Sale Configuration"
-msgstr ""
+msgstr "Configuración del Punto de Venta"
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
msgid "Point of Sale Orders"
-msgstr ""
+msgstr "Pedidos en el punto de venta"
From 11124f3df3041671a94f4311383ba9859c94118a Mon Sep 17 00:00:00 2001
From: Ricardoalso
Date: Wed, 9 Aug 2023 09:58:12 +0200
Subject: [PATCH 15/26] [15.0][FIX] pos_analytic_by_config: update signature of
_get_sale_vals
---
pos_analytic_by_config/README.rst | 15 ++++---
pos_analytic_by_config/i18n/ar.po | 33 ++++-----------
pos_analytic_by_config/i18n/ca.po | 14 +++++--
pos_analytic_by_config/i18n/de.po | 9 +++-
pos_analytic_by_config/i18n/el_GR.po | 9 +++-
pos_analytic_by_config/i18n/es.po | 14 +++++--
pos_analytic_by_config/i18n/es_MX.po | 9 +++-
pos_analytic_by_config/i18n/fi.po | 9 +++-
pos_analytic_by_config/i18n/fr.po | 9 +++-
pos_analytic_by_config/i18n/pt_BR.po | 18 +++++---
pos_analytic_by_config/i18n/sk_SK.po | 9 +++-
pos_analytic_by_config/i18n/sl.po | 9 +++-
pos_analytic_by_config/i18n/zh_CN.po | 9 +++-
pos_analytic_by_config/models/pos_session.py | 6 +--
.../static/description/index.html | 42 ++++++++++---------
15 files changed, 134 insertions(+), 80 deletions(-)
diff --git a/pos_analytic_by_config/README.rst b/pos_analytic_by_config/README.rst
index 8b0425b1b1..7f158c63e3 100644
--- a/pos_analytic_by_config/README.rst
+++ b/pos_analytic_by_config/README.rst
@@ -2,10 +2,13 @@
POS Analytic Config
===================
-.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+..
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! source digest: sha256:ad7b579cd5a3f429ed1b700183d47b316702016c6e8186679acb4c50dc687ab0
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
@@ -19,11 +22,11 @@ POS Analytic Config
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-analytic-15-0/account-analytic-15-0-pos_analytic_by_config
:alt: Translate me on Weblate
-.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/87/15.0
- :alt: Try me on Runbot
+.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/account-analytic&target_branch=15.0
+ :alt: Try me on Runboat
-|badge1| |badge2| |badge3| |badge4| |badge5|
+|badge1| |badge2| |badge3| |badge4| |badge5|
This module allows to use analytic account defined on POS configuration
for invoices and accounting entries generated from POS orders.
@@ -56,7 +59,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
-If you spotted it first, help us smashing it by providing a detailed and welcomed
+If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback `_.
Do not contact contributors directly about support or help with technical issues.
diff --git a/pos_analytic_by_config/i18n/ar.po b/pos_analytic_by_config/i18n/ar.po
index 76e729df61..7c704e1cf5 100644
--- a/pos_analytic_by_config/i18n/ar.po
+++ b/pos_analytic_by_config/i18n/ar.po
@@ -33,35 +33,11 @@ msgstr "حساب تحليلي لهذا التكوين."
msgid "Analytic Account that these orders link to"
msgstr "الحساب التحليلي الذي ترتبط به هذه الطلبات"
-#. module: pos_analytic_by_config
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_account_move_line__display_name
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__display_name
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_order__display_name
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_session__display_name
-msgid "Display Name"
-msgstr "الاسم المعروض"
-
-#. module: pos_analytic_by_config
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_account_move_line__id
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config__id
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_order__id
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_session__id
-msgid "ID"
-msgstr "المُعرف"
-
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_account_move_line
msgid "Journal Item"
msgstr "عنصر اليومية"
-#. module: pos_analytic_by_config
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_account_move_line____last_update
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_config____last_update
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_order____last_update
-#: model:ir.model.fields,field_description:pos_analytic_by_config.field_pos_session____last_update
-msgid "Last Modified on"
-msgstr "آخر تعديل في"
-
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_config
msgid "Point of Sale Configuration"
@@ -76,3 +52,12 @@ msgstr "أوامر نقطة البيع"
#: model:ir.model,name:pos_analytic_by_config.model_pos_session
msgid "Point of Sale Session"
msgstr "جلسة نقطة البيع"
+
+#~ msgid "Display Name"
+#~ msgstr "الاسم المعروض"
+
+#~ msgid "ID"
+#~ msgstr "المُعرف"
+
+#~ msgid "Last Modified on"
+#~ msgstr "آخر تعديل في"
diff --git a/pos_analytic_by_config/i18n/ca.po b/pos_analytic_by_config/i18n/ca.po
index 58a9961c0b..21b26dc536 100644
--- a/pos_analytic_by_config/i18n/ca.po
+++ b/pos_analytic_by_config/i18n/ca.po
@@ -36,9 +36,9 @@ msgid "Analytic Account that these orders link to"
msgstr "Compte analític al qual enllacen aquestes comandes"
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
-msgid "Invoice Line"
-msgstr "Línia de factura"
+#: model:ir.model,name:pos_analytic_by_config.model_account_move_line
+msgid "Journal Item"
+msgstr ""
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_config
@@ -49,3 +49,11 @@ msgstr "Configuració del punt de venda"
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
msgid "Point of Sale Orders"
msgstr "Comandes al punt de venda"
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_session
+msgid "Point of Sale Session"
+msgstr ""
+
+#~ msgid "Invoice Line"
+#~ msgstr "Línia de factura"
diff --git a/pos_analytic_by_config/i18n/de.po b/pos_analytic_by_config/i18n/de.po
index edb745b9cc..98524b38d1 100644
--- a/pos_analytic_by_config/i18n/de.po
+++ b/pos_analytic_by_config/i18n/de.po
@@ -35,8 +35,8 @@ msgid "Analytic Account that these orders link to"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
-msgid "Invoice Line"
+#: model:ir.model,name:pos_analytic_by_config.model_account_move_line
+msgid "Journal Item"
msgstr ""
#. module: pos_analytic_by_config
@@ -48,3 +48,8 @@ msgstr ""
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
msgid "Point of Sale Orders"
msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_session
+msgid "Point of Sale Session"
+msgstr ""
diff --git a/pos_analytic_by_config/i18n/el_GR.po b/pos_analytic_by_config/i18n/el_GR.po
index 589b1ccdfc..781db7a6dc 100644
--- a/pos_analytic_by_config/i18n/el_GR.po
+++ b/pos_analytic_by_config/i18n/el_GR.po
@@ -36,8 +36,8 @@ msgid "Analytic Account that these orders link to"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
-msgid "Invoice Line"
+#: model:ir.model,name:pos_analytic_by_config.model_account_move_line
+msgid "Journal Item"
msgstr ""
#. module: pos_analytic_by_config
@@ -49,3 +49,8 @@ msgstr ""
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
msgid "Point of Sale Orders"
msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_session
+msgid "Point of Sale Session"
+msgstr ""
diff --git a/pos_analytic_by_config/i18n/es.po b/pos_analytic_by_config/i18n/es.po
index 97e2b0e990..4fb035346b 100644
--- a/pos_analytic_by_config/i18n/es.po
+++ b/pos_analytic_by_config/i18n/es.po
@@ -36,9 +36,9 @@ msgid "Analytic Account that these orders link to"
msgstr "Cuenta analítica relacionada con estos pedidos"
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
-msgid "Invoice Line"
-msgstr "Línea de Factura"
+#: model:ir.model,name:pos_analytic_by_config.model_account_move_line
+msgid "Journal Item"
+msgstr ""
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_config
@@ -49,3 +49,11 @@ msgstr "Configuración del Punto de Venta"
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
msgid "Point of Sale Orders"
msgstr "Pedidos en el punto de venta"
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_session
+msgid "Point of Sale Session"
+msgstr ""
+
+#~ msgid "Invoice Line"
+#~ msgstr "Línea de Factura"
diff --git a/pos_analytic_by_config/i18n/es_MX.po b/pos_analytic_by_config/i18n/es_MX.po
index 5d1553d617..3bcadd1a31 100644
--- a/pos_analytic_by_config/i18n/es_MX.po
+++ b/pos_analytic_by_config/i18n/es_MX.po
@@ -36,8 +36,8 @@ msgid "Analytic Account that these orders link to"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
-msgid "Invoice Line"
+#: model:ir.model,name:pos_analytic_by_config.model_account_move_line
+msgid "Journal Item"
msgstr ""
#. module: pos_analytic_by_config
@@ -49,3 +49,8 @@ msgstr ""
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
msgid "Point of Sale Orders"
msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_session
+msgid "Point of Sale Session"
+msgstr ""
diff --git a/pos_analytic_by_config/i18n/fi.po b/pos_analytic_by_config/i18n/fi.po
index 40983e81b0..f04c0a87cb 100644
--- a/pos_analytic_by_config/i18n/fi.po
+++ b/pos_analytic_by_config/i18n/fi.po
@@ -35,8 +35,8 @@ msgid "Analytic Account that these orders link to"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
-msgid "Invoice Line"
+#: model:ir.model,name:pos_analytic_by_config.model_account_move_line
+msgid "Journal Item"
msgstr ""
#. module: pos_analytic_by_config
@@ -48,3 +48,8 @@ msgstr ""
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
msgid "Point of Sale Orders"
msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_session
+msgid "Point of Sale Session"
+msgstr ""
diff --git a/pos_analytic_by_config/i18n/fr.po b/pos_analytic_by_config/i18n/fr.po
index 6badf7c162..c2cee5ab75 100644
--- a/pos_analytic_by_config/i18n/fr.po
+++ b/pos_analytic_by_config/i18n/fr.po
@@ -36,8 +36,8 @@ msgid "Analytic Account that these orders link to"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
-msgid "Invoice Line"
+#: model:ir.model,name:pos_analytic_by_config.model_account_move_line
+msgid "Journal Item"
msgstr ""
#. module: pos_analytic_by_config
@@ -49,3 +49,8 @@ msgstr ""
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
msgid "Point of Sale Orders"
msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_session
+msgid "Point of Sale Session"
+msgstr ""
diff --git a/pos_analytic_by_config/i18n/pt_BR.po b/pos_analytic_by_config/i18n/pt_BR.po
index eb5f5f336a..d438f1f940 100644
--- a/pos_analytic_by_config/i18n/pt_BR.po
+++ b/pos_analytic_by_config/i18n/pt_BR.po
@@ -11,8 +11,8 @@ msgstr ""
"POT-Creation-Date: 2017-04-06 02:55+0000\n"
"PO-Revision-Date: 2022-10-31 20:44+0000\n"
"Last-Translator: Douglas Custódio \n"
-"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/"
-"23907/pt_BR/)\n"
+"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/"
+"teams/23907/pt_BR/)\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -37,9 +37,9 @@ msgid "Analytic Account that these orders link to"
msgstr "Conta analítica que essas ordem estão vinculadas"
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
-msgid "Invoice Line"
-msgstr "Linha da Fatura"
+#: model:ir.model,name:pos_analytic_by_config.model_account_move_line
+msgid "Journal Item"
+msgstr ""
#. module: pos_analytic_by_config
#: model:ir.model,name:pos_analytic_by_config.model_pos_config
@@ -50,3 +50,11 @@ msgstr "Configuração do Ponto de Venda"
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
msgid "Point of Sale Orders"
msgstr "Pedido do Ponto de Venda"
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_session
+msgid "Point of Sale Session"
+msgstr ""
+
+#~ msgid "Invoice Line"
+#~ msgstr "Linha da Fatura"
diff --git a/pos_analytic_by_config/i18n/sk_SK.po b/pos_analytic_by_config/i18n/sk_SK.po
index 192c4054b7..5cdd15ce82 100644
--- a/pos_analytic_by_config/i18n/sk_SK.po
+++ b/pos_analytic_by_config/i18n/sk_SK.po
@@ -36,8 +36,8 @@ msgid "Analytic Account that these orders link to"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
-msgid "Invoice Line"
+#: model:ir.model,name:pos_analytic_by_config.model_account_move_line
+msgid "Journal Item"
msgstr ""
#. module: pos_analytic_by_config
@@ -49,3 +49,8 @@ msgstr ""
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
msgid "Point of Sale Orders"
msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_session
+msgid "Point of Sale Session"
+msgstr ""
diff --git a/pos_analytic_by_config/i18n/sl.po b/pos_analytic_by_config/i18n/sl.po
index 5440cbd885..f397d2e38b 100644
--- a/pos_analytic_by_config/i18n/sl.po
+++ b/pos_analytic_by_config/i18n/sl.po
@@ -36,8 +36,8 @@ msgid "Analytic Account that these orders link to"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
-msgid "Invoice Line"
+#: model:ir.model,name:pos_analytic_by_config.model_account_move_line
+msgid "Journal Item"
msgstr ""
#. module: pos_analytic_by_config
@@ -49,3 +49,8 @@ msgstr ""
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
msgid "Point of Sale Orders"
msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_session
+msgid "Point of Sale Session"
+msgstr ""
diff --git a/pos_analytic_by_config/i18n/zh_CN.po b/pos_analytic_by_config/i18n/zh_CN.po
index 4c728ce71d..fbdb178920 100644
--- a/pos_analytic_by_config/i18n/zh_CN.po
+++ b/pos_analytic_by_config/i18n/zh_CN.po
@@ -37,8 +37,8 @@ msgid "Analytic Account that these orders link to"
msgstr ""
#. module: pos_analytic_by_config
-#: model:ir.model,name:pos_analytic_by_config.model_account_invoice_line
-msgid "Invoice Line"
+#: model:ir.model,name:pos_analytic_by_config.model_account_move_line
+msgid "Journal Item"
msgstr ""
#. module: pos_analytic_by_config
@@ -50,3 +50,8 @@ msgstr ""
#: model:ir.model,name:pos_analytic_by_config.model_pos_order
msgid "Point of Sale Orders"
msgstr ""
+
+#. module: pos_analytic_by_config
+#: model:ir.model,name:pos_analytic_by_config.model_pos_session
+msgid "Point of Sale Session"
+msgstr ""
diff --git a/pos_analytic_by_config/models/pos_session.py b/pos_analytic_by_config/models/pos_session.py
index bf6b728db4..97a03de7cf 100644
--- a/pos_analytic_by_config/models/pos_session.py
+++ b/pos_analytic_by_config/models/pos_session.py
@@ -25,7 +25,7 @@ def _credit_amounts(
partial_move_line_vals, amount, amount_converted, force_company_currency
)
- def _get_sale_vals(self, key, amount, amount_converted):
+ def _get_sale_vals(self, key, amount, amount_converted, tax_amount):
"""The method that allowed to add the analytic account to the sales items
has been dropped in v13, so we have to add it in the moment the sales
items values are prepared.
@@ -35,5 +35,5 @@ def _get_sale_vals(self, key, amount, amount_converted):
return super(
PosSession,
self.with_context(account_analytic_id=account_analytic_id.id),
- )._get_sale_vals(key, amount, amount_converted)
- return super()._get_sale_vals(key, amount, amount_converted)
+ )._get_sale_vals(key, amount, amount_converted, tax_amount)
+ return super()._get_sale_vals(key, amount, amount_converted, tax_amount)
diff --git a/pos_analytic_by_config/static/description/index.html b/pos_analytic_by_config/static/description/index.html
index bf70cc290d..7595f72689 100644
--- a/pos_analytic_by_config/static/description/index.html
+++ b/pos_analytic_by_config/static/description/index.html
@@ -1,20 +1,20 @@
-
+
-
+
POS Analytic Config