From 78ae3910269f2a414b11cce7ac80fba3190257c0 Mon Sep 17 00:00:00 2001
From: Steve Campbell
Date: Thu, 8 Aug 2019 12:57:43 -0700
Subject: [PATCH 01/52] [ADD] account_brand (#568)
---
account_brand/README.rst | 106 +++++
account_brand/__init__.py | 4 +
account_brand/__manifest__.py | 22 +
account_brand/i18n/account_brand.pot | 25 ++
account_brand/models/__init__.py | 4 +
account_brand/models/account_invoice.py | 11 +
account_brand/readme/CONFIGURE.rst | 2 +
account_brand/readme/CONTRIBUTORS.rst | 3 +
account_brand/readme/CREDITS.rst | 1 +
account_brand/readme/DESCRIPTION.rst | 3 +
account_brand/readme/USAGE.rst | 6 +
account_brand/static/description/icon.png | Bin 0 -> 9455 bytes
account_brand/static/description/index.html | 449 ++++++++++++++++++++
account_brand/views/account_invoice.xml | 17 +
14 files changed, 653 insertions(+)
create mode 100644 account_brand/README.rst
create mode 100644 account_brand/__init__.py
create mode 100644 account_brand/__manifest__.py
create mode 100644 account_brand/i18n/account_brand.pot
create mode 100644 account_brand/models/__init__.py
create mode 100644 account_brand/models/account_invoice.py
create mode 100644 account_brand/readme/CONFIGURE.rst
create mode 100644 account_brand/readme/CONTRIBUTORS.rst
create mode 100644 account_brand/readme/CREDITS.rst
create mode 100644 account_brand/readme/DESCRIPTION.rst
create mode 100644 account_brand/readme/USAGE.rst
create mode 100644 account_brand/static/description/icon.png
create mode 100644 account_brand/static/description/index.html
create mode 100644 account_brand/views/account_invoice.xml
diff --git a/account_brand/README.rst b/account_brand/README.rst
new file mode 100644
index 000000000..e523ee4c1
--- /dev/null
+++ b/account_brand/README.rst
@@ -0,0 +1,106 @@
+=============
+Account Brand
+=============
+
+.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! 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%2Fbrand-lightgray.png?logo=github
+ :target: https://github.com/OCA/brand/tree/12.0/account_brand
+ :alt: OCA/brand
+.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
+ :target: https://translation.odoo-community.org/projects/brand-12-0/brand-12-0-account_brand
+ :alt: Translate me on Weblate
+.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
+ :target: https://runbot.odoo-community.org/runbot/284/12.0
+ :alt: Try me on Runbot
+
+|badge1| |badge2| |badge3| |badge4| |badge5|
+
+This module allows you to send branded invoices to your customers.
+It adds a brand field on the invoice and the brand information to the PDF
+report.
+
+**Table of contents**
+
+.. contents::
+ :local:
+
+Configuration
+=============
+
+To configure this module, please refer to the documentation of
+`partner_brand `_.
+
+Usage
+=====
+
+To use this module, you need to:
+
+#. Go to Accounting > Customers > Invoices
+#. Select or create an invoice
+#. Enter the information and select the brand
+#. Print the PDF report. It includes the information of the brand.
+
+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 `_.
+
+Do not contact contributors directly about support or help with technical issues.
+
+Credits
+=======
+
+Authors
+~~~~~~~
+
+* Open Source Integrators
+
+Contributors
+~~~~~~~~~~~~
+
+* Raphael Lee
+* Steve Campbell
+* Maxime Chambreuil
+
+Other credits
+~~~~~~~~~~~~~
+
+* Open Source Integrators
+
+Maintainers
+~~~~~~~~~~~
+
+This module is maintained by the OCA.
+
+.. image:: https://odoo-community.org/logo.png
+ :alt: Odoo Community Association
+ :target: https://odoo-community.org
+
+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.
+
+.. |maintainer-osi-scampbell| image:: https://github.com/osi-scampbell.png?size=40px
+ :target: https://github.com/osi-scampbell
+ :alt: osi-scampbell
+
+Current `maintainer `__:
+
+|maintainer-osi-scampbell|
+
+This module is part of the `OCA/brand `_ project on GitHub.
+
+You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/account_brand/__init__.py b/account_brand/__init__.py
new file mode 100644
index 000000000..33c2f06ef
--- /dev/null
+++ b/account_brand/__init__.py
@@ -0,0 +1,4 @@
+# Copyright (C) 2019 Open Source Integrators
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from . import models
diff --git a/account_brand/__manifest__.py b/account_brand/__manifest__.py
new file mode 100644
index 000000000..86181bc7c
--- /dev/null
+++ b/account_brand/__manifest__.py
@@ -0,0 +1,22 @@
+# Copyright (C) 2019 Open Source Integrators
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+{
+ "name": "Account Brand",
+ "summary": "Send branded invoices and refunds",
+ "version": "12.0.1.0.0",
+ "category": "Accounting Management",
+ "website": "https://github.com/OCA/account-invoicing",
+ "author": "Open Source Integrators, Odoo Community Association (OCA)",
+ "license": "AGPL-3",
+ "depends": [
+ 'account',
+ 'partner_brand',
+ ],
+ "data": [
+ "views/account_invoice.xml",
+ ],
+ "installable": True,
+ "development_status": "Beta",
+ "maintainers": ["osi-scampbell"],
+}
diff --git a/account_brand/i18n/account_brand.pot b/account_brand/i18n/account_brand.pot
new file mode 100644
index 000000000..5e7bd7214
--- /dev/null
+++ b/account_brand/i18n/account_brand.pot
@@ -0,0 +1,25 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * account_brand
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 12.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: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
+msgid "Brand"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model,name:account_brand.model_account_invoice
+msgid "Invoice"
+msgstr ""
+
diff --git a/account_brand/models/__init__.py b/account_brand/models/__init__.py
new file mode 100644
index 000000000..72e75675d
--- /dev/null
+++ b/account_brand/models/__init__.py
@@ -0,0 +1,4 @@
+# Copyright (C) 2019 Open Source Integrators
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from . import account_invoice
diff --git a/account_brand/models/account_invoice.py b/account_brand/models/account_invoice.py
new file mode 100644
index 000000000..a495d5ea6
--- /dev/null
+++ b/account_brand/models/account_invoice.py
@@ -0,0 +1,11 @@
+# Copyright (C) 2019 Open Source Integrators
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo import fields, models
+
+
+class AccountInvoice(models.Model):
+ _inherit = 'account.invoice'
+
+ brand_id = fields.Many2one('res.partner', string='Brand',
+ domain="[('type', '=', 'brand')]")
diff --git a/account_brand/readme/CONFIGURE.rst b/account_brand/readme/CONFIGURE.rst
new file mode 100644
index 000000000..a20e2200f
--- /dev/null
+++ b/account_brand/readme/CONFIGURE.rst
@@ -0,0 +1,2 @@
+To configure this module, please refer to the documentation of
+`partner_brand `_.
diff --git a/account_brand/readme/CONTRIBUTORS.rst b/account_brand/readme/CONTRIBUTORS.rst
new file mode 100644
index 000000000..d9fb6931c
--- /dev/null
+++ b/account_brand/readme/CONTRIBUTORS.rst
@@ -0,0 +1,3 @@
+* Raphael Lee
+* Steve Campbell
+* Maxime Chambreuil
diff --git a/account_brand/readme/CREDITS.rst b/account_brand/readme/CREDITS.rst
new file mode 100644
index 000000000..dab2345c9
--- /dev/null
+++ b/account_brand/readme/CREDITS.rst
@@ -0,0 +1 @@
+* Open Source Integrators
diff --git a/account_brand/readme/DESCRIPTION.rst b/account_brand/readme/DESCRIPTION.rst
new file mode 100644
index 000000000..cb6151133
--- /dev/null
+++ b/account_brand/readme/DESCRIPTION.rst
@@ -0,0 +1,3 @@
+This module allows you to send branded invoices to your customers.
+It adds a brand field on the invoice and the brand information to the PDF
+report.
diff --git a/account_brand/readme/USAGE.rst b/account_brand/readme/USAGE.rst
new file mode 100644
index 000000000..005139f26
--- /dev/null
+++ b/account_brand/readme/USAGE.rst
@@ -0,0 +1,6 @@
+To use this module, you need to:
+
+#. Go to Accounting > Customers > Invoices
+#. Select or create an invoice
+#. Enter the information and select the brand
+#. Print the PDF report. It includes the information of the brand.
diff --git a/account_brand/static/description/icon.png b/account_brand/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/account_brand/static/description/index.html b/account_brand/static/description/index.html
new file mode 100644
index 000000000..cc848c511
--- /dev/null
+++ b/account_brand/static/description/index.html
@@ -0,0 +1,449 @@
+
+
+
+
+
+
+Account Brand
+
+
+
+
+
Account Brand
+
+
+
+
This module allows you to send branded invoices to your customers.
+It adds a brand field on the invoice and the brand information to the PDF
+report.
+
Table of contents
+
+
+
+
To configure this module, please refer to the documentation of
+partner_brand.
+
+
+
+
To use this module, you need to:
+
+- Go to Accounting > Customers > Invoices
+- Select or create an invoice
+- Enter the information and select the brand
+- Print the PDF report. It includes the information of the brand.
+
+
+
+
+
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.
+
+
+
+
+
+
+- Open Source Integrators
+
+
+
+
+
+
+
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.
+
Current maintainer:
+
+
This module is part of the OCA/brand project on GitHub.
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
+
+
+
+
+
diff --git a/account_brand/views/account_invoice.xml b/account_brand/views/account_invoice.xml
new file mode 100644
index 000000000..f4d41439b
--- /dev/null
+++ b/account_brand/views/account_invoice.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ account.invoice.form.brand
+ account.invoice
+
+
+
+
+
+
+
+
+
From 94efd036821b9e7960bacee354a18ad3dcfe8591 Mon Sep 17 00:00:00 2001
From: sbejaoui
Date: Fri, 16 Aug 2019 14:06:26 +0200
Subject: [PATCH 02/52] [12.0][IMP] - dedicated model for partner brand in
account_brand module
---
account_brand/__manifest__.py | 2 +-
account_brand/i18n/zh_CN.po | 27 +++++++++++++++++++
.../migrations/12.0.2.0.0/post-migration.py | 15 +++++++++++
.../migrations/12.0.2.0.0/pre-migration.py | 16 +++++++++++
account_brand/models/account_invoice.py | 3 +--
5 files changed, 60 insertions(+), 3 deletions(-)
create mode 100644 account_brand/i18n/zh_CN.po
create mode 100644 account_brand/migrations/12.0.2.0.0/post-migration.py
create mode 100644 account_brand/migrations/12.0.2.0.0/pre-migration.py
diff --git a/account_brand/__manifest__.py b/account_brand/__manifest__.py
index 86181bc7c..dc89f6546 100644
--- a/account_brand/__manifest__.py
+++ b/account_brand/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Account Brand",
"summary": "Send branded invoices and refunds",
- "version": "12.0.1.0.0",
+ "version": "12.0.2.0.0",
"category": "Accounting Management",
"website": "https://github.com/OCA/account-invoicing",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
diff --git a/account_brand/i18n/zh_CN.po b/account_brand/i18n/zh_CN.po
new file mode 100644
index 000000000..15e011366
--- /dev/null
+++ b/account_brand/i18n/zh_CN.po
@@ -0,0 +1,27 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * account_brand
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 12.0\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: 2019-09-17 16:24+0000\n"
+"Last-Translator: 黎伟杰 <674416404@qq.com>\n"
+"Language-Team: none\n"
+"Language: zh_CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Weblate 3.8\n"
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
+msgid "Brand"
+msgstr "品牌"
+
+#. module: account_brand
+#: model:ir.model,name:account_brand.model_account_invoice
+msgid "Invoice"
+msgstr "发票"
diff --git a/account_brand/migrations/12.0.2.0.0/post-migration.py b/account_brand/migrations/12.0.2.0.0/post-migration.py
new file mode 100644
index 000000000..f45049cbe
--- /dev/null
+++ b/account_brand/migrations/12.0.2.0.0/post-migration.py
@@ -0,0 +1,15 @@
+# Copyright 2019 ACSONE SA/NV
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+import logging
+
+_logger = logging.getLogger(__name__)
+
+
+def migrate(cr, version):
+ _logger.info("Move sale brand to res.brand model")
+ cr.execute("""
+ UPDATE account_invoice SET brand_id = brand.id
+ FROM res_brand brand
+ WHERE brand.partner_id=brand_id_tmp""")
+ cr.execute("""ALTER TABLE account_invoice DROP COLUMN brand_id_tmp""")
diff --git a/account_brand/migrations/12.0.2.0.0/pre-migration.py b/account_brand/migrations/12.0.2.0.0/pre-migration.py
new file mode 100644
index 000000000..34c49706c
--- /dev/null
+++ b/account_brand/migrations/12.0.2.0.0/pre-migration.py
@@ -0,0 +1,16 @@
+# Copyright 2019 ACSONE SA/NV
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+import logging
+
+_logger = logging.getLogger(__name__)
+
+
+def migrate(cr, version):
+ _logger.info("Move invoice brand to res.brand model")
+ cr.execute(
+ """ALTER TABLE account_invoice
+ ADD COLUMN brand_id_tmp INTEGER"""
+ )
+ cr.execute("""UPDATE account_invoice SET brand_id_tmp = brand_id""")
+ cr.execute("""ALTER TABLE account_invoice DROP COLUMN brand_id""")
diff --git a/account_brand/models/account_invoice.py b/account_brand/models/account_invoice.py
index a495d5ea6..325524cb8 100644
--- a/account_brand/models/account_invoice.py
+++ b/account_brand/models/account_invoice.py
@@ -7,5 +7,4 @@
class AccountInvoice(models.Model):
_inherit = 'account.invoice'
- brand_id = fields.Many2one('res.partner', string='Brand',
- domain="[('type', '=', 'brand')]")
+ brand_id = fields.Many2one('res.brand', string='Brand')
From a2fa77ed058477f82bb3fff99974a2c6a5c7371b Mon Sep 17 00:00:00 2001
From: Xavier Brochard
Date: Fri, 25 Oct 2019 08:53:38 +0200
Subject: [PATCH 03/52] Fix URL to OCA/brand
was on OCA/partner-contact, switch to OCA/brand
---
account_brand/README.rst | 2 +-
account_brand/readme/CONFIGURE.rst | 2 +-
account_brand/static/description/index.html | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/account_brand/README.rst b/account_brand/README.rst
index e523ee4c1..e423b0bf7 100644
--- a/account_brand/README.rst
+++ b/account_brand/README.rst
@@ -38,7 +38,7 @@ Configuration
=============
To configure this module, please refer to the documentation of
-`partner_brand `_.
+`partner_brand `_.
Usage
=====
diff --git a/account_brand/readme/CONFIGURE.rst b/account_brand/readme/CONFIGURE.rst
index a20e2200f..bdf04f5e5 100644
--- a/account_brand/readme/CONFIGURE.rst
+++ b/account_brand/readme/CONFIGURE.rst
@@ -1,2 +1,2 @@
To configure this module, please refer to the documentation of
-`partner_brand `_.
+`partner_brand `_.
diff --git a/account_brand/static/description/index.html b/account_brand/static/description/index.html
index cc848c511..0caaa95ac 100644
--- a/account_brand/static/description/index.html
+++ b/account_brand/static/description/index.html
@@ -389,7 +389,7 @@ Account Brand
From 6536cedd2a31995e0b35d1562a662e0fad4eb0a8 Mon Sep 17 00:00:00 2001
From: sbejaoui
Date: Thu, 31 Oct 2019 18:05:14 +0100
Subject: [PATCH 04/52] [12.0][REF] - Use brand mixin in branded invoices
definition
---
account_brand/__manifest__.py | 2 +-
account_brand/models/account_invoice.py | 7 +++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/account_brand/__manifest__.py b/account_brand/__manifest__.py
index dc89f6546..e79fac4f8 100644
--- a/account_brand/__manifest__.py
+++ b/account_brand/__manifest__.py
@@ -11,7 +11,7 @@
"license": "AGPL-3",
"depends": [
'account',
- 'partner_brand',
+ 'brand',
],
"data": [
"views/account_invoice.xml",
diff --git a/account_brand/models/account_invoice.py b/account_brand/models/account_invoice.py
index 325524cb8..a422ccc11 100644
--- a/account_brand/models/account_invoice.py
+++ b/account_brand/models/account_invoice.py
@@ -1,10 +1,9 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-from odoo import fields, models
+from odoo import models
class AccountInvoice(models.Model):
- _inherit = 'account.invoice'
-
- brand_id = fields.Many2one('res.brand', string='Brand')
+ _name = 'account.invoice'
+ _inherit = ['account.invoice', 'res.brand.mixin']
From da773a83af7ee968e8dff7c42f6a4bf802f4de28 Mon Sep 17 00:00:00 2001
From: sbejaoui
Date: Mon, 4 Nov 2019 19:30:15 +0100
Subject: [PATCH 05/52] [12.0][IMP] - Improve unit tests
---
account_brand/__init__.py | 1 +
account_brand/tests/__init__.py | 1 +
account_brand/tests/test_brand_mixin.py | 104 ++++++++++++++++++++++++
3 files changed, 106 insertions(+)
create mode 100644 account_brand/tests/__init__.py
create mode 100644 account_brand/tests/test_brand_mixin.py
diff --git a/account_brand/__init__.py b/account_brand/__init__.py
index 33c2f06ef..58b6a7fd9 100644
--- a/account_brand/__init__.py
+++ b/account_brand/__init__.py
@@ -2,3 +2,4 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import models
+from . import tests
diff --git a/account_brand/tests/__init__.py b/account_brand/tests/__init__.py
new file mode 100644
index 000000000..7216aca23
--- /dev/null
+++ b/account_brand/tests/__init__.py
@@ -0,0 +1 @@
+from . import test_brand_mixin
diff --git a/account_brand/tests/test_brand_mixin.py b/account_brand/tests/test_brand_mixin.py
new file mode 100644
index 000000000..6c092ac28
--- /dev/null
+++ b/account_brand/tests/test_brand_mixin.py
@@ -0,0 +1,104 @@
+# Copyright 2019 ACSONE SA/NV
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from lxml import etree
+from odoo.tests.common import TransactionCase
+from odoo.exceptions import ValidationError
+from odoo.addons.brand.models.res_company import BRAND_USE_LEVEL_REQUIRED_LEVEL
+
+
+class TestBrandMixin(TransactionCase):
+ def setUp(self):
+ super(TestBrandMixin, self).setUp()
+ self.partner = self.env.user.partner_id
+ self.company = self.env.user.company_id
+ self.other_company = self.env['res.company'].create(
+ {'name': 'other company', 'parent_id': self.company.id}
+ )
+ self.journal = self.env['account.journal'].create(
+ {'type': 'sale', 'code': 'SALE', 'name': 'Sale journal'}
+ )
+ self.invoice = self.env['account.invoice'].create(
+ {
+ 'name': "Sample invoice",
+ 'company_id': self.company.id,
+ 'journal_id': self.journal.id,
+ 'partner_id': self.partner.id,
+ }
+ )
+ self.brand = self.env['res.brand'].create({'name': 'brand'})
+ self.other_company_brand = self.env['res.brand'].create(
+ {'name': 'brand', 'company_id': self.other_company.id}
+ )
+
+ def test_is_brand_required(self):
+ self.assertFalse(self.invoice._is_brand_required())
+ self.company.brand_use_level = BRAND_USE_LEVEL_REQUIRED_LEVEL
+ self.assertTrue(self.invoice._is_brand_required())
+
+ def test_check_brand_requirement(self):
+ self.env['account.invoice'].create(
+ {
+ 'name': "Sample invoice",
+ 'company_id': self.company.id,
+ 'journal_id': self.journal.id,
+ 'partner_id': self.partner.id,
+ }
+ )
+ self.company.brand_use_level = BRAND_USE_LEVEL_REQUIRED_LEVEL
+ with self.assertRaises(ValidationError):
+ self.env['account.invoice'].create(
+ {
+ 'name': "Sample invoice",
+ 'company_id': self.company.id,
+ 'journal_id': self.journal.id,
+ 'partner_id': self.partner.id,
+ }
+ )
+ self.env['account.invoice'].create(
+ {
+ 'name': "Sample invoice",
+ 'company_id': self.company.id,
+ 'journal_id': self.journal.id,
+ 'partner_id': self.partner.id,
+ 'brand_id': self.brand.id,
+ }
+ )
+
+ def test_check_brand_company_id(self):
+ invoice = self.env['account.invoice'].create(
+ {
+ 'name': "Sample invoice",
+ 'company_id': self.company.id,
+ 'journal_id': self.journal.id,
+ 'partner_id': self.partner.id,
+ 'brand_id': self.brand.id,
+ }
+ )
+ with self.assertRaises(ValidationError):
+ invoice.brand_id = self.other_company_brand
+
+ def test_onchange_brand_id(self):
+ new_invoice = self.env['account.invoice'].new(
+ {
+ 'name': "Sample invoice",
+ 'company_id': self.company.id,
+ 'journal_id': self.journal.id,
+ 'partner_id': self.partner.id,
+ 'brand_id': self.brand.id,
+ }
+ )
+ self.assertEqual(new_invoice.company_id, self.company)
+ new_invoice.brand_id = self.other_company_brand
+ new_invoice._onchange_brand_id()
+ self.assertEqual(new_invoice.company_id, self.other_company)
+
+ def test_fields_view_get(self):
+ view = self.env['account.invoice'].fields_view_get(
+ view_id=self.env.ref(
+ 'account_brand.account_invoice_view_form_brand'
+ ).id,
+ view_type='form',
+ )
+ doc = etree.XML(view['arch'])
+ self.assertTrue(doc.xpath("//field[@name='brand_use_level']"))
From 8fa3792927fdd84f5fc65af97d3c88f2fc8c9c5c Mon Sep 17 00:00:00 2001
From: sbejaoui
Date: Tue, 12 Nov 2019 10:47:36 +0100
Subject: [PATCH 06/52] [12.0][IMP] - Improve readme
---
account_brand/README.rst | 2 +-
account_brand/i18n/account_brand.pot | 5 ----
account_brand/i18n/hr.po | 28 +++++++++++++++++++++
account_brand/readme/CONFIGURE.rst | 2 +-
account_brand/static/description/index.html | 2 +-
5 files changed, 31 insertions(+), 8 deletions(-)
create mode 100644 account_brand/i18n/hr.po
diff --git a/account_brand/README.rst b/account_brand/README.rst
index e423b0bf7..f3c27ac92 100644
--- a/account_brand/README.rst
+++ b/account_brand/README.rst
@@ -38,7 +38,7 @@ Configuration
=============
To configure this module, please refer to the documentation of
-`partner_brand `_.
+`brand `_.
Usage
=====
diff --git a/account_brand/i18n/account_brand.pot b/account_brand/i18n/account_brand.pot
index 5e7bd7214..1787235b1 100644
--- a/account_brand/i18n/account_brand.pot
+++ b/account_brand/i18n/account_brand.pot
@@ -13,11 +13,6 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
-#. module: account_brand
-#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
-msgid "Brand"
-msgstr ""
-
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_invoice
msgid "Invoice"
diff --git a/account_brand/i18n/hr.po b/account_brand/i18n/hr.po
new file mode 100644
index 000000000..291056d54
--- /dev/null
+++ b/account_brand/i18n/hr.po
@@ -0,0 +1,28 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * account_brand
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 12.0\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: 2019-11-13 15:34+0000\n"
+"Last-Translator: Bole \n"
+"Language-Team: none\n"
+"Language: hr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<="
+"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"X-Generator: Weblate 3.8\n"
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
+msgid "Brand"
+msgstr "Brand"
+
+#. module: account_brand
+#: model:ir.model,name:account_brand.model_account_invoice
+msgid "Invoice"
+msgstr "Račun"
diff --git a/account_brand/readme/CONFIGURE.rst b/account_brand/readme/CONFIGURE.rst
index bdf04f5e5..14f02f8f3 100644
--- a/account_brand/readme/CONFIGURE.rst
+++ b/account_brand/readme/CONFIGURE.rst
@@ -1,2 +1,2 @@
To configure this module, please refer to the documentation of
-`partner_brand `_.
+`brand `_.
diff --git a/account_brand/static/description/index.html b/account_brand/static/description/index.html
index 0caaa95ac..96d35e342 100644
--- a/account_brand/static/description/index.html
+++ b/account_brand/static/description/index.html
@@ -389,7 +389,7 @@ Account Brand
From 8876d2bcb3e0377d1834d5317eb8e4755ab626a2 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Fri, 15 Nov 2019 16:58:22 +0000
Subject: [PATCH 07/52] account_brand 12.0.2.1.0
---
account_brand/__manifest__.py | 2 +-
account_brand/i18n/hr.po | 14 ++++++--------
account_brand/i18n/zh_CN.po | 10 ++++------
3 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/account_brand/__manifest__.py b/account_brand/__manifest__.py
index e79fac4f8..9d16222fe 100644
--- a/account_brand/__manifest__.py
+++ b/account_brand/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Account Brand",
"summary": "Send branded invoices and refunds",
- "version": "12.0.2.0.0",
+ "version": "12.0.2.1.0",
"category": "Accounting Management",
"website": "https://github.com/OCA/account-invoicing",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
diff --git a/account_brand/i18n/hr.po b/account_brand/i18n/hr.po
index 291056d54..f70106ed0 100644
--- a/account_brand/i18n/hr.po
+++ b/account_brand/i18n/hr.po
@@ -1,6 +1,6 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * account_brand
+# * account_brand
#
msgid ""
msgstr ""
@@ -13,16 +13,14 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<="
-"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 3.8\n"
-#. module: account_brand
-#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
-msgid "Brand"
-msgstr "Brand"
-
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_invoice
msgid "Invoice"
msgstr "Račun"
+
+#~ msgid "Brand"
+#~ msgstr "Brand"
diff --git a/account_brand/i18n/zh_CN.po b/account_brand/i18n/zh_CN.po
index 15e011366..01fef4647 100644
--- a/account_brand/i18n/zh_CN.po
+++ b/account_brand/i18n/zh_CN.po
@@ -1,6 +1,6 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * account_brand
+# * account_brand
#
msgid ""
msgstr ""
@@ -16,12 +16,10 @@ msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 3.8\n"
-#. module: account_brand
-#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
-msgid "Brand"
-msgstr "品牌"
-
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_invoice
msgid "Invoice"
msgstr "发票"
+
+#~ msgid "Brand"
+#~ msgstr "品牌"
From c558aa99c8819bcf0d77944e3453b42df3efc93b Mon Sep 17 00:00:00 2001
From: sbejaoui
Date: Thu, 13 Feb 2020 11:40:15 +0100
Subject: [PATCH 08/52] [12.0][IMP] - Brand field is editable in draft state
for invoice and sale object
---
account_brand/i18n/account_brand.pot | 10 ++++++++++
account_brand/models/account_invoice.py | 11 ++++++++++-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/account_brand/i18n/account_brand.pot b/account_brand/i18n/account_brand.pot
index 1787235b1..656fe5db5 100644
--- a/account_brand/i18n/account_brand.pot
+++ b/account_brand/i18n/account_brand.pot
@@ -13,6 +13,16 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
+msgid "Brand"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,help:account_brand.field_account_invoice__brand_id
+msgid "Brand to use for this sale"
+msgstr ""
+
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_invoice
msgid "Invoice"
diff --git a/account_brand/models/account_invoice.py b/account_brand/models/account_invoice.py
index a422ccc11..87d6fd48d 100644
--- a/account_brand/models/account_invoice.py
+++ b/account_brand/models/account_invoice.py
@@ -1,9 +1,18 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-from odoo import models
+from odoo import fields, models
class AccountInvoice(models.Model):
_name = 'account.invoice'
_inherit = ['account.invoice', 'res.brand.mixin']
+
+ brand_id = fields.Many2one(
+ states={
+ 'open': [('readonly', True)],
+ 'in_payment': [('readonly', True)],
+ 'paid': [('readonly', True)],
+ 'cancel': [('readonly', True)],
+ }
+ )
From 129f93ae2eef817bb2c3165e16370f30a666b46f Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Tue, 18 Feb 2020 16:06:13 +0000
Subject: [PATCH 09/52] account_brand 12.0.3.0.0
---
account_brand/__manifest__.py | 2 +-
account_brand/i18n/de.po | 32 ++++++++++++++++++++++++++++++++
account_brand/i18n/es.po | 32 ++++++++++++++++++++++++++++++++
account_brand/i18n/hr.po | 13 ++++++++++---
account_brand/i18n/zh_CN.po | 13 ++++++++++---
5 files changed, 85 insertions(+), 7 deletions(-)
create mode 100644 account_brand/i18n/de.po
create mode 100644 account_brand/i18n/es.po
diff --git a/account_brand/__manifest__.py b/account_brand/__manifest__.py
index 9d16222fe..0b803938e 100644
--- a/account_brand/__manifest__.py
+++ b/account_brand/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Account Brand",
"summary": "Send branded invoices and refunds",
- "version": "12.0.2.1.0",
+ "version": "12.0.3.0.0",
"category": "Accounting Management",
"website": "https://github.com/OCA/account-invoicing",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
diff --git a/account_brand/i18n/de.po b/account_brand/i18n/de.po
new file mode 100644
index 000000000..b3f6a8812
--- /dev/null
+++ b/account_brand/i18n/de.po
@@ -0,0 +1,32 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * account_brand
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 12.0\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: 2020-07-01 22:19+0000\n"
+"Last-Translator: Peter Schubert \n"
+"Language-Team: none\n"
+"Language: de\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"
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
+msgid "Brand"
+msgstr "Marke"
+
+#. module: account_brand
+#: model:ir.model.fields,help:account_brand.field_account_invoice__brand_id
+msgid "Brand to use for this sale"
+msgstr "zu verwendende Marke für diesen Verkauf"
+
+#. module: account_brand
+#: model:ir.model,name:account_brand.model_account_invoice
+msgid "Invoice"
+msgstr "Rechnung"
diff --git a/account_brand/i18n/es.po b/account_brand/i18n/es.po
new file mode 100644
index 000000000..380943062
--- /dev/null
+++ b/account_brand/i18n/es.po
@@ -0,0 +1,32 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * account_brand
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 12.0\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: 2020-05-22 09:19+0000\n"
+"Last-Translator: Daniel Luque \n"
+"Language-Team: none\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"
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
+msgid "Brand"
+msgstr "Marca"
+
+#. module: account_brand
+#: model:ir.model.fields,help:account_brand.field_account_invoice__brand_id
+msgid "Brand to use for this sale"
+msgstr "Marca a usar en esta venta"
+
+#. module: account_brand
+#: model:ir.model,name:account_brand.model_account_invoice
+msgid "Invoice"
+msgstr "Factura"
diff --git a/account_brand/i18n/hr.po b/account_brand/i18n/hr.po
index f70106ed0..76dee72c2 100644
--- a/account_brand/i18n/hr.po
+++ b/account_brand/i18n/hr.po
@@ -17,10 +17,17 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 3.8\n"
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
+msgid "Brand"
+msgstr "Brand"
+
+#. module: account_brand
+#: model:ir.model.fields,help:account_brand.field_account_invoice__brand_id
+msgid "Brand to use for this sale"
+msgstr ""
+
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_invoice
msgid "Invoice"
msgstr "Račun"
-
-#~ msgid "Brand"
-#~ msgstr "Brand"
diff --git a/account_brand/i18n/zh_CN.po b/account_brand/i18n/zh_CN.po
index 01fef4647..5c50153a6 100644
--- a/account_brand/i18n/zh_CN.po
+++ b/account_brand/i18n/zh_CN.po
@@ -16,10 +16,17 @@ msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 3.8\n"
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
+msgid "Brand"
+msgstr "品牌"
+
+#. module: account_brand
+#: model:ir.model.fields,help:account_brand.field_account_invoice__brand_id
+msgid "Brand to use for this sale"
+msgstr ""
+
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_invoice
msgid "Invoice"
msgstr "发票"
-
-#~ msgid "Brand"
-#~ msgstr "品牌"
From e360bbd2399e5ae123ff6950662a6a50c7d01af4 Mon Sep 17 00:00:00 2001
From: Quentin Groulard
Date: Tue, 11 Aug 2020 17:05:55 +0200
Subject: [PATCH 10/52] [12.0][FIX] Brand not required on vendor bill
---
account_brand/models/account_invoice.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/account_brand/models/account_invoice.py b/account_brand/models/account_invoice.py
index 87d6fd48d..07ad2a548 100644
--- a/account_brand/models/account_invoice.py
+++ b/account_brand/models/account_invoice.py
@@ -1,7 +1,7 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-from odoo import fields, models
+from odoo import api, fields, models
class AccountInvoice(models.Model):
@@ -16,3 +16,10 @@ class AccountInvoice(models.Model):
'cancel': [('readonly', True)],
}
)
+
+ @api.constrains('brand_id', 'company_id')
+ def _check_brand_requirement(self):
+ out_invoices = self.filtered(
+ lambda l: l.type in ('out_invoice', 'out_refund')
+ )
+ return super(AccountInvoice, out_invoices)._check_brand_requirement()
From b2dc05bb164d4d77d1b506e0352c53fb18163ca1 Mon Sep 17 00:00:00 2001
From: Quentin Groulard
Date: Wed, 12 Aug 2020 09:53:40 +0200
Subject: [PATCH 11/52] [FIX] Check brand requirement constraint
---
account_brand/models/account_invoice.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/account_brand/models/account_invoice.py b/account_brand/models/account_invoice.py
index 07ad2a548..0ab14ef95 100644
--- a/account_brand/models/account_invoice.py
+++ b/account_brand/models/account_invoice.py
@@ -17,7 +17,7 @@ class AccountInvoice(models.Model):
}
)
- @api.constrains('brand_id', 'company_id')
+ @api.constrains('brand_id', 'company_id', 'type')
def _check_brand_requirement(self):
out_invoices = self.filtered(
lambda l: l.type in ('out_invoice', 'out_refund')
From 908f29c7d578b8299ec43348a3c50e6003c50af1 Mon Sep 17 00:00:00 2001
From: Quentin Groulard
Date: Tue, 18 Aug 2020 09:38:34 +0200
Subject: [PATCH 12/52] [FIX] Override is brand required
---
account_brand/models/account_invoice.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/account_brand/models/account_invoice.py b/account_brand/models/account_invoice.py
index 0ab14ef95..4793e0b5e 100644
--- a/account_brand/models/account_invoice.py
+++ b/account_brand/models/account_invoice.py
@@ -17,9 +17,9 @@ class AccountInvoice(models.Model):
}
)
- @api.constrains('brand_id', 'company_id', 'type')
- def _check_brand_requirement(self):
- out_invoices = self.filtered(
- lambda l: l.type in ('out_invoice', 'out_refund')
- )
- return super(AccountInvoice, out_invoices)._check_brand_requirement()
+ @api.multi
+ def _is_brand_required(self):
+ self.ensure_one()
+ if self.type in ('in_invoice', 'in_refund'):
+ return False
+ return super(AccountInvoice, self)._is_brand_required()
From 8ff63b77884c5af1b6ad6df46d13319e6026db91 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Tue, 18 Aug 2020 07:54:58 +0000
Subject: [PATCH 13/52] account_brand 12.0.3.0.1
---
account_brand/__manifest__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/account_brand/__manifest__.py b/account_brand/__manifest__.py
index 0b803938e..24844fa58 100644
--- a/account_brand/__manifest__.py
+++ b/account_brand/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Account Brand",
"summary": "Send branded invoices and refunds",
- "version": "12.0.3.0.0",
+ "version": "12.0.3.0.1",
"category": "Accounting Management",
"website": "https://github.com/OCA/account-invoicing",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
From 525870d71f38279aab43a18f611e003706ed1893 Mon Sep 17 00:00:00 2001
From: Quentin Groulard
Date: Tue, 11 Aug 2020 17:19:21 +0200
Subject: [PATCH 14/52] [12.0][FIX] Create credit note with brand
---
account_brand/models/account_invoice.py | 10 ++++++++++
account_brand/tests/test_brand_mixin.py | 13 +++++++++++++
2 files changed, 23 insertions(+)
diff --git a/account_brand/models/account_invoice.py b/account_brand/models/account_invoice.py
index 4793e0b5e..c5212f299 100644
--- a/account_brand/models/account_invoice.py
+++ b/account_brand/models/account_invoice.py
@@ -23,3 +23,13 @@ def _is_brand_required(self):
if self.type in ('in_invoice', 'in_refund'):
return False
return super(AccountInvoice, self)._is_brand_required()
+
+ @api.model
+ def _prepare_refund(self, invoice, date_invoice=None, date=None,
+ description=None, journal_id=None):
+ values = super(AccountInvoice, self)._prepare_refund(
+ invoice, date_invoice=date_invoice, date=date,
+ description=description, journal_id=journal_id)
+ if invoice.brand_id:
+ values['brand_id'] = invoice.brand_id.id
+ return values
diff --git a/account_brand/tests/test_brand_mixin.py b/account_brand/tests/test_brand_mixin.py
index 6c092ac28..3b8b1c38f 100644
--- a/account_brand/tests/test_brand_mixin.py
+++ b/account_brand/tests/test_brand_mixin.py
@@ -102,3 +102,16 @@ def test_fields_view_get(self):
)
doc = etree.XML(view['arch'])
self.assertTrue(doc.xpath("//field[@name='brand_use_level']"))
+
+ def test_refund_invoice(self):
+ invoice = self.env['account.invoice'].create(
+ {
+ 'name': "Sample invoice",
+ 'company_id': self.company.id,
+ 'journal_id': self.journal.id,
+ 'partner_id': self.partner.id,
+ 'brand_id': self.brand.id,
+ }
+ )
+ credit_note = invoice.refund()
+ self.assertEqual(credit_note.brand_id, self.brand)
From c843a69e89af4ed9c5ad3a3c13e1659d3fba5a6b Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Tue, 25 Aug 2020 15:03:10 +0000
Subject: [PATCH 15/52] account_brand 12.0.3.0.2
---
account_brand/__manifest__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/account_brand/__manifest__.py b/account_brand/__manifest__.py
index 24844fa58..12c25b1e3 100644
--- a/account_brand/__manifest__.py
+++ b/account_brand/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Account Brand",
"summary": "Send branded invoices and refunds",
- "version": "12.0.3.0.1",
+ "version": "12.0.3.0.2",
"category": "Accounting Management",
"website": "https://github.com/OCA/account-invoicing",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
From 18a83e6440a9fa28bb3e6706df36d9c2c185e91e Mon Sep 17 00:00:00 2001
From: sbejaoui
Date: Mon, 30 Dec 2019 14:55:02 +0100
Subject: [PATCH 16/52] [IMP] - set the invoice line analytic account at brand
change
---
account_brand/__manifest__.py | 1 +
account_brand/models/account_invoice.py | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/account_brand/__manifest__.py b/account_brand/__manifest__.py
index 12c25b1e3..d8510b1ef 100644
--- a/account_brand/__manifest__.py
+++ b/account_brand/__manifest__.py
@@ -12,6 +12,7 @@
"depends": [
'account',
'brand',
+ 'analytic_brand',
],
"data": [
"views/account_invoice.xml",
diff --git a/account_brand/models/account_invoice.py b/account_brand/models/account_invoice.py
index c5212f299..dd2146594 100644
--- a/account_brand/models/account_invoice.py
+++ b/account_brand/models/account_invoice.py
@@ -17,6 +17,17 @@ class AccountInvoice(models.Model):
}
)
+ @api.onchange('brand_id', 'invoice_line_ids')
+ def _onchange_brand_id(self):
+ res = super()._onchange_brand_id()
+ for invoice in self:
+ if invoice.state == 'draft' and invoice.brand_id:
+ account_analytic = invoice.brand_id.analytic_account_id
+ invoice.invoice_line_ids.update(
+ {'account_analytic_id': account_analytic.id}
+ )
+ return res
+
@api.multi
def _is_brand_required(self):
self.ensure_one()
From 10744e46a441a4c9c96eb3ea293870afb1a75ed7 Mon Sep 17 00:00:00 2001
From: sbejaoui
Date: Mon, 30 Dec 2019 15:00:51 +0100
Subject: [PATCH 17/52] [FIX] - brand_id field in invoice form view is editable
only in draft state
---
account_brand/views/account_invoice.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/account_brand/views/account_invoice.xml b/account_brand/views/account_invoice.xml
index f4d41439b..f061c8f78 100644
--- a/account_brand/views/account_invoice.xml
+++ b/account_brand/views/account_invoice.xml
@@ -9,7 +9,7 @@
-
+
From efb28dbb54bb2fbb636a2c3eec676257bf3a2fef Mon Sep 17 00:00:00 2001
From: sbejaoui
Date: Mon, 30 Dec 2019 16:19:07 +0100
Subject: [PATCH 18/52] [IMP] - Add unit tests
---
account_brand/tests/__init__.py | 1 +
.../tests/test_account_analytic_invoice.py | 50 +++++++++++++++++++
2 files changed, 51 insertions(+)
create mode 100644 account_brand/tests/test_account_analytic_invoice.py
diff --git a/account_brand/tests/__init__.py b/account_brand/tests/__init__.py
index 7216aca23..6df401fa6 100644
--- a/account_brand/tests/__init__.py
+++ b/account_brand/tests/__init__.py
@@ -1 +1,2 @@
from . import test_brand_mixin
+from . import test_account_analytic_invoice
diff --git a/account_brand/tests/test_account_analytic_invoice.py b/account_brand/tests/test_account_analytic_invoice.py
new file mode 100644
index 000000000..5be1d9fb5
--- /dev/null
+++ b/account_brand/tests/test_account_analytic_invoice.py
@@ -0,0 +1,50 @@
+# Copyright 2019 ACSONE SA/NV
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo.tests.common import SavepointCase
+
+
+class TestAccountAnalyticInvoice(SavepointCase):
+ def setUp(self):
+ super(TestAccountAnalyticInvoice, self).setUp()
+ self.invoice = self.env['account.invoice'].create(
+ {
+ 'partner_id': self.env.ref('base.res_partner_12').id,
+ 'type': 'out_invoice',
+ }
+ )
+ self.env['account.invoice.line'].create(
+ {
+ 'product_id': self.env.ref('product.product_product_4').id,
+ 'quantity': 1,
+ 'price_unit': 42,
+ 'invoice_id': self.invoice.id,
+ 'name': 'something',
+ 'account_id': self.env['account.account']
+ .create(
+ {
+ 'name': 'Test sale',
+ 'code': 'XX_700',
+ 'user_type_id': self.env.ref(
+ 'account.data_account_type_revenue'
+ ).id,
+ }
+ )
+ .id,
+ }
+ )
+ self.brand_id = self.env['res.brand'].create({'name': 'Brand'})
+
+ def test_invoice_analytic_account_onchange_brand(self):
+ self.brand_id.analytic_account_id = self.env[
+ 'account.analytic.account'
+ ].create({'name': 'analytic account'})
+ self.invoice.brand_id = self.brand_id
+ self.assertFalse(
+ self.invoice.invoice_line_ids.mapped('account_analytic_id')
+ )
+ self.invoice._onchange_brand_id()
+ self.assertEqual(
+ self.invoice.invoice_line_ids.mapped('account_analytic_id'),
+ self.brand_id.analytic_account_id,
+ )
From 916bb7db9abe08f67620639c888a06e5db6d5f95 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Fri, 23 Oct 2020 20:56:31 +0000
Subject: [PATCH 19/52] account_brand 12.0.3.0.3
---
account_brand/__manifest__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/account_brand/__manifest__.py b/account_brand/__manifest__.py
index d8510b1ef..657737574 100644
--- a/account_brand/__manifest__.py
+++ b/account_brand/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Account Brand",
"summary": "Send branded invoices and refunds",
- "version": "12.0.3.0.2",
+ "version": "12.0.3.0.3",
"category": "Accounting Management",
"website": "https://github.com/OCA/account-invoicing",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
From af454c0f57f881782187758b1fa478d98005f100 Mon Sep 17 00:00:00 2001
From: sbejaoui
Date: Fri, 8 Nov 2019 14:17:02 +0100
Subject: [PATCH 20/52] [12.0][IMP] - Add res partner account brand
---
account_brand/__manifest__.py | 7 +-
account_brand/models/__init__.py | 1 +
account_brand/models/account_invoice.py | 42 +++++++
.../models/res_partner_account_brand.py | 68 +++++++++++
.../security/res_partner_account_brand.xml | 27 +++++
account_brand/tests/__init__.py | 1 +
account_brand/tests/test_account_invoice.py | 110 ++++++++++++++++++
.../views/res_partner_account_brand.xml | 32 +++++
8 files changed, 287 insertions(+), 1 deletion(-)
create mode 100644 account_brand/models/res_partner_account_brand.py
create mode 100644 account_brand/security/res_partner_account_brand.xml
create mode 100644 account_brand/tests/test_account_invoice.py
create mode 100644 account_brand/views/res_partner_account_brand.xml
diff --git a/account_brand/__manifest__.py b/account_brand/__manifest__.py
index 657737574..311f73ed8 100644
--- a/account_brand/__manifest__.py
+++ b/account_brand/__manifest__.py
@@ -1,4 +1,5 @@
# Copyright (C) 2019 Open Source Integrators
+# Copyright 2019 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
@@ -7,7 +8,9 @@
"version": "12.0.3.0.3",
"category": "Accounting Management",
"website": "https://github.com/OCA/account-invoicing",
- "author": "Open Source Integrators, Odoo Community Association (OCA)",
+ "author": "Open Source Integrators,"
+ "ACSONE SA/NV,"
+ "Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": [
'account',
@@ -16,6 +19,8 @@
],
"data": [
"views/account_invoice.xml",
+ "views/res_partner_account_brand.xml",
+ "security/res_partner_account_brand.xml",
],
"installable": True,
"development_status": "Beta",
diff --git a/account_brand/models/__init__.py b/account_brand/models/__init__.py
index 72e75675d..85eb3b08b 100644
--- a/account_brand/models/__init__.py
+++ b/account_brand/models/__init__.py
@@ -2,3 +2,4 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import account_invoice
+from . import res_partner_account_brand
diff --git a/account_brand/models/account_invoice.py b/account_brand/models/account_invoice.py
index dd2146594..9e584cab3 100644
--- a/account_brand/models/account_invoice.py
+++ b/account_brand/models/account_invoice.py
@@ -1,4 +1,5 @@
# Copyright (C) 2019 Open Source Integrators
+# Copyright 2019 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
@@ -17,6 +18,47 @@ class AccountInvoice(models.Model):
}
)
+ @api.onchange("partner_id", "company_id", "brand_id")
+ def _onchange_partner_id(self):
+ res = super()._onchange_partner_id()
+ if not self.brand_id:
+ return res
+ partner_account_brand_model = self.env["res.partner.account.brand"]
+ company_id = self.company_id.id
+ partner = (
+ self.partner_id
+ if not company_id
+ else self.partner_id.with_context(force_company=company_id)
+ )
+ invoice_type = self.type or self.env.context.get("type", "out_invoice")
+ if partner:
+ rec_account = (
+ partner_account_brand_model._get_partner_account_by_brand(
+ "receivable", self.brand_id, partner
+ )
+ )
+ rec_account = (
+ rec_account.account_id
+ if rec_account
+ else partner.property_account_receivable_id
+ )
+ pay_account = (
+ partner_account_brand_model._get_partner_account_by_brand(
+ "payable", self.brand_id, partner
+ )
+ )
+ pay_account = (
+ pay_account.account_id
+ if pay_account
+ else partner.property_account_payable_id
+ )
+ if invoice_type in ("in_invoice", "in_refund"):
+ account_id = pay_account
+ else:
+ account_id = rec_account
+ self.account_id = account_id
+ return res
+
@api.onchange('brand_id', 'invoice_line_ids')
def _onchange_brand_id(self):
res = super()._onchange_brand_id()
diff --git a/account_brand/models/res_partner_account_brand.py b/account_brand/models/res_partner_account_brand.py
new file mode 100644
index 000000000..b49f79f10
--- /dev/null
+++ b/account_brand/models/res_partner_account_brand.py
@@ -0,0 +1,68 @@
+# Copyright 2019 ACSONE SA/NV
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo import _, api, fields, models
+
+
+class ResPartnerAccountBrand(models.Model):
+ """This model is meant to be used in case we need to define different
+ receivable/payable accounts for partners"""
+
+ _name = "res.partner.account.brand"
+ _description = "Receivable/Payable Partner Account By Brand"
+
+ partner_id = fields.Many2one(
+ comodel_name="res.partner", string="Partner", required=False
+ )
+ account_id = fields.Many2one(
+ comodel_name="account.account", string="Account", required=True
+ )
+ brand_id = fields.Many2one(
+ comodel_name='res.brand',
+ string='Brand',
+ required=True,
+ )
+ account_type = fields.Selection(
+ string="Type",
+ selection=[("payable", "Payable"), ("receivable", "Receivable")],
+ required=True,
+ )
+
+ _sql_constraints = [
+ (
+ "unique_account_by_partner",
+ "unique(partner_id, account_id, brand_id, account_type)",
+ _("Partner has already an account set for this brand!"),
+ )
+ ]
+
+ @api.onchange("account_type")
+ def _onchange_account_type(self):
+ self.ensure_one()
+ self.update({"account_id": False})
+ domain = [("id", "=", False)]
+ if self.account_type == "payable":
+ domain = [
+ ("internal_type", "=", "payable"),
+ ("deprecated", "=", False),
+ ]
+ elif self.account_type == "receivable":
+ domain = [
+ ("internal_type", "=", "receivable"),
+ ("deprecated", "=", False),
+ ]
+ return {"domain": {"account_id": domain}}
+
+ @api.model
+ def _get_partner_account_by_brand(self, account_type, brand, partner):
+ domain = [
+ ("brand_id", "=", brand.id),
+ ("account_type", "=", account_type),
+ ]
+ default_account = self.search(
+ domain + [("partner_id", "=", False)], limit=1
+ )
+ account = False
+ if partner:
+ account = self.search(domain + [("partner_id", "=", partner.id)])
+ return account or default_account
diff --git a/account_brand/security/res_partner_account_brand.xml b/account_brand/security/res_partner_account_brand.xml
new file mode 100644
index 000000000..65acc6e1e
--- /dev/null
+++ b/account_brand/security/res_partner_account_brand.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+ res.partner.account.brand access
+
+
+
+
+
+
+
+
+
+ res.partner.account.brand invoice user access
+
+
+
+
+
+
+
+
diff --git a/account_brand/tests/__init__.py b/account_brand/tests/__init__.py
index 6df401fa6..82ff43c68 100644
--- a/account_brand/tests/__init__.py
+++ b/account_brand/tests/__init__.py
@@ -1,2 +1,3 @@
from . import test_brand_mixin
+from . import test_account_invoice
from . import test_account_analytic_invoice
diff --git a/account_brand/tests/test_account_invoice.py b/account_brand/tests/test_account_invoice.py
new file mode 100644
index 000000000..81bcce632
--- /dev/null
+++ b/account_brand/tests/test_account_invoice.py
@@ -0,0 +1,110 @@
+# Copyright 2019 ACSONE SA/NV
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo.tests.common import SavepointCase
+
+
+class TestAccountInvoice(SavepointCase):
+ def setUp(self):
+ super(TestAccountInvoice, self).setUp()
+ account_receivable_type = self.env.ref(
+ 'account.data_account_type_receivable'
+ )
+ self.account_receivable = self.env['account.account'].create(
+ {
+ 'name': 'Partner Receivable',
+ 'code': 'RCV00',
+ 'user_type_id': account_receivable_type.id,
+ 'reconcile': True,
+ }
+ )
+ self.account_receivable_brand_default = self.env[
+ 'account.account'
+ ].create(
+ {
+ 'name': 'Receivable Brand Default',
+ 'code': 'RCV01',
+ 'user_type_id': account_receivable_type.id,
+ 'reconcile': True,
+ }
+ )
+ self.account_receivable_partner_brand_default = self.env[
+ 'account.account'
+ ].create(
+ {
+ 'name': 'Receivable Partner Brand Default',
+ 'code': 'RCV02',
+ 'user_type_id': account_receivable_type.id,
+ 'reconcile': True,
+ }
+ )
+ self.partner_id = self.env.ref('base.res_partner_12')
+ self.partner_id.property_account_receivable_id = (
+ self.account_receivable
+ )
+ self.invoice = self.env['account.invoice'].create(
+ {'partner_id': self.partner_id.id, 'type': 'out_invoice'}
+ )
+ type_revenue = self.env.ref('account.data_account_type_revenue')
+ self.account_revenue = self.env['account.account'].create(
+ {
+ 'name': 'Test sale',
+ 'code': 'XX_700',
+ 'user_type_id': type_revenue.id,
+ }
+ )
+ product = self.env.ref('product.product_product_4')
+ self.env['account.invoice.line'].create(
+ {
+ 'product_id': product.id,
+ 'quantity': 1,
+ 'price_unit': 42,
+ 'invoice_id': self.invoice.id,
+ 'name': 'something',
+ 'account_id': self.account_revenue.id,
+ }
+ )
+ self.brand_id = self.env['res.brand'].create(
+ {'name': 'Brand'}
+ )
+
+ def test_on_change_partner_id(self):
+ self.invoice._onchange_partner_id()
+ self.assertEqual(self.invoice.account_id, self.account_receivable)
+ partner_account_brand = self.env['res.partner.account.brand'].create(
+ {
+ 'partner_id': False,
+ 'account_id': self.account_receivable_brand_default.id,
+ 'brand_id': self.brand_id.id,
+ 'account_type': 'receivable',
+ }
+ )
+ self.invoice._onchange_partner_id()
+ self.assertEqual(self.invoice.account_id, self.account_receivable)
+ self.invoice.brand_id = self.brand_id
+ self.invoice._onchange_partner_id()
+ self.assertEqual(
+ self.invoice.account_id, self.account_receivable_brand_default
+ )
+ partner_account_brand.update(
+ {
+ 'partner_id': self.partner_id.id,
+ 'account_id': self.account_receivable_partner_brand_default.id,
+ }
+ )
+ self.invoice._onchange_partner_id()
+ self.assertEqual(
+ self.invoice.account_id,
+ self.account_receivable_partner_brand_default,
+ )
+ invoice = self.env['account.invoice'].create(
+ {
+ 'partner_id': self.partner_id.id,
+ 'brand_id': self.brand_id.id,
+ 'type': 'out_invoice',
+ }
+ )
+ self.assertEqual(
+ invoice.account_id,
+ self.account_receivable_partner_brand_default,
+ )
diff --git a/account_brand/views/res_partner_account_brand.xml b/account_brand/views/res_partner_account_brand.xml
new file mode 100644
index 000000000..526ae4980
--- /dev/null
+++ b/account_brand/views/res_partner_account_brand.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+ res.partner.account.brand.tree (in account_brand)
+ res.partner.account.brand
+
+
+
+
+
+
+
+
+
+
+
+ Partner Accounts by Brand
+ res.partner.account.brand
+ tree
+
+
+
+ Partner Accounts by Brand
+
+
+
+
+
From 096e7f36ab18cfcc4fdb68fb3e806b953b25b297 Mon Sep 17 00:00:00 2001
From: sbejaoui
Date: Mon, 18 May 2020 11:17:57 +0200
Subject: [PATCH 21/52] [IMP] - Add account type constrains and domain
---
account_brand/models/account_invoice.py | 4 +--
.../models/res_partner_account_brand.py | 36 ++++++++++++++-----
2 files changed, 30 insertions(+), 10 deletions(-)
diff --git a/account_brand/models/account_invoice.py b/account_brand/models/account_invoice.py
index 9e584cab3..db5b3e449 100644
--- a/account_brand/models/account_invoice.py
+++ b/account_brand/models/account_invoice.py
@@ -38,7 +38,7 @@ def _onchange_partner_id(self):
)
)
rec_account = (
- rec_account.account_id
+ rec_account
if rec_account
else partner.property_account_receivable_id
)
@@ -48,7 +48,7 @@ def _onchange_partner_id(self):
)
)
pay_account = (
- pay_account.account_id
+ pay_account
if pay_account
else partner.property_account_payable_id
)
diff --git a/account_brand/models/res_partner_account_brand.py b/account_brand/models/res_partner_account_brand.py
index b49f79f10..f5dd1f927 100644
--- a/account_brand/models/res_partner_account_brand.py
+++ b/account_brand/models/res_partner_account_brand.py
@@ -2,6 +2,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
+from odoo.exceptions import ValidationError
class ResPartnerAccountBrand(models.Model):
@@ -15,12 +16,13 @@ class ResPartnerAccountBrand(models.Model):
comodel_name="res.partner", string="Partner", required=False
)
account_id = fields.Many2one(
- comodel_name="account.account", string="Account", required=True
+ comodel_name="account.account",
+ string="Account",
+ required=True,
+ domain="[('user_type_id.type', 'in', ('payable', 'receivable'))]",
)
brand_id = fields.Many2one(
- comodel_name='res.brand',
- string='Brand',
- required=True,
+ comodel_name='res.brand', string='Brand', required=True
)
account_type = fields.Selection(
string="Type",
@@ -36,6 +38,18 @@ class ResPartnerAccountBrand(models.Model):
)
]
+ @api.constrains('account_id', 'account_type')
+ def _check_account_type(self):
+ for rec in self:
+ if (
+ rec.account_id
+ and rec.account_type
+ and rec.account_id.user_type_id.type != rec.account_type
+ ):
+ raise ValidationError(
+ _("Please select an account of type %s") % rec.account_type
+ )
+
@api.onchange("account_type")
def _onchange_account_type(self):
self.ensure_one()
@@ -59,10 +73,16 @@ def _get_partner_account_by_brand(self, account_type, brand, partner):
("brand_id", "=", brand.id),
("account_type", "=", account_type),
]
- default_account = self.search(
+ default_rule = self.search(
domain + [("partner_id", "=", False)], limit=1
)
- account = False
+ partner_rule = False
if partner:
- account = self.search(domain + [("partner_id", "=", partner.id)])
- return account or default_account
+ partner_rule = self.search(
+ domain + [("partner_id", "=", partner.id)]
+ )
+ return (
+ partner_rule.account_id
+ if partner_rule
+ else default_rule.account_id
+ )
From 3ce135dda1d0f6d22ce528b3a6e14ef29dda8b54 Mon Sep 17 00:00:00 2001
From: sbejaoui
Date: Tue, 2 Jun 2020 16:05:19 +0200
Subject: [PATCH 22/52] [FIX] - Fix brand onchange
---
account_brand/models/account_invoice.py | 69 +++++++++++++------------
1 file changed, 35 insertions(+), 34 deletions(-)
diff --git a/account_brand/models/account_invoice.py b/account_brand/models/account_invoice.py
index db5b3e449..79fe88ce9 100644
--- a/account_brand/models/account_invoice.py
+++ b/account_brand/models/account_invoice.py
@@ -18,46 +18,47 @@ class AccountInvoice(models.Model):
}
)
- @api.onchange("partner_id", "company_id", "brand_id")
+ @api.onchange("partner_id", "company_id")
def _onchange_partner_id(self):
res = super()._onchange_partner_id()
- if not self.brand_id:
- return res
- partner_account_brand_model = self.env["res.partner.account.brand"]
- company_id = self.company_id.id
- partner = (
- self.partner_id
- if not company_id
- else self.partner_id.with_context(force_company=company_id)
- )
- invoice_type = self.type or self.env.context.get("type", "out_invoice")
- if partner:
- rec_account = (
- partner_account_brand_model._get_partner_account_by_brand(
- "receivable", self.brand_id, partner
- )
+ self._onchange_partner_brand()
+ return res
+
+ @api.onchange("partner_id", "company_id", "brand_id")
+ def _onchange_partner_brand(self):
+ if self.brand_id:
+ pab_model = self.env["res.partner.account.brand"]
+ company_id = self.company_id.id
+ partner = (
+ self.partner_id
+ if not company_id
+ else self.partner_id.with_context(force_company=company_id)
)
- rec_account = (
- rec_account
- if rec_account
- else partner.property_account_receivable_id
+ invoice_type = self.type or self.env.context.get(
+ "type", "out_invoice"
)
- pay_account = (
- partner_account_brand_model._get_partner_account_by_brand(
+ if partner:
+ rec_account = pab_model._get_partner_account_by_brand(
+ "receivable", self.brand_id, partner
+ )
+ rec_account = (
+ rec_account
+ if rec_account
+ else partner.property_account_receivable_id
+ )
+ pay_account = pab_model._get_partner_account_by_brand(
"payable", self.brand_id, partner
)
- )
- pay_account = (
- pay_account
- if pay_account
- else partner.property_account_payable_id
- )
- if invoice_type in ("in_invoice", "in_refund"):
- account_id = pay_account
- else:
- account_id = rec_account
- self.account_id = account_id
- return res
+ pay_account = (
+ pay_account
+ if pay_account
+ else partner.property_account_payable_id
+ )
+ if invoice_type in ("in_invoice", "in_refund"):
+ account_id = pay_account
+ else:
+ account_id = rec_account
+ self.account_id = account_id
@api.onchange('brand_id', 'invoice_line_ids')
def _onchange_brand_id(self):
From 6b7885347f99f8d5d3c3b3f20246dd4b7ccef6ae Mon Sep 17 00:00:00 2001
From: Quentin Groulard
Date: Tue, 16 Jun 2020 11:02:58 +0200
Subject: [PATCH 23/52] [FIX] Invoice account_id
---
account_brand/README.rst | 1 +
account_brand/i18n/account_brand.pot | 85 +++++++++++++++++++++
account_brand/models/account_invoice.py | 12 +--
account_brand/static/description/index.html | 1 +
account_brand/tests/test_account_invoice.py | 8 +-
5 files changed, 98 insertions(+), 9 deletions(-)
diff --git a/account_brand/README.rst b/account_brand/README.rst
index f3c27ac92..c3cb012f0 100644
--- a/account_brand/README.rst
+++ b/account_brand/README.rst
@@ -67,6 +67,7 @@ Authors
~~~~~~~
* Open Source Integrators
+* ACSONE SA/NV
Contributors
~~~~~~~~~~~~
diff --git a/account_brand/i18n/account_brand.pot b/account_brand/i18n/account_brand.pot
index 656fe5db5..088f64135 100644
--- a/account_brand/i18n/account_brand.pot
+++ b/account_brand/i18n/account_brand.pot
@@ -13,8 +13,14 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_id
+msgid "Account"
+msgstr ""
+
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__brand_id
msgid "Brand"
msgstr ""
@@ -23,8 +29,87 @@ msgstr ""
msgid "Brand to use for this sale"
msgstr ""
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_uid
+msgid "Created by"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_date
+msgid "Created on"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__id
+msgid "ID"
+msgstr ""
+
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_invoice
msgid "Invoice"
msgstr ""
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand____last_update
+msgid "Last Modified on"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_uid
+msgid "Last Updated by"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_date
+msgid "Last Updated on"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__partner_id
+msgid "Partner"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.actions.act_window,name:account_brand.res_partner_account_brand_act_window
+#: model:ir.ui.menu,name:account_brand.res_partner_account_brand_menu
+msgid "Partner Accounts by Brand"
+msgstr ""
+
+#. module: account_brand
+#: code:addons/account_brand/models/res_partner_account_brand.py:37
+#: sql_constraint:res.partner.account.brand:0
+#, python-format
+msgid "Partner has already an account set for this brand!"
+msgstr ""
+
+#. module: account_brand
+#: selection:res.partner.account.brand,account_type:0
+msgid "Payable"
+msgstr ""
+
+#. module: account_brand
+#: code:addons/account_brand/models/res_partner_account_brand.py:50
+#, python-format
+msgid "Please select an account of type %s"
+msgstr ""
+
+#. module: account_brand
+#: selection:res.partner.account.brand,account_type:0
+msgid "Receivable"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model,name:account_brand.model_res_partner_account_brand
+msgid "Receivable/Payable Partner Account By Brand"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_type
+msgid "Type"
+msgstr ""
+
diff --git a/account_brand/models/account_invoice.py b/account_brand/models/account_invoice.py
index 79fe88ce9..f60788922 100644
--- a/account_brand/models/account_invoice.py
+++ b/account_brand/models/account_invoice.py
@@ -2,6 +2,8 @@
# Copyright 2019 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+from collections import OrderedDict
+
from odoo import api, fields, models
@@ -18,11 +20,11 @@ class AccountInvoice(models.Model):
}
)
- @api.onchange("partner_id", "company_id")
- def _onchange_partner_id(self):
- res = super()._onchange_partner_id()
- self._onchange_partner_brand()
- return res
+ def _get_onchange_create(self):
+ res = super()._get_onchange_create()
+ return OrderedDict(
+ [("_onchange_partner_brand", ["account_id"])] + list(res.items())
+ )
@api.onchange("partner_id", "company_id", "brand_id")
def _onchange_partner_brand(self):
diff --git a/account_brand/static/description/index.html b/account_brand/static/description/index.html
index 96d35e342..7795ab496 100644
--- a/account_brand/static/description/index.html
+++ b/account_brand/static/description/index.html
@@ -415,6 +415,7 @@
- Open Source Integrators
+- ACSONE SA/NV
diff --git a/account_brand/tests/test_account_invoice.py b/account_brand/tests/test_account_invoice.py
index 81bcce632..832d829d8 100644
--- a/account_brand/tests/test_account_invoice.py
+++ b/account_brand/tests/test_account_invoice.py
@@ -69,7 +69,7 @@ def setUp(self):
)
def test_on_change_partner_id(self):
- self.invoice._onchange_partner_id()
+ self.invoice._onchange_partner_brand()
self.assertEqual(self.invoice.account_id, self.account_receivable)
partner_account_brand = self.env['res.partner.account.brand'].create(
{
@@ -79,10 +79,10 @@ def test_on_change_partner_id(self):
'account_type': 'receivable',
}
)
- self.invoice._onchange_partner_id()
+ self.invoice._onchange_partner_brand()
self.assertEqual(self.invoice.account_id, self.account_receivable)
self.invoice.brand_id = self.brand_id
- self.invoice._onchange_partner_id()
+ self.invoice._onchange_partner_brand()
self.assertEqual(
self.invoice.account_id, self.account_receivable_brand_default
)
@@ -92,7 +92,7 @@ def test_on_change_partner_id(self):
'account_id': self.account_receivable_partner_brand_default.id,
}
)
- self.invoice._onchange_partner_id()
+ self.invoice._onchange_partner_brand()
self.assertEqual(
self.invoice.account_id,
self.account_receivable_partner_brand_default,
From f7515966375a21a5c96495e0ebe871868a296dd4 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Fri, 23 Oct 2020 21:32:11 +0000
Subject: [PATCH 24/52] account_brand 12.0.3.1.0
---
account_brand/__manifest__.py | 2 +-
account_brand/i18n/de.po | 87 ++++++++++++++++++++++++++++++++++-
account_brand/i18n/es.po | 87 ++++++++++++++++++++++++++++++++++-
account_brand/i18n/hr.po | 85 ++++++++++++++++++++++++++++++++++
account_brand/i18n/zh_CN.po | 85 ++++++++++++++++++++++++++++++++++
5 files changed, 343 insertions(+), 3 deletions(-)
diff --git a/account_brand/__manifest__.py b/account_brand/__manifest__.py
index 311f73ed8..1b62a9009 100644
--- a/account_brand/__manifest__.py
+++ b/account_brand/__manifest__.py
@@ -5,7 +5,7 @@
{
"name": "Account Brand",
"summary": "Send branded invoices and refunds",
- "version": "12.0.3.0.3",
+ "version": "12.0.3.1.0",
"category": "Accounting Management",
"website": "https://github.com/OCA/account-invoicing",
"author": "Open Source Integrators,"
diff --git a/account_brand/i18n/de.po b/account_brand/i18n/de.po
index b3f6a8812..d43c31062 100644
--- a/account_brand/i18n/de.po
+++ b/account_brand/i18n/de.po
@@ -1,6 +1,6 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * account_brand
+# * account_brand
#
msgid ""
msgstr ""
@@ -16,8 +16,14 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.10\n"
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_id
+msgid "Account"
+msgstr ""
+
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__brand_id
msgid "Brand"
msgstr "Marke"
@@ -26,7 +32,86 @@ msgstr "Marke"
msgid "Brand to use for this sale"
msgstr "zu verwendende Marke für diesen Verkauf"
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_uid
+msgid "Created by"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_date
+msgid "Created on"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__id
+msgid "ID"
+msgstr ""
+
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_invoice
msgid "Invoice"
msgstr "Rechnung"
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand____last_update
+msgid "Last Modified on"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_uid
+msgid "Last Updated by"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_date
+msgid "Last Updated on"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__partner_id
+msgid "Partner"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.actions.act_window,name:account_brand.res_partner_account_brand_act_window
+#: model:ir.ui.menu,name:account_brand.res_partner_account_brand_menu
+msgid "Partner Accounts by Brand"
+msgstr ""
+
+#. module: account_brand
+#: code:addons/account_brand/models/res_partner_account_brand.py:37
+#: sql_constraint:res.partner.account.brand:0
+#, python-format
+msgid "Partner has already an account set for this brand!"
+msgstr ""
+
+#. module: account_brand
+#: selection:res.partner.account.brand,account_type:0
+msgid "Payable"
+msgstr ""
+
+#. module: account_brand
+#: code:addons/account_brand/models/res_partner_account_brand.py:50
+#, python-format
+msgid "Please select an account of type %s"
+msgstr ""
+
+#. module: account_brand
+#: selection:res.partner.account.brand,account_type:0
+msgid "Receivable"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model,name:account_brand.model_res_partner_account_brand
+msgid "Receivable/Payable Partner Account By Brand"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_type
+msgid "Type"
+msgstr ""
diff --git a/account_brand/i18n/es.po b/account_brand/i18n/es.po
index 380943062..f87bc3765 100644
--- a/account_brand/i18n/es.po
+++ b/account_brand/i18n/es.po
@@ -1,6 +1,6 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * account_brand
+# * account_brand
#
msgid ""
msgstr ""
@@ -16,8 +16,14 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.10\n"
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_id
+msgid "Account"
+msgstr ""
+
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__brand_id
msgid "Brand"
msgstr "Marca"
@@ -26,7 +32,86 @@ msgstr "Marca"
msgid "Brand to use for this sale"
msgstr "Marca a usar en esta venta"
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_uid
+msgid "Created by"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_date
+msgid "Created on"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__id
+msgid "ID"
+msgstr ""
+
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_invoice
msgid "Invoice"
msgstr "Factura"
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand____last_update
+msgid "Last Modified on"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_uid
+msgid "Last Updated by"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_date
+msgid "Last Updated on"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__partner_id
+msgid "Partner"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.actions.act_window,name:account_brand.res_partner_account_brand_act_window
+#: model:ir.ui.menu,name:account_brand.res_partner_account_brand_menu
+msgid "Partner Accounts by Brand"
+msgstr ""
+
+#. module: account_brand
+#: code:addons/account_brand/models/res_partner_account_brand.py:37
+#: sql_constraint:res.partner.account.brand:0
+#, python-format
+msgid "Partner has already an account set for this brand!"
+msgstr ""
+
+#. module: account_brand
+#: selection:res.partner.account.brand,account_type:0
+msgid "Payable"
+msgstr ""
+
+#. module: account_brand
+#: code:addons/account_brand/models/res_partner_account_brand.py:50
+#, python-format
+msgid "Please select an account of type %s"
+msgstr ""
+
+#. module: account_brand
+#: selection:res.partner.account.brand,account_type:0
+msgid "Receivable"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model,name:account_brand.model_res_partner_account_brand
+msgid "Receivable/Payable Partner Account By Brand"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_type
+msgid "Type"
+msgstr ""
diff --git a/account_brand/i18n/hr.po b/account_brand/i18n/hr.po
index 76dee72c2..5385e322f 100644
--- a/account_brand/i18n/hr.po
+++ b/account_brand/i18n/hr.po
@@ -17,8 +17,14 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 3.8\n"
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_id
+msgid "Account"
+msgstr ""
+
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__brand_id
msgid "Brand"
msgstr "Brand"
@@ -27,7 +33,86 @@ msgstr "Brand"
msgid "Brand to use for this sale"
msgstr ""
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_uid
+msgid "Created by"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_date
+msgid "Created on"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__id
+msgid "ID"
+msgstr ""
+
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_invoice
msgid "Invoice"
msgstr "Račun"
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand____last_update
+msgid "Last Modified on"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_uid
+msgid "Last Updated by"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_date
+msgid "Last Updated on"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__partner_id
+msgid "Partner"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.actions.act_window,name:account_brand.res_partner_account_brand_act_window
+#: model:ir.ui.menu,name:account_brand.res_partner_account_brand_menu
+msgid "Partner Accounts by Brand"
+msgstr ""
+
+#. module: account_brand
+#: code:addons/account_brand/models/res_partner_account_brand.py:37
+#: sql_constraint:res.partner.account.brand:0
+#, python-format
+msgid "Partner has already an account set for this brand!"
+msgstr ""
+
+#. module: account_brand
+#: selection:res.partner.account.brand,account_type:0
+msgid "Payable"
+msgstr ""
+
+#. module: account_brand
+#: code:addons/account_brand/models/res_partner_account_brand.py:50
+#, python-format
+msgid "Please select an account of type %s"
+msgstr ""
+
+#. module: account_brand
+#: selection:res.partner.account.brand,account_type:0
+msgid "Receivable"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model,name:account_brand.model_res_partner_account_brand
+msgid "Receivable/Payable Partner Account By Brand"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_type
+msgid "Type"
+msgstr ""
diff --git a/account_brand/i18n/zh_CN.po b/account_brand/i18n/zh_CN.po
index 5c50153a6..e49487b05 100644
--- a/account_brand/i18n/zh_CN.po
+++ b/account_brand/i18n/zh_CN.po
@@ -16,8 +16,14 @@ msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 3.8\n"
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_id
+msgid "Account"
+msgstr ""
+
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__brand_id
msgid "Brand"
msgstr "品牌"
@@ -26,7 +32,86 @@ msgstr "品牌"
msgid "Brand to use for this sale"
msgstr ""
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_uid
+msgid "Created by"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_date
+msgid "Created on"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__id
+msgid "ID"
+msgstr ""
+
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_invoice
msgid "Invoice"
msgstr "发票"
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand____last_update
+msgid "Last Modified on"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_uid
+msgid "Last Updated by"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_date
+msgid "Last Updated on"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__partner_id
+msgid "Partner"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.actions.act_window,name:account_brand.res_partner_account_brand_act_window
+#: model:ir.ui.menu,name:account_brand.res_partner_account_brand_menu
+msgid "Partner Accounts by Brand"
+msgstr ""
+
+#. module: account_brand
+#: code:addons/account_brand/models/res_partner_account_brand.py:37
+#: sql_constraint:res.partner.account.brand:0
+#, python-format
+msgid "Partner has already an account set for this brand!"
+msgstr ""
+
+#. module: account_brand
+#: selection:res.partner.account.brand,account_type:0
+msgid "Payable"
+msgstr ""
+
+#. module: account_brand
+#: code:addons/account_brand/models/res_partner_account_brand.py:50
+#, python-format
+msgid "Please select an account of type %s"
+msgstr ""
+
+#. module: account_brand
+#: selection:res.partner.account.brand,account_type:0
+msgid "Receivable"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model,name:account_brand.model_res_partner_account_brand
+msgid "Receivable/Payable Partner Account By Brand"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_type
+msgid "Type"
+msgstr ""
From f850ace37f5b878c480bc1f6c9d8e1ff5e789efc Mon Sep 17 00:00:00 2001
From: cubells
Date: Tue, 28 Apr 2020 08:46:17 +0200
Subject: [PATCH 25/52] [MIG] account_brand: Migration to 13.0
[ADD] - add sbejaoui as maintainer
[IMP] - move brand config section outside multi_company section
[FIX] - add brand_use_level to fields_view_get fields
---
account_brand/README.rst | 21 ++-
account_brand/__init__.py | 2 +-
account_brand/__manifest__.py | 16 +--
account_brand/i18n/account_brand.pot | 30 ++--
account_brand/i18n/de.po | 28 ++--
account_brand/i18n/es.po | 28 ++--
account_brand/i18n/hr.po | 28 ++--
account_brand/i18n/zh_CN.po | 28 ++--
.../migrations/12.0.2.0.0/post-migration.py | 15 --
.../migrations/12.0.2.0.0/pre-migration.py | 16 ---
account_brand/models/__init__.py | 2 +-
account_brand/models/account_invoice.py | 91 ------------
account_brand/models/account_move.py | 72 ++++++++++
.../models/res_partner_account_brand.py | 20 +--
account_brand/readme/CONTRIBUTORS.rst | 4 +
.../security/res_partner_account_brand.xml | 34 +++--
account_brand/static/description/index.html | 14 +-
account_brand/tests/__init__.py | 4 +-
.../tests/test_account_analytic_invoice.py | 50 -------
.../tests/test_account_analytic_move.py | 48 +++++++
account_brand/tests/test_account_invoice.py | 110 ---------------
account_brand/tests/test_account_move.py | 112 +++++++++++++++
account_brand/tests/test_brand_mixin.py | 132 ++++++++++--------
account_brand/views/account_invoice.xml | 17 ---
account_brand/views/account_move_views.xml | 16 +++
.../views/res_partner_account_brand.xml | 19 +--
account_brand/wizards/__init__.py | 1 +
.../wizards/account_move_reversal.py | 14 ++
28 files changed, 494 insertions(+), 478 deletions(-)
delete mode 100644 account_brand/migrations/12.0.2.0.0/post-migration.py
delete mode 100644 account_brand/migrations/12.0.2.0.0/pre-migration.py
delete mode 100644 account_brand/models/account_invoice.py
create mode 100644 account_brand/models/account_move.py
delete mode 100644 account_brand/tests/test_account_analytic_invoice.py
create mode 100644 account_brand/tests/test_account_analytic_move.py
delete mode 100644 account_brand/tests/test_account_invoice.py
create mode 100644 account_brand/tests/test_account_move.py
delete mode 100644 account_brand/views/account_invoice.xml
create mode 100644 account_brand/views/account_move_views.xml
create mode 100644 account_brand/wizards/__init__.py
create mode 100644 account_brand/wizards/account_move_reversal.py
diff --git a/account_brand/README.rst b/account_brand/README.rst
index c3cb012f0..7f857a8ae 100644
--- a/account_brand/README.rst
+++ b/account_brand/README.rst
@@ -14,13 +14,13 @@ Account Brand
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbrand-lightgray.png?logo=github
- :target: https://github.com/OCA/brand/tree/12.0/account_brand
+ :target: https://github.com/OCA/brand/tree/13.0/account_brand
:alt: OCA/brand
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/brand-12-0/brand-12-0-account_brand
+ :target: https://translation.odoo-community.org/projects/brand-13-0/brand-13-0-account_brand
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/284/12.0
+ :target: https://runbot.odoo-community.org/runbot/284/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -56,7 +56,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.
@@ -76,6 +76,10 @@ Contributors
* Steve Campbell
* Maxime Chambreuil
+* `Obertix `_:
+
+ * Vicent Cubells
+
Other credits
~~~~~~~~~~~~~
@@ -97,11 +101,14 @@ promote its widespread use.
.. |maintainer-osi-scampbell| image:: https://github.com/osi-scampbell.png?size=40px
:target: https://github.com/osi-scampbell
:alt: osi-scampbell
+.. |maintainer-sbejaoui| image:: https://github.com/sbejaoui.png?size=40px
+ :target: https://github.com/sbejaoui
+ :alt: sbejaoui
-Current `maintainer `__:
+Current `maintainers `__:
-|maintainer-osi-scampbell|
+|maintainer-osi-scampbell| |maintainer-sbejaoui|
-This module is part of the `OCA/brand `_ project on GitHub.
+This module is part of the `OCA/brand `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/account_brand/__init__.py b/account_brand/__init__.py
index 58b6a7fd9..887d8d15b 100644
--- a/account_brand/__init__.py
+++ b/account_brand/__init__.py
@@ -2,4 +2,4 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import models
-from . import tests
+from . import wizards
diff --git a/account_brand/__manifest__.py b/account_brand/__manifest__.py
index 1b62a9009..6009114f7 100644
--- a/account_brand/__manifest__.py
+++ b/account_brand/__manifest__.py
@@ -5,24 +5,20 @@
{
"name": "Account Brand",
"summary": "Send branded invoices and refunds",
- "version": "12.0.3.1.0",
+ "version": "13.0.1.0.0",
"category": "Accounting Management",
"website": "https://github.com/OCA/account-invoicing",
"author": "Open Source Integrators,"
- "ACSONE SA/NV,"
- "Odoo Community Association (OCA)",
+ "ACSONE SA/NV,"
+ "Odoo Community Association (OCA)",
"license": "AGPL-3",
- "depends": [
- 'account',
- 'brand',
- 'analytic_brand',
- ],
+ "depends": ["account", "brand", "analytic_brand"],
"data": [
- "views/account_invoice.xml",
+ "views/account_move_views.xml",
"views/res_partner_account_brand.xml",
"security/res_partner_account_brand.xml",
],
"installable": True,
"development_status": "Beta",
- "maintainers": ["osi-scampbell"],
+ "maintainers": ["osi-scampbell", "sbejaoui"],
}
diff --git a/account_brand/i18n/account_brand.pot b/account_brand/i18n/account_brand.pot
index 088f64135..d18bd80cc 100644
--- a/account_brand/i18n/account_brand.pot
+++ b/account_brand/i18n/account_brand.pot
@@ -1,12 +1,12 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * account_brand
+# * account_brand
#
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"
@@ -19,13 +19,18 @@ msgid "Account"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
+#: model:ir.model,name:account_brand.model_account_move_reversal
+msgid "Account Move Reversal"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_id
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__brand_id
msgid "Brand"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields,help:account_brand.field_account_invoice__brand_id
+#: model:ir.model.fields,help:account_brand.field_account_move__brand_id
msgid "Brand to use for this sale"
msgstr ""
@@ -50,8 +55,8 @@ msgid "ID"
msgstr ""
#. module: account_brand
-#: model:ir.model,name:account_brand.model_account_invoice
-msgid "Invoice"
+#: model:ir.model,name:account_brand.model_account_move
+msgid "Journal Entries"
msgstr ""
#. module: account_brand
@@ -81,25 +86,25 @@ msgid "Partner Accounts by Brand"
msgstr ""
#. module: account_brand
-#: code:addons/account_brand/models/res_partner_account_brand.py:37
-#: sql_constraint:res.partner.account.brand:0
+#: code:addons/account_brand/models/res_partner_account_brand.py:0
+#: model:ir.model.constraint,message:account_brand.constraint_res_partner_account_brand_unique_account_by_partner
#, python-format
msgid "Partner has already an account set for this brand!"
msgstr ""
#. module: account_brand
-#: selection:res.partner.account.brand,account_type:0
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__payable
msgid "Payable"
msgstr ""
#. module: account_brand
-#: code:addons/account_brand/models/res_partner_account_brand.py:50
+#: code:addons/account_brand/models/res_partner_account_brand.py:0
#, python-format
msgid "Please select an account of type %s"
msgstr ""
#. module: account_brand
-#: selection:res.partner.account.brand,account_type:0
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__receivable
msgid "Receivable"
msgstr ""
@@ -112,4 +117,3 @@ msgstr ""
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_type
msgid "Type"
msgstr ""
-
diff --git a/account_brand/i18n/de.po b/account_brand/i18n/de.po
index d43c31062..c35419489 100644
--- a/account_brand/i18n/de.po
+++ b/account_brand/i18n/de.po
@@ -22,13 +22,18 @@ msgid "Account"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
+#: model:ir.model,name:account_brand.model_account_move_reversal
+msgid "Account Move Reversal"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_id
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__brand_id
msgid "Brand"
msgstr "Marke"
#. module: account_brand
-#: model:ir.model.fields,help:account_brand.field_account_invoice__brand_id
+#: model:ir.model.fields,help:account_brand.field_account_move__brand_id
msgid "Brand to use for this sale"
msgstr "zu verwendende Marke für diesen Verkauf"
@@ -53,9 +58,9 @@ msgid "ID"
msgstr ""
#. module: account_brand
-#: model:ir.model,name:account_brand.model_account_invoice
-msgid "Invoice"
-msgstr "Rechnung"
+#: model:ir.model,name:account_brand.model_account_move
+msgid "Journal Entries"
+msgstr ""
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand____last_update
@@ -84,25 +89,25 @@ msgid "Partner Accounts by Brand"
msgstr ""
#. module: account_brand
-#: code:addons/account_brand/models/res_partner_account_brand.py:37
-#: sql_constraint:res.partner.account.brand:0
+#: code:addons/account_brand/models/res_partner_account_brand.py:0
+#: model:ir.model.constraint,message:account_brand.constraint_res_partner_account_brand_unique_account_by_partner
#, python-format
msgid "Partner has already an account set for this brand!"
msgstr ""
#. module: account_brand
-#: selection:res.partner.account.brand,account_type:0
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__payable
msgid "Payable"
msgstr ""
#. module: account_brand
-#: code:addons/account_brand/models/res_partner_account_brand.py:50
+#: code:addons/account_brand/models/res_partner_account_brand.py:0
#, python-format
msgid "Please select an account of type %s"
msgstr ""
#. module: account_brand
-#: selection:res.partner.account.brand,account_type:0
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__receivable
msgid "Receivable"
msgstr ""
@@ -115,3 +120,6 @@ msgstr ""
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_type
msgid "Type"
msgstr ""
+
+#~ msgid "Invoice"
+#~ msgstr "Rechnung"
diff --git a/account_brand/i18n/es.po b/account_brand/i18n/es.po
index f87bc3765..5a9c02afc 100644
--- a/account_brand/i18n/es.po
+++ b/account_brand/i18n/es.po
@@ -22,13 +22,18 @@ msgid "Account"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
+#: model:ir.model,name:account_brand.model_account_move_reversal
+msgid "Account Move Reversal"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_id
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__brand_id
msgid "Brand"
msgstr "Marca"
#. module: account_brand
-#: model:ir.model.fields,help:account_brand.field_account_invoice__brand_id
+#: model:ir.model.fields,help:account_brand.field_account_move__brand_id
msgid "Brand to use for this sale"
msgstr "Marca a usar en esta venta"
@@ -53,9 +58,9 @@ msgid "ID"
msgstr ""
#. module: account_brand
-#: model:ir.model,name:account_brand.model_account_invoice
-msgid "Invoice"
-msgstr "Factura"
+#: model:ir.model,name:account_brand.model_account_move
+msgid "Journal Entries"
+msgstr ""
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand____last_update
@@ -84,25 +89,25 @@ msgid "Partner Accounts by Brand"
msgstr ""
#. module: account_brand
-#: code:addons/account_brand/models/res_partner_account_brand.py:37
-#: sql_constraint:res.partner.account.brand:0
+#: code:addons/account_brand/models/res_partner_account_brand.py:0
+#: model:ir.model.constraint,message:account_brand.constraint_res_partner_account_brand_unique_account_by_partner
#, python-format
msgid "Partner has already an account set for this brand!"
msgstr ""
#. module: account_brand
-#: selection:res.partner.account.brand,account_type:0
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__payable
msgid "Payable"
msgstr ""
#. module: account_brand
-#: code:addons/account_brand/models/res_partner_account_brand.py:50
+#: code:addons/account_brand/models/res_partner_account_brand.py:0
#, python-format
msgid "Please select an account of type %s"
msgstr ""
#. module: account_brand
-#: selection:res.partner.account.brand,account_type:0
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__receivable
msgid "Receivable"
msgstr ""
@@ -115,3 +120,6 @@ msgstr ""
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_type
msgid "Type"
msgstr ""
+
+#~ msgid "Invoice"
+#~ msgstr "Factura"
diff --git a/account_brand/i18n/hr.po b/account_brand/i18n/hr.po
index 5385e322f..b0495828e 100644
--- a/account_brand/i18n/hr.po
+++ b/account_brand/i18n/hr.po
@@ -23,13 +23,18 @@ msgid "Account"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
+#: model:ir.model,name:account_brand.model_account_move_reversal
+msgid "Account Move Reversal"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_id
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__brand_id
msgid "Brand"
msgstr "Brand"
#. module: account_brand
-#: model:ir.model.fields,help:account_brand.field_account_invoice__brand_id
+#: model:ir.model.fields,help:account_brand.field_account_move__brand_id
msgid "Brand to use for this sale"
msgstr ""
@@ -54,9 +59,9 @@ msgid "ID"
msgstr ""
#. module: account_brand
-#: model:ir.model,name:account_brand.model_account_invoice
-msgid "Invoice"
-msgstr "Račun"
+#: model:ir.model,name:account_brand.model_account_move
+msgid "Journal Entries"
+msgstr ""
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand____last_update
@@ -85,25 +90,25 @@ msgid "Partner Accounts by Brand"
msgstr ""
#. module: account_brand
-#: code:addons/account_brand/models/res_partner_account_brand.py:37
-#: sql_constraint:res.partner.account.brand:0
+#: code:addons/account_brand/models/res_partner_account_brand.py:0
+#: model:ir.model.constraint,message:account_brand.constraint_res_partner_account_brand_unique_account_by_partner
#, python-format
msgid "Partner has already an account set for this brand!"
msgstr ""
#. module: account_brand
-#: selection:res.partner.account.brand,account_type:0
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__payable
msgid "Payable"
msgstr ""
#. module: account_brand
-#: code:addons/account_brand/models/res_partner_account_brand.py:50
+#: code:addons/account_brand/models/res_partner_account_brand.py:0
#, python-format
msgid "Please select an account of type %s"
msgstr ""
#. module: account_brand
-#: selection:res.partner.account.brand,account_type:0
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__receivable
msgid "Receivable"
msgstr ""
@@ -116,3 +121,6 @@ msgstr ""
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_type
msgid "Type"
msgstr ""
+
+#~ msgid "Invoice"
+#~ msgstr "Račun"
diff --git a/account_brand/i18n/zh_CN.po b/account_brand/i18n/zh_CN.po
index e49487b05..dc401f696 100644
--- a/account_brand/i18n/zh_CN.po
+++ b/account_brand/i18n/zh_CN.po
@@ -22,13 +22,18 @@ msgid "Account"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields,field_description:account_brand.field_account_invoice__brand_id
+#: model:ir.model,name:account_brand.model_account_move_reversal
+msgid "Account Move Reversal"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_id
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__brand_id
msgid "Brand"
msgstr "品牌"
#. module: account_brand
-#: model:ir.model.fields,help:account_brand.field_account_invoice__brand_id
+#: model:ir.model.fields,help:account_brand.field_account_move__brand_id
msgid "Brand to use for this sale"
msgstr ""
@@ -53,9 +58,9 @@ msgid "ID"
msgstr ""
#. module: account_brand
-#: model:ir.model,name:account_brand.model_account_invoice
-msgid "Invoice"
-msgstr "发票"
+#: model:ir.model,name:account_brand.model_account_move
+msgid "Journal Entries"
+msgstr ""
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand____last_update
@@ -84,25 +89,25 @@ msgid "Partner Accounts by Brand"
msgstr ""
#. module: account_brand
-#: code:addons/account_brand/models/res_partner_account_brand.py:37
-#: sql_constraint:res.partner.account.brand:0
+#: code:addons/account_brand/models/res_partner_account_brand.py:0
+#: model:ir.model.constraint,message:account_brand.constraint_res_partner_account_brand_unique_account_by_partner
#, python-format
msgid "Partner has already an account set for this brand!"
msgstr ""
#. module: account_brand
-#: selection:res.partner.account.brand,account_type:0
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__payable
msgid "Payable"
msgstr ""
#. module: account_brand
-#: code:addons/account_brand/models/res_partner_account_brand.py:50
+#: code:addons/account_brand/models/res_partner_account_brand.py:0
#, python-format
msgid "Please select an account of type %s"
msgstr ""
#. module: account_brand
-#: selection:res.partner.account.brand,account_type:0
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__receivable
msgid "Receivable"
msgstr ""
@@ -115,3 +120,6 @@ msgstr ""
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_type
msgid "Type"
msgstr ""
+
+#~ msgid "Invoice"
+#~ msgstr "发票"
diff --git a/account_brand/migrations/12.0.2.0.0/post-migration.py b/account_brand/migrations/12.0.2.0.0/post-migration.py
deleted file mode 100644
index f45049cbe..000000000
--- a/account_brand/migrations/12.0.2.0.0/post-migration.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 2019 ACSONE SA/NV
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-
-import logging
-
-_logger = logging.getLogger(__name__)
-
-
-def migrate(cr, version):
- _logger.info("Move sale brand to res.brand model")
- cr.execute("""
- UPDATE account_invoice SET brand_id = brand.id
- FROM res_brand brand
- WHERE brand.partner_id=brand_id_tmp""")
- cr.execute("""ALTER TABLE account_invoice DROP COLUMN brand_id_tmp""")
diff --git a/account_brand/migrations/12.0.2.0.0/pre-migration.py b/account_brand/migrations/12.0.2.0.0/pre-migration.py
deleted file mode 100644
index 34c49706c..000000000
--- a/account_brand/migrations/12.0.2.0.0/pre-migration.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2019 ACSONE SA/NV
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-
-import logging
-
-_logger = logging.getLogger(__name__)
-
-
-def migrate(cr, version):
- _logger.info("Move invoice brand to res.brand model")
- cr.execute(
- """ALTER TABLE account_invoice
- ADD COLUMN brand_id_tmp INTEGER"""
- )
- cr.execute("""UPDATE account_invoice SET brand_id_tmp = brand_id""")
- cr.execute("""ALTER TABLE account_invoice DROP COLUMN brand_id""")
diff --git a/account_brand/models/__init__.py b/account_brand/models/__init__.py
index 85eb3b08b..a438e0dec 100644
--- a/account_brand/models/__init__.py
+++ b/account_brand/models/__init__.py
@@ -1,5 +1,5 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-from . import account_invoice
+from . import account_move
from . import res_partner_account_brand
diff --git a/account_brand/models/account_invoice.py b/account_brand/models/account_invoice.py
deleted file mode 100644
index f60788922..000000000
--- a/account_brand/models/account_invoice.py
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright (C) 2019 Open Source Integrators
-# Copyright 2019 ACSONE SA/NV
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-
-from collections import OrderedDict
-
-from odoo import api, fields, models
-
-
-class AccountInvoice(models.Model):
- _name = 'account.invoice'
- _inherit = ['account.invoice', 'res.brand.mixin']
-
- brand_id = fields.Many2one(
- states={
- 'open': [('readonly', True)],
- 'in_payment': [('readonly', True)],
- 'paid': [('readonly', True)],
- 'cancel': [('readonly', True)],
- }
- )
-
- def _get_onchange_create(self):
- res = super()._get_onchange_create()
- return OrderedDict(
- [("_onchange_partner_brand", ["account_id"])] + list(res.items())
- )
-
- @api.onchange("partner_id", "company_id", "brand_id")
- def _onchange_partner_brand(self):
- if self.brand_id:
- pab_model = self.env["res.partner.account.brand"]
- company_id = self.company_id.id
- partner = (
- self.partner_id
- if not company_id
- else self.partner_id.with_context(force_company=company_id)
- )
- invoice_type = self.type or self.env.context.get(
- "type", "out_invoice"
- )
- if partner:
- rec_account = pab_model._get_partner_account_by_brand(
- "receivable", self.brand_id, partner
- )
- rec_account = (
- rec_account
- if rec_account
- else partner.property_account_receivable_id
- )
- pay_account = pab_model._get_partner_account_by_brand(
- "payable", self.brand_id, partner
- )
- pay_account = (
- pay_account
- if pay_account
- else partner.property_account_payable_id
- )
- if invoice_type in ("in_invoice", "in_refund"):
- account_id = pay_account
- else:
- account_id = rec_account
- self.account_id = account_id
-
- @api.onchange('brand_id', 'invoice_line_ids')
- def _onchange_brand_id(self):
- res = super()._onchange_brand_id()
- for invoice in self:
- if invoice.state == 'draft' and invoice.brand_id:
- account_analytic = invoice.brand_id.analytic_account_id
- invoice.invoice_line_ids.update(
- {'account_analytic_id': account_analytic.id}
- )
- return res
-
- @api.multi
- def _is_brand_required(self):
- self.ensure_one()
- if self.type in ('in_invoice', 'in_refund'):
- return False
- return super(AccountInvoice, self)._is_brand_required()
-
- @api.model
- def _prepare_refund(self, invoice, date_invoice=None, date=None,
- description=None, journal_id=None):
- values = super(AccountInvoice, self)._prepare_refund(
- invoice, date_invoice=date_invoice, date=date,
- description=description, journal_id=journal_id)
- if invoice.brand_id:
- values['brand_id'] = invoice.brand_id.id
- return values
diff --git a/account_brand/models/account_move.py b/account_brand/models/account_move.py
new file mode 100644
index 000000000..de9a5003a
--- /dev/null
+++ b/account_brand/models/account_move.py
@@ -0,0 +1,72 @@
+# Copyright (C) 2019 Open Source Integrators
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+
+from odoo import api, fields, models
+
+
+class AccountMove(models.Model):
+ _name = "account.move"
+ _inherit = ["account.move", "res.brand.mixin"]
+
+ brand_id = fields.Many2one(
+ states={
+ "open": [("readonly", True)],
+ "in_payment": [("readonly", True)],
+ "paid": [("readonly", True)],
+ "cancel": [("readonly", True)],
+ }
+ )
+
+ def _is_brand_required(self):
+ self.ensure_one()
+ if self.type in ("in_invoice", "in_refund"):
+ return False
+ return super()._is_brand_required()
+
+ def _recompute_payment_terms_lines(self):
+ super()._recompute_payment_terms_lines()
+ if self.brand_id:
+ pab_model = self.env["res.partner.account.brand"]
+ company_id = self.company_id.id
+ partner = (
+ self.partner_id
+ if not company_id
+ else self.partner_id.with_context(force_company=company_id)
+ )
+ invoice_type = self.type or self.env.context.get("type", "out_invoice")
+ if partner:
+ rec_account = pab_model._get_partner_account_by_brand(
+ "receivable", self.brand_id, partner
+ )
+ rec_account = (
+ rec_account
+ if rec_account
+ else partner.property_account_receivable_id
+ )
+ pay_account = pab_model._get_partner_account_by_brand(
+ "payable", self.brand_id, partner
+ )
+ pay_account = (
+ pay_account if pay_account else partner.property_account_payable_id
+ )
+ if invoice_type in ("in_invoice", "in_refund"):
+ account_id = pay_account
+ else:
+ account_id = rec_account
+ if account_id:
+ self.line_ids.filtered(
+ lambda l, a=account_id: l.account_id.user_type_id
+ == a.user_type_id
+ ).update({"account_id": account_id.id})
+
+ @api.onchange("brand_id", "invoice_line_ids")
+ def _onchange_brand_id(self):
+ res = super()._onchange_brand_id()
+ for invoice in self:
+ if invoice.state == "draft" and invoice.brand_id:
+ account_analytic = invoice.brand_id.analytic_account_id
+ invoice.invoice_line_ids.update(
+ {"analytic_account_id": account_analytic.id}
+ )
+ return res
diff --git a/account_brand/models/res_partner_account_brand.py b/account_brand/models/res_partner_account_brand.py
index f5dd1f927..6a2a5e989 100644
--- a/account_brand/models/res_partner_account_brand.py
+++ b/account_brand/models/res_partner_account_brand.py
@@ -21,9 +21,7 @@ class ResPartnerAccountBrand(models.Model):
required=True,
domain="[('user_type_id.type', 'in', ('payable', 'receivable'))]",
)
- brand_id = fields.Many2one(
- comodel_name='res.brand', string='Brand', required=True
- )
+ brand_id = fields.Many2one(comodel_name="res.brand", string="Brand", required=True)
account_type = fields.Selection(
string="Type",
selection=[("payable", "Payable"), ("receivable", "Receivable")],
@@ -38,7 +36,7 @@ class ResPartnerAccountBrand(models.Model):
)
]
- @api.constrains('account_id', 'account_type')
+ @api.constrains("account_id", "account_type")
def _check_account_type(self):
for rec in self:
if (
@@ -73,16 +71,8 @@ def _get_partner_account_by_brand(self, account_type, brand, partner):
("brand_id", "=", brand.id),
("account_type", "=", account_type),
]
- default_rule = self.search(
- domain + [("partner_id", "=", False)], limit=1
- )
+ default_rule = self.search(domain + [("partner_id", "=", False)], limit=1)
partner_rule = False
if partner:
- partner_rule = self.search(
- domain + [("partner_id", "=", partner.id)]
- )
- return (
- partner_rule.account_id
- if partner_rule
- else default_rule.account_id
- )
+ partner_rule = self.search(domain + [("partner_id", "=", partner.id)])
+ return partner_rule.account_id if partner_rule else default_rule.account_id
diff --git a/account_brand/readme/CONTRIBUTORS.rst b/account_brand/readme/CONTRIBUTORS.rst
index d9fb6931c..be2101c94 100644
--- a/account_brand/readme/CONTRIBUTORS.rst
+++ b/account_brand/readme/CONTRIBUTORS.rst
@@ -1,3 +1,7 @@
* Raphael Lee
* Steve Campbell
* Maxime Chambreuil
+
+* `Obertix `_:
+
+ * Vicent Cubells
diff --git a/account_brand/security/res_partner_account_brand.xml b/account_brand/security/res_partner_account_brand.xml
index 65acc6e1e..50961bfd2 100644
--- a/account_brand/security/res_partner_account_brand.xml
+++ b/account_brand/security/res_partner_account_brand.xml
@@ -1,27 +1,25 @@
-
+
-
-
res.partner.account.brand access
-
-
-
-
-
+
+
+
+
+
-
-
-
+
res.partner.account.brand invoice user access
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/account_brand/static/description/index.html b/account_brand/static/description/index.html
index 7795ab496..20f05067b 100644
--- a/account_brand/static/description/index.html
+++ b/account_brand/static/description/index.html
@@ -367,7 +367,7 @@ Account Brand
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module allows you to send branded invoices to your customers.
It adds a brand field on the invoice and the brand information to the PDF
report.
@@ -406,7 +406,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.
@@ -439,9 +443,9 @@
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.
-
Current maintainer:
-
-
This module is part of the OCA/brand project on GitHub.
+
Current maintainers:
+
+
This module is part of the OCA/brand project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/account_brand/tests/__init__.py b/account_brand/tests/__init__.py
index 82ff43c68..adad8688d 100644
--- a/account_brand/tests/__init__.py
+++ b/account_brand/tests/__init__.py
@@ -1,3 +1,3 @@
from . import test_brand_mixin
-from . import test_account_invoice
-from . import test_account_analytic_invoice
+from . import test_account_move
+from . import test_account_analytic_move
diff --git a/account_brand/tests/test_account_analytic_invoice.py b/account_brand/tests/test_account_analytic_invoice.py
deleted file mode 100644
index 5be1d9fb5..000000000
--- a/account_brand/tests/test_account_analytic_invoice.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 2019 ACSONE SA/NV
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-
-from odoo.tests.common import SavepointCase
-
-
-class TestAccountAnalyticInvoice(SavepointCase):
- def setUp(self):
- super(TestAccountAnalyticInvoice, self).setUp()
- self.invoice = self.env['account.invoice'].create(
- {
- 'partner_id': self.env.ref('base.res_partner_12').id,
- 'type': 'out_invoice',
- }
- )
- self.env['account.invoice.line'].create(
- {
- 'product_id': self.env.ref('product.product_product_4').id,
- 'quantity': 1,
- 'price_unit': 42,
- 'invoice_id': self.invoice.id,
- 'name': 'something',
- 'account_id': self.env['account.account']
- .create(
- {
- 'name': 'Test sale',
- 'code': 'XX_700',
- 'user_type_id': self.env.ref(
- 'account.data_account_type_revenue'
- ).id,
- }
- )
- .id,
- }
- )
- self.brand_id = self.env['res.brand'].create({'name': 'Brand'})
-
- def test_invoice_analytic_account_onchange_brand(self):
- self.brand_id.analytic_account_id = self.env[
- 'account.analytic.account'
- ].create({'name': 'analytic account'})
- self.invoice.brand_id = self.brand_id
- self.assertFalse(
- self.invoice.invoice_line_ids.mapped('account_analytic_id')
- )
- self.invoice._onchange_brand_id()
- self.assertEqual(
- self.invoice.invoice_line_ids.mapped('account_analytic_id'),
- self.brand_id.analytic_account_id,
- )
diff --git a/account_brand/tests/test_account_analytic_move.py b/account_brand/tests/test_account_analytic_move.py
new file mode 100644
index 000000000..85e4ba39b
--- /dev/null
+++ b/account_brand/tests/test_account_analytic_move.py
@@ -0,0 +1,48 @@
+# Copyright 2019 ACSONE SA/NV
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo.tests.common import SavepointCase
+
+
+class TestAccountAnalyticMove(SavepointCase):
+ def setUp(self):
+ super().setUp()
+ self.account = self.env["account.account"].create(
+ {
+ "name": "Test sale",
+ "code": "XX_700",
+ "user_type_id": self.env.ref("account.data_account_type_revenue").id,
+ }
+ )
+ self.move = self.env["account.move"].create(
+ {
+ "partner_id": self.env.ref("base.res_partner_12").id,
+ "type": "out_invoice",
+ "invoice_line_ids": [
+ (
+ 0,
+ 0,
+ {
+ "product_id": self.env.ref("product.product_product_4").id,
+ "quantity": 1,
+ "price_unit": 42,
+ "name": "something",
+ "account_id": self.account.id,
+ },
+ )
+ ],
+ }
+ )
+ self.brand_id = self.env["res.brand"].create({"name": "Brand"})
+
+ def test_move_analytic_account_onchange_brand(self):
+ self.brand_id.analytic_account_id = self.env["account.analytic.account"].create(
+ {"name": "analytic account"}
+ )
+ self.move.brand_id = self.brand_id
+ self.assertFalse(self.move.invoice_line_ids.mapped("analytic_account_id"))
+ self.move._onchange_brand_id()
+ self.assertEqual(
+ self.move.invoice_line_ids.mapped("analytic_account_id"),
+ self.brand_id.analytic_account_id,
+ )
diff --git a/account_brand/tests/test_account_invoice.py b/account_brand/tests/test_account_invoice.py
deleted file mode 100644
index 832d829d8..000000000
--- a/account_brand/tests/test_account_invoice.py
+++ /dev/null
@@ -1,110 +0,0 @@
-# Copyright 2019 ACSONE SA/NV
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-
-from odoo.tests.common import SavepointCase
-
-
-class TestAccountInvoice(SavepointCase):
- def setUp(self):
- super(TestAccountInvoice, self).setUp()
- account_receivable_type = self.env.ref(
- 'account.data_account_type_receivable'
- )
- self.account_receivable = self.env['account.account'].create(
- {
- 'name': 'Partner Receivable',
- 'code': 'RCV00',
- 'user_type_id': account_receivable_type.id,
- 'reconcile': True,
- }
- )
- self.account_receivable_brand_default = self.env[
- 'account.account'
- ].create(
- {
- 'name': 'Receivable Brand Default',
- 'code': 'RCV01',
- 'user_type_id': account_receivable_type.id,
- 'reconcile': True,
- }
- )
- self.account_receivable_partner_brand_default = self.env[
- 'account.account'
- ].create(
- {
- 'name': 'Receivable Partner Brand Default',
- 'code': 'RCV02',
- 'user_type_id': account_receivable_type.id,
- 'reconcile': True,
- }
- )
- self.partner_id = self.env.ref('base.res_partner_12')
- self.partner_id.property_account_receivable_id = (
- self.account_receivable
- )
- self.invoice = self.env['account.invoice'].create(
- {'partner_id': self.partner_id.id, 'type': 'out_invoice'}
- )
- type_revenue = self.env.ref('account.data_account_type_revenue')
- self.account_revenue = self.env['account.account'].create(
- {
- 'name': 'Test sale',
- 'code': 'XX_700',
- 'user_type_id': type_revenue.id,
- }
- )
- product = self.env.ref('product.product_product_4')
- self.env['account.invoice.line'].create(
- {
- 'product_id': product.id,
- 'quantity': 1,
- 'price_unit': 42,
- 'invoice_id': self.invoice.id,
- 'name': 'something',
- 'account_id': self.account_revenue.id,
- }
- )
- self.brand_id = self.env['res.brand'].create(
- {'name': 'Brand'}
- )
-
- def test_on_change_partner_id(self):
- self.invoice._onchange_partner_brand()
- self.assertEqual(self.invoice.account_id, self.account_receivable)
- partner_account_brand = self.env['res.partner.account.brand'].create(
- {
- 'partner_id': False,
- 'account_id': self.account_receivable_brand_default.id,
- 'brand_id': self.brand_id.id,
- 'account_type': 'receivable',
- }
- )
- self.invoice._onchange_partner_brand()
- self.assertEqual(self.invoice.account_id, self.account_receivable)
- self.invoice.brand_id = self.brand_id
- self.invoice._onchange_partner_brand()
- self.assertEqual(
- self.invoice.account_id, self.account_receivable_brand_default
- )
- partner_account_brand.update(
- {
- 'partner_id': self.partner_id.id,
- 'account_id': self.account_receivable_partner_brand_default.id,
- }
- )
- self.invoice._onchange_partner_brand()
- self.assertEqual(
- self.invoice.account_id,
- self.account_receivable_partner_brand_default,
- )
- invoice = self.env['account.invoice'].create(
- {
- 'partner_id': self.partner_id.id,
- 'brand_id': self.brand_id.id,
- 'type': 'out_invoice',
- }
- )
- self.assertEqual(
- invoice.account_id,
- self.account_receivable_partner_brand_default,
- )
diff --git a/account_brand/tests/test_account_move.py b/account_brand/tests/test_account_move.py
new file mode 100644
index 000000000..afd83d501
--- /dev/null
+++ b/account_brand/tests/test_account_move.py
@@ -0,0 +1,112 @@
+# Copyright 2019 ACSONE SA/NV
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo.tests.common import SavepointCase
+
+
+class TestAccountMove(SavepointCase):
+ def setUp(self):
+ super(TestAccountMove, self).setUp()
+ self.product = self.env.ref("product.product_product_4")
+ account_receivable_type = self.env.ref("account.data_account_type_receivable")
+ self.account_receivable = self.env["account.account"].create(
+ {
+ "name": "Partner Receivable",
+ "code": "RCV00",
+ "user_type_id": account_receivable_type.id,
+ "reconcile": True,
+ }
+ )
+ self.account_receivable_brand_default = self.env["account.account"].create(
+ {
+ "name": "Receivable Brand Default",
+ "code": "RCV01",
+ "user_type_id": account_receivable_type.id,
+ "reconcile": True,
+ }
+ )
+ self.account_receivable_partner_brand_default = self.env[
+ "account.account"
+ ].create(
+ {
+ "name": "Receivable Partner Brand Default",
+ "code": "RCV02",
+ "user_type_id": account_receivable_type.id,
+ "reconcile": True,
+ }
+ )
+ self.partner_id = self.env.ref("base.res_partner_12")
+ self.partner_id.property_account_receivable_id = self.account_receivable
+ type_revenue = self.env.ref("account.data_account_type_revenue")
+ self.account_revenue = self.env["account.account"].create(
+ {"name": "Test sale", "code": "XX_700", "user_type_id": type_revenue.id}
+ )
+ self.move = self.env["account.move"].create(
+ {
+ "partner_id": self.partner_id.id,
+ "type": "out_invoice",
+ "invoice_line_ids": [
+ (
+ 0,
+ 0,
+ {
+ "product_id": self.product.id,
+ "quantity": 1,
+ "price_unit": 42,
+ "name": "something",
+ "account_id": self.account_revenue.id,
+ },
+ )
+ ],
+ }
+ )
+
+ self.brand_id = self.env["res.brand"].create({"name": "Brand"})
+
+ def _get_receivable_account(self, move):
+ user_type_receivable = self.env.ref("account.data_account_type_receivable")
+ return self.move.line_ids.filtered(
+ lambda l, u_type=user_type_receivable: l.account_id.user_type_id == u_type
+ ).account_id
+
+ def test_on_change_partner_id(self):
+
+ account = self._get_receivable_account(self.move)
+ self.assertEqual(account, self.account_receivable)
+ partner_account_brand = self.env["res.partner.account.brand"].create(
+ {
+ "partner_id": False,
+ "account_id": self.account_receivable_brand_default.id,
+ "brand_id": self.brand_id.id,
+ "account_type": "receivable",
+ }
+ )
+ self.move._onchange_partner_id()
+ account = self._get_receivable_account(self.move)
+ self.assertEqual(account, self.account_receivable)
+ self.move.brand_id = self.brand_id
+ self.move._onchange_partner_id()
+ account = self._get_receivable_account(self.move)
+ self.assertEqual(account, self.account_receivable_brand_default)
+ partner_account_brand.update(
+ {
+ "partner_id": self.partner_id.id,
+ "account_id": self.account_receivable_partner_brand_default.id,
+ }
+ )
+ self.move._onchange_partner_id()
+ account = self._get_receivable_account(self.move)
+ self.assertEqual(
+ account, self.account_receivable_partner_brand_default,
+ )
+ move = self.env["account.move"].create(
+ {
+ "partner_id": self.partner_id.id,
+ "brand_id": self.brand_id.id,
+ "type": "out_invoice",
+ }
+ )
+ account = self._get_receivable_account(move)
+ self.assertEqual(
+ account, self.account_receivable_partner_brand_default,
+ )
diff --git a/account_brand/tests/test_brand_mixin.py b/account_brand/tests/test_brand_mixin.py
index 3b8b1c38f..545f643ae 100644
--- a/account_brand/tests/test_brand_mixin.py
+++ b/account_brand/tests/test_brand_mixin.py
@@ -2,8 +2,10 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from lxml import etree
-from odoo.tests.common import TransactionCase
+
from odoo.exceptions import ValidationError
+from odoo.tests.common import Form, TransactionCase
+
from odoo.addons.brand.models.res_company import BRAND_USE_LEVEL_REQUIRED_LEVEL
@@ -12,23 +14,23 @@ def setUp(self):
super(TestBrandMixin, self).setUp()
self.partner = self.env.user.partner_id
self.company = self.env.user.company_id
- self.other_company = self.env['res.company'].create(
- {'name': 'other company', 'parent_id': self.company.id}
+ self.other_company = self.env["res.company"].create(
+ {"name": "other company", "parent_id": self.company.id}
)
- self.journal = self.env['account.journal'].create(
- {'type': 'sale', 'code': 'SALE', 'name': 'Sale journal'}
+ self.journal = self.env["account.journal"].create(
+ {"type": "sale", "code": "SALE", "name": "Sale journal"}
)
- self.invoice = self.env['account.invoice'].create(
+ self.invoice = self.env["account.move"].create(
{
- 'name': "Sample invoice",
- 'company_id': self.company.id,
- 'journal_id': self.journal.id,
- 'partner_id': self.partner.id,
+ "name": "Sample invoice",
+ "company_id": self.company.id,
+ "journal_id": self.journal.id,
+ "partner_id": self.partner.id,
}
)
- self.brand = self.env['res.brand'].create({'name': 'brand'})
- self.other_company_brand = self.env['res.brand'].create(
- {'name': 'brand', 'company_id': self.other_company.id}
+ self.brand = self.env["res.brand"].create({"name": "brand"})
+ self.other_company_brand = self.env["res.brand"].create(
+ {"name": "brand", "company_id": self.other_company.id}
)
def test_is_brand_required(self):
@@ -37,55 +39,55 @@ def test_is_brand_required(self):
self.assertTrue(self.invoice._is_brand_required())
def test_check_brand_requirement(self):
- self.env['account.invoice'].create(
+ self.env["account.move"].create(
{
- 'name': "Sample invoice",
- 'company_id': self.company.id,
- 'journal_id': self.journal.id,
- 'partner_id': self.partner.id,
+ "name": "Sample invoice",
+ "company_id": self.company.id,
+ "journal_id": self.journal.id,
+ "partner_id": self.partner.id,
}
)
self.company.brand_use_level = BRAND_USE_LEVEL_REQUIRED_LEVEL
with self.assertRaises(ValidationError):
- self.env['account.invoice'].create(
+ self.env["account.move"].create(
{
- 'name': "Sample invoice",
- 'company_id': self.company.id,
- 'journal_id': self.journal.id,
- 'partner_id': self.partner.id,
+ "name": "Sample invoice",
+ "company_id": self.company.id,
+ "journal_id": self.journal.id,
+ "partner_id": self.partner.id,
}
)
- self.env['account.invoice'].create(
+ self.env["account.move"].create(
{
- 'name': "Sample invoice",
- 'company_id': self.company.id,
- 'journal_id': self.journal.id,
- 'partner_id': self.partner.id,
- 'brand_id': self.brand.id,
+ "name": "Sample invoice",
+ "company_id": self.company.id,
+ "journal_id": self.journal.id,
+ "partner_id": self.partner.id,
+ "brand_id": self.brand.id,
}
)
def test_check_brand_company_id(self):
- invoice = self.env['account.invoice'].create(
+ invoice = self.env["account.move"].create(
{
- 'name': "Sample invoice",
- 'company_id': self.company.id,
- 'journal_id': self.journal.id,
- 'partner_id': self.partner.id,
- 'brand_id': self.brand.id,
+ "name": "Sample invoice",
+ "company_id": self.company.id,
+ "journal_id": self.journal.id,
+ "partner_id": self.partner.id,
+ "brand_id": self.brand.id,
}
)
with self.assertRaises(ValidationError):
invoice.brand_id = self.other_company_brand
def test_onchange_brand_id(self):
- new_invoice = self.env['account.invoice'].new(
+ new_invoice = self.env["account.move"].new(
{
- 'name': "Sample invoice",
- 'company_id': self.company.id,
- 'journal_id': self.journal.id,
- 'partner_id': self.partner.id,
- 'brand_id': self.brand.id,
+ "name": "Sample invoice",
+ "company_id": self.company.id,
+ "journal_id": self.journal.id,
+ "partner_id": self.partner.id,
+ "brand_id": self.brand.id,
}
)
self.assertEqual(new_invoice.company_id, self.company)
@@ -94,24 +96,44 @@ def test_onchange_brand_id(self):
self.assertEqual(new_invoice.company_id, self.other_company)
def test_fields_view_get(self):
- view = self.env['account.invoice'].fields_view_get(
- view_id=self.env.ref(
- 'account_brand.account_invoice_view_form_brand'
- ).id,
- view_type='form',
+ view = self.env["account.move"].fields_view_get(
+ view_id=self.env.ref("account.view_move_form").id, view_type="form",
)
- doc = etree.XML(view['arch'])
+ doc = etree.XML(view["arch"])
self.assertTrue(doc.xpath("//field[@name='brand_use_level']"))
- def test_refund_invoice(self):
- invoice = self.env['account.invoice'].create(
+ def test_reverse_move(self):
+ move = self.env["account.move"].create(
{
- 'name': "Sample invoice",
- 'company_id': self.company.id,
- 'journal_id': self.journal.id,
- 'partner_id': self.partner.id,
- 'brand_id': self.brand.id,
+ "name": "Sample invoice",
+ "type": "out_invoice",
+ "company_id": self.company.id,
+ "journal_id": self.journal.id,
+ "partner_id": self.partner.id,
+ "brand_id": self.brand.id,
+ "invoice_line_ids": [
+ (
+ 0,
+ 0,
+ {
+ "product_id": self.env.ref("product.product_product_1").id,
+ "quantity": 40.0,
+ "name": "product test 1",
+ "discount": 10.00,
+ "price_unit": 2.27,
+ },
+ )
+ ],
}
)
- credit_note = invoice.refund()
+ move.action_post()
+ reverse_wizard = Form(
+ self.env["account.move.reversal"].with_context(
+ active_ids=move.ids, active_model="account.move"
+ )
+ )
+ reverse_wizard.reason = "modify"
+ reverse = reverse_wizard.save()
+ action = reverse.reverse_moves()
+ credit_note = self.env["account.move"].browse(action.get("res_id"))
self.assertEqual(credit_note.brand_id, self.brand)
diff --git a/account_brand/views/account_invoice.xml b/account_brand/views/account_invoice.xml
deleted file mode 100644
index f061c8f78..000000000
--- a/account_brand/views/account_invoice.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
- account.invoice.form.brand
- account.invoice
-
-
-
-
-
-
-
-
-
diff --git a/account_brand/views/account_move_views.xml b/account_brand/views/account_move_views.xml
new file mode 100644
index 000000000..2318fcc51
--- /dev/null
+++ b/account_brand/views/account_move_views.xml
@@ -0,0 +1,16 @@
+
+
+
+ account.move
+
+
+
+
+
+
+
+
diff --git a/account_brand/views/res_partner_account_brand.xml b/account_brand/views/res_partner_account_brand.xml
index 526ae4980..2e739df02 100644
--- a/account_brand/views/res_partner_account_brand.xml
+++ b/account_brand/views/res_partner_account_brand.xml
@@ -1,32 +1,27 @@
-
+
-
-
res.partner.account.brand.tree (in account_brand)
res.partner.account.brand
-
-
-
-
+
+
+
+
-
Partner Accounts by Brand
res.partner.account.brand
tree
-
Partner Accounts by Brand
-
-
+
+
-
diff --git a/account_brand/wizards/__init__.py b/account_brand/wizards/__init__.py
new file mode 100644
index 000000000..715d1bd6d
--- /dev/null
+++ b/account_brand/wizards/__init__.py
@@ -0,0 +1 @@
+from . import account_move_reversal
diff --git a/account_brand/wizards/account_move_reversal.py b/account_brand/wizards/account_move_reversal.py
new file mode 100644
index 000000000..fa87ad46f
--- /dev/null
+++ b/account_brand/wizards/account_move_reversal.py
@@ -0,0 +1,14 @@
+# Copyright 2020 ACSONE SA/NV
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo import models
+
+
+class AccountMoveReversal(models.TransientModel):
+
+ _inherit = "account.move.reversal"
+
+ def _prepare_default_reversal(self, move):
+ res = super()._prepare_default_reversal(move)
+ res["brand_id"] = move.brand_id.id
+ return res
From 87d25a94eea204fe2d824c991917adafef62cabb Mon Sep 17 00:00:00 2001
From: sbejaoui
Date: Mon, 30 Dec 2019 16:19:07 +0100
Subject: [PATCH 26/52] [IMP] - Add unit tests
---
account_brand/i18n/nl.po | 122 ++++++++++++++++++
.../tests/test_account_analytic_invoice.py | 48 +++++++
2 files changed, 170 insertions(+)
create mode 100644 account_brand/i18n/nl.po
create mode 100644 account_brand/tests/test_account_analytic_invoice.py
diff --git a/account_brand/i18n/nl.po b/account_brand/i18n/nl.po
new file mode 100644
index 000000000..9cd100c18
--- /dev/null
+++ b/account_brand/i18n/nl.po
@@ -0,0 +1,122 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * account_brand
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 13.0\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: 2020-12-13 23:19+0000\n"
+"Last-Translator: Bosd \n"
+"Language-Team: none\n"
+"Language: nl\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 4.3.2\n"
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_id
+msgid "Account"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model,name:account_brand.model_account_move_reversal
+msgid "Account Move Reversal"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_id
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__brand_id
+msgid "Brand"
+msgstr "Merk"
+
+#. module: account_brand
+#: model:ir.model.fields,help:account_brand.field_account_move__brand_id
+msgid "Brand to use for this sale"
+msgstr "Merk voor deze verkoop"
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_uid
+msgid "Created by"
+msgstr "Aangemaakt door"
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_date
+msgid "Created on"
+msgstr "Aangemaakt op"
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__display_name
+msgid "Display Name"
+msgstr "Weergavenaam"
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__id
+msgid "ID"
+msgstr "ID"
+
+#. module: account_brand
+#: model:ir.model,name:account_brand.model_account_move
+msgid "Journal Entries"
+msgstr "Journaal ingave"
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand____last_update
+msgid "Last Modified on"
+msgstr "Laatst gewijzigt op"
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_uid
+msgid "Last Updated by"
+msgstr "Laatste wijziging door"
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_date
+msgid "Last Updated on"
+msgstr "Laatste wijziging op"
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__partner_id
+msgid "Partner"
+msgstr "Partner"
+
+#. module: account_brand
+#: model:ir.actions.act_window,name:account_brand.res_partner_account_brand_act_window
+#: model:ir.ui.menu,name:account_brand.res_partner_account_brand_menu
+msgid "Partner Accounts by Brand"
+msgstr ""
+
+#. module: account_brand
+#: code:addons/account_brand/models/res_partner_account_brand.py:0
+#: model:ir.model.constraint,message:account_brand.constraint_res_partner_account_brand_unique_account_by_partner
+#, python-format
+msgid "Partner has already an account set for this brand!"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__payable
+msgid "Payable"
+msgstr "Te betalen"
+
+#. module: account_brand
+#: code:addons/account_brand/models/res_partner_account_brand.py:0
+#, python-format
+msgid "Please select an account of type %s"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__receivable
+msgid "Receivable"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model,name:account_brand.model_res_partner_account_brand
+msgid "Receivable/Payable Partner Account By Brand"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_type
+msgid "Type"
+msgstr "Type"
diff --git a/account_brand/tests/test_account_analytic_invoice.py b/account_brand/tests/test_account_analytic_invoice.py
new file mode 100644
index 000000000..8e8e42b59
--- /dev/null
+++ b/account_brand/tests/test_account_analytic_invoice.py
@@ -0,0 +1,48 @@
+# Copyright 2019 ACSONE SA/NV
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo.tests.common import SavepointCase
+
+
+class TestAccountAnalyticInvoice(SavepointCase):
+ def setUp(self):
+ super(TestAccountAnalyticInvoice, self).setUp()
+ self.invoice = self.env["account.invoice"].create(
+ {
+ "partner_id": self.env.ref("base.res_partner_12").id,
+ "type": "out_invoice",
+ }
+ )
+ self.env["account.invoice.line"].create(
+ {
+ "product_id": self.env.ref("product.product_product_4").id,
+ "quantity": 1,
+ "price_unit": 42,
+ "invoice_id": self.invoice.id,
+ "name": "something",
+ "account_id": self.env["account.account"]
+ .create(
+ {
+ "name": "Test sale",
+ "code": "XX_700",
+ "user_type_id": self.env.ref(
+ "account.data_account_type_revenue"
+ ).id,
+ }
+ )
+ .id,
+ }
+ )
+ self.brand_id = self.env["res.brand"].create({"name": "Brand"})
+
+ def test_invoice_analytic_account_onchange_brand(self):
+ self.brand_id.analytic_account_id = self.env["account.analytic.account"].create(
+ {"name": "analytic account"}
+ )
+ self.invoice.brand_id = self.brand_id
+ self.assertFalse(self.invoice.invoice_line_ids.mapped("account_analytic_id"))
+ self.invoice._onchange_brand_id()
+ self.assertEqual(
+ self.invoice.invoice_line_ids.mapped("account_analytic_id"),
+ self.brand_id.analytic_account_id,
+ )
From d68a69cc1a8096d7d08a3e0d4b9f6bdad3d384b7 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Wed, 2 Jun 2021 13:29:40 +0000
Subject: [PATCH 27/52] account_brand 13.0.1.0.1
---
account_brand/__manifest__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/account_brand/__manifest__.py b/account_brand/__manifest__.py
index 6009114f7..7d2394e5e 100644
--- a/account_brand/__manifest__.py
+++ b/account_brand/__manifest__.py
@@ -5,7 +5,7 @@
{
"name": "Account Brand",
"summary": "Send branded invoices and refunds",
- "version": "13.0.1.0.0",
+ "version": "13.0.1.0.1",
"category": "Accounting Management",
"website": "https://github.com/OCA/account-invoicing",
"author": "Open Source Integrators,"
From 8ac5c329facafe52c1ea02c8554409c4d3821f36 Mon Sep 17 00:00:00 2001
From: Freni-OSI
Date: Fri, 16 Jul 2021 12:49:25 +0530
Subject: [PATCH 28/52] [14.0][FIX] Travis
---
account_brand/__manifest__.py | 4 ++--
account_brand/tests/test_account_move.py | 6 ++++--
account_brand/tests/test_brand_mixin.py | 3 ++-
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/account_brand/__manifest__.py b/account_brand/__manifest__.py
index 7d2394e5e..bf1c61625 100644
--- a/account_brand/__manifest__.py
+++ b/account_brand/__manifest__.py
@@ -5,9 +5,9 @@
{
"name": "Account Brand",
"summary": "Send branded invoices and refunds",
- "version": "13.0.1.0.1",
+ "version": "14.0.1.0.0",
"category": "Accounting Management",
- "website": "https://github.com/OCA/account-invoicing",
+ "website": "https://github.com/OCA/brand",
"author": "Open Source Integrators,"
"ACSONE SA/NV,"
"Odoo Community Association (OCA)",
diff --git a/account_brand/tests/test_account_move.py b/account_brand/tests/test_account_move.py
index afd83d501..a3c745041 100644
--- a/account_brand/tests/test_account_move.py
+++ b/account_brand/tests/test_account_move.py
@@ -97,7 +97,8 @@ def test_on_change_partner_id(self):
self.move._onchange_partner_id()
account = self._get_receivable_account(self.move)
self.assertEqual(
- account, self.account_receivable_partner_brand_default,
+ account,
+ self.account_receivable_partner_brand_default,
)
move = self.env["account.move"].create(
{
@@ -108,5 +109,6 @@ def test_on_change_partner_id(self):
)
account = self._get_receivable_account(move)
self.assertEqual(
- account, self.account_receivable_partner_brand_default,
+ account,
+ self.account_receivable_partner_brand_default,
)
diff --git a/account_brand/tests/test_brand_mixin.py b/account_brand/tests/test_brand_mixin.py
index 545f643ae..17581fa18 100644
--- a/account_brand/tests/test_brand_mixin.py
+++ b/account_brand/tests/test_brand_mixin.py
@@ -97,7 +97,8 @@ def test_onchange_brand_id(self):
def test_fields_view_get(self):
view = self.env["account.move"].fields_view_get(
- view_id=self.env.ref("account.view_move_form").id, view_type="form",
+ view_id=self.env.ref("account.view_move_form").id,
+ view_type="form",
)
doc = etree.XML(view["arch"])
self.assertTrue(doc.xpath("//field[@name='brand_use_level']"))
From ff1150705fe1c1633e43c051f6d95c6d513d70c5 Mon Sep 17 00:00:00 2001
From: Freni-OSI
Date: Fri, 16 Jul 2021 12:52:19 +0530
Subject: [PATCH 29/52] [14.0][MIG] account_brand
---
account_brand/README.rst | 12 +++--
account_brand/models/account_move.py | 8 ++--
account_brand/readme/CONTRIBUTORS.rst | 1 +
account_brand/static/description/index.html | 7 +--
.../tests/test_account_analytic_invoice.py | 48 -------------------
.../tests/test_account_analytic_move.py | 2 +-
account_brand/tests/test_account_move.py | 4 +-
account_brand/tests/test_brand_mixin.py | 2 +-
account_brand/views/account_move_views.xml | 2 +-
9 files changed, 22 insertions(+), 64 deletions(-)
delete mode 100644 account_brand/tests/test_account_analytic_invoice.py
diff --git a/account_brand/README.rst b/account_brand/README.rst
index 7f857a8ae..53b9d7211 100644
--- a/account_brand/README.rst
+++ b/account_brand/README.rst
@@ -14,13 +14,13 @@ Account Brand
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbrand-lightgray.png?logo=github
- :target: https://github.com/OCA/brand/tree/13.0/account_brand
+ :target: https://github.com/OCA/brand/tree/14.0/account_brand
:alt: OCA/brand
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/brand-13-0/brand-13-0-account_brand
+ :target: https://translation.odoo-community.org/projects/brand-14-0/brand-14-0-account_brand
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/284/13.0
+ :target: https://runbot.odoo-community.org/runbot/284/14.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -56,7 +56,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.
@@ -79,6 +79,8 @@ Contributors
* `Obertix `_:
* Vicent Cubells
+* Ammar Officewala
+
Other credits
~~~~~~~~~~~~~
@@ -109,6 +111,6 @@ Current `maintainers `__:
|maintainer-osi-scampbell| |maintainer-sbejaoui|
-This module is part of the `OCA/brand `_ project on GitHub.
+This module is part of the `OCA/brand `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/account_brand/models/account_move.py b/account_brand/models/account_move.py
index de9a5003a..d3469ce42 100644
--- a/account_brand/models/account_move.py
+++ b/account_brand/models/account_move.py
@@ -20,7 +20,7 @@ class AccountMove(models.Model):
def _is_brand_required(self):
self.ensure_one()
- if self.type in ("in_invoice", "in_refund"):
+ if self.move_type in ("in_invoice", "in_refund"):
return False
return super()._is_brand_required()
@@ -32,9 +32,11 @@ def _recompute_payment_terms_lines(self):
partner = (
self.partner_id
if not company_id
- else self.partner_id.with_context(force_company=company_id)
+ else self.partner_id.with_company(company_id)
+ )
+ invoice_type = self.move_type or self.env.context.get(
+ "move_type", "out_invoice"
)
- invoice_type = self.type or self.env.context.get("type", "out_invoice")
if partner:
rec_account = pab_model._get_partner_account_by_brand(
"receivable", self.brand_id, partner
diff --git a/account_brand/readme/CONTRIBUTORS.rst b/account_brand/readme/CONTRIBUTORS.rst
index be2101c94..1194917f2 100644
--- a/account_brand/readme/CONTRIBUTORS.rst
+++ b/account_brand/readme/CONTRIBUTORS.rst
@@ -5,3 +5,4 @@
* `Obertix `_:
* Vicent Cubells
+* Ammar Officewala
diff --git a/account_brand/static/description/index.html b/account_brand/static/description/index.html
index 20f05067b..8c602c7b4 100644
--- a/account_brand/static/description/index.html
+++ b/account_brand/static/description/index.html
@@ -367,7 +367,7 @@ Account Brand
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module allows you to send branded invoices to your customers.
It adds a brand field on the invoice and the brand information to the PDF
report.
@@ -406,7 +406,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.
diff --git a/account_brand/tests/test_account_analytic_invoice.py b/account_brand/tests/test_account_analytic_invoice.py
deleted file mode 100644
index 8e8e42b59..000000000
--- a/account_brand/tests/test_account_analytic_invoice.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 2019 ACSONE SA/NV
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-
-from odoo.tests.common import SavepointCase
-
-
-class TestAccountAnalyticInvoice(SavepointCase):
- def setUp(self):
- super(TestAccountAnalyticInvoice, self).setUp()
- self.invoice = self.env["account.invoice"].create(
- {
- "partner_id": self.env.ref("base.res_partner_12").id,
- "type": "out_invoice",
- }
- )
- self.env["account.invoice.line"].create(
- {
- "product_id": self.env.ref("product.product_product_4").id,
- "quantity": 1,
- "price_unit": 42,
- "invoice_id": self.invoice.id,
- "name": "something",
- "account_id": self.env["account.account"]
- .create(
- {
- "name": "Test sale",
- "code": "XX_700",
- "user_type_id": self.env.ref(
- "account.data_account_type_revenue"
- ).id,
- }
- )
- .id,
- }
- )
- self.brand_id = self.env["res.brand"].create({"name": "Brand"})
-
- def test_invoice_analytic_account_onchange_brand(self):
- self.brand_id.analytic_account_id = self.env["account.analytic.account"].create(
- {"name": "analytic account"}
- )
- self.invoice.brand_id = self.brand_id
- self.assertFalse(self.invoice.invoice_line_ids.mapped("account_analytic_id"))
- self.invoice._onchange_brand_id()
- self.assertEqual(
- self.invoice.invoice_line_ids.mapped("account_analytic_id"),
- self.brand_id.analytic_account_id,
- )
diff --git a/account_brand/tests/test_account_analytic_move.py b/account_brand/tests/test_account_analytic_move.py
index 85e4ba39b..2949e6762 100644
--- a/account_brand/tests/test_account_analytic_move.py
+++ b/account_brand/tests/test_account_analytic_move.py
@@ -17,7 +17,7 @@ def setUp(self):
self.move = self.env["account.move"].create(
{
"partner_id": self.env.ref("base.res_partner_12").id,
- "type": "out_invoice",
+ "move_type": "out_invoice",
"invoice_line_ids": [
(
0,
diff --git a/account_brand/tests/test_account_move.py b/account_brand/tests/test_account_move.py
index a3c745041..4854db929 100644
--- a/account_brand/tests/test_account_move.py
+++ b/account_brand/tests/test_account_move.py
@@ -44,7 +44,7 @@ def setUp(self):
self.move = self.env["account.move"].create(
{
"partner_id": self.partner_id.id,
- "type": "out_invoice",
+ "move_type": "out_invoice",
"invoice_line_ids": [
(
0,
@@ -104,7 +104,7 @@ def test_on_change_partner_id(self):
{
"partner_id": self.partner_id.id,
"brand_id": self.brand_id.id,
- "type": "out_invoice",
+ "move_type": "out_invoice",
}
)
account = self._get_receivable_account(move)
diff --git a/account_brand/tests/test_brand_mixin.py b/account_brand/tests/test_brand_mixin.py
index 17581fa18..94bcc3cb5 100644
--- a/account_brand/tests/test_brand_mixin.py
+++ b/account_brand/tests/test_brand_mixin.py
@@ -107,7 +107,7 @@ def test_reverse_move(self):
move = self.env["account.move"].create(
{
"name": "Sample invoice",
- "type": "out_invoice",
+ "move_type": "out_invoice",
"company_id": self.company.id,
"journal_id": self.journal.id,
"partner_id": self.partner.id,
diff --git a/account_brand/views/account_move_views.xml b/account_brand/views/account_move_views.xml
index 2318fcc51..cbdf8752a 100644
--- a/account_brand/views/account_move_views.xml
+++ b/account_brand/views/account_move_views.xml
@@ -8,7 +8,7 @@
From 5888378bde5b543775598482630eaa1536a0d9dc Mon Sep 17 00:00:00 2001
From: oca-travis
Date: Fri, 16 Jul 2021 19:37:04 +0000
Subject: [PATCH 30/52] [UPD] Update account_brand.pot
---
account_brand/i18n/account_brand.pot | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/account_brand/i18n/account_brand.pot b/account_brand/i18n/account_brand.pot
index d18bd80cc..0093d3465 100644
--- a/account_brand/i18n/account_brand.pot
+++ b/account_brand/i18n/account_brand.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"
@@ -24,16 +24,30 @@ msgid "Account Move Reversal"
msgstr ""
#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_bank_statement_line__brand_id
#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_id
+#: model:ir.model.fields,field_description:account_brand.field_account_payment__brand_id
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__brand_id
msgid "Brand"
msgstr ""
#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_use_level
+msgid "Brand Use Level"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,help:account_brand.field_account_bank_statement_line__brand_id
#: model:ir.model.fields,help:account_brand.field_account_move__brand_id
+#: model:ir.model.fields,help:account_brand.field_account_payment__brand_id
msgid "Brand to use for this sale"
msgstr ""
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__company_id
+msgid "Company"
+msgstr ""
+
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_uid
msgid "Created by"
@@ -45,21 +59,27 @@ msgid "Created on"
msgstr ""
#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__display_name
+#: model:ir.model.fields,field_description:account_brand.field_account_move_reversal__display_name
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__display_name
msgid "Display Name"
msgstr ""
#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__id
+#: model:ir.model.fields,field_description:account_brand.field_account_move_reversal__id
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__id
msgid "ID"
msgstr ""
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_move
-msgid "Journal Entries"
+msgid "Journal Entry"
msgstr ""
#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move____last_update
+#: model:ir.model.fields,field_description:account_brand.field_account_move_reversal____last_update
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand____last_update
msgid "Last Modified on"
msgstr ""
From beabcfb8af223399b498276fd45d0b8b1fa47489 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Fri, 16 Jul 2021 19:41:04 +0000
Subject: [PATCH 31/52] [UPD] README.rst
---
account_brand/README.rst | 1 -
1 file changed, 1 deletion(-)
diff --git a/account_brand/README.rst b/account_brand/README.rst
index 53b9d7211..8cfffb7d9 100644
--- a/account_brand/README.rst
+++ b/account_brand/README.rst
@@ -81,7 +81,6 @@ Contributors
* Vicent Cubells
* Ammar Officewala
-
Other credits
~~~~~~~~~~~~~
From 2a38e0258ec40c0ea822a0b5a97fa98a24031813 Mon Sep 17 00:00:00 2001
From: sbejaoui
Date: Thu, 17 Mar 2022 15:02:01 +0100
Subject: [PATCH 32/52] [15.0][MIG] - account_brand
---
account_brand/__manifest__.py | 2 +-
account_brand/models/account_move.py | 3 ++-
account_brand/tests/test_account_analytic_move.py | 4 ++--
account_brand/tests/test_account_move.py | 4 ++--
4 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/account_brand/__manifest__.py b/account_brand/__manifest__.py
index bf1c61625..e2f689b97 100644
--- a/account_brand/__manifest__.py
+++ b/account_brand/__manifest__.py
@@ -5,7 +5,7 @@
{
"name": "Account Brand",
"summary": "Send branded invoices and refunds",
- "version": "14.0.1.0.0",
+ "version": "15.0.1.0.0",
"category": "Accounting Management",
"website": "https://github.com/OCA/brand",
"author": "Open Source Integrators,"
diff --git a/account_brand/models/account_move.py b/account_brand/models/account_move.py
index d3469ce42..318345729 100644
--- a/account_brand/models/account_move.py
+++ b/account_brand/models/account_move.py
@@ -25,7 +25,7 @@ def _is_brand_required(self):
return super()._is_brand_required()
def _recompute_payment_terms_lines(self):
- super()._recompute_payment_terms_lines()
+ res = super()._recompute_payment_terms_lines()
if self.brand_id:
pab_model = self.env["res.partner.account.brand"]
company_id = self.company_id.id
@@ -61,6 +61,7 @@ def _recompute_payment_terms_lines(self):
lambda l, a=account_id: l.account_id.user_type_id
== a.user_type_id
).update({"account_id": account_id.id})
+ return res
@api.onchange("brand_id", "invoice_line_ids")
def _onchange_brand_id(self):
diff --git a/account_brand/tests/test_account_analytic_move.py b/account_brand/tests/test_account_analytic_move.py
index 2949e6762..49db9e504 100644
--- a/account_brand/tests/test_account_analytic_move.py
+++ b/account_brand/tests/test_account_analytic_move.py
@@ -1,10 +1,10 @@
# Copyright 2019 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-from odoo.tests.common import SavepointCase
+from odoo.tests.common import TransactionCase
-class TestAccountAnalyticMove(SavepointCase):
+class TestAccountAnalyticMove(TransactionCase):
def setUp(self):
super().setUp()
self.account = self.env["account.account"].create(
diff --git a/account_brand/tests/test_account_move.py b/account_brand/tests/test_account_move.py
index 4854db929..733eccfe8 100644
--- a/account_brand/tests/test_account_move.py
+++ b/account_brand/tests/test_account_move.py
@@ -1,10 +1,10 @@
# Copyright 2019 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-from odoo.tests.common import SavepointCase
+from odoo.tests.common import TransactionCase
-class TestAccountMove(SavepointCase):
+class TestAccountMove(TransactionCase):
def setUp(self):
super(TestAccountMove, self).setUp()
self.product = self.env.ref("product.product_product_4")
From 3079bc4bbac37721527a9924141dabf37309e63e Mon Sep 17 00:00:00 2001
From: oca-ci
Date: Fri, 18 Mar 2022 09:25:35 +0000
Subject: [PATCH 33/52] [UPD] Update account_brand.pot
---
account_brand/i18n/account_brand.pot | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/account_brand/i18n/account_brand.pot b/account_brand/i18n/account_brand.pot
index 0093d3465..0c7260d60 100644
--- a/account_brand/i18n/account_brand.pot
+++ b/account_brand/i18n/account_brand.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"
@@ -59,15 +59,11 @@ msgid "Created on"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields,field_description:account_brand.field_account_move__display_name
-#: model:ir.model.fields,field_description:account_brand.field_account_move_reversal__display_name
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__display_name
msgid "Display Name"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields,field_description:account_brand.field_account_move__id
-#: model:ir.model.fields,field_description:account_brand.field_account_move_reversal__id
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__id
msgid "ID"
msgstr ""
@@ -78,8 +74,6 @@ msgid "Journal Entry"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields,field_description:account_brand.field_account_move____last_update
-#: model:ir.model.fields,field_description:account_brand.field_account_move_reversal____last_update
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand____last_update
msgid "Last Modified on"
msgstr ""
From 4af8e38c83a0ea658e5f37f425f93c58cde84a07 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Fri, 18 Mar 2022 09:27:50 +0000
Subject: [PATCH 34/52] [UPD] README.rst
---
account_brand/README.rst | 10 +++++-----
account_brand/static/description/index.html | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/account_brand/README.rst b/account_brand/README.rst
index 8cfffb7d9..8f8d61aae 100644
--- a/account_brand/README.rst
+++ b/account_brand/README.rst
@@ -14,13 +14,13 @@ Account Brand
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbrand-lightgray.png?logo=github
- :target: https://github.com/OCA/brand/tree/14.0/account_brand
+ :target: https://github.com/OCA/brand/tree/15.0/account_brand
:alt: OCA/brand
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/brand-14-0/brand-14-0-account_brand
+ :target: https://translation.odoo-community.org/projects/brand-15-0/brand-15-0-account_brand
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/284/14.0
+ :target: https://runbot.odoo-community.org/runbot/284/15.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -56,7 +56,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.
@@ -110,6 +110,6 @@ Current `maintainers `__:
|maintainer-osi-scampbell| |maintainer-sbejaoui|
-This module is part of the `OCA/brand `_ project on GitHub.
+This module is part of the `OCA/brand `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/account_brand/static/description/index.html b/account_brand/static/description/index.html
index 8c602c7b4..cec1a10e3 100644
--- a/account_brand/static/description/index.html
+++ b/account_brand/static/description/index.html
@@ -367,7 +367,7 @@ Account Brand
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module allows you to send branded invoices to your customers.
It adds a brand field on the invoice and the brand information to the PDF
report.
@@ -406,7 +406,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 a5b1761db2d7de4e11c78864451fa9c5539eb2ef Mon Sep 17 00:00:00 2001
From: Vimal Patel
Date: Wed, 16 Mar 2022 18:45:20 +0530
Subject: [PATCH 35/52] [IMP]account_brand: If we can't set analytic account in
brand then user can't fill up analytic account on invoice lines
---
account_brand/models/account_move.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/account_brand/models/account_move.py b/account_brand/models/account_move.py
index 318345729..529ec790f 100644
--- a/account_brand/models/account_move.py
+++ b/account_brand/models/account_move.py
@@ -69,7 +69,8 @@ def _onchange_brand_id(self):
for invoice in self:
if invoice.state == "draft" and invoice.brand_id:
account_analytic = invoice.brand_id.analytic_account_id
- invoice.invoice_line_ids.update(
- {"analytic_account_id": account_analytic.id}
- )
+ if account_analytic:
+ invoice.invoice_line_ids.update(
+ {"analytic_account_id": account_analytic.id}
+ )
return res
From 816da83c82dad7b4a066986d70dc03afa96cabc1 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Mon, 21 Mar 2022 18:15:12 +0000
Subject: [PATCH 36/52] account_brand 15.0.1.0.1
---
account_brand/__manifest__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/account_brand/__manifest__.py b/account_brand/__manifest__.py
index e2f689b97..5cb9fddc9 100644
--- a/account_brand/__manifest__.py
+++ b/account_brand/__manifest__.py
@@ -5,7 +5,7 @@
{
"name": "Account Brand",
"summary": "Send branded invoices and refunds",
- "version": "15.0.1.0.0",
+ "version": "15.0.1.0.1",
"category": "Accounting Management",
"website": "https://github.com/OCA/brand",
"author": "Open Source Integrators,"
From 6dbe02fd14e9a3cc28d02d07120d4550e2b2aba9 Mon Sep 17 00:00:00 2001
From: sbejaoui
Date: Mon, 10 Oct 2022 11:11:36 +0200
Subject: [PATCH 37/52] [16.0][MIG] - migration brand & account_brand to 16.0
---
account_brand/__manifest__.py | 4 +-
account_brand/models/account_move.py | 25 +++-------
.../models/res_partner_account_brand.py | 9 ++--
account_brand/tests/__init__.py | 1 -
.../tests/test_account_analytic_move.py | 48 -------------------
account_brand/tests/test_account_move.py | 15 +++---
account_brand/tests/test_brand_mixin.py | 4 +-
7 files changed, 23 insertions(+), 83 deletions(-)
delete mode 100644 account_brand/tests/test_account_analytic_move.py
diff --git a/account_brand/__manifest__.py b/account_brand/__manifest__.py
index 5cb9fddc9..edec0c66e 100644
--- a/account_brand/__manifest__.py
+++ b/account_brand/__manifest__.py
@@ -5,14 +5,14 @@
{
"name": "Account Brand",
"summary": "Send branded invoices and refunds",
- "version": "15.0.1.0.1",
+ "version": "16.0.1.0.0",
"category": "Accounting Management",
"website": "https://github.com/OCA/brand",
"author": "Open Source Integrators,"
"ACSONE SA/NV,"
"Odoo Community Association (OCA)",
"license": "AGPL-3",
- "depends": ["account", "brand", "analytic_brand"],
+ "depends": ["account", "brand"],
"data": [
"views/account_move_views.xml",
"views/res_partner_account_brand.xml",
diff --git a/account_brand/models/account_move.py b/account_brand/models/account_move.py
index 529ec790f..46e8c96d2 100644
--- a/account_brand/models/account_move.py
+++ b/account_brand/models/account_move.py
@@ -24,8 +24,9 @@ def _is_brand_required(self):
return False
return super()._is_brand_required()
- def _recompute_payment_terms_lines(self):
- res = super()._recompute_payment_terms_lines()
+ @api.onchange("partner_id")
+ def _onchange_partner_id(self):
+ res = super()._onchange_partner_id()
if self.brand_id:
pab_model = self.env["res.partner.account.brand"]
company_id = self.company_id.id
@@ -39,7 +40,7 @@ def _recompute_payment_terms_lines(self):
)
if partner:
rec_account = pab_model._get_partner_account_by_brand(
- "receivable", self.brand_id, partner
+ "asset_receivable", self.brand_id, partner
)
rec_account = (
rec_account
@@ -47,7 +48,7 @@ def _recompute_payment_terms_lines(self):
else partner.property_account_receivable_id
)
pay_account = pab_model._get_partner_account_by_brand(
- "payable", self.brand_id, partner
+ "liability_payable", self.brand_id, partner
)
pay_account = (
pay_account if pay_account else partner.property_account_payable_id
@@ -58,19 +59,7 @@ def _recompute_payment_terms_lines(self):
account_id = rec_account
if account_id:
self.line_ids.filtered(
- lambda l, a=account_id: l.account_id.user_type_id
- == a.user_type_id
+ lambda l, a=account_id: l.account_id.account_type
+ == a.account_type
).update({"account_id": account_id.id})
return res
-
- @api.onchange("brand_id", "invoice_line_ids")
- def _onchange_brand_id(self):
- res = super()._onchange_brand_id()
- for invoice in self:
- if invoice.state == "draft" and invoice.brand_id:
- account_analytic = invoice.brand_id.analytic_account_id
- if account_analytic:
- invoice.invoice_line_ids.update(
- {"analytic_account_id": account_analytic.id}
- )
- return res
diff --git a/account_brand/models/res_partner_account_brand.py b/account_brand/models/res_partner_account_brand.py
index 6a2a5e989..6a5fdb42a 100644
--- a/account_brand/models/res_partner_account_brand.py
+++ b/account_brand/models/res_partner_account_brand.py
@@ -19,12 +19,15 @@ class ResPartnerAccountBrand(models.Model):
comodel_name="account.account",
string="Account",
required=True,
- domain="[('user_type_id.type', 'in', ('payable', 'receivable'))]",
+ domain="[('account_type', 'in', ('liability_payable', 'asset_receivable'))]",
)
brand_id = fields.Many2one(comodel_name="res.brand", string="Brand", required=True)
account_type = fields.Selection(
string="Type",
- selection=[("payable", "Payable"), ("receivable", "Receivable")],
+ selection=[
+ ("liability_payable", "Payable"),
+ ("asset_receivable", "Receivable"),
+ ],
required=True,
)
@@ -42,7 +45,7 @@ def _check_account_type(self):
if (
rec.account_id
and rec.account_type
- and rec.account_id.user_type_id.type != rec.account_type
+ and rec.account_id.account_type != rec.account_type
):
raise ValidationError(
_("Please select an account of type %s") % rec.account_type
diff --git a/account_brand/tests/__init__.py b/account_brand/tests/__init__.py
index adad8688d..66f862e41 100644
--- a/account_brand/tests/__init__.py
+++ b/account_brand/tests/__init__.py
@@ -1,3 +1,2 @@
from . import test_brand_mixin
from . import test_account_move
-from . import test_account_analytic_move
diff --git a/account_brand/tests/test_account_analytic_move.py b/account_brand/tests/test_account_analytic_move.py
deleted file mode 100644
index 49db9e504..000000000
--- a/account_brand/tests/test_account_analytic_move.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 2019 ACSONE SA/NV
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-
-from odoo.tests.common import TransactionCase
-
-
-class TestAccountAnalyticMove(TransactionCase):
- def setUp(self):
- super().setUp()
- self.account = self.env["account.account"].create(
- {
- "name": "Test sale",
- "code": "XX_700",
- "user_type_id": self.env.ref("account.data_account_type_revenue").id,
- }
- )
- self.move = self.env["account.move"].create(
- {
- "partner_id": self.env.ref("base.res_partner_12").id,
- "move_type": "out_invoice",
- "invoice_line_ids": [
- (
- 0,
- 0,
- {
- "product_id": self.env.ref("product.product_product_4").id,
- "quantity": 1,
- "price_unit": 42,
- "name": "something",
- "account_id": self.account.id,
- },
- )
- ],
- }
- )
- self.brand_id = self.env["res.brand"].create({"name": "Brand"})
-
- def test_move_analytic_account_onchange_brand(self):
- self.brand_id.analytic_account_id = self.env["account.analytic.account"].create(
- {"name": "analytic account"}
- )
- self.move.brand_id = self.brand_id
- self.assertFalse(self.move.invoice_line_ids.mapped("analytic_account_id"))
- self.move._onchange_brand_id()
- self.assertEqual(
- self.move.invoice_line_ids.mapped("analytic_account_id"),
- self.brand_id.analytic_account_id,
- )
diff --git a/account_brand/tests/test_account_move.py b/account_brand/tests/test_account_move.py
index 733eccfe8..39883ef79 100644
--- a/account_brand/tests/test_account_move.py
+++ b/account_brand/tests/test_account_move.py
@@ -8,12 +8,11 @@ class TestAccountMove(TransactionCase):
def setUp(self):
super(TestAccountMove, self).setUp()
self.product = self.env.ref("product.product_product_4")
- account_receivable_type = self.env.ref("account.data_account_type_receivable")
self.account_receivable = self.env["account.account"].create(
{
"name": "Partner Receivable",
"code": "RCV00",
- "user_type_id": account_receivable_type.id,
+ "account_type": "asset_receivable",
"reconcile": True,
}
)
@@ -21,7 +20,7 @@ def setUp(self):
{
"name": "Receivable Brand Default",
"code": "RCV01",
- "user_type_id": account_receivable_type.id,
+ "account_type": "asset_receivable",
"reconcile": True,
}
)
@@ -31,15 +30,14 @@ def setUp(self):
{
"name": "Receivable Partner Brand Default",
"code": "RCV02",
- "user_type_id": account_receivable_type.id,
+ "account_type": "asset_receivable",
"reconcile": True,
}
)
self.partner_id = self.env.ref("base.res_partner_12")
self.partner_id.property_account_receivable_id = self.account_receivable
- type_revenue = self.env.ref("account.data_account_type_revenue")
self.account_revenue = self.env["account.account"].create(
- {"name": "Test sale", "code": "XX_700", "user_type_id": type_revenue.id}
+ {"name": "Test sale", "code": "XX.700", "account_type": "income"}
)
self.move = self.env["account.move"].create(
{
@@ -64,9 +62,8 @@ def setUp(self):
self.brand_id = self.env["res.brand"].create({"name": "Brand"})
def _get_receivable_account(self, move):
- user_type_receivable = self.env.ref("account.data_account_type_receivable")
return self.move.line_ids.filtered(
- lambda l, u_type=user_type_receivable: l.account_id.user_type_id == u_type
+ lambda l: l.account_id.account_type == "asset_receivable"
).account_id
def test_on_change_partner_id(self):
@@ -78,7 +75,7 @@ def test_on_change_partner_id(self):
"partner_id": False,
"account_id": self.account_receivable_brand_default.id,
"brand_id": self.brand_id.id,
- "account_type": "receivable",
+ "account_type": "asset_receivable",
}
)
self.move._onchange_partner_id()
diff --git a/account_brand/tests/test_brand_mixin.py b/account_brand/tests/test_brand_mixin.py
index 94bcc3cb5..9c8443573 100644
--- a/account_brand/tests/test_brand_mixin.py
+++ b/account_brand/tests/test_brand_mixin.py
@@ -95,8 +95,8 @@ def test_onchange_brand_id(self):
new_invoice._onchange_brand_id()
self.assertEqual(new_invoice.company_id, self.other_company)
- def test_fields_view_get(self):
- view = self.env["account.move"].fields_view_get(
+ def test_get_view(self):
+ view = self.env["account.move"].get_view(
view_id=self.env.ref("account.view_move_form").id,
view_type="form",
)
From ebc2fb268c9619cbdfa2d6a99bbd132591be806a Mon Sep 17 00:00:00 2001
From: oca-ci
Date: Mon, 10 Oct 2022 12:35:22 +0000
Subject: [PATCH 38/52] [UPD] Update account_brand.pot
---
account_brand/i18n/account_brand.pot | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/account_brand/i18n/account_brand.pot b/account_brand/i18n/account_brand.pot
index 0c7260d60..b7ef0f2a7 100644
--- a/account_brand/i18n/account_brand.pot
+++ b/account_brand/i18n/account_brand.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 15.0\n"
+"Project-Id-Version: Odoo Server 16.0beta\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -107,7 +107,7 @@ msgid "Partner has already an account set for this brand!"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__payable
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__liability_payable
msgid "Payable"
msgstr ""
@@ -118,7 +118,7 @@ msgid "Please select an account of type %s"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__receivable
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__asset_receivable
msgid "Receivable"
msgstr ""
From 46bc4f80d906f3fbce8ceff0c8281abec1bbcc9d Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Mon, 10 Oct 2022 12:37:58 +0000
Subject: [PATCH 39/52] [UPD] README.rst
---
account_brand/README.rst | 10 +++++-----
account_brand/static/description/index.html | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/account_brand/README.rst b/account_brand/README.rst
index 8f8d61aae..f07cec270 100644
--- a/account_brand/README.rst
+++ b/account_brand/README.rst
@@ -14,13 +14,13 @@ Account Brand
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbrand-lightgray.png?logo=github
- :target: https://github.com/OCA/brand/tree/15.0/account_brand
+ :target: https://github.com/OCA/brand/tree/16.0/account_brand
:alt: OCA/brand
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/brand-15-0/brand-15-0-account_brand
+ :target: https://translation.odoo-community.org/projects/brand-16-0/brand-16-0-account_brand
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/284/15.0
+ :target: https://runbot.odoo-community.org/runbot/284/16.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -56,7 +56,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.
@@ -110,6 +110,6 @@ Current `maintainers `__:
|maintainer-osi-scampbell| |maintainer-sbejaoui|
-This module is part of the `OCA/brand `_ project on GitHub.
+This module is part of the `OCA/brand `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/account_brand/static/description/index.html b/account_brand/static/description/index.html
index cec1a10e3..2aa48d0ba 100644
--- a/account_brand/static/description/index.html
+++ b/account_brand/static/description/index.html
@@ -367,7 +367,7 @@ Account Brand
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module allows you to send branded invoices to your customers.
It adds a brand field on the invoice and the brand information to the PDF
report.
@@ -406,7 +406,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 4448eb8db3efa9984123f27d350314532d3e923d Mon Sep 17 00:00:00 2001
From: oca-ci
Date: Fri, 14 Oct 2022 13:25:58 +0000
Subject: [PATCH 40/52] [UPD] Update account_brand.pot
---
account_brand/i18n/account_brand.pot | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/account_brand/i18n/account_brand.pot b/account_brand/i18n/account_brand.pot
index b7ef0f2a7..c7d1f0785 100644
--- a/account_brand/i18n/account_brand.pot
+++ b/account_brand/i18n/account_brand.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 16.0beta\n"
+"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
From 25802923fcba09adf117de2484dc499c0f5b4b8e Mon Sep 17 00:00:00 2001
From: Weblate
Date: Fri, 14 Oct 2022 13:26:08 +0000
Subject: [PATCH 41/52] Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: brand-16.0/brand-16.0-account_brand
Translate-URL: https://translation.odoo-community.org/projects/brand-16-0/brand-16-0-account_brand/
---
account_brand/i18n/de.po | 20 +++++++++++++++++---
account_brand/i18n/es.po | 20 +++++++++++++++++---
account_brand/i18n/hr.po | 20 +++++++++++++++++---
account_brand/i18n/nl.po | 25 +++++++++++++++++++++----
account_brand/i18n/zh_CN.po | 20 +++++++++++++++++---
5 files changed, 89 insertions(+), 16 deletions(-)
diff --git a/account_brand/i18n/de.po b/account_brand/i18n/de.po
index c35419489..13b64b14c 100644
--- a/account_brand/i18n/de.po
+++ b/account_brand/i18n/de.po
@@ -27,16 +27,30 @@ msgid "Account Move Reversal"
msgstr ""
#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_bank_statement_line__brand_id
#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_id
+#: model:ir.model.fields,field_description:account_brand.field_account_payment__brand_id
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__brand_id
msgid "Brand"
msgstr "Marke"
#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_use_level
+msgid "Brand Use Level"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,help:account_brand.field_account_bank_statement_line__brand_id
#: model:ir.model.fields,help:account_brand.field_account_move__brand_id
+#: model:ir.model.fields,help:account_brand.field_account_payment__brand_id
msgid "Brand to use for this sale"
msgstr "zu verwendende Marke für diesen Verkauf"
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__company_id
+msgid "Company"
+msgstr ""
+
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_uid
msgid "Created by"
@@ -59,7 +73,7 @@ msgstr ""
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_move
-msgid "Journal Entries"
+msgid "Journal Entry"
msgstr ""
#. module: account_brand
@@ -96,7 +110,7 @@ msgid "Partner has already an account set for this brand!"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__payable
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__liability_payable
msgid "Payable"
msgstr ""
@@ -107,7 +121,7 @@ msgid "Please select an account of type %s"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__receivable
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__asset_receivable
msgid "Receivable"
msgstr ""
diff --git a/account_brand/i18n/es.po b/account_brand/i18n/es.po
index 5a9c02afc..c019ed636 100644
--- a/account_brand/i18n/es.po
+++ b/account_brand/i18n/es.po
@@ -27,16 +27,30 @@ msgid "Account Move Reversal"
msgstr ""
#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_bank_statement_line__brand_id
#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_id
+#: model:ir.model.fields,field_description:account_brand.field_account_payment__brand_id
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__brand_id
msgid "Brand"
msgstr "Marca"
#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_use_level
+msgid "Brand Use Level"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,help:account_brand.field_account_bank_statement_line__brand_id
#: model:ir.model.fields,help:account_brand.field_account_move__brand_id
+#: model:ir.model.fields,help:account_brand.field_account_payment__brand_id
msgid "Brand to use for this sale"
msgstr "Marca a usar en esta venta"
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__company_id
+msgid "Company"
+msgstr ""
+
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_uid
msgid "Created by"
@@ -59,7 +73,7 @@ msgstr ""
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_move
-msgid "Journal Entries"
+msgid "Journal Entry"
msgstr ""
#. module: account_brand
@@ -96,7 +110,7 @@ msgid "Partner has already an account set for this brand!"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__payable
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__liability_payable
msgid "Payable"
msgstr ""
@@ -107,7 +121,7 @@ msgid "Please select an account of type %s"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__receivable
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__asset_receivable
msgid "Receivable"
msgstr ""
diff --git a/account_brand/i18n/hr.po b/account_brand/i18n/hr.po
index b0495828e..8adfafe43 100644
--- a/account_brand/i18n/hr.po
+++ b/account_brand/i18n/hr.po
@@ -28,16 +28,30 @@ msgid "Account Move Reversal"
msgstr ""
#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_bank_statement_line__brand_id
#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_id
+#: model:ir.model.fields,field_description:account_brand.field_account_payment__brand_id
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__brand_id
msgid "Brand"
msgstr "Brand"
#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_use_level
+msgid "Brand Use Level"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,help:account_brand.field_account_bank_statement_line__brand_id
#: model:ir.model.fields,help:account_brand.field_account_move__brand_id
+#: model:ir.model.fields,help:account_brand.field_account_payment__brand_id
msgid "Brand to use for this sale"
msgstr ""
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__company_id
+msgid "Company"
+msgstr ""
+
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_uid
msgid "Created by"
@@ -60,7 +74,7 @@ msgstr ""
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_move
-msgid "Journal Entries"
+msgid "Journal Entry"
msgstr ""
#. module: account_brand
@@ -97,7 +111,7 @@ msgid "Partner has already an account set for this brand!"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__payable
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__liability_payable
msgid "Payable"
msgstr ""
@@ -108,7 +122,7 @@ msgid "Please select an account of type %s"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__receivable
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__asset_receivable
msgid "Receivable"
msgstr ""
diff --git a/account_brand/i18n/nl.po b/account_brand/i18n/nl.po
index 9cd100c18..c46c69aa7 100644
--- a/account_brand/i18n/nl.po
+++ b/account_brand/i18n/nl.po
@@ -27,16 +27,30 @@ msgid "Account Move Reversal"
msgstr ""
#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_bank_statement_line__brand_id
#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_id
+#: model:ir.model.fields,field_description:account_brand.field_account_payment__brand_id
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__brand_id
msgid "Brand"
msgstr "Merk"
#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_use_level
+msgid "Brand Use Level"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,help:account_brand.field_account_bank_statement_line__brand_id
#: model:ir.model.fields,help:account_brand.field_account_move__brand_id
+#: model:ir.model.fields,help:account_brand.field_account_payment__brand_id
msgid "Brand to use for this sale"
msgstr "Merk voor deze verkoop"
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__company_id
+msgid "Company"
+msgstr ""
+
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_uid
msgid "Created by"
@@ -59,8 +73,8 @@ msgstr "ID"
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_move
-msgid "Journal Entries"
-msgstr "Journaal ingave"
+msgid "Journal Entry"
+msgstr ""
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand____last_update
@@ -96,7 +110,7 @@ msgid "Partner has already an account set for this brand!"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__payable
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__liability_payable
msgid "Payable"
msgstr "Te betalen"
@@ -107,7 +121,7 @@ msgid "Please select an account of type %s"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__receivable
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__asset_receivable
msgid "Receivable"
msgstr ""
@@ -120,3 +134,6 @@ msgstr ""
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_type
msgid "Type"
msgstr "Type"
+
+#~ msgid "Journal Entries"
+#~ msgstr "Journaal ingave"
diff --git a/account_brand/i18n/zh_CN.po b/account_brand/i18n/zh_CN.po
index dc401f696..6bed6f43c 100644
--- a/account_brand/i18n/zh_CN.po
+++ b/account_brand/i18n/zh_CN.po
@@ -27,16 +27,30 @@ msgid "Account Move Reversal"
msgstr ""
#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_bank_statement_line__brand_id
#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_id
+#: model:ir.model.fields,field_description:account_brand.field_account_payment__brand_id
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__brand_id
msgid "Brand"
msgstr "品牌"
#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_use_level
+msgid "Brand Use Level"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,help:account_brand.field_account_bank_statement_line__brand_id
#: model:ir.model.fields,help:account_brand.field_account_move__brand_id
+#: model:ir.model.fields,help:account_brand.field_account_payment__brand_id
msgid "Brand to use for this sale"
msgstr ""
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__company_id
+msgid "Company"
+msgstr ""
+
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_uid
msgid "Created by"
@@ -59,7 +73,7 @@ msgstr ""
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_move
-msgid "Journal Entries"
+msgid "Journal Entry"
msgstr ""
#. module: account_brand
@@ -96,7 +110,7 @@ msgid "Partner has already an account set for this brand!"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__payable
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__liability_payable
msgid "Payable"
msgstr ""
@@ -107,7 +121,7 @@ msgid "Please select an account of type %s"
msgstr ""
#. module: account_brand
-#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__receivable
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__asset_receivable
msgid "Receivable"
msgstr ""
From a4318189530b08ae6bf3720e856a0988d34ef4c7 Mon Sep 17 00:00:00 2001
From: Maria Sparenberg
Date: Fri, 4 Nov 2022 11:11:29 +0000
Subject: [PATCH 42/52] Translated using Weblate (German)
Currently translated at 86.3% (19 of 22 strings)
Translation: brand-16.0/brand-16.0-account_brand
Translate-URL: https://translation.odoo-community.org/projects/brand-16-0/brand-16-0-account_brand/de/
---
account_brand/i18n/de.po | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/account_brand/i18n/de.po b/account_brand/i18n/de.po
index 13b64b14c..3574934e4 100644
--- a/account_brand/i18n/de.po
+++ b/account_brand/i18n/de.po
@@ -6,20 +6,20 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2020-07-01 22:19+0000\n"
-"Last-Translator: Peter Schubert \n"
+"PO-Revision-Date: 2022-11-04 13:45+0000\n"
+"Last-Translator: Maria Sparenberg \n"
"Language-Team: none\n"
"Language: de\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.14.1\n"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_id
msgid "Account"
-msgstr ""
+msgstr "Konto"
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_move_reversal
@@ -49,52 +49,52 @@ msgstr "zu verwendende Marke für diesen Verkauf"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_account_move__company_id
msgid "Company"
-msgstr ""
+msgstr "Unternehmen"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_uid
msgid "Created by"
-msgstr ""
+msgstr "Erstellt von"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_date
msgid "Created on"
-msgstr ""
+msgstr "Erstellt am"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__display_name
msgid "Display Name"
-msgstr ""
+msgstr "Anzeigename"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__id
msgid "ID"
-msgstr ""
+msgstr "ID"
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_move
msgid "Journal Entry"
-msgstr ""
+msgstr "Buchungssatz"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand____last_update
msgid "Last Modified on"
-msgstr ""
+msgstr "Zuletzt geändert am"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_uid
msgid "Last Updated by"
-msgstr ""
+msgstr "Zuletzt aktualisiert von"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_date
msgid "Last Updated on"
-msgstr ""
+msgstr "Zuletzt aktualisiert am"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__partner_id
msgid "Partner"
-msgstr ""
+msgstr "Partner"
#. module: account_brand
#: model:ir.actions.act_window,name:account_brand.res_partner_account_brand_act_window
@@ -107,33 +107,33 @@ msgstr ""
#: model:ir.model.constraint,message:account_brand.constraint_res_partner_account_brand_unique_account_by_partner
#, python-format
msgid "Partner has already an account set for this brand!"
-msgstr ""
+msgstr "Der Partner hat für diese Marke bereits ein Konto!"
#. module: account_brand
#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__liability_payable
msgid "Payable"
-msgstr ""
+msgstr "Kreditor"
#. module: account_brand
#: code:addons/account_brand/models/res_partner_account_brand.py:0
#, python-format
msgid "Please select an account of type %s"
-msgstr ""
+msgstr "Bitte ein Konto vom Typ %s wählen."
#. module: account_brand
#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__asset_receivable
msgid "Receivable"
-msgstr ""
+msgstr "Debitor"
#. module: account_brand
#: model:ir.model,name:account_brand.model_res_partner_account_brand
msgid "Receivable/Payable Partner Account By Brand"
-msgstr ""
+msgstr "Debitoren-/Kreditorenkonto nach Marke"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_type
msgid "Type"
-msgstr ""
+msgstr "Typ"
#~ msgid "Invoice"
#~ msgstr "Rechnung"
From 5c12db2a6dcddf3f2cc249ca71ac4b7aa15a7d6f Mon Sep 17 00:00:00 2001
From: oca-ci
Date: Tue, 29 Nov 2022 17:53:18 +0000
Subject: [PATCH 43/52] [UPD] Update account_brand.pot
---
account_brand/i18n/account_brand.pot | 2 ++
1 file changed, 2 insertions(+)
diff --git a/account_brand/i18n/account_brand.pot b/account_brand/i18n/account_brand.pot
index c7d1f0785..d92368954 100644
--- a/account_brand/i18n/account_brand.pot
+++ b/account_brand/i18n/account_brand.pot
@@ -100,6 +100,7 @@ msgid "Partner Accounts by Brand"
msgstr ""
#. module: account_brand
+#. odoo-python
#: code:addons/account_brand/models/res_partner_account_brand.py:0
#: model:ir.model.constraint,message:account_brand.constraint_res_partner_account_brand_unique_account_by_partner
#, python-format
@@ -112,6 +113,7 @@ msgid "Payable"
msgstr ""
#. module: account_brand
+#. odoo-python
#: code:addons/account_brand/models/res_partner_account_brand.py:0
#, python-format
msgid "Please select an account of type %s"
From a089630fa92f49e621ae6852db660272ae429fc3 Mon Sep 17 00:00:00 2001
From: Weblate
Date: Tue, 29 Nov 2022 17:53:25 +0000
Subject: [PATCH 44/52] Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: brand-16.0/brand-16.0-account_brand
Translate-URL: https://translation.odoo-community.org/projects/brand-16-0/brand-16-0-account_brand/
---
account_brand/i18n/de.po | 2 ++
account_brand/i18n/es.po | 2 ++
account_brand/i18n/hr.po | 2 ++
account_brand/i18n/nl.po | 2 ++
account_brand/i18n/zh_CN.po | 2 ++
5 files changed, 10 insertions(+)
diff --git a/account_brand/i18n/de.po b/account_brand/i18n/de.po
index 3574934e4..9c3643b12 100644
--- a/account_brand/i18n/de.po
+++ b/account_brand/i18n/de.po
@@ -103,6 +103,7 @@ msgid "Partner Accounts by Brand"
msgstr ""
#. module: account_brand
+#. odoo-python
#: code:addons/account_brand/models/res_partner_account_brand.py:0
#: model:ir.model.constraint,message:account_brand.constraint_res_partner_account_brand_unique_account_by_partner
#, python-format
@@ -115,6 +116,7 @@ msgid "Payable"
msgstr "Kreditor"
#. module: account_brand
+#. odoo-python
#: code:addons/account_brand/models/res_partner_account_brand.py:0
#, python-format
msgid "Please select an account of type %s"
diff --git a/account_brand/i18n/es.po b/account_brand/i18n/es.po
index c019ed636..a93701e39 100644
--- a/account_brand/i18n/es.po
+++ b/account_brand/i18n/es.po
@@ -103,6 +103,7 @@ msgid "Partner Accounts by Brand"
msgstr ""
#. module: account_brand
+#. odoo-python
#: code:addons/account_brand/models/res_partner_account_brand.py:0
#: model:ir.model.constraint,message:account_brand.constraint_res_partner_account_brand_unique_account_by_partner
#, python-format
@@ -115,6 +116,7 @@ msgid "Payable"
msgstr ""
#. module: account_brand
+#. odoo-python
#: code:addons/account_brand/models/res_partner_account_brand.py:0
#, python-format
msgid "Please select an account of type %s"
diff --git a/account_brand/i18n/hr.po b/account_brand/i18n/hr.po
index 8adfafe43..0c9eb9f9a 100644
--- a/account_brand/i18n/hr.po
+++ b/account_brand/i18n/hr.po
@@ -104,6 +104,7 @@ msgid "Partner Accounts by Brand"
msgstr ""
#. module: account_brand
+#. odoo-python
#: code:addons/account_brand/models/res_partner_account_brand.py:0
#: model:ir.model.constraint,message:account_brand.constraint_res_partner_account_brand_unique_account_by_partner
#, python-format
@@ -116,6 +117,7 @@ msgid "Payable"
msgstr ""
#. module: account_brand
+#. odoo-python
#: code:addons/account_brand/models/res_partner_account_brand.py:0
#, python-format
msgid "Please select an account of type %s"
diff --git a/account_brand/i18n/nl.po b/account_brand/i18n/nl.po
index c46c69aa7..77e5aa9fa 100644
--- a/account_brand/i18n/nl.po
+++ b/account_brand/i18n/nl.po
@@ -103,6 +103,7 @@ msgid "Partner Accounts by Brand"
msgstr ""
#. module: account_brand
+#. odoo-python
#: code:addons/account_brand/models/res_partner_account_brand.py:0
#: model:ir.model.constraint,message:account_brand.constraint_res_partner_account_brand_unique_account_by_partner
#, python-format
@@ -115,6 +116,7 @@ msgid "Payable"
msgstr "Te betalen"
#. module: account_brand
+#. odoo-python
#: code:addons/account_brand/models/res_partner_account_brand.py:0
#, python-format
msgid "Please select an account of type %s"
diff --git a/account_brand/i18n/zh_CN.po b/account_brand/i18n/zh_CN.po
index 6bed6f43c..85f3be330 100644
--- a/account_brand/i18n/zh_CN.po
+++ b/account_brand/i18n/zh_CN.po
@@ -103,6 +103,7 @@ msgid "Partner Accounts by Brand"
msgstr ""
#. module: account_brand
+#. odoo-python
#: code:addons/account_brand/models/res_partner_account_brand.py:0
#: model:ir.model.constraint,message:account_brand.constraint_res_partner_account_brand_unique_account_by_partner
#, python-format
@@ -115,6 +116,7 @@ msgid "Payable"
msgstr ""
#. module: account_brand
+#. odoo-python
#: code:addons/account_brand/models/res_partner_account_brand.py:0
#, python-format
msgid "Please select an account of type %s"
From db3f8c323bfa028ea6f13a188ec2ad83034a2c30 Mon Sep 17 00:00:00 2001
From: Bole
Date: Fri, 6 Jan 2023 11:10:42 +0000
Subject: [PATCH 45/52] Translated using Weblate (Croatian)
Currently translated at 72.7% (16 of 22 strings)
Translation: brand-16.0/brand-16.0-account_brand
Translate-URL: https://translation.odoo-community.org/projects/brand-16-0/brand-16-0-account_brand/hr/
---
account_brand/i18n/hr.po | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/account_brand/i18n/hr.po b/account_brand/i18n/hr.po
index 0c9eb9f9a..a71687e3a 100644
--- a/account_brand/i18n/hr.po
+++ b/account_brand/i18n/hr.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2019-11-13 15:34+0000\n"
+"PO-Revision-Date: 2023-01-06 13:44+0000\n"
"Last-Translator: Bole \n"
"Language-Team: none\n"
"Language: hr\n"
@@ -15,12 +15,12 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 3.8\n"
+"X-Generator: Weblate 4.14.1\n"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_id
msgid "Account"
-msgstr ""
+msgstr "Konto"
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_move_reversal
@@ -45,47 +45,47 @@ msgstr ""
#: model:ir.model.fields,help:account_brand.field_account_move__brand_id
#: model:ir.model.fields,help:account_brand.field_account_payment__brand_id
msgid "Brand to use for this sale"
-msgstr ""
+msgstr "Brand za ovu prodaju"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_account_move__company_id
msgid "Company"
-msgstr ""
+msgstr "Tvrtka"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_uid
msgid "Created by"
-msgstr ""
+msgstr "Kreirao"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_date
msgid "Created on"
-msgstr ""
+msgstr "Kreirano"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__display_name
msgid "Display Name"
-msgstr ""
+msgstr "Naziv za prikaz"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__id
msgid "ID"
-msgstr ""
+msgstr "ID"
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_move
msgid "Journal Entry"
-msgstr ""
+msgstr "Stavka dnevnika"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand____last_update
msgid "Last Modified on"
-msgstr ""
+msgstr "Zadnje modificirano"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_uid
msgid "Last Updated by"
-msgstr ""
+msgstr "Zadnje ažurirano"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_date
@@ -109,24 +109,24 @@ msgstr ""
#: model:ir.model.constraint,message:account_brand.constraint_res_partner_account_brand_unique_account_by_partner
#, python-format
msgid "Partner has already an account set for this brand!"
-msgstr ""
+msgstr "Partner već ima postavljen konto za ovaj brand!"
#. module: account_brand
#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__liability_payable
msgid "Payable"
-msgstr ""
+msgstr "Dugovno"
#. module: account_brand
#. odoo-python
#: code:addons/account_brand/models/res_partner_account_brand.py:0
#, python-format
msgid "Please select an account of type %s"
-msgstr ""
+msgstr "Molimo odaberite konto tipa %s"
#. module: account_brand
#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__asset_receivable
msgid "Receivable"
-msgstr ""
+msgstr "Potražno"
#. module: account_brand
#: model:ir.model,name:account_brand.model_res_partner_account_brand
@@ -136,7 +136,7 @@ msgstr ""
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_type
msgid "Type"
-msgstr ""
+msgstr "Tip"
#~ msgid "Invoice"
#~ msgstr "Račun"
From 49df01d4ea0c0b11b472d2a214b4fd0d707c4ccc Mon Sep 17 00:00:00 2001
From: Bole
Date: Thu, 16 Feb 2023 12:12:32 +0000
Subject: [PATCH 46/52] Translated using Weblate (Croatian)
Currently translated at 100.0% (22 of 22 strings)
Translation: brand-16.0/brand-16.0-account_brand
Translate-URL: https://translation.odoo-community.org/projects/brand-16-0/brand-16-0-account_brand/hr/
---
account_brand/i18n/hr.po | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/account_brand/i18n/hr.po b/account_brand/i18n/hr.po
index a71687e3a..7308ce362 100644
--- a/account_brand/i18n/hr.po
+++ b/account_brand/i18n/hr.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2023-01-06 13:44+0000\n"
+"PO-Revision-Date: 2023-02-16 14:23+0000\n"
"Last-Translator: Bole \n"
"Language-Team: none\n"
"Language: hr\n"
@@ -25,7 +25,7 @@ msgstr "Konto"
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_move_reversal
msgid "Account Move Reversal"
-msgstr ""
+msgstr "Storno temeljnice"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_account_bank_statement_line__brand_id
@@ -38,7 +38,7 @@ msgstr "Brand"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_use_level
msgid "Brand Use Level"
-msgstr ""
+msgstr "Razina uporabe brenda"
#. module: account_brand
#: model:ir.model.fields,help:account_brand.field_account_bank_statement_line__brand_id
@@ -90,18 +90,18 @@ msgstr "Zadnje ažurirano"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_date
msgid "Last Updated on"
-msgstr ""
+msgstr "Zadnje ažurirano"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__partner_id
msgid "Partner"
-msgstr ""
+msgstr "Partner"
#. module: account_brand
#: model:ir.actions.act_window,name:account_brand.res_partner_account_brand_act_window
#: model:ir.ui.menu,name:account_brand.res_partner_account_brand_menu
msgid "Partner Accounts by Brand"
-msgstr ""
+msgstr "Konta partnera po brendu"
#. module: account_brand
#. odoo-python
@@ -131,7 +131,7 @@ msgstr "Potražno"
#. module: account_brand
#: model:ir.model,name:account_brand.model_res_partner_account_brand
msgid "Receivable/Payable Partner Account By Brand"
-msgstr ""
+msgstr "Potražna/Dugovna konta partnera po brendu"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_type
From ed18927c9a2f93c10df7850cd8f6f69a48486d60 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?gelo=20joga=20Rodr=C3=ADguez?=
Date: Thu, 4 May 2023 06:57:06 +0000
Subject: [PATCH 47/52] Translated using Weblate (Spanish)
Currently translated at 100.0% (22 of 22 strings)
Translation: brand-16.0/brand-16.0-account_brand
Translate-URL: https://translation.odoo-community.org/projects/brand-16-0/brand-16-0-account_brand/es/
---
account_brand/i18n/es.po | 46 ++++++++++++++++++++--------------------
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/account_brand/i18n/es.po b/account_brand/i18n/es.po
index a93701e39..cffde24a8 100644
--- a/account_brand/i18n/es.po
+++ b/account_brand/i18n/es.po
@@ -6,25 +6,25 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2020-05-22 09:19+0000\n"
-"Last-Translator: Daniel Luque \n"
+"PO-Revision-Date: 2023-05-04 12:19+0000\n"
+"Last-Translator: gelo joga Rodríguez \n"
"Language-Team: none\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.14.1\n"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_id
msgid "Account"
-msgstr ""
+msgstr "Cuenta"
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_move_reversal
msgid "Account Move Reversal"
-msgstr ""
+msgstr "Asiento de reversión"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_account_bank_statement_line__brand_id
@@ -37,7 +37,7 @@ msgstr "Marca"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_use_level
msgid "Brand Use Level"
-msgstr ""
+msgstr "Uso del campo Marca"
#. module: account_brand
#: model:ir.model.fields,help:account_brand.field_account_bank_statement_line__brand_id
@@ -49,58 +49,58 @@ msgstr "Marca a usar en esta venta"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_account_move__company_id
msgid "Company"
-msgstr ""
+msgstr "Compañía"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_uid
msgid "Created by"
-msgstr ""
+msgstr "Creado por"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_date
msgid "Created on"
-msgstr ""
+msgstr "Creado el"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__display_name
msgid "Display Name"
-msgstr ""
+msgstr "Nombre mostrado"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__id
msgid "ID"
-msgstr ""
+msgstr "ID"
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_move
msgid "Journal Entry"
-msgstr ""
+msgstr "Asiento contable"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand____last_update
msgid "Last Modified on"
-msgstr ""
+msgstr "Última modificación el"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_uid
msgid "Last Updated by"
-msgstr ""
+msgstr "Última actualización por"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_date
msgid "Last Updated on"
-msgstr ""
+msgstr "Última actualización el"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__partner_id
msgid "Partner"
-msgstr ""
+msgstr "Partner"
#. module: account_brand
#: model:ir.actions.act_window,name:account_brand.res_partner_account_brand_act_window
#: model:ir.ui.menu,name:account_brand.res_partner_account_brand_menu
msgid "Partner Accounts by Brand"
-msgstr ""
+msgstr "Cuentas de clientes/proveedores por marca"
#. module: account_brand
#. odoo-python
@@ -108,34 +108,34 @@ msgstr ""
#: model:ir.model.constraint,message:account_brand.constraint_res_partner_account_brand_unique_account_by_partner
#, python-format
msgid "Partner has already an account set for this brand!"
-msgstr ""
+msgstr "¡El cliente/proveedor ya tiene establecida una cuenta para esta marca!"
#. module: account_brand
#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__liability_payable
msgid "Payable"
-msgstr ""
+msgstr "A pagar"
#. module: account_brand
#. odoo-python
#: code:addons/account_brand/models/res_partner_account_brand.py:0
#, python-format
msgid "Please select an account of type %s"
-msgstr ""
+msgstr "Por favor selecciona una cuenta de tipo %s"
#. module: account_brand
#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__asset_receivable
msgid "Receivable"
-msgstr ""
+msgstr "Por cobrar"
#. module: account_brand
#: model:ir.model,name:account_brand.model_res_partner_account_brand
msgid "Receivable/Payable Partner Account By Brand"
-msgstr ""
+msgstr "Cuentas Por Cobrar/A Pagar de clientes y proveedores por marca"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_type
msgid "Type"
-msgstr ""
+msgstr "Tipo"
#~ msgid "Invoice"
#~ msgstr "Factura"
From 78c7bd5f812fb0da08d355c42a3ce9c769f88d9e Mon Sep 17 00:00:00 2001
From: Ignacio Buioli
Date: Sun, 25 Jun 2023 15:23:51 +0000
Subject: [PATCH 48/52] Added translation using Weblate (Spanish (Argentina))
---
account_brand/i18n/es_AR.po | 136 ++++++++++++++++++++++++++++++++++++
1 file changed, 136 insertions(+)
create mode 100644 account_brand/i18n/es_AR.po
diff --git a/account_brand/i18n/es_AR.po b/account_brand/i18n/es_AR.po
new file mode 100644
index 000000000..faf2efdf4
--- /dev/null
+++ b/account_brand/i18n/es_AR.po
@@ -0,0 +1,136 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * account_brand
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 16.0\n"
+"Report-Msgid-Bugs-To: \n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"Language: es_AR\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"
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_id
+msgid "Account"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model,name:account_brand.model_account_move_reversal
+msgid "Account Move Reversal"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_bank_statement_line__brand_id
+#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_id
+#: model:ir.model.fields,field_description:account_brand.field_account_payment__brand_id
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__brand_id
+msgid "Brand"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_use_level
+msgid "Brand Use Level"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,help:account_brand.field_account_bank_statement_line__brand_id
+#: model:ir.model.fields,help:account_brand.field_account_move__brand_id
+#: model:ir.model.fields,help:account_brand.field_account_payment__brand_id
+msgid "Brand to use for this sale"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_account_move__company_id
+msgid "Company"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_uid
+msgid "Created by"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_date
+msgid "Created on"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__id
+msgid "ID"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model,name:account_brand.model_account_move
+msgid "Journal Entry"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand____last_update
+msgid "Last Modified on"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_uid
+msgid "Last Updated by"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_date
+msgid "Last Updated on"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__partner_id
+msgid "Partner"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.actions.act_window,name:account_brand.res_partner_account_brand_act_window
+#: model:ir.ui.menu,name:account_brand.res_partner_account_brand_menu
+msgid "Partner Accounts by Brand"
+msgstr ""
+
+#. module: account_brand
+#. odoo-python
+#: code:addons/account_brand/models/res_partner_account_brand.py:0
+#: model:ir.model.constraint,message:account_brand.constraint_res_partner_account_brand_unique_account_by_partner
+#, python-format
+msgid "Partner has already an account set for this brand!"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__liability_payable
+msgid "Payable"
+msgstr ""
+
+#. module: account_brand
+#. odoo-python
+#: code:addons/account_brand/models/res_partner_account_brand.py:0
+#, python-format
+msgid "Please select an account of type %s"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__asset_receivable
+msgid "Receivable"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model,name:account_brand.model_res_partner_account_brand
+msgid "Receivable/Payable Partner Account By Brand"
+msgstr ""
+
+#. module: account_brand
+#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_type
+msgid "Type"
+msgstr ""
From fab13f806a448fee9812b587a9d1568e2592f58b Mon Sep 17 00:00:00 2001
From: Ignacio Buioli
Date: Sun, 25 Jun 2023 15:24:34 +0000
Subject: [PATCH 49/52] Translated using Weblate (Spanish (Argentina))
Currently translated at 100.0% (22 of 22 strings)
Translation: brand-16.0/brand-16.0-account_brand
Translate-URL: https://translation.odoo-community.org/projects/brand-16-0/brand-16-0-account_brand/es_AR/
---
account_brand/i18n/es_AR.po | 48 +++++++++++++++++++------------------
1 file changed, 25 insertions(+), 23 deletions(-)
diff --git a/account_brand/i18n/es_AR.po b/account_brand/i18n/es_AR.po
index faf2efdf4..dd8da324c 100644
--- a/account_brand/i18n/es_AR.po
+++ b/account_brand/i18n/es_AR.po
@@ -6,23 +6,25 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2023-06-25 15:26+0000\n"
+"Last-Translator: Ignacio Buioli \n"
"Language-Team: none\n"
"Language: es_AR\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 4.17\n"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_id
msgid "Account"
-msgstr ""
+msgstr "Cuenta"
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_move_reversal
msgid "Account Move Reversal"
-msgstr ""
+msgstr "Reversión de Movimiento de Cuenta"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_account_bank_statement_line__brand_id
@@ -30,75 +32,75 @@ msgstr ""
#: model:ir.model.fields,field_description:account_brand.field_account_payment__brand_id
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__brand_id
msgid "Brand"
-msgstr ""
+msgstr "Marca"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_account_move__brand_use_level
msgid "Brand Use Level"
-msgstr ""
+msgstr "Nivel de Uso de Marca"
#. module: account_brand
#: model:ir.model.fields,help:account_brand.field_account_bank_statement_line__brand_id
#: model:ir.model.fields,help:account_brand.field_account_move__brand_id
#: model:ir.model.fields,help:account_brand.field_account_payment__brand_id
msgid "Brand to use for this sale"
-msgstr ""
+msgstr "Marca a utilizar para este venta"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_account_move__company_id
msgid "Company"
-msgstr ""
+msgstr "Compañía"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_uid
msgid "Created by"
-msgstr ""
+msgstr "Creado por"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__create_date
msgid "Created on"
-msgstr ""
+msgstr "Creado el"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__display_name
msgid "Display Name"
-msgstr ""
+msgstr "Nombre Mostrado"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__id
msgid "ID"
-msgstr ""
+msgstr "ID"
#. module: account_brand
#: model:ir.model,name:account_brand.model_account_move
msgid "Journal Entry"
-msgstr ""
+msgstr "Asiento Contable"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand____last_update
msgid "Last Modified on"
-msgstr ""
+msgstr "Última modificación el"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_uid
msgid "Last Updated by"
-msgstr ""
+msgstr "Última actualización por"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__write_date
msgid "Last Updated on"
-msgstr ""
+msgstr "Última modificación el"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__partner_id
msgid "Partner"
-msgstr ""
+msgstr "Contacto"
#. module: account_brand
#: model:ir.actions.act_window,name:account_brand.res_partner_account_brand_act_window
#: model:ir.ui.menu,name:account_brand.res_partner_account_brand_menu
msgid "Partner Accounts by Brand"
-msgstr ""
+msgstr "Cuentas de Contacto por Marca"
#. module: account_brand
#. odoo-python
@@ -106,31 +108,31 @@ msgstr ""
#: model:ir.model.constraint,message:account_brand.constraint_res_partner_account_brand_unique_account_by_partner
#, python-format
msgid "Partner has already an account set for this brand!"
-msgstr ""
+msgstr "¡El contacto ya tiene una cuenta configurada para esta marca!"
#. module: account_brand
#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__liability_payable
msgid "Payable"
-msgstr ""
+msgstr "A Pagar"
#. module: account_brand
#. odoo-python
#: code:addons/account_brand/models/res_partner_account_brand.py:0
#, python-format
msgid "Please select an account of type %s"
-msgstr ""
+msgstr "Por favor, selecciones una cuenta de tipo %s"
#. module: account_brand
#: model:ir.model.fields.selection,name:account_brand.selection__res_partner_account_brand__account_type__asset_receivable
msgid "Receivable"
-msgstr ""
+msgstr "A Cobrar"
#. module: account_brand
#: model:ir.model,name:account_brand.model_res_partner_account_brand
msgid "Receivable/Payable Partner Account By Brand"
-msgstr ""
+msgstr "Cuenta de contacto a Cobrar/Pagar por Marca"
#. module: account_brand
#: model:ir.model.fields,field_description:account_brand.field_res_partner_account_brand__account_type
msgid "Type"
-msgstr ""
+msgstr "Tipo"
From b08bf5150c56821c660103db528a76f359b5b35a Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Sun, 3 Sep 2023 11:54:35 +0000
Subject: [PATCH 50/52] [UPD] README.rst
---
account_brand/README.rst | 15 ++++---
account_brand/static/description/index.html | 48 +++++++++++----------
2 files changed, 34 insertions(+), 29 deletions(-)
diff --git a/account_brand/README.rst b/account_brand/README.rst
index f07cec270..c38025d87 100644
--- a/account_brand/README.rst
+++ b/account_brand/README.rst
@@ -2,10 +2,13 @@
Account Brand
=============
-.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+..
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! source digest: sha256:6dbc0d8cfac63a97b25a76fe68e37d6fb3505a5d38929edbfbab7bd6bf6bf5ff
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
@@ -19,11 +22,11 @@ Account Brand
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/brand-16-0/brand-16-0-account_brand
:alt: Translate me on Weblate
-.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/284/16.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/brand&target_branch=16.0
+ :alt: Try me on Runboat
-|badge1| |badge2| |badge3| |badge4| |badge5|
+|badge1| |badge2| |badge3| |badge4| |badge5|
This module allows you to send branded invoices to your customers.
It adds a brand field on the invoice and the brand information to the PDF
@@ -55,7 +58,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/account_brand/static/description/index.html b/account_brand/static/description/index.html
index 2aa48d0ba..4592c140b 100644
--- a/account_brand/static/description/index.html
+++ b/account_brand/static/description/index.html
@@ -1,20 +1,20 @@
-
+
-
+
Account Brand