Compare commits
693 Commits
12-account
...
10.0-accou
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
08cb6f2e86 | ||
|
|
d01820cd39 | ||
|
|
71ecc03001 | ||
|
|
913be476dd | ||
|
|
de9871fd17 | ||
|
|
90a2e26e79 | ||
|
|
21f3b14d7a | ||
|
|
a7a8271a38 | ||
|
|
4cfd326398 | ||
|
|
295bb4edb5 | ||
|
|
8c73a84c46 | ||
|
|
8f555c88ce | ||
|
|
b5af2e54b0 | ||
|
|
b298039af4 | ||
|
|
8fbac5c221 | ||
|
|
96680c893f | ||
|
|
cc3b9d73ae | ||
|
|
8416216a77 | ||
|
|
1a9126d9a1 | ||
|
|
4e8c6f47f6 | ||
|
|
1cabf721f4 | ||
|
|
929f79cd98 | ||
|
|
0fabc8c4c1 | ||
|
|
c25747b474 | ||
|
|
6fa8464ab7 | ||
|
|
c02f539f8f | ||
|
|
27f96b8af2 | ||
|
|
8b3205cc35 | ||
|
|
7908943645 | ||
|
|
ffd6a409cc | ||
|
|
6446e087be | ||
|
|
a4a9be78bc | ||
|
|
567e7f1f6e | ||
|
|
a29384b817 | ||
|
|
23bd22a009 | ||
|
|
020ca72188 | ||
|
|
2d9b133cf6 | ||
|
|
4e9ca8fc5c | ||
|
|
3fdc3b4256 | ||
|
|
4d7102d699 | ||
|
|
bfb0f5380a | ||
|
|
e02727e6ee | ||
|
|
7cb35a031d | ||
|
|
4f10be1bfe | ||
|
|
d547fd6916 | ||
|
|
357ad8d707 | ||
|
|
03bbe001ae | ||
|
|
b199228e1d | ||
|
|
7f0ea7fd0c | ||
|
|
0c94dde977 | ||
|
|
da92731607 | ||
|
|
2950f86219 | ||
|
|
744c0f487a | ||
|
|
d9fe676cae | ||
|
|
65d0d61c13 | ||
|
|
d61e48635b | ||
|
|
a7b2bde9e9 | ||
|
|
74966a7f15 | ||
|
|
3f47f7bf9f | ||
|
|
4d833d1c97 | ||
|
|
a577c4bbbd | ||
|
|
a2ea2534f0 | ||
|
|
1cae9ca021 | ||
|
|
953929cc4b | ||
|
|
068d57030a | ||
|
|
054bee90c0 | ||
|
|
782f1fdb92 | ||
|
|
72f7235c18 | ||
|
|
0a5c14b7f9 | ||
|
|
a4c382a546 | ||
|
|
5c9b6dd702 | ||
|
|
da6ba9b75e | ||
|
|
1ed7034ee4 | ||
|
|
9a8d9616b7 | ||
|
|
b9014e937d | ||
|
|
fc2dcbc359 | ||
|
|
b95837fa86 | ||
|
|
22a0d2b41b | ||
|
|
f9e554a312 | ||
|
|
559c301f2c | ||
|
|
295bf50cea | ||
|
|
8ed8c2bc70 | ||
|
|
b8a015a01e | ||
|
|
3024889c41 | ||
|
|
8a538c4e74 | ||
|
|
03ebc09eb0 | ||
|
|
81a4328531 | ||
|
|
1faecd98f7 | ||
|
|
0f4193e7c4 | ||
|
|
ecd05222a9 | ||
|
|
690a9196dd | ||
|
|
ab03ebe2cb | ||
|
|
074f4e517a | ||
|
|
26b27c398d | ||
|
|
e7afaa2c78 | ||
|
|
72116a7374 | ||
|
|
5d1df0b654 | ||
|
|
522d3d5aa0 | ||
|
|
bfd0c6f8cd | ||
|
|
a05263be77 | ||
|
|
f9951890b5 | ||
|
|
06a1d182e5 | ||
|
|
c4256b3005 | ||
|
|
c5776557cc | ||
|
|
361eb380e4 | ||
|
|
1034cc2347 | ||
|
|
f74dc15d4b | ||
|
|
c52412295f | ||
|
|
0d8e3a9066 | ||
|
|
238344b964 | ||
|
|
6ff67694ab | ||
|
|
662c37670c | ||
|
|
2b0c64b69e | ||
|
|
b40e4eca05 | ||
|
|
cc5291ba52 | ||
|
|
2f63e4e7a6 | ||
|
|
9ec29082b8 | ||
|
|
a11f9574ee | ||
|
|
ac05ca27a4 | ||
|
|
746d23fb3a | ||
|
|
aba8e33d48 | ||
|
|
d384b626e5 | ||
|
|
fcecfcc4e1 | ||
|
|
e6076c3f76 | ||
|
|
987e753a54 | ||
|
|
080e3decbc | ||
|
|
7d7424ad8a | ||
|
|
a32d091d83 | ||
|
|
bb849c0228 | ||
|
|
338d0d445d | ||
|
|
f0adce0034 | ||
|
|
2ebdc8e329 | ||
|
|
748614ba34 | ||
|
|
d0cdc96fbf | ||
|
|
61d576451e | ||
|
|
d56acb4a86 | ||
|
|
f3ad97de73 | ||
|
|
03cec78dc7 | ||
|
|
d4a936deaa | ||
|
|
9cfdaa88a3 | ||
|
|
e0732689b8 | ||
|
|
55d977914e | ||
|
|
0da06febfc | ||
|
|
a9d8137d1f | ||
|
|
19d2614feb | ||
|
|
dd05dfab28 | ||
|
|
a6e9568454 | ||
|
|
5a39df7423 | ||
|
|
2f9584e04e | ||
|
|
a3245985e5 | ||
|
|
19909b6761 | ||
|
|
aca7911d81 | ||
|
|
1d765aa4f7 | ||
|
|
16094358c7 | ||
|
|
2469c1f79d | ||
|
|
94926d188a | ||
|
|
e5221d6a96 | ||
|
|
d55b01ca7b | ||
|
|
5fda678474 | ||
|
|
390363d7e1 | ||
|
|
15a12feafd | ||
|
|
479e1a2710 | ||
|
|
735495656c | ||
|
|
b8255a5287 | ||
|
|
08445ad370 | ||
|
|
9267fca881 | ||
|
|
b8b307154a | ||
|
|
8b06320204 | ||
|
|
181ffab457 | ||
|
|
4d2f7a47ff | ||
|
|
216369f66c | ||
|
|
348e0205a0 | ||
|
|
ffda316d34 | ||
|
|
37281620af | ||
|
|
933bf336aa | ||
|
|
09b94dd01d | ||
|
|
0af5c20727 | ||
|
|
e3b305f117 | ||
|
|
1a191c9444 | ||
|
|
e30285caf7 | ||
|
|
fe7fec797f | ||
|
|
5304bde100 | ||
|
|
db7ea5681f | ||
|
|
0b12805495 | ||
|
|
f91b5267fe | ||
|
|
3396814a09 | ||
|
|
83c4e095f6 | ||
|
|
84bf228d92 | ||
|
|
7f8c461122 | ||
|
|
80b3d08ba5 | ||
|
|
7750ed1834 | ||
|
|
3b6973c4a2 | ||
|
|
b518594136 | ||
|
|
e353cdcad1 | ||
|
|
ea20effa7e | ||
|
|
c9bfc8bef2 | ||
|
|
6361e2e453 | ||
|
|
217afc8af0 | ||
|
|
2d74753bea | ||
|
|
d507311091 | ||
|
|
84c1caaf16 | ||
|
|
895a92393c | ||
|
|
fcba3e4129 | ||
|
|
a22148329f | ||
|
|
b2a96f4db2 | ||
|
|
a325a3a828 | ||
|
|
1c1855ec11 | ||
|
|
5bcfe45251 | ||
|
|
ddbdecd64e | ||
|
|
9e44400acd | ||
|
|
67e3c9a199 | ||
|
|
da5d35b8cb | ||
|
|
9fdbebc591 | ||
|
|
7f3d465a24 | ||
|
|
ad7a8d5e40 | ||
|
|
9617aedcb3 | ||
|
|
d8f0d061b7 | ||
|
|
5d7f512335 | ||
|
|
a7dc7a51ce | ||
|
|
da7ac67933 | ||
|
|
4d9659dee3 | ||
|
|
1f5887eb87 | ||
|
|
84ee109bdf | ||
|
|
80c90c7d35 | ||
|
|
bf4d613ed2 | ||
|
|
889fb28fd6 | ||
|
|
265210b4f1 | ||
|
|
ec6975ce6a | ||
|
|
b0f6832541 | ||
|
|
49f928199e | ||
|
|
94fd30c4b3 | ||
|
|
e51d19941b | ||
|
|
3284953528 | ||
|
|
52350ba5a7 | ||
|
|
95fb0d6f43 | ||
|
|
e7191d3ee1 | ||
|
|
8fc54fd37a | ||
|
|
85f505bd2d | ||
|
|
777fc14908 | ||
|
|
115c0b36de | ||
|
|
256c603796 | ||
|
|
985a894866 | ||
|
|
23cadc403c | ||
|
|
23139916b2 | ||
|
|
42b3505966 | ||
|
|
a9139b9430 | ||
|
|
3eab0c9d7a | ||
|
|
07f646dca3 | ||
|
|
4350679c22 | ||
|
|
5fb19a4a5e | ||
|
|
346de9be4b | ||
|
|
e4dc38b963 | ||
|
|
67e6860ec1 | ||
|
|
bdeb1a4101 | ||
|
|
e1f8e95bce | ||
|
|
f16095e343 | ||
|
|
c92ce72fd9 | ||
|
|
f90aa12a9f | ||
|
|
35163d8613 | ||
|
|
4e4d02aa14 | ||
|
|
9e3d62b4ba | ||
|
|
0bc2d19747 | ||
|
|
ed1937d501 | ||
|
|
acfd2f18a7 | ||
|
|
83140872ef | ||
|
|
6abb743736 | ||
|
|
5549139e5c | ||
|
|
e878021e63 | ||
|
|
6d7dc61dee | ||
|
|
cebc0e3b84 | ||
|
|
ef85216271 | ||
|
|
7c5ac7144c | ||
|
|
a35f1a3a32 | ||
|
|
022d7a719d | ||
|
|
e505ce2ad4 | ||
|
|
8bcbb83a91 | ||
|
|
07781aa724 | ||
|
|
42233bc0ce | ||
|
|
10eacdf226 | ||
|
|
1a46f39705 | ||
|
|
9e37c6e1ae | ||
|
|
96a7e6e443 | ||
|
|
c2f4e2066a | ||
|
|
b861521571 | ||
|
|
245c605ef5 | ||
|
|
aa278b3a0c | ||
|
|
a1ef881201 | ||
|
|
56095375d1 | ||
|
|
746a6926ea | ||
|
|
13e6facec5 | ||
|
|
6c53b3c1ae | ||
|
|
a379b59597 | ||
|
|
2f179995bf | ||
|
|
7c5f04a39e | ||
|
|
b814ec11bf | ||
|
|
7d39e50ba3 | ||
|
|
77995aa125 | ||
|
|
314350efee | ||
|
|
40ef119999 | ||
|
|
6583ea0cd9 | ||
|
|
7def6a85e4 | ||
|
|
618ad6d6d6 | ||
|
|
05c0f74420 | ||
|
|
78ff16436d | ||
|
|
b4dc9da272 | ||
|
|
3aa16cdacf | ||
|
|
d823e3ae75 | ||
|
|
a1f57e1ab5 | ||
|
|
c2d2e93f07 | ||
|
|
56bdeb3ee9 | ||
|
|
b811ae890a | ||
|
|
07a444367b | ||
|
|
8a7a3c670f | ||
|
|
7f2589c9bf | ||
|
|
93e63b74b6 | ||
|
|
c2accec411 | ||
|
|
62b01c781f | ||
|
|
33b99de09e | ||
|
|
e134153a40 | ||
|
|
6812d2e68b | ||
|
|
25d8a50d3a | ||
|
|
54b74f01c0 | ||
|
|
5ac6b777b2 | ||
|
|
fd05834ffe | ||
|
|
34a763d894 | ||
|
|
30089555c5 | ||
|
|
7f62369a06 | ||
|
|
005063e8c6 | ||
|
|
08ad828da7 | ||
|
|
31c6246e2c | ||
|
|
b7dd2a6a07 | ||
|
|
ef97656b42 | ||
|
|
16627ba6f0 | ||
|
|
7cf98a1001 | ||
|
|
6e8e9fa1aa | ||
|
|
02940c08cd | ||
|
|
2dd4a7d577 | ||
|
|
e1c660d90c | ||
|
|
aa3568e986 | ||
|
|
9c67a6df5d | ||
|
|
5be71f05b3 | ||
|
|
0498f6e24e | ||
|
|
80763de94b | ||
|
|
18753eadf9 | ||
|
|
932de847b6 | ||
|
|
b7ab16477a | ||
|
|
72bd441617 | ||
|
|
c7908c38ed | ||
|
|
ad786e892f | ||
|
|
744c721950 | ||
|
|
7c2f10423f | ||
|
|
9c666ba4d9 | ||
|
|
c62a163f93 | ||
|
|
9ad2d0f7e1 | ||
|
|
907022b31d | ||
|
|
2cbb4dcfb6 | ||
|
|
8cdf8c68e8 | ||
|
|
10ebf47612 | ||
|
|
3a69e7bf69 | ||
|
|
69c975bfc5 | ||
|
|
9d8d2cf8cc | ||
|
|
9356ccc497 | ||
|
|
3e702f0186 | ||
|
|
b0110ca542 | ||
|
|
ecf5f6f843 | ||
|
|
d90bd9dd8e | ||
|
|
d794e3fcd2 | ||
|
|
e519cf89cd | ||
|
|
15ebf4a756 | ||
|
|
7a6a38aa1d | ||
|
|
0971fb48e4 | ||
|
|
41f012e0b4 | ||
|
|
dba79c83c4 | ||
|
|
f2e48cb977 | ||
|
|
8b3dd37c33 | ||
|
|
549ab31e82 | ||
|
|
3bedaa076c | ||
|
|
518628ec8c | ||
|
|
14518c7f9f | ||
|
|
354137d101 | ||
|
|
cb2ec53062 | ||
|
|
d806d1cf81 | ||
|
|
b640290962 | ||
|
|
447e5a7d82 | ||
|
|
3bc6bb2900 | ||
|
|
9a55c50563 | ||
|
|
a88c3e7f6d | ||
|
|
9c63ea19d3 | ||
|
|
38f0f5eb78 | ||
|
|
53f85a6b8e | ||
|
|
5b7cdcff37 | ||
|
|
30bc6ff801 | ||
|
|
f4574647dd | ||
|
|
1b2fada686 | ||
|
|
db55e148c3 | ||
|
|
2ceb626723 | ||
|
|
90a2f719ef | ||
|
|
4883570131 | ||
|
|
110d8b6982 | ||
|
|
6d29f236fd | ||
|
|
dd784fa245 | ||
|
|
7d0ea7967c | ||
|
|
111a42c2da | ||
|
|
f66d74499f | ||
|
|
ea195e6c75 | ||
|
|
f74828e3ea | ||
|
|
3ef6312f65 | ||
|
|
9701eb1986 | ||
|
|
dbb427e70e | ||
|
|
91ad3f0f05 | ||
|
|
2c760935af | ||
|
|
607968983b | ||
|
|
e1f8611ef3 | ||
|
|
0a154e4314 | ||
|
|
25d593710e | ||
|
|
9f2ce9dd14 | ||
|
|
7fdf51be31 | ||
|
|
ccc0684312 | ||
|
|
140349e4d8 | ||
|
|
540d7cf82c | ||
|
|
f745388f37 | ||
|
|
ad0e2f43c4 | ||
|
|
12d9934889 | ||
|
|
32553d0042 | ||
|
|
823e9ad208 | ||
|
|
f5c54ce9d0 | ||
|
|
b24182c5b6 | ||
|
|
91f400be09 | ||
|
|
4c7dc09979 | ||
|
|
15c0400805 | ||
|
|
b3bc3c923d | ||
|
|
623dca3cbf | ||
|
|
490b203943 | ||
|
|
a41d5bc3ce | ||
|
|
55d1f66d0e | ||
|
|
2617170314 | ||
|
|
f436a651cf | ||
|
|
0eedae22c6 | ||
|
|
26930e6a84 | ||
|
|
b26164e05c | ||
|
|
fcaf342d2a | ||
|
|
b5d814860e | ||
|
|
ad6a8f28eb | ||
|
|
5252ed95cd | ||
|
|
a068c534bb | ||
|
|
c67d51b303 | ||
|
|
91886211ae | ||
|
|
473b97fd7e | ||
|
|
92c89b0756 | ||
|
|
abe79d1c48 | ||
|
|
81e923def2 | ||
|
|
fb9e05b5b9 | ||
|
|
96796ebe05 | ||
|
|
72eef666eb | ||
|
|
03f4a1438c | ||
|
|
8d64f799d1 | ||
|
|
725314e497 | ||
|
|
45f3294249 | ||
|
|
7ed3a38cb2 | ||
|
|
ab464db930 | ||
|
|
704667e71e | ||
|
|
badaa404a4 | ||
|
|
0fb70e97aa | ||
|
|
1a38600aeb | ||
|
|
c3a55088ed | ||
|
|
5c3716dfe1 | ||
|
|
fec06bbb59 | ||
|
|
9b4c770382 | ||
|
|
2d7f151543 | ||
|
|
8c9c30b604 | ||
|
|
cfc24eeeee | ||
|
|
fdbc003ac7 | ||
|
|
44fcf386ee | ||
|
|
a1e4829455 | ||
|
|
0bac95c085 | ||
|
|
9f331306af | ||
|
|
613d6d688d | ||
|
|
152e94b116 | ||
|
|
60e9caf2e7 | ||
|
|
214aafd243 | ||
|
|
b140aa2abf | ||
|
|
da2c22329c | ||
|
|
83bca9318d | ||
|
|
32e2ecea37 | ||
|
|
27fc5070ec | ||
|
|
d3080b90a7 | ||
|
|
dddc24dc02 | ||
|
|
6c073b7d4d | ||
|
|
2114ce5da5 | ||
|
|
27abfa0880 | ||
|
|
340bd0857d | ||
|
|
13f9a51bff | ||
|
|
d4b979979a | ||
|
|
6aadd49592 | ||
|
|
b2ce56755f | ||
|
|
7070f7f1ec | ||
|
|
6d50815196 | ||
|
|
99f3bc3778 | ||
|
|
e081876473 | ||
|
|
1fbd4281ba | ||
|
|
45593e94fc | ||
|
|
f967e0007b | ||
|
|
3e5af98552 | ||
|
|
d365286bdf | ||
|
|
63d06b285a | ||
|
|
d67e82926a | ||
|
|
e11a62dd90 | ||
|
|
9a787e88b3 | ||
|
|
f086cb9d29 | ||
|
|
0b3c1ff510 | ||
|
|
8cd265cae3 | ||
|
|
a5507fadfc | ||
|
|
7713a1178f | ||
|
|
ea41ed7663 | ||
|
|
1f04ef8b92 | ||
|
|
165d042a6b | ||
|
|
44b3e74398 | ||
|
|
215cb70cea | ||
|
|
d9f8da2b9e | ||
|
|
58203941df | ||
|
|
f717761aa2 | ||
|
|
2ea24123da | ||
|
|
e67d9a6a3a | ||
|
|
9fdfaf9d49 | ||
|
|
154104e5a8 | ||
|
|
9f1c82aeca | ||
|
|
8eb87d249b | ||
|
|
9a3fa8dbe0 | ||
|
|
cdfbc427d1 | ||
|
|
beed014aca | ||
|
|
6347327b58 | ||
|
|
c52a8e901f | ||
|
|
db8f78e5cf | ||
|
|
54efe13723 | ||
|
|
2a5f3c460e | ||
|
|
9a678154c9 | ||
|
|
4e8f9bbf97 | ||
|
|
4e40393b14 | ||
|
|
5c95d9bd88 | ||
|
|
a6480df8c5 | ||
|
|
db690e77ea | ||
|
|
b2a7741fd3 | ||
|
|
053911edca | ||
|
|
1ff2416435 | ||
|
|
219ec0e671 | ||
|
|
fe46134a43 | ||
|
|
43ce9daf2e | ||
|
|
4842386aac | ||
|
|
f20145d06a | ||
|
|
f986bf05fd | ||
|
|
21f657616b | ||
|
|
ac91927ea1 | ||
|
|
74d8f0c23d | ||
|
|
ddb802b31a | ||
|
|
979c33a457 | ||
|
|
681be2ec9e | ||
|
|
b217a504e6 | ||
|
|
2f8e57ae28 | ||
|
|
4373d5ff4b | ||
|
|
3526e98a00 | ||
|
|
6bd38857d1 | ||
|
|
2abab0caaa | ||
|
|
de76a64f7e | ||
|
|
604dab1bb9 | ||
|
|
1bfa265278 | ||
|
|
7e868f3faa | ||
|
|
7e19809cff | ||
|
|
f5d86f7bc8 | ||
|
|
db89d01739 | ||
|
|
0bae792e79 | ||
|
|
2a311b8cb8 | ||
|
|
ae0bd93403 | ||
|
|
36929e5f48 | ||
|
|
413f8ca0fd | ||
|
|
0d1f1961af | ||
|
|
749dd367fa | ||
|
|
5849a2fecd | ||
|
|
343e92439c | ||
|
|
82c8243978 | ||
|
|
35d13bfc53 | ||
|
|
af975d3055 | ||
|
|
aeb64790d0 | ||
|
|
8d23f49c05 | ||
|
|
496a2ad710 | ||
|
|
7af3778761 | ||
|
|
0035b197c2 | ||
|
|
522e5299f1 | ||
|
|
13d28af70d | ||
|
|
7e8cad4fcc | ||
|
|
4c04109ba4 | ||
|
|
5341c120cc | ||
|
|
215e5a7b90 | ||
|
|
9e6c8b28ba | ||
|
|
e6761de367 | ||
|
|
18d24ebfdd | ||
|
|
c7d66ac1ab | ||
|
|
9039f26eab | ||
|
|
a91d3f79c3 | ||
|
|
587403d009 | ||
|
|
30585ec690 | ||
|
|
1b591a83ca | ||
|
|
189c3062f0 | ||
|
|
37b8bb1ce4 | ||
|
|
de89795eed | ||
|
|
a8b122e1c4 | ||
|
|
eba9a4bce5 | ||
|
|
14e6acad4d | ||
|
|
b2b073a2d7 | ||
|
|
59a5181e80 | ||
|
|
b800a639a2 | ||
|
|
4852a84ab8 | ||
|
|
2a9882e7af | ||
|
|
6c3b3749b1 | ||
|
|
eae6766995 | ||
|
|
67b49d9917 | ||
|
|
b8f0db3e69 | ||
|
|
55fe513c50 | ||
|
|
1653ac5453 | ||
|
|
6889fdf8a1 | ||
|
|
5f1fc280bb | ||
|
|
76b510fabc | ||
|
|
706c29231c | ||
|
|
4048a8cdc4 | ||
|
|
703757dc1f | ||
|
|
924e4011ee | ||
|
|
cbfebd6fdb | ||
|
|
6c8f51b311 | ||
|
|
484baa832d | ||
|
|
c89ca60777 | ||
|
|
aeb0c2f5e7 | ||
|
|
6a0d9043a2 | ||
|
|
b54b69d48f | ||
|
|
5052b233dd | ||
|
|
7f1c5a9b7e | ||
|
|
f17ca54c77 | ||
|
|
a33c3a1a21 | ||
|
|
7c515b6273 | ||
|
|
e7dbeaea52 | ||
|
|
46b08d22ac | ||
|
|
eef739806e | ||
|
|
4eb3bdbb5c | ||
|
|
ee6915dd47 | ||
|
|
45c23df381 | ||
|
|
79a700f9b3 | ||
|
|
0074a23631 | ||
|
|
7cd8d59fba | ||
|
|
188730318e | ||
|
|
044f2addbe | ||
|
|
f0715c53c4 | ||
|
|
46e3a86c81 | ||
|
|
06808dde92 | ||
|
|
cffd57797b | ||
|
|
1b918f3655 | ||
|
|
9f4e25be09 | ||
|
|
d552909adf | ||
|
|
81ae120a11 | ||
|
|
28d820e5ad | ||
|
|
d32796ce8f | ||
|
|
527424db79 | ||
|
|
762419f037 | ||
|
|
7c09ab2ea2 | ||
|
|
14bacaeba5 | ||
|
|
fe08942e39 | ||
|
|
bc4dd21316 | ||
|
|
0c5a496ba2 | ||
|
|
0a626f39ae | ||
|
|
e9806b73c6 | ||
|
|
2b522f5702 | ||
|
|
082c133128 | ||
|
|
c33ef19086 | ||
|
|
6f07d50d90 | ||
|
|
037e4d4214 | ||
|
|
53b1ff6ed4 | ||
|
|
2847f14dc7 | ||
|
|
4fb4ed9ca4 | ||
|
|
98bc291b54 | ||
|
|
532b9cb53c | ||
|
|
5075221428 | ||
|
|
3ee3edb8ce | ||
|
|
f3085a163f | ||
|
|
7b04e578af | ||
|
|
9daeeca997 | ||
|
|
0c5366420f | ||
|
|
f388d0d10f | ||
|
|
e588686d5f | ||
|
|
2e6e1c07bf | ||
|
|
a98dbc0b1c | ||
|
|
529b585d07 | ||
|
|
46d177fb9f | ||
|
|
24abaec406 | ||
|
|
673afbac0f | ||
|
|
5dc05f3c81 | ||
|
|
dce0604e7d |
@@ -1,3 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import sale_order
|
||||
from . import partner
|
||||
25
account_aged_balance_from_partner/__manifest__.py
Normal file
25
account_aged_balance_from_partner/__manifest__.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2015-2018 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'Aged Partner Balance from Partner',
|
||||
'version': '10.0.0.1.0',
|
||||
'category': 'Accounting',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Direct access to the aged partner balance report from the partner form',
|
||||
'description': """
|
||||
Aged Partner Balance from Partner
|
||||
=================================
|
||||
|
||||
This module adds a button on the partner form view (the icon on the button is a banknote) to easily open the detailed aged partner balance of the partner in PDF format.
|
||||
|
||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['account_financial_report_qweb'],
|
||||
'data': ['partner_view.xml'],
|
||||
'installable': True,
|
||||
}
|
||||
30
account_aged_balance_from_partner/partner.py
Normal file
30
account_aged_balance_from_partner/partner.py
Normal file
@@ -0,0 +1,30 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2015-2018 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
|
||||
from odoo import models, fields, api
|
||||
|
||||
|
||||
class ResPartner(models.Model):
|
||||
_inherit = 'res.partner'
|
||||
|
||||
@api.depends('credit', 'debit')
|
||||
def _compute_balance(self):
|
||||
for partner in self:
|
||||
partner.balance = partner.credit - partner.debit
|
||||
|
||||
# The field 'currency_id' defined in the account module
|
||||
# is a computed field that gets the company currency
|
||||
balance = fields.Monetary(
|
||||
compute='_compute_balance', readonly=True,
|
||||
string="Account Balance")
|
||||
|
||||
def open_aged_open_invoices_report(self):
|
||||
wiz = self.env['aged.partner.balance.wizard'].create({
|
||||
'show_move_line_details': True,
|
||||
'partner_ids': [(6, 0, self.ids)],
|
||||
})
|
||||
action = wiz.button_export_pdf()
|
||||
return action
|
||||
31
account_aged_balance_from_partner/partner_view.xml
Normal file
31
account_aged_balance_from_partner/partner_view.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2015-2018 Akretion (http://www.akretion.com/)
|
||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
|
||||
<record id="view_partner_form" model="ir.ui.view">
|
||||
<field name="name">account.balance.button.partner.form</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="account.partner_view_buttons"/>
|
||||
<field name="arch" type="xml">
|
||||
<button name="open_partner_history" type="object" position="after">
|
||||
<button class="oe_stat_button" type="object"
|
||||
name="open_aged_open_invoices_report"
|
||||
attrs="{'invisible': [('parent_id', '!=', False)]}"
|
||||
icon="fa-money">
|
||||
<div class="o_form_field o_stat_info">
|
||||
<span class="o_stat_value"><field name="balance"/></span>
|
||||
<span class="o_stat_text">Account Balance</span>
|
||||
</div>
|
||||
</button>
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
||||
35
account_bank_statement_import_fr_hsbc_card/README.rst
Normal file
35
account_bank_statement_import_fr_hsbc_card/README.rst
Normal file
@@ -0,0 +1,35 @@
|
||||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
|
||||
=======================================
|
||||
Import French HSBC Card Bank Statements
|
||||
=======================================
|
||||
|
||||
This module allows you to import French HSBC credit cards bank statements (CSV version).
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
Create a bank journal dedicated to HSBC credit cards. Associate it with a new bank account on which you will set the account number to *HSBC_CARD_EUR*.
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
In the dashboard of the *Accounting* menu, click on the button *Import Statement* located on the journal corresponding to the bank account of the statement file you are importing.
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues
|
||||
<https://github.com/akretion/odoo-usability/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.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
3
account_bank_statement_import_fr_hsbc_card/__init__.py
Normal file
3
account_bank_statement_import_fr_hsbc_card/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import wizard
|
||||
16
account_bank_statement_import_fr_hsbc_card/__manifest__.py
Normal file
16
account_bank_statement_import_fr_hsbc_card/__manifest__.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2017 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'Import French HSBC Card Bank Statements',
|
||||
'version': '10.0.1.0.0',
|
||||
'license': 'AGPL-3',
|
||||
'author': "Akretion",
|
||||
'website': 'http://www.akretion.com',
|
||||
'summary': 'Import French HSBC Card Bank Statements in Odoo (CSV version)',
|
||||
'depends': ['account_bank_statement_import'],
|
||||
'data': ['views/account_bank_statement_import.xml'],
|
||||
'installable': True,
|
||||
}
|
||||
69
account_bank_statement_import_fr_hsbc_card/i18n/nb_NO.po
Normal file
69
account_bank_statement_import_fr_hsbc_card/i18n/nb_NO.po
Normal file
@@ -0,0 +1,69 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_bank_statement_import_fr_cfonb
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-01-13 03:36+0000\n"
|
||||
"PO-Revision-Date: 2017-01-13 03:36+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
|
||||
"Language-Team: Norwegian Bokmål (Norway) (https://www.transifex.com/oca/teams/23907/nb_NO/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Language: nb_NO\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. module: account_bank_statement_import_fr_cfonb
|
||||
#: code:addons/account_bank_statement_import_fr_cfonb/models/account_bank_statement_import.py:146
|
||||
#, python-format
|
||||
msgid "Account %s"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_fr_cfonb
|
||||
#: model:ir.ui.view,arch_db:account_bank_statement_import_fr_cfonb.account_bank_statement_import_view
|
||||
msgid "CFONB (French format, fixed-length text lines of 120 caracters)"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_fr_cfonb
|
||||
#: model:ir.model,name:account_bank_statement_import_fr_cfonb.model_account_bank_statement_import
|
||||
msgid "Import Bank Statement"
|
||||
msgstr "Importer bankutsagn"
|
||||
|
||||
#. module: account_bank_statement_import_fr_cfonb
|
||||
#: code:addons/account_bank_statement_import_fr_cfonb/models/account_bank_statement_import.py:70
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Line %d is %d caracters long. All lines of a CFONB bank statement file must "
|
||||
"be 120 caracters long."
|
||||
msgstr ""
|
||||
"Linje %d er %d tegn langt. Alle linjer i en CFONB-bankutsagnsfil må være 120"
|
||||
" tegn langt."
|
||||
|
||||
#. module: account_bank_statement_import_fr_cfonb
|
||||
#: code:addons/account_bank_statement_import_fr_cfonb/models/account_bank_statement_import.py:110
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Only single-account files and single-currency files are supported for the "
|
||||
"moment. It is not the case starting from line %d."
|
||||
msgstr ""
|
||||
"Kun enkeltkontofiler og enkeltmyntenhetsfiler støttes for øyeblikket. Dette "
|
||||
"er ikke tilfellet fra og med linje %d og utover."
|
||||
|
||||
#. module: account_bank_statement_import_fr_cfonb
|
||||
#: code:addons/account_bank_statement_import_fr_cfonb/models/account_bank_statement_import.py:99
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The 2 first letters of the first line are '%s'. A CFONB file should start "
|
||||
"with '01'"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_bank_statement_import_fr_cfonb
|
||||
#: code:addons/account_bank_statement_import_fr_cfonb/models/account_bank_statement_import.py:52
|
||||
#, python-format
|
||||
msgid "The file is empty."
|
||||
msgstr "Filen er tom."
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!--
|
||||
© 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
|
||||
<record id="account_bank_statement_import_view" model="ir.ui.view">
|
||||
<field name="name">hsbc.fr.csv.account.bank.statement.import.form</field>
|
||||
<field name="model">account.bank.statement.import</field>
|
||||
<field name="inherit_id" ref="account_bank_statement_import.account_bank_statement_import_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//ul[@id='statement_format']" position="inside">
|
||||
<li>French HSBC Credit Cards (CSV format)</li>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import account_bank_statement_import
|
||||
@@ -0,0 +1,105 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2017 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
import logging
|
||||
import unicodecsv
|
||||
from tempfile import TemporaryFile
|
||||
from datetime import datetime
|
||||
from odoo import models, fields, api, _
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AccountBankStatementImport(models.TransientModel):
|
||||
_inherit = 'account.bank.statement.import'
|
||||
|
||||
@api.model
|
||||
def _check_hsbc_card_csv(self, data_file):
|
||||
return data_file.strip().startswith(
|
||||
'Titulaire;Division;;Cpt Affaires;Num carte;')
|
||||
|
||||
@api.model
|
||||
def _parse_file(self, data_file):
|
||||
""" Import a file in French HSBC CSV Credit card format"""
|
||||
hsbc_csv = self._check_hsbc_card_csv(data_file)
|
||||
if not hsbc_csv:
|
||||
return super(AccountBankStatementImport, self)._parse_file(
|
||||
data_file)
|
||||
transactions = []
|
||||
fileobj = TemporaryFile('w+')
|
||||
fileobj.write(data_file)
|
||||
fileobj.seek(0)
|
||||
reader = unicodecsv.DictReader(
|
||||
fileobj,
|
||||
fieldnames=[
|
||||
'company', 'division', 'empty', 'account',
|
||||
'card_num', 'title', 'lastname', 'firstname',
|
||||
'op_code', 'seller_type', 'seller', 'date', 'acc_date',
|
||||
'hour', 'city', 'code', 'label', 'local_amount',
|
||||
'local_currency', 'acc_amount', 'acc_currency'],
|
||||
delimiter=';',
|
||||
quoting=unicodecsv.QUOTE_MINIMAL,
|
||||
encoding='latin1')
|
||||
i = 0
|
||||
start_balance = end_balance = 0.0
|
||||
currency_code = 'EUR'
|
||||
account_number = 'HSBC_CARD_EUR'
|
||||
for line in reader:
|
||||
i += 1
|
||||
if i == 1:
|
||||
continue # skip title line
|
||||
_logger.debug("Line %d: %s" % (i, line))
|
||||
if not line:
|
||||
continue
|
||||
# cleanup
|
||||
for key, value in line.iteritems():
|
||||
line[key] = value and value.strip() or False
|
||||
if not line['date'] or not line['acc_amount']:
|
||||
continue
|
||||
labels = [
|
||||
'%s %s' % (line['firstname'], line['lastname']),
|
||||
'%s (%s)' % (line['seller'], line['seller_type']),
|
||||
line['city']]
|
||||
if line['local_currency'] != currency_code:
|
||||
labels.append(
|
||||
'%s %s' % (line['local_amount'], line['local_currency']))
|
||||
name = ', '.join(labels)
|
||||
amount = float(
|
||||
line['acc_amount'].replace(',', '.').replace(' ', '')) * -1
|
||||
end_balance += amount
|
||||
date_dt = datetime.strptime(line['date'], '%d/%m/%Y')
|
||||
date_str = fields.Date.to_string(date_dt)
|
||||
if line['acc_currency'] != currency_code:
|
||||
raise UserError(_(
|
||||
"On line %d of the HSBC CSV file, the column "
|
||||
"'Dev Cpt Affaires' contains '%s' instead of 'EUR'")
|
||||
% (line['acc_currency'], i))
|
||||
vals_line = {
|
||||
'date': date_str,
|
||||
'name': name,
|
||||
'ref': False,
|
||||
# unfortunately, I'm obliged to include i in
|
||||
# the unique_import_id, which will disable the auto-delete
|
||||
# of already imported lines. But experice has proven that
|
||||
# Internet payment often have hour=00:00, and it's possible
|
||||
# to have 2 internet payments for the same supplier the same
|
||||
# day with the same amount (e.g. purchase a return ticket)
|
||||
'unique_import_id': '%s-%s-%.2f-%s-%d' % (
|
||||
date_str, line['hour'], amount, name, i),
|
||||
'amount': amount,
|
||||
'partner_id': False,
|
||||
}
|
||||
transactions.append(vals_line)
|
||||
vals_bank_statement = {
|
||||
'name': _('HSBC Cards'),
|
||||
'balance_start': start_balance,
|
||||
'balance_end_real': end_balance,
|
||||
'transactions': transactions,
|
||||
}
|
||||
fileobj.close()
|
||||
# from pprint import pprint
|
||||
# pprint(vals_bank_statement)
|
||||
return currency_code, account_number, [vals_bank_statement]
|
||||
3
account_bank_statement_import_usability/__init__.py
Normal file
3
account_bank_statement_import_usability/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import account_bank_statement_import
|
||||
29
account_bank_statement_import_usability/__manifest__.py
Normal file
29
account_bank_statement_import_usability/__manifest__.py
Normal file
@@ -0,0 +1,29 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2015-2016 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'Account Bank Statement Import Usability',
|
||||
'version': '10.0.0.1.0',
|
||||
'category': 'Accounting & Finance',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Small usability enhancements in account_bank_statement_import module',
|
||||
'description': """
|
||||
Account Bank Statement Import Usability
|
||||
=======================================
|
||||
|
||||
This module adds the following changes:
|
||||
|
||||
* Works if the bank statement file only contain the account number and not the full IBAN
|
||||
|
||||
* remove start balance and end balance (doesn't work with OFX, which is one of the most used file format !)
|
||||
|
||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['account_bank_statement_import'],
|
||||
'data': ['account_view.xml'],
|
||||
'installable': True,
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2015-2016 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models, api
|
||||
|
||||
|
||||
class AccountBankStatementImport(models.TransientModel):
|
||||
_inherit = 'account.bank.statement.import'
|
||||
|
||||
def _check_journal_bank_account(self, journal, account_number):
|
||||
if account_number in journal.bank_account_id.sanitized_acc_number:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
class AccountBankStatement(models.Model):
|
||||
_inherit = 'account.bank.statement'
|
||||
|
||||
# When we use the import of bank statement via files,
|
||||
# the start/end_balance is usually computed from the lines itself
|
||||
# because we don't have the 'real' information in the file
|
||||
# But, in the module account_bank_statement_import, in the method
|
||||
# _create_bank_statement(), the bank statement lines already present in
|
||||
# Odoo are filtered out, but the start/end balance is not adjusted,
|
||||
# so the user has to manually modifiy it the close the bank statement
|
||||
# I think the solution is just to remove the start/end balance system
|
||||
# on the bank statement when we use the file import
|
||||
# This code is present in the 'account' module, but I override it here
|
||||
# and not in account_usability because the users who don't have
|
||||
# account_bank_statement_import may want to keep start/end balance
|
||||
@api.multi
|
||||
def _balance_check(self):
|
||||
return True
|
||||
48
account_bank_statement_import_usability/account_view.xml
Normal file
48
account_bank_statement_import_usability/account_view.xml
Normal file
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
© 2016 Akretion (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
<!--
|
||||
Let's try again to work with balance_start and balance_end_real
|
||||
in v10 to see if we can work with it in v10 or not...
|
||||
If we really can't, I'll re-activate this view inheritance again
|
||||
|
||||
<record id="view_bank_statement_form" model="ir.ui.view">
|
||||
<field name="name">bank_statement_import_usability.account.bank.statement.form</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="inherit_id" ref="account.view_bank_statement_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="balance_start" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
<field name="balance_end_real" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
<record id="view_bank_statement_tree" model="ir.ui.view">
|
||||
<field name="name">bank_statement_import_usability.account.bank.statement.tree</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="inherit_id" ref="account.view_bank_statement_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="balance_start" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
<field name="balance_end_real" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
<tree position="attributes">
|
||||
<attribute name="colors">blue:state=='draft';black:state=='confirm'</attribute>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
||||
3
account_bank_statement_no_reconcile_guess/__init__.py
Normal file
3
account_bank_statement_no_reconcile_guess/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import account
|
||||
33
account_bank_statement_no_reconcile_guess/__manifest__.py
Normal file
33
account_bank_statement_no_reconcile_guess/__manifest__.py
Normal file
@@ -0,0 +1,33 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2017 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'Account Bank Statement No Reconcile Guess',
|
||||
'version': '10.0.1.0.0',
|
||||
'category': 'Accounting & Finance',
|
||||
'license': 'AGPL-3',
|
||||
'summary': "Don't pre-select lines to reconcile in bank statements",
|
||||
'description': """
|
||||
Account Bank Statement No Reconcile Guess
|
||||
=========================================
|
||||
|
||||
Here is a scenario where the "reconcile guess" feature is a problem for the accountant:
|
||||
|
||||
1) The accountant imports a large bank statement with 40 bank statement lines.
|
||||
2) The "reconcile guess" feature will pre-select reconcile of line X with line 39 of the bank statement. But this guess is a mistake and line X should be reconciled with line 2 of the bank statement.
|
||||
=> The accountant will not understand why he can't select line X to be reconciled with line 2 of the bank statement. To be able to reconcile line 2 correctif, he has to:
|
||||
3) click several times on the "next page" button to reach line 39 of the bank statement and unselect line X.
|
||||
4) Go back to line 2 of the bank statement and now he will be able to select line X.
|
||||
|
||||
This module disables the "reconcile guess" feature to avoid this problem.
|
||||
|
||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['account'],
|
||||
'data': [],
|
||||
'installable': True,
|
||||
}
|
||||
14
account_bank_statement_no_reconcile_guess/account.py
Normal file
14
account_bank_statement_no_reconcile_guess/account.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2017 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class AccountBankStatementLine(models.Model):
|
||||
_inherit = 'account.bank.statement.line'
|
||||
|
||||
def get_reconciliation_proposition(self, excluded_ids=None):
|
||||
self.ensure_one()
|
||||
return self.env['account.move.line']
|
||||
3
account_credit_control_usability/__init__.py
Normal file
3
account_credit_control_usability/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import account_credit_control
|
||||
46
account_credit_control_usability/__manifest__.py
Normal file
46
account_credit_control_usability/__manifest__.py
Normal file
@@ -0,0 +1,46 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Account Credit Control Usability module for Odoo
|
||||
# Copyright (C) 2016 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
{
|
||||
'name': 'Account Credit Control Usability',
|
||||
'version': '0.1',
|
||||
'category': 'Accounting & Finance',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Small usability enhancements in account_credit_control module',
|
||||
'description': """
|
||||
Account Credit Control Usability
|
||||
================================
|
||||
|
||||
The usability enhancements include:
|
||||
|
||||
* add phone call in the list of channels
|
||||
* hide some fields
|
||||
|
||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['account_credit_control', 'partner_aged_open_invoices'],
|
||||
'data': ['account_credit_control_view.xml'],
|
||||
'installable': False,
|
||||
}
|
||||
82
account_credit_control_usability/account_credit_control.py
Normal file
82
account_credit_control_usability/account_credit_control.py
Normal file
@@ -0,0 +1,82 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Account Credit Control Usability module for Odoo
|
||||
# Copyright (C) 2016 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp import models, fields, api
|
||||
|
||||
|
||||
class CreditControlPolicyLevel(models.Model):
|
||||
_inherit = "credit.control.policy.level"
|
||||
_rec_name = 'internal_name'
|
||||
|
||||
channel = fields.Selection(selection_add=[('phone', 'Phone Call')])
|
||||
name = fields.Char(
|
||||
string='Subject',
|
||||
help="Will be displayed in the subject of the emails and in "
|
||||
"the letters")
|
||||
internal_name = fields.Char(string='Internal Name', required=True)
|
||||
|
||||
|
||||
class CreditControlLine(models.Model):
|
||||
_inherit = "credit.control.line"
|
||||
|
||||
channel = fields.Selection(selection_add=[('phone', 'Phone Call')])
|
||||
note = fields.Text(string='Notes')
|
||||
|
||||
@api.multi
|
||||
def open_aged_open_invoices_report(self):
|
||||
self.ensure_one()
|
||||
return self.partner_id.open_aged_open_invoices_report()
|
||||
|
||||
@api.multi
|
||||
def go_to_partner_form(self):
|
||||
self.ensure_one()
|
||||
action = self.env['ir.actions.act_window'].for_xml_id(
|
||||
'base', 'action_partner_customer_form')
|
||||
action.update({
|
||||
'view_mode': 'form,kanban,tree',
|
||||
'views': False,
|
||||
'res_id': self.partner_id.id,
|
||||
'context': {},
|
||||
})
|
||||
return action
|
||||
|
||||
|
||||
class CreditControlRun(models.Model):
|
||||
_inherit = "credit.control.run"
|
||||
|
||||
date = fields.Date(default=fields.Date.context_today)
|
||||
|
||||
|
||||
class ResPartner(models.Model):
|
||||
_inherit = 'res.partner'
|
||||
|
||||
@api.one
|
||||
@api.depends('credit_control_line_ids')
|
||||
def _credit_control_line_count(self):
|
||||
try:
|
||||
self.credit_control_line_count = len(self.credit_control_line_ids)
|
||||
except:
|
||||
self.credit_control_line_count = 0
|
||||
|
||||
credit_control_line_count = fields.Integer(
|
||||
compute='_credit_control_line_count',
|
||||
string="# of Credit Control Lines", readonly=True)
|
||||
127
account_credit_control_usability/account_credit_control_view.xml
Normal file
127
account_credit_control_usability/account_credit_control_view.xml
Normal file
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="credit_control_line_tree" model="ir.ui.view">
|
||||
<field name="name">credit_control_usability.credit_control_line_tree</field>
|
||||
<field name="model">credit.control.line</field>
|
||||
<field name="inherit_id" ref="account_credit_control.credit_control_line_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="account_id" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
<field name="move_line_id" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
<field name="mail_message_id" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
<field name="partner_id" position="after">
|
||||
<button name="go_to_partner_form" type="object"
|
||||
string="Go to Partner" icon="terp-gtk-jump-to-ltr"/>
|
||||
<button name="open_aged_open_invoices_report" type="object"
|
||||
string="Open Aged Open Invoices Report" icon="STOCK_ZOOM_IN"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="credit_control_line_form" model="ir.ui.view">
|
||||
<field name="name">credit_control_usability.credit_control_line_form</field>
|
||||
<field name="model">credit.control.line</field>
|
||||
<field name="inherit_id" ref="account_credit_control.credit_control_line_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='currency_id']/.." position="after">
|
||||
<group name="note">
|
||||
<field name="note"/>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="credit_control_policy_form" model="ir.ui.view">
|
||||
<field name="name">credit_control_usability.credit.control.policy.form</field>
|
||||
<field name="model">credit.control.policy</field>
|
||||
<field name="inherit_id" ref="account_credit_control.credit_control_policy_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='level_ids']/tree/field[@name='name']" position="before">
|
||||
<field name="internal_name"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='level_ids']/form//field[@name='name']" position="replace">
|
||||
<group name="level-main">
|
||||
|
||||
<field name="internal_name"/>
|
||||
<field name="name"/>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="credit_mangement_policy_level_form" model="ir.ui.view">
|
||||
<field name="name">credit_control_usability.credit.control.policy.level.form</field>
|
||||
<field name="model">credit.control.policy.level</field>
|
||||
<field name="inherit_id" ref="account_credit_control.credit_mangement_policy_level_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="name" position="before">
|
||||
<field name="internal_name"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="credit_control_policy_level_tree" model="ir.ui.view">
|
||||
<field name="name">credit_control_usability.credit.control.policy.level.tree</field>
|
||||
<field name="model">credit.control.policy.level</field>
|
||||
<field name="inherit_id" ref="account_credit_control.credit_control_policy_level_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="name" position="before">
|
||||
<field name="internal_name"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="credit_control_line_search" model="ir.ui.view">
|
||||
<field name="name">credit_control_usability.credit_control_line_search</field>
|
||||
<field name="model">credit.control.line</field>
|
||||
<field name="inherit_id" ref="account_credit_control.credit_control_line_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<filter name="filter_manual" position="after">
|
||||
<filter name="phone" string="Phone Call" domain="[('channel', '=', 'phone')]"/>
|
||||
<filter name="letter" string="Letter" domain="[('channel', '=', 'letter')]"/>
|
||||
<filter name="email" string="Email" domain="[('channel', '=', 'email')]"/>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="partner_credit_control_line_action" model="ir.actions.act_window">
|
||||
<field name="name">Credit Control Lines</field>
|
||||
<field name="res_model">credit.control.line</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="context">{'search_default_partner_id': active_id}</field>
|
||||
</record>
|
||||
|
||||
<record id="view_partner_form" model="ir.ui.view">
|
||||
<field name="name">account_credit_control_usability.button.res.partner.form</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='buttons']" position="inside">
|
||||
<button class="oe_inline oe_stat_button" type="action"
|
||||
name="%(partner_credit_control_line_action)d"
|
||||
attrs="{'invisible': [('customer', '=', False)]}"
|
||||
icon="fa-gavel">
|
||||
<field string="Credit Control"
|
||||
name="credit_control_line_count" widget="statinfo"/>
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- rapport -->
|
||||
<template id="report_credit_control_summary_document" inherit_id="account_credit_control.report_credit_control_summary_document">
|
||||
<xpath expr="//span[@t-field='l.amount_due']" position="attributes">
|
||||
<attribute name="t-field-options">{"widget": "monetary", "display_currency": "l.currency_id or l.company_id.currency_id"}</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
1
account_cutoff_accrual_picking_ods/__init__.py
Normal file
1
account_cutoff_accrual_picking_ods/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
24
account_cutoff_accrual_picking_ods/__manifest__.py
Normal file
24
account_cutoff_accrual_picking_ods/__manifest__.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'Account Cutoff Accrual Picking ODS',
|
||||
'version': '8.0.0.1.0',
|
||||
'category': 'Tools',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Adds an Aeroo ODS report on cutoff accrual',
|
||||
'description': """
|
||||
Account Cutoff Accrual Picking ODS
|
||||
==================================
|
||||
|
||||
This module will add an Aeroo ODS report on Accrued Revenue and Accrued Expense.
|
||||
|
||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
||||
""",
|
||||
'author': "Akretion",
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['account_cutoff_accrual_picking', 'report_aeroo'],
|
||||
'data': ['report.xml'],
|
||||
'installable': False,
|
||||
}
|
||||
BIN
account_cutoff_accrual_picking_ods/cutoff_accrual.ods
Normal file
BIN
account_cutoff_accrual_picking_ods/cutoff_accrual.ods
Normal file
Binary file not shown.
27
account_cutoff_accrual_picking_ods/report.xml
Normal file
27
account_cutoff_accrual_picking_ods/report.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
|
||||
<record id="account_cutoff_accrual_picking_ods" model="ir.actions.report.xml">
|
||||
<field name="name">Cutoff Accrual ODS</field>
|
||||
<field name="model">account.cutoff</field>
|
||||
<field name="report_name">account.cutoff.accrual.picking.ods</field>
|
||||
<field name="report_type">aeroo</field>
|
||||
<field name="in_format">oo-ods</field>
|
||||
<field name="report_rml">account_cutoff_accrual_picking_ods/cutoff_accrual.ods</field>
|
||||
<field name="parser_state">default</field>
|
||||
<field name="tml_source">file</field>
|
||||
<field name="out_format" ref="report_aeroo.report_mimetypes_ods_ods"/>
|
||||
</record>
|
||||
|
||||
<record id="account_cutoff_accrual_picking_ods_button" model="ir.values">
|
||||
<field name="name">Cutoff Accrual ODS</field>
|
||||
<field name="model">account.cutoff</field>
|
||||
<field name="key2">client_print_multi</field>
|
||||
<field name="value" eval="'ir.actions.report.xml,%d'%account_cutoff_accrual_picking_ods"/>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
1
account_cutoff_prepaid_ods/__init__.py
Normal file
1
account_cutoff_prepaid_ods/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
43
account_cutoff_prepaid_ods/__manifest__.py
Normal file
43
account_cutoff_prepaid_ods/__manifest__.py
Normal file
@@ -0,0 +1,43 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Account Cutoff Prepaid ODS module for Odoo
|
||||
# Copyright (C) 2016 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
{
|
||||
'name': 'Account Cutoff Prepaid ODS',
|
||||
'version': '8.0.0.1.0',
|
||||
'category': 'Tools',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Adds an Aeroo ODS report on cutoff prepaid',
|
||||
'description': """
|
||||
Account Cutoff Prepaid ODS
|
||||
===========================
|
||||
|
||||
This module will add an Aeroo ODS report on Prepaid Revenue and Prepaid Expense.
|
||||
|
||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
||||
""",
|
||||
'author': "Akretion",
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['account_cutoff_prepaid', 'report_aeroo'],
|
||||
'data': ['report.xml'],
|
||||
'installable': False,
|
||||
}
|
||||
BIN
account_cutoff_prepaid_ods/cutoff_prepaid.ods
Normal file
BIN
account_cutoff_prepaid_ods/cutoff_prepaid.ods
Normal file
Binary file not shown.
27
account_cutoff_prepaid_ods/report.xml
Normal file
27
account_cutoff_prepaid_ods/report.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
|
||||
<record id="account_cutoff_prepaid_ods" model="ir.actions.report.xml">
|
||||
<field name="name">Cutoff Prepaid ODS</field>
|
||||
<field name="model">account.cutoff</field>
|
||||
<field name="report_name">account.cutoff.prepaid.ods</field>
|
||||
<field name="report_type">aeroo</field>
|
||||
<field name="in_format">oo-ods</field>
|
||||
<field name="report_rml">account_cutoff_prepaid_ods/cutoff_prepaid.ods</field>
|
||||
<field name="parser_state">default</field>
|
||||
<field name="tml_source">file</field>
|
||||
<field name="out_format" ref="report_aeroo.report_mimetypes_ods_ods"/>
|
||||
</record>
|
||||
|
||||
<record id="account_cutoff_prepaid_ods_button" model="ir.values">
|
||||
<field name="name">Cutoff Prepaid ODS</field>
|
||||
<field name="model">account.cutoff</field>
|
||||
<field name="key2">client_print_multi</field>
|
||||
<field name="value" eval="'ir.actions.report.xml,%d'%account_cutoff_prepaid_ods"/>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
24
account_direct_debit_autogenerate/__init__.py
Normal file
24
account_direct_debit_autogenerate/__init__.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Account Direct Debit Autogenerate module for Odoo
|
||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
from . import account_invoice
|
||||
47
account_direct_debit_autogenerate/__manifest__.py
Normal file
47
account_direct_debit_autogenerate/__manifest__.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Account Direct Debit Autogenerate module for Odoo
|
||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
{
|
||||
'name': 'Account Direct Debit Autogenerate',
|
||||
'version': '0.1',
|
||||
'category': 'Accounting & Finance',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Auto-generate direct debit order on invoice validation',
|
||||
'description': """
|
||||
Account Direct Debit Autogenerate
|
||||
=================================
|
||||
|
||||
With this module, when you validate a customer invoice whose payment mode is SEPA Direct Debit :
|
||||
|
||||
* if a draft Direct Debit order for SEPA Direct Debit already exists, a new payment line is added to it for the invoice,
|
||||
|
||||
* otherwise, a new SEPA Direct Debit order is created for this invoice.
|
||||
|
||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['account_banking_sepa_direct_debit', 'account_payment_partner'],
|
||||
'data': [],
|
||||
'installable': False,
|
||||
}
|
||||
107
account_direct_debit_autogenerate/account_invoice.py
Normal file
107
account_direct_debit_autogenerate/account_invoice.py
Normal file
@@ -0,0 +1,107 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Account Direct Debit Autogenerate module for Odoo
|
||||
# Copyright (C) 2015 Akretion (www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp import models, api, _
|
||||
from openerp.exceptions import Warning
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AccountInvoice(models.Model):
|
||||
_inherit = 'account.invoice'
|
||||
|
||||
@api.model
|
||||
def _prepare_payment_order(self, invoice):
|
||||
vals = {
|
||||
'mode': invoice.payment_mode_id.id,
|
||||
'payment_order_type': 'debit',
|
||||
}
|
||||
return vals
|
||||
|
||||
@api.model
|
||||
def _prepare_payment_line(self, move_line, payment_order):
|
||||
assert move_line.invoice, 'The move line must be linked to an invoice'
|
||||
if not move_line.invoice.mandate_id:
|
||||
raise Warning(
|
||||
_('Missing Mandate on Invoice %s') % move_line.invoice.number)
|
||||
vals = {
|
||||
'order_id': payment_order.id,
|
||||
'move_line_id': move_line.id,
|
||||
'partner_id': move_line.partner_id.id,
|
||||
'amount_currency': move_line.debit,
|
||||
'communication': move_line.invoice.number.replace('/', ''),
|
||||
'state': 'structured',
|
||||
'date': move_line.date_maturity,
|
||||
'currency': move_line.invoice.currency_id.id,
|
||||
'mandate_id': move_line.invoice.mandate_id.id,
|
||||
'bank_id': move_line.invoice.mandate_id.partner_bank_id.id,
|
||||
}
|
||||
return vals
|
||||
|
||||
@api.multi
|
||||
def invoice_validate(self):
|
||||
'''Create Direct debit payment order on invoice validation or update
|
||||
an existing draft Direct Debit pay order'''
|
||||
res = super(AccountInvoice, self).invoice_validate()
|
||||
poo = self.env['payment.order']
|
||||
plo = self.env['payment.line']
|
||||
for invoice in self:
|
||||
if (
|
||||
invoice.type == 'out_invoice'
|
||||
and invoice.payment_mode_id
|
||||
and invoice.payment_mode_id.type
|
||||
and invoice.payment_mode_id.type.code
|
||||
and invoice.payment_mode_id.type.code.
|
||||
startswith('pain.008.001.')):
|
||||
payorders = poo.search([
|
||||
('state', '=', 'draft'),
|
||||
('payment_order_type', '=', 'debit'),
|
||||
('mode', '=', invoice.payment_mode_id.id),
|
||||
# mode is attached to company
|
||||
])
|
||||
if payorders:
|
||||
payorder = payorders[0]
|
||||
payorder_type = _('existing')
|
||||
else:
|
||||
payorder_vals = self._prepare_payment_order(invoice)
|
||||
payorder = poo.create(payorder_vals)
|
||||
payorder_type = _('new')
|
||||
logger.info(
|
||||
'New Direct Debit Order created %s'
|
||||
% payorder.reference)
|
||||
move_lines = [
|
||||
line for line in invoice.move_id.line_id
|
||||
if line.account_id == invoice.account_id]
|
||||
for move_line in move_lines:
|
||||
if not invoice.mandate_id:
|
||||
raise Warning(
|
||||
_("Missing Mandate on invoice %s")
|
||||
% invoice.number)
|
||||
# add payment line
|
||||
pl_vals = self._prepare_payment_line(move_line, payorder)
|
||||
pl = plo.create(pl_vals)
|
||||
invoice.message_post(
|
||||
_("A new payment line %s has been automatically "
|
||||
"created on the %s direct debit order %s")
|
||||
% (pl.name, payorder_type, payorder.reference))
|
||||
return res
|
||||
@@ -1 +1,3 @@
|
||||
from . import models
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import account_fiscal_position
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2016-2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "Account Fiscal Position Payable Receivable",
|
||||
"version": "12.0.1.0.0",
|
||||
"category": "Accounting & Finance",
|
||||
"license": "AGPL-3",
|
||||
"summary": "Configure payable/receivable accounts on fiscal positions",
|
||||
"description": """
|
||||
'name': 'Account Fiscal Position Payable Receivable',
|
||||
'version': '10.0.1.0.0',
|
||||
'category': 'Accounting & Finance',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Configure payable/receivable accounts on fiscal positions',
|
||||
'description': """
|
||||
Account Fiscal Position Payable Receivable
|
||||
==========================================
|
||||
|
||||
@@ -15,9 +16,11 @@ This module allows to configure a special *Partner Receivable Account* and a spe
|
||||
|
||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
||||
""",
|
||||
"author": "Akretion",
|
||||
"website": "http://www.akretion.com",
|
||||
"depends": ["account"],
|
||||
"data": ["views/account_fiscal_position_view.xml"],
|
||||
"installable": True,
|
||||
'author': "Akretion",
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['account'],
|
||||
'data': [
|
||||
'account_fiscal_position_view.xml',
|
||||
],
|
||||
'installable': True,
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2016-2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models, fields, api
|
||||
|
||||
|
||||
class AccountFiscalPosition(models.Model):
|
||||
_inherit = 'account.fiscal.position'
|
||||
|
||||
receivable_account_id = fields.Many2one(
|
||||
'account.account', string='Partner Receivable Account',
|
||||
company_dependent=True, domain=[('internal_type', '=', 'receivable')])
|
||||
payable_account_id = fields.Many2one(
|
||||
'account.account', string='Partner Payable Account',
|
||||
company_dependent=True, domain=[('internal_type', '=', 'payable')])
|
||||
|
||||
|
||||
class ResPartner(models.Model):
|
||||
_inherit = 'res.partner'
|
||||
|
||||
@api.onchange('property_account_position_id')
|
||||
def fiscal_position_receivable_payable_change(self):
|
||||
fp = self.property_account_position_id
|
||||
ipo = self.env['ir.property']
|
||||
if fp.receivable_account_id:
|
||||
self.property_account_receivable_id = fp.receivable_account_id
|
||||
else:
|
||||
self.property_account_receivable_id = ipo.get(
|
||||
'property_account_receivable_id', 'res.partner')
|
||||
if fp.payable_account_id:
|
||||
self.property_account_payable_id = fp.payable_account_id
|
||||
else:
|
||||
self.property_account_payable_id = ipo.get(
|
||||
'property_account_payable_id', 'res.partner')
|
||||
@@ -1,2 +0,0 @@
|
||||
from . import account_fiscal_position
|
||||
from . import res_partner
|
||||
@@ -1,21 +0,0 @@
|
||||
# © 2016-2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class AccountFiscalPosition(models.Model):
|
||||
_inherit = "account.fiscal.position"
|
||||
|
||||
receivable_account_id = fields.Many2one(
|
||||
"account.account",
|
||||
string="Partner Receivable Account",
|
||||
company_dependent=True,
|
||||
domain=[("internal_type", "=", "receivable")],
|
||||
)
|
||||
payable_account_id = fields.Many2one(
|
||||
"account.account",
|
||||
string="Partner Payable Account",
|
||||
company_dependent=True,
|
||||
domain=[("internal_type", "=", "payable")],
|
||||
)
|
||||
@@ -1,25 +0,0 @@
|
||||
# © 2016-2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models, api
|
||||
|
||||
|
||||
class ResPartner(models.Model):
|
||||
_inherit = "res.partner"
|
||||
|
||||
@api.onchange("property_account_position_id")
|
||||
def fiscal_position_receivable_payable_change(self):
|
||||
fp = self.property_account_position_id
|
||||
ipo = self.env["ir.property"]
|
||||
if fp.receivable_account_id:
|
||||
self.property_account_receivable_id = fp.receivable_account_id
|
||||
else:
|
||||
self.property_account_receivable_id = ipo.get(
|
||||
"property_account_receivable_id", "res.partner"
|
||||
)
|
||||
if fp.payable_account_id:
|
||||
self.property_account_payable_id = fp.payable_account_id
|
||||
else:
|
||||
self.property_account_payable_id = ipo.get(
|
||||
"property_account_payable_id", "res.partner"
|
||||
)
|
||||
@@ -1,2 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import account_invoice
|
||||
from . import account_invoice_report
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# Copyright 2015-2019 Akretion France (http://www.akretion.com)
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2015-2017 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'Account Invoice Margin',
|
||||
'version': '12.0.1.0.0',
|
||||
'category': 'Invoicing Management',
|
||||
'version': '10.0.1.0.0',
|
||||
'category': 'Accounting & Finance',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Copy standard price on invoice line and compute margins',
|
||||
'description': """
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# Copyright 2015-2019 Akretion France (http://www.akretion.com)
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2015-2017 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import api, fields, models
|
||||
from odoo import models, fields, api
|
||||
import odoo.addons.decimal_precision as dp
|
||||
|
||||
|
||||
@@ -47,18 +48,16 @@ class AccountInvoiceLine(models.Model):
|
||||
# it works in _get_current_rate
|
||||
# even if we set date = False in context
|
||||
# standard_price_inv_cur is in the UoM of the invoice line
|
||||
date = inv._get_currency_rate_date() or\
|
||||
fields.Date.context_today(self)
|
||||
company = inv.company_id
|
||||
company_currency = company.currency_id
|
||||
standard_price_inv_cur =\
|
||||
company_currency._convert(
|
||||
il.standard_price_company_currency,
|
||||
inv.currency_id, company, date)
|
||||
inv.company_id.currency_id.with_context(
|
||||
date=inv.date_invoice).compute(
|
||||
il.standard_price_company_currency,
|
||||
inv.currency_id)
|
||||
margin_inv_cur =\
|
||||
il.price_subtotal - il.quantity * standard_price_inv_cur
|
||||
margin_comp_cur = inv.currency_id._convert(
|
||||
margin_inv_cur, company_currency, company, date)
|
||||
margin_comp_cur = inv.currency_id.with_context(
|
||||
date=inv.date_invoice).compute(
|
||||
margin_inv_cur, inv.company_id.currency_id)
|
||||
if il.price_subtotal:
|
||||
margin_rate = 100 * margin_inv_cur / il.price_subtotal
|
||||
# for a refund, margin should be negative
|
||||
@@ -84,12 +83,12 @@ class AccountInvoiceLine(models.Model):
|
||||
std_price = pp.standard_price
|
||||
inv_uom_id = vals.get('uom_id')
|
||||
if inv_uom_id and inv_uom_id != pp.uom_id.id:
|
||||
inv_uom = self.env['uom.uom'].browse(inv_uom_id)
|
||||
std_price = pp.uom_id._compute_price(
|
||||
std_price, inv_uom)
|
||||
std_price = self.env['product.uom']._compute_price(
|
||||
pp.uom_id.id, std_price, inv_uom_id)
|
||||
vals['standard_price_company_currency'] = std_price
|
||||
return super(AccountInvoiceLine, self).create(vals)
|
||||
|
||||
@api.multi
|
||||
def write(self, vals):
|
||||
if not vals:
|
||||
vals = {}
|
||||
@@ -106,7 +105,7 @@ class AccountInvoiceLine(models.Model):
|
||||
# uom_id is NOT a required field
|
||||
if 'uom_id' in vals:
|
||||
if vals.get('uom_id'):
|
||||
inv_uom = self.env['uom.uom'].browse(
|
||||
inv_uom = self.env['product.uom'].browse(
|
||||
vals['uom_id'])
|
||||
else:
|
||||
inv_uom = False
|
||||
@@ -127,11 +126,11 @@ class AccountInvoice(models.Model):
|
||||
|
||||
margin_invoice_currency = fields.Monetary(
|
||||
string='Margin in Invoice Currency',
|
||||
compute='_compute_margin', store=True, readonly=True,
|
||||
readonly=True, compute='_compute_margin', store=True,
|
||||
currency_field='currency_id')
|
||||
margin_company_currency = fields.Monetary(
|
||||
string='Margin in Company Currency',
|
||||
compute='_compute_margin', store=True, readonly=True,
|
||||
readonly=True, compute='_compute_margin', store=True,
|
||||
currency_field='company_currency_id')
|
||||
|
||||
@api.depends(
|
||||
@@ -139,14 +138,12 @@ class AccountInvoice(models.Model):
|
||||
'invoice_line_ids.margin_invoice_currency',
|
||||
'invoice_line_ids.margin_company_currency')
|
||||
def _compute_margin(self):
|
||||
res = self.env['account.invoice.line'].read_group(
|
||||
[('invoice_id', 'in', self.ids)],
|
||||
['invoice_id', 'margin_invoice_currency',
|
||||
'margin_company_currency'],
|
||||
['invoice_id'])
|
||||
for re in res:
|
||||
if re['invoice_id']:
|
||||
inv = self.browse(re['invoice_id'][0])
|
||||
if inv.type in ('out_invoice', 'out_refund'):
|
||||
inv.margin_invoice_currency = re['margin_invoice_currency']
|
||||
inv.margin_company_currency = re['margin_company_currency']
|
||||
for inv in self:
|
||||
margin_inv_cur = 0.0
|
||||
margin_comp_cur = 0.0
|
||||
if inv.type in ('out_invoice', 'out_refund'):
|
||||
for il in inv.invoice_line_ids:
|
||||
margin_inv_cur += il.margin_invoice_currency
|
||||
margin_comp_cur += il.margin_company_currency
|
||||
inv.margin_invoice_currency = margin_inv_cur
|
||||
inv.margin_company_currency = margin_comp_cur
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
# Copyright 2018-2019 Akretion France (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class AccountInvoiceReport(models.Model):
|
||||
_inherit = 'account.invoice.report'
|
||||
|
||||
margin = fields.Float(string='Margin', readonly=True)
|
||||
# why digits=0 ??? Why is it like that in the native "account" module
|
||||
user_currency_margin = fields.Float(
|
||||
string="Margin", compute='_compute_user_currency_margin', digits=0)
|
||||
|
||||
_depends = {
|
||||
'account.invoice': [
|
||||
'account_id', 'amount_total_company_signed',
|
||||
'commercial_partner_id', 'company_id',
|
||||
'currency_id', 'date_due', 'date_invoice', 'fiscal_position_id',
|
||||
'journal_id', 'number', 'partner_bank_id', 'partner_id',
|
||||
'payment_term_id', 'residual', 'state', 'type', 'user_id',
|
||||
],
|
||||
'account.invoice.line': [
|
||||
'account_id', 'invoice_id', 'price_subtotal', 'product_id',
|
||||
'quantity', 'uom_id', 'account_analytic_id',
|
||||
'margin_company_currency',
|
||||
],
|
||||
'product.product': ['product_tmpl_id'],
|
||||
'product.template': ['categ_id'],
|
||||
'uom.uom': ['category_id', 'factor', 'name', 'uom_type'],
|
||||
'res.currency.rate': ['currency_id', 'name'],
|
||||
'res.partner': ['country_id'],
|
||||
}
|
||||
|
||||
@api.depends('currency_id', 'date', 'margin')
|
||||
def _compute_user_currency_margin(self):
|
||||
user_currency = self.env.user.company_id.currency_id
|
||||
currency_rate = self.env['res.currency.rate'].search([
|
||||
('rate', '=', 1),
|
||||
'|',
|
||||
('company_id', '=', self.env.user.company_id.id),
|
||||
('company_id', '=', False)], limit=1)
|
||||
base_currency = currency_rate.currency_id
|
||||
for record in self:
|
||||
date = record.date or fields.Date.today()
|
||||
company = record.company_id
|
||||
record.user_currency_margin = base_currency._convert(
|
||||
record.margin, user_currency, company, date)
|
||||
|
||||
# TODO check for refunds
|
||||
def _sub_select(self):
|
||||
select_str = super(AccountInvoiceReport, self)._sub_select()
|
||||
select_str += ", SUM(ail.margin_company_currency) AS margin"
|
||||
return select_str
|
||||
|
||||
def _select(self):
|
||||
select_str = super(AccountInvoiceReport, self)._select()
|
||||
select_str += ", sub.margin AS margin"
|
||||
return select_str
|
||||
@@ -12,24 +12,18 @@
|
||||
<field name="model">account.invoice.line</field>
|
||||
<field name="inherit_id" ref="account.view_invoice_line_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='analytic_tag_ids']/.." position="inside">
|
||||
<field name="discount" position="after">
|
||||
<field name="standard_price_company_currency"
|
||||
string="Cost Price in Comp. Cur."
|
||||
groups="base.group_no_one"/>
|
||||
groups="account.group_account_user"/>
|
||||
<field name="standard_price_invoice_currency"
|
||||
string="Cost Price in Inv. Cur."
|
||||
groups="base.group_no_one"/>
|
||||
widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"
|
||||
groups="account.group_account_user"/>
|
||||
<field name="margin_invoice_currency"
|
||||
string="Margin in Inv. Cur."
|
||||
groups="base.group_no_one"/>
|
||||
groups="account.group_account_user"/>
|
||||
<field name="margin_company_currency"
|
||||
string="Margin in Comp. Cur."
|
||||
groups="base.group_no_one"/>
|
||||
<label for="margin_rate" groups="base.group_no_one"/>
|
||||
<div name="margin_rate" groups="base.group_no_one">
|
||||
<field name="margin_rate" class="oe_inline"/> %
|
||||
</div>
|
||||
</xpath>
|
||||
groups="account.group_account_user"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -40,10 +34,18 @@
|
||||
<field name="arch" type="xml">
|
||||
<field name="move_id" position="after">
|
||||
<field name="margin_invoice_currency"
|
||||
string="Margin in Inv. Cur." groups="base.group_no_one"/>
|
||||
string="Margin" groups="account.group_account_user"/>
|
||||
<field name="margin_company_currency"
|
||||
string="Margin in Comp. Cur." groups="base.group_no_one"/>
|
||||
groups="account.group_account_user"/>
|
||||
</field>
|
||||
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='price_subtotal']" position="after">
|
||||
<field name="standard_price_invoice_currency" groups="base.group_no_one" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||
<field name="standard_price_company_currency" groups="base.group_no_one" widget="monetary" options="{'currency_field': 'company_currency_id'}"/>
|
||||
<field name="margin_invoice_currency" groups="base.group_no_one"/>
|
||||
<field name="margin_company_currency" groups="base.group_no_one"/>
|
||||
<field name="margin_rate" groups="base.group_no_one"/>
|
||||
<field name="company_currency_id" invisible="1"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
3
account_invoice_margin_report/__init__.py
Normal file
3
account_invoice_margin_report/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import report
|
||||
41
account_invoice_margin_report/__manifest__.py
Normal file
41
account_invoice_margin_report/__manifest__.py
Normal file
@@ -0,0 +1,41 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Account Invoice Margin Report module for Odoo
|
||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
{
|
||||
'name': 'Account Invoice Margin Report',
|
||||
'version': '0.1',
|
||||
'category': 'Accounting & Finance',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Add margin measure in Invoices Analysis',
|
||||
'description': """
|
||||
This module adds the measure *Margin* in the Invoices Analysis pivot table. It is in a separate module because it depends on the module *bi_invoice_company_currency* (in which I re-wrote the Invoice Analysis pivot table).
|
||||
|
||||
This module has been written by Alexis de Lattre from Akretion
|
||||
<alexis.delattre@akretion.com>.
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['account_invoice_margin', 'bi_invoice_company_currency'],
|
||||
'data': [],
|
||||
'installable': False,
|
||||
}
|
||||
3
account_invoice_margin_report/report/__init__.py
Normal file
3
account_invoice_margin_report/report/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import invoice_report
|
||||
39
account_invoice_margin_report/report/invoice_report.py
Normal file
39
account_invoice_margin_report/report/invoice_report.py
Normal file
@@ -0,0 +1,39 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Account Invoice Margin Report module for Odoo
|
||||
# Copyright (C) 2015 Akretion (http://www.akretion.com/)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp import models, fields
|
||||
import openerp.addons.decimal_precision as dp
|
||||
|
||||
|
||||
class AccountInvoiceReportBi(models.Model):
|
||||
_inherit = "account.invoice.report.bi"
|
||||
|
||||
margin_company_currency = fields.Float(
|
||||
string='Margin', readonly=True,
|
||||
digits=dp.get_precision('Account'))
|
||||
|
||||
def _select(self):
|
||||
select = super(AccountInvoiceReportBi, self)._select()
|
||||
select += """
|
||||
, sum(ail.margin_company_currency) AS margin_company_currency
|
||||
"""
|
||||
return select
|
||||
1
account_invoice_transmit_method_street3/__init__.py
Normal file
1
account_invoice_transmit_method_street3/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
26
account_invoice_transmit_method_street3/__manifest__.py
Normal file
26
account_invoice_transmit_method_street3/__manifest__.py
Normal file
@@ -0,0 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2018 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'partner_address_street3 / account_invoice_transmit_method compat.',
|
||||
'version': '10.0.0.1.0',
|
||||
'category': 'Partner',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Compatibility between partner_address_street3 and account_invoice_transmit_method',
|
||||
'description': """
|
||||
Glue module between partner_address_street3 and account_invoice_transmit_method
|
||||
===============================================================================
|
||||
|
||||
Stupid technical module to workaround an Odoo framework limitation about the inherit of the context attribute in a view.
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['partner_address_street3', 'account_invoice_transmit_method'],
|
||||
'data': [
|
||||
'partner_view.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'auto_install': True,
|
||||
}
|
||||
23
account_invoice_transmit_method_street3/partner_view.xml
Normal file
23
account_invoice_transmit_method_street3/partner_view.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2018 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
|
||||
<record id="view_partner_form" model="ir.ui.view">
|
||||
<field name="name">Compatibility partner_address_street3 / account_invoice_transmit_method</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="priority">1000</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="child_ids" position="attributes">
|
||||
<attribute name="context">{'default_parent_id': active_id, 'default_street': street, 'default_street2': street2, 'default_city': city, 'default_state_id': state_id, 'default_zip': zip, 'default_country_id': country_id, 'default_supplier': supplier, 'default_customer': customer, 'default_lang': lang, 'default_customer_invoice_transmit_method_code': customer_invoice_transmit_method_code, 'default_supplier_invoice_transmit_method_code': supplier_invoice_transmit_method_code, 'default_street3': street3}</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
||||
@@ -1,39 +0,0 @@
|
||||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
|
||||
Account Invoice Update Wizard
|
||||
=============================
|
||||
|
||||
This module adds a button *Update Invoice* on Customer and Supplier invoices in
|
||||
Open or Paid state. This button starts a wizard which allows the user to update
|
||||
non-legal fields of the invoice:
|
||||
|
||||
* Source Document
|
||||
* Reference/Description
|
||||
* Payment terms (update allowed only to a payment term with same number of terms
|
||||
of the same amount and on invoices without any payment)
|
||||
* Bank Account
|
||||
* Salesman
|
||||
* Notes
|
||||
* Description of invoice lines
|
||||
* Analytic account
|
||||
* Analytic tags
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues
|
||||
<https://github.com/akretion/odoo-usability/issues>`_. In case of trouble, please
|
||||
check there if your issue has already been reported. If you spotted it first,
|
||||
help us smash it by providing detailed and welcomed feedback.
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
* Florian da Costa <florian.dacosta@akretion.com>
|
||||
* Matthieu Dietrich <matthieu.dietrich@camptocamp.com>
|
||||
* Yannick Vaucher <yannick.vaucher@camptocamp.com>
|
||||
* Mykhailo Panarin <m.panarin@mobilunity.com>
|
||||
* Artem Kostyuk <a.kostyuk@mobilunity.com>
|
||||
@@ -1,2 +1 @@
|
||||
from . import models
|
||||
from . import wizard
|
||||
|
||||
@@ -1,18 +1,34 @@
|
||||
# Copyright 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# Copyright 2018-2019 Camptocamp
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# Copyright 2018 Camptocamp
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'Account Invoice Update Wizard',
|
||||
'version': '12.0.1.0.0',
|
||||
'version': '8.0.1.0.0',
|
||||
'category': 'Accounting & Finance',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Wizard to update non-legal fields of an open/paid invoice',
|
||||
'description': """
|
||||
Account Invoice Update Wizard
|
||||
=============================
|
||||
|
||||
This module adds a button *Update Invoice* on Customer and Supplier invoices in Open or Paid state. This button starts a wizard which allows the user to update non-legal fields of the invoice:
|
||||
|
||||
* Source Document
|
||||
* Reference/Description
|
||||
* Payment terms (update allowed only to a payment term with same number of terms of the same amount and on invoices without any payment)
|
||||
* Bank Account
|
||||
* Salesman
|
||||
* Notes
|
||||
* Description of invoice lines
|
||||
* Analytic account
|
||||
* Analytic tags
|
||||
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'https://github.com/akretion/odoo-usability',
|
||||
'depends': [
|
||||
'account',
|
||||
],
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['account'],
|
||||
'data': [
|
||||
'wizard/account_invoice_update_view.xml',
|
||||
'views/account_invoice.xml',
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
from . import account_invoice
|
||||
@@ -1,22 +0,0 @@
|
||||
# Copyright 2019 Camptocamp
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models, fields, api, _
|
||||
from odoo.exceptions import UserError
|
||||
import odoo.addons.decimal_precision as dp
|
||||
|
||||
|
||||
class AccountInvoice(models.Model):
|
||||
_inherit = 'account.invoice'
|
||||
|
||||
def prepare_update_wizard(self):
|
||||
self.ensure_one()
|
||||
wizard = self.env['account.invoice.update']
|
||||
res = wizard._prepare_default_get(self)
|
||||
action = self.env.ref(
|
||||
'account_invoice_update_wizard.account_invoice_update_action'
|
||||
).read()[0]
|
||||
action['name'] = "Update Wizard"
|
||||
action['res_id'] = wizard.create(res).id
|
||||
return action
|
||||
|
||||
@@ -1,51 +1,53 @@
|
||||
# Copyright 2018-2019 Camptocamp
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2018 Camptocamp
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo.tests.common import SavepointCase
|
||||
from odoo.tests.common import TransactionCase
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
class TestAccountInvoiceUpdateWizard(SavepointCase):
|
||||
class TestAccountInvoiceUpdateWizard(TransactionCase):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.customer12 = cls.env.ref('base.res_partner_12')
|
||||
cls.product16 = cls.env.ref('product.product_product_16')
|
||||
cls.product24 = cls.env.ref('product.product_product_24')
|
||||
uom_unit = cls.env.ref('uom.product_uom_categ_unit')
|
||||
def setUp(self):
|
||||
super(TestAccountInvoiceUpdateWizard, self).setUp()
|
||||
self.customer12 = self.env.ref('base.res_partner_12')
|
||||
self.product16 = self.env.ref('product.product_product_16')
|
||||
self.product24 = self.env.ref('product.product_product_24')
|
||||
uom_unit = self.env.ref('product.product_uom_categ_unit')
|
||||
|
||||
cls.invoice1 = cls.env['account.invoice'].create({
|
||||
self.invoice1 = self.env['account.invoice'].create({
|
||||
'name': 'Test invoice',
|
||||
'partner_id': cls.customer12.id,
|
||||
'partner_id': self.customer12.id,
|
||||
})
|
||||
cls.inv_line1 = cls.env['account.invoice.line'].create({
|
||||
'invoice_id': cls.invoice1.id,
|
||||
self.inv_line1 = self.env['account.invoice.line'].create({
|
||||
'invoice_id': self.invoice1.id,
|
||||
'name': "Line1",
|
||||
'product_id': cls.product16.id,
|
||||
'product_id': self.product16.id,
|
||||
'product_uom_id': uom_unit.id,
|
||||
'account_id': cls.invoice1.account_id.id,
|
||||
'account_id': self.invoice1.account_id.id,
|
||||
'price_unit': 42.0,
|
||||
})
|
||||
cls.inv_line2 = cls.env['account.invoice.line'].create({
|
||||
'invoice_id': cls.invoice1.id,
|
||||
self.inv_line2 = self.env['account.invoice.line'].create({
|
||||
'invoice_id': self.invoice1.id,
|
||||
'name': "Line2",
|
||||
'product_id': cls.product24.id,
|
||||
'product_id': self.product24.id,
|
||||
'product_uom_id': uom_unit.id,
|
||||
'account_id': cls.invoice1.account_id.id,
|
||||
'account_id': self.invoice1.account_id.id,
|
||||
'price_unit': 1111.1,
|
||||
})
|
||||
|
||||
cls.aa1 = cls.env.ref('analytic.analytic_partners_camp_to_camp')
|
||||
cls.aa2 = cls.env.ref('analytic.analytic_nebula')
|
||||
cls.atag1 = cls.env.ref('analytic.tag_contract')
|
||||
cls.atag2 = cls.env['account.analytic.tag'].create({
|
||||
'name': 'の',
|
||||
self.aa1 = self.env.ref('analytic.analytic_partners_camp_to_camp')
|
||||
self.aa2 = self.env.ref('analytic.analytic_nebula')
|
||||
self.atag1 = self.env.ref('analytic.tag_contract')
|
||||
self.atag2 = self.env['account.analytic.tag'].create({
|
||||
'name': u'の',
|
||||
})
|
||||
|
||||
def create_wizard(self, invoice):
|
||||
res = self.invoice1.prepare_update_wizard()
|
||||
self.wiz = self.env['account.invoice.update'].browse(res['res_id'])
|
||||
def create_wizard(self):
|
||||
UpdateWizard = self.env['account.invoice.update'].with_context(
|
||||
active_model='account.invoice',
|
||||
active_id=self.invoice1.id)
|
||||
self.wiz = UpdateWizard.create({})
|
||||
|
||||
def test_add_analytic_account_line1(self):
|
||||
""" Add analytic account on an invoice line
|
||||
@@ -56,7 +58,7 @@ class TestAccountInvoiceUpdateWizard(SavepointCase):
|
||||
- create a new analytic line.
|
||||
"""
|
||||
self.invoice1.action_invoice_open()
|
||||
self.create_wizard(self.invoice1)
|
||||
self.create_wizard()
|
||||
|
||||
wiz_line = self.wiz.line_ids.filtered(
|
||||
lambda rec: rec.invoice_line_id == self.inv_line1)
|
||||
@@ -78,7 +80,7 @@ class TestAccountInvoiceUpdateWizard(SavepointCase):
|
||||
self.inv_line1.account_analytic_id = self.aa2
|
||||
|
||||
self.invoice1.action_invoice_open()
|
||||
self.create_wizard(self.invoice1)
|
||||
self.create_wizard()
|
||||
|
||||
wiz_line = self.wiz.line_ids.filtered(
|
||||
lambda rec: rec.invoice_line_id == self.inv_line1)
|
||||
@@ -103,7 +105,7 @@ class TestAccountInvoiceUpdateWizard(SavepointCase):
|
||||
self.inv_line2.unit_price = 42.0
|
||||
|
||||
self.invoice1.action_invoice_open()
|
||||
self.create_wizard(self.invoice1)
|
||||
self.create_wizard()
|
||||
|
||||
line1 = self.wiz.line_ids[0]
|
||||
line1.account_analytic_id = self.aa1
|
||||
@@ -117,7 +119,7 @@ class TestAccountInvoiceUpdateWizard(SavepointCase):
|
||||
This will update move line.
|
||||
"""
|
||||
self.invoice1.action_invoice_open()
|
||||
self.create_wizard(self.invoice1)
|
||||
self.create_wizard()
|
||||
|
||||
wiz_line = self.wiz.line_ids.filtered(
|
||||
lambda rec: rec.invoice_line_id == self.inv_line1)
|
||||
@@ -139,7 +141,7 @@ class TestAccountInvoiceUpdateWizard(SavepointCase):
|
||||
self.inv_line1.analytic_tag_ids = self.atag1
|
||||
|
||||
self.invoice1.action_invoice_open()
|
||||
self.create_wizard(self.invoice1)
|
||||
self.create_wizard()
|
||||
|
||||
wiz_line = self.wiz.line_ids.filtered(
|
||||
lambda rec: rec.invoice_line_id == self.inv_line1)
|
||||
@@ -160,7 +162,7 @@ class TestAccountInvoiceUpdateWizard(SavepointCase):
|
||||
- create an analytic line
|
||||
"""
|
||||
self.invoice1.action_invoice_open()
|
||||
self.create_wizard(self.invoice1)
|
||||
self.create_wizard()
|
||||
|
||||
wiz_line = self.wiz.line_ids.filtered(
|
||||
lambda rec: rec.invoice_line_id == self.inv_line1)
|
||||
@@ -184,7 +186,7 @@ class TestAccountInvoiceUpdateWizard(SavepointCase):
|
||||
self.inv_line1.account_analytic_id = self.aa2
|
||||
|
||||
self.invoice1.action_invoice_open()
|
||||
self.create_wizard(self.invoice1)
|
||||
self.create_wizard()
|
||||
|
||||
wiz_line = self.wiz.line_ids.filtered(
|
||||
lambda rec: rec.invoice_line_id == self.inv_line1)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
© 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
<field name="model">account.invoice</field>
|
||||
<field name="inherit_id" ref="account.invoice_supplier_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<button name="action_invoice_draft" position="before">
|
||||
<button name="prepare_update_wizard" type="object" string="Update Invoice" states="open,paid" groups="account.group_account_invoice"/>
|
||||
<button name="action_invoice_cancel" position="before">
|
||||
<button name="%(account_invoice_update_action)d" type="action" string="Update Invoice" states="open,paid" groups="account.group_account_invoice"/>
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
@@ -20,8 +20,8 @@
|
||||
<field name="model">account.invoice</field>
|
||||
<field name="inherit_id" ref="account.invoice_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<button name="action_invoice_draft" position="before">
|
||||
<button name="prepare_update_wizard" type="object" string="Update Invoice" states="open,paid" groups="account.group_account_invoice"/>
|
||||
<button name="action_invoice_cancel" position="before">
|
||||
<button name="%(account_invoice_update_action)d" type="action" string="Update Invoice" states="open,paid" groups="account.group_account_invoice"/>
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# Copyright 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# Copyright 2018-2019 Camptocamp
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# Copyright 2018 Camptocamp
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models, fields, api, _
|
||||
@@ -57,8 +58,16 @@ class AccountInvoiceUpdate(models.TransientModel):
|
||||
'price_subtotal': line.price_subtotal,
|
||||
'account_analytic_id': line.account_analytic_id.id,
|
||||
'analytic_tag_ids': aa_tags,
|
||||
'display_type': line.display_type,
|
||||
}])
|
||||
}])
|
||||
return res
|
||||
|
||||
@api.model
|
||||
def default_get(self, fields_list):
|
||||
res = super(AccountInvoiceUpdate, self).default_get(fields_list)
|
||||
assert self._context.get('active_model') == 'account.invoice',\
|
||||
'active_model should be account.invoice'
|
||||
inv = self.env['account.invoice'].browse(self._context['active_id'])
|
||||
res = self._prepare_default_get(inv)
|
||||
return res
|
||||
|
||||
@api.onchange('type')
|
||||
@@ -132,7 +141,7 @@ class AccountInvoiceUpdate(models.TransientModel):
|
||||
# be grouped unless journal.group_invoice_line is True
|
||||
inv_line = self.invoice_id.invoice_line_ids.filtered(
|
||||
lambda rec: rec.product_id == move_line.product_id)
|
||||
if len(inv_line) != 1:
|
||||
if len(inv_line) <> 1:
|
||||
raise UserError(
|
||||
"Cannot match a single invoice line to move line %s" %
|
||||
move_line.name)
|
||||
@@ -212,7 +221,7 @@ class AccountInvoiceUpdate(models.TransientModel):
|
||||
mlines[amount].append(line)
|
||||
else:
|
||||
mlines[amount] = [line]
|
||||
for iamount, lines in mlines.items():
|
||||
for iamount, lines in mlines.iteritems():
|
||||
if len(lines) != len(new_pterm.get(iamount, [])):
|
||||
raise UserError(_(
|
||||
"The original payment term '%s' doesn't have the "
|
||||
@@ -273,7 +282,7 @@ class AccountInvoiceUpdate(models.TransientModel):
|
||||
updated = True
|
||||
line.invoice_line_id.write(ilvals)
|
||||
if updated:
|
||||
inv.message_post(body=_(
|
||||
inv.message_post(_(
|
||||
'Non-legal fields of invoice updated via the Invoice Update '
|
||||
'wizard.'))
|
||||
return True
|
||||
@@ -288,9 +297,6 @@ class AccountInvoiceLineUpdate(models.TransientModel):
|
||||
invoice_line_id = fields.Many2one(
|
||||
'account.invoice.line', string='Invoice Line', readonly=True)
|
||||
name = fields.Text(string='Description', required=True)
|
||||
display_type = fields.Selection([
|
||||
('line_section', "Section"),
|
||||
('line_note', "Note")], default=False, help="Technical field for UX purpose.")
|
||||
quantity = fields.Float(
|
||||
string='Quantity', digits=dp.get_precision('Product Unit of Measure'),
|
||||
readonly=True)
|
||||
|
||||
@@ -6,49 +6,48 @@
|
||||
|
||||
<odoo>
|
||||
|
||||
<record id="account_invoice_update_form" model="ir.ui.view">
|
||||
<field name="model">account.invoice.update</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Update Invoice Wizard">
|
||||
<group name="main">
|
||||
<field name="invoice_id" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="reference" attrs="{'invisible': [('type', 'not in', ('in_invoice', 'in_refund'))]}"/>
|
||||
<field name="origin"/>
|
||||
<field name="name"/>
|
||||
<field name="payment_term_id" widget="selection"/>
|
||||
<field name="partner_bank_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="comment"/>
|
||||
</group>
|
||||
<group name="lines">
|
||||
<field name="line_ids" nolabel="1">
|
||||
<tree editable="bottom" create="false" delete="false" edit="true">
|
||||
<field name="invoice_line_id" invisible="1"/>
|
||||
<field name="display_type" invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="quantity" attrs="{'invisible': [('display_type', '!=', False)]}"/>
|
||||
<field name="price_subtotal" attrs="{'invisible': [('display_type', '!=', False)]}"/>
|
||||
<field name="account_analytic_id" attrs="{'invisible': [('display_type', '!=', False)]}" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="analytic_tag_ids" attrs="{'invisible': [('display_type', '!=', False)]}" groups="analytic.group_analytic_accounting" widget="many2many_tags"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="run" type="object" class="oe_highlight" string="Update"/>
|
||||
<button special="cancel" string="Cancel" class="oe_link"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_invoice_update_form" model="ir.ui.view">
|
||||
<field name="model">account.invoice.update</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Update Invoice Wizard">
|
||||
<group name="main">
|
||||
<field name="invoice_id" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="reference" attrs="{'invisible': [('type', 'not in', ('in_invoice', 'in_refund'))]}"/>
|
||||
<field name="origin"/>
|
||||
<field name="name"/>
|
||||
<field name="payment_term_id" widget="selection"/>
|
||||
<field name="partner_bank_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="comment"/>
|
||||
</group>
|
||||
<group name="lines">
|
||||
<field name="line_ids" nolabel="1">
|
||||
<tree editable="bottom">
|
||||
<field name="invoice_line_id" invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="quantity"/>
|
||||
<field name="price_subtotal"/>
|
||||
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="analytic_tag_ids" groups="analytic.group_analytic_accounting" widget="many2many_tags"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="run" type="object" class="oe_highlight" string="Update"/>
|
||||
<button special="cancel" string="Cancel" class="oe_link"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_invoice_update_action" model="ir.actions.act_window">
|
||||
<field name="name">Invoice Update Wizard</field>
|
||||
<field name="res_model">account.invoice.update</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<record id="account_invoice_update_action" model="ir.actions.act_window">
|
||||
<field name="name">Invoice Update Wizard</field>
|
||||
<field name="res_model">account.invoice.update</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
3
account_move_line_filter_wizard/__init__.py
Normal file
3
account_move_line_filter_wizard/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import wizard
|
||||
25
account_move_line_filter_wizard/__manifest__.py
Normal file
25
account_move_line_filter_wizard/__manifest__.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2016-2018 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'Account Move Line Filter Wizard',
|
||||
'version': '10.0.1.0.0',
|
||||
'category': 'Accounting',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Easy and fast access to the details of an account',
|
||||
'description': """
|
||||
Account Move Line Filter Wizard
|
||||
===============================
|
||||
|
||||
This module adds a wizard in Accounting > ... >
|
||||
|
||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['account_usability'],
|
||||
'data': ['wizard/account_move_line_filter_view.xml'],
|
||||
'installable': True,
|
||||
}
|
||||
3
account_move_line_filter_wizard/wizard/__init__.py
Normal file
3
account_move_line_filter_wizard/wizard/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import account_move_line_filter
|
||||
@@ -0,0 +1,46 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2016-2018 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models, fields, api
|
||||
|
||||
|
||||
class AccountMoveLineFilterWizard(models.TransientModel):
|
||||
_name = 'account.move.line.filter.wizard'
|
||||
_description = 'Wizard for easy and fast access to account move lines'
|
||||
|
||||
partner_id = fields.Many2one(
|
||||
'res.partner', string='Partner', domain=[('parent_id', '=', False)])
|
||||
account_id = fields.Many2one(
|
||||
'account.account', string='Account',
|
||||
domain=[('deprecated', '=', False)], required=True)
|
||||
account_reconcile = fields.Boolean(
|
||||
related='account_id.reconcile', readonly=True)
|
||||
reconcile = fields.Selection([
|
||||
('unreconciled', 'Unreconciled'),
|
||||
('reconciled', 'Fully Reconciled'),
|
||||
# ('partial_reconciled', 'Partially Reconciled'),
|
||||
], string='Reconciliation Filter')
|
||||
|
||||
@api.onchange('partner_id')
|
||||
def partner_id_change(self):
|
||||
if self.partner_id:
|
||||
if self.partner_id.customer:
|
||||
self.account_id =\
|
||||
self.partner_id.property_account_receivable_id.id
|
||||
else:
|
||||
self.account_id =\
|
||||
self.partner_id.property_account_payable_id.id
|
||||
|
||||
def go(self):
|
||||
self.ensure_one()
|
||||
action = self.env['ir.actions.act_window'].for_xml_id(
|
||||
'account', 'action_account_moves_all_a')
|
||||
action['context'] = {'search_default_account_id': [self.account_id.id]}
|
||||
if self.partner_id:
|
||||
action['context']['search_default_partner_id'] =\
|
||||
[self.partner_id.id]
|
||||
if self.reconcile:
|
||||
action['context']['search_default_%s' % self.reconcile] = True
|
||||
return action
|
||||
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
Copyright (C) 2016-2018 Akretion (http://www.akretion.com/)
|
||||
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
<record id="account_move_line_filter_wizard_form" model="ir.ui.view">
|
||||
<field name="name">account_move_line_filter_wizard_form</field>
|
||||
<field name="model">account.move.line.filter.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account Move Lines">
|
||||
<group name="filters" string="Filters">
|
||||
<field name="partner_id"/>
|
||||
<field name="account_id"/>
|
||||
<field name="account_reconcile" invisible="1"/>
|
||||
<field name="reconcile"
|
||||
attrs="{'invisible': [('account_reconcile', '!=', True)]}"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button type="object" name="go" string="Go" class="btn-primary"/>
|
||||
<button special="cancel" string="Cancel" class="btn-default"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_move_line_filter_wizard_action" model="ir.actions.act_window">
|
||||
<field name="name">Journal Items of Account</field>
|
||||
<field name="res_model">account.move.line.filter.wizard</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="account_move_line_filter_wizard_menu"
|
||||
action="account_move_line_filter_wizard_action"
|
||||
parent="account.menu_finance_entries"
|
||||
sequence="-1"/>
|
||||
|
||||
|
||||
</odoo>
|
||||
3
account_move_line_start_end_dates_xls/__init__.py
Normal file
3
account_move_line_start_end_dates_xls/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import account_move_line
|
||||
44
account_move_line_start_end_dates_xls/__manifest__.py
Normal file
44
account_move_line_start_end_dates_xls/__manifest__.py
Normal file
@@ -0,0 +1,44 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Account Move Line Start End Dates XLS module for Odoo
|
||||
# Copyright (C) 2014-2016 Akretion (http://www.akretion.com/)
|
||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
{
|
||||
'name': 'Account Move Line Start End Dates XLS',
|
||||
'version': '0.1',
|
||||
'category': 'Accounting & Finance',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Adds start and end dates in the XLS export of the move lines',
|
||||
'description': """
|
||||
Account Move Line Start End Dates XLS
|
||||
=====================================
|
||||
|
||||
This module adds *Start Date* and *End Date* in the XLS export of the account move lines.
|
||||
|
||||
This module has been written by Alexis de Lattre from Akretion
|
||||
<alexis.delattre@akretion.com>.
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com/',
|
||||
'depends': ['account_cutoff_prepaid', 'account_move_line_report_xls'],
|
||||
'data': [],
|
||||
'installable': False,
|
||||
}
|
||||
66
account_move_line_start_end_dates_xls/account_move_line.py
Normal file
66
account_move_line_start_end_dates_xls/account_move_line.py
Normal file
@@ -0,0 +1,66 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Account Move Line Start End Dates XLS module for Odoo
|
||||
# Copyright (C) 2014-2016 Akretion (http://www.akretion.com/)
|
||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import xlwt
|
||||
from openerp import models, api
|
||||
from openerp.addons.report_xls.utils import _render
|
||||
from openerp.addons.report_xls.report_xls import report_xls
|
||||
|
||||
|
||||
class AccountMoveLine(models.Model):
|
||||
_inherit = 'account.move.line'
|
||||
|
||||
@api.model
|
||||
def _report_xls_fields(self):
|
||||
res = super(AccountMoveLine, self)._report_xls_fields()
|
||||
return res + ['start_date', 'end_date']
|
||||
|
||||
@api.model
|
||||
def _report_xls_template(self):
|
||||
res = super(AccountMoveLine, self)._report_xls_template()
|
||||
bc = '22'
|
||||
aml_cell_style_date = xlwt.easyxf(
|
||||
'borders: left thin, right thin, top thin, bottom thin, '
|
||||
'left_colour %s, right_colour %s, top_colour %s, '
|
||||
'bottom_colour %s; align: horz left;'
|
||||
% (bc, bc, bc, bc), num_format_str=report_xls.date_format)
|
||||
res.update({
|
||||
'start_date': {
|
||||
'header': [1, 13, 'text', _render("_('Start Date')")],
|
||||
'lines': [1, 0, _render(
|
||||
"line.start_date and line.start_date != 'False' and "
|
||||
"'date' or 'text'"), _render(
|
||||
"line.start_date and line.start_date != 'False' and "
|
||||
"datetime.strptime(line.start_date, '%Y-%m-%d') or None"),
|
||||
None, aml_cell_style_date],
|
||||
'totals': [1, 0, 'text', None]},
|
||||
'end_date': {
|
||||
'header': [1, 13, 'text', _render("_('End Date')")],
|
||||
'lines': [1, 0, _render(
|
||||
"line.end_date and line.end_date != 'False' and "
|
||||
"'date' or 'text'"), _render(
|
||||
"line.end_date and line.end_date != 'False' and "
|
||||
"datetime.strptime(line.end_date, '%Y-%m-%d') or None"),
|
||||
None, aml_cell_style_date],
|
||||
'totals': [1, 0, 'text', None]},
|
||||
})
|
||||
return res
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
1
account_no_analytic_tags/__init__.py
Normal file
1
account_no_analytic_tags/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
25
account_no_analytic_tags/__manifest__.py
Normal file
25
account_no_analytic_tags/__manifest__.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2017 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'Account No Analytic Tags',
|
||||
'version': '10.0.1.0.0',
|
||||
'category': 'Accounting & Finance',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'No Analytic Tags in Accounting',
|
||||
'description': """
|
||||
Account No Analytic Tags
|
||||
========================
|
||||
|
||||
This module hides analytic tags on invoices and move lines.
|
||||
|
||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['account'],
|
||||
'data': ['account_view.xml'],
|
||||
'installable': True,
|
||||
}
|
||||
46
account_no_analytic_tags/account_view.xml
Normal file
46
account_no_analytic_tags/account_view.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
© 2017 Akretion (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
<!-- INVOICE -->
|
||||
<record id="invoice_supplier_form" model="ir.ui.view">
|
||||
<field name="name">account_no_analytic_tags.supplier.invoice.form</field>
|
||||
<field name="model">account.invoice</field>
|
||||
<field name="inherit_id" ref="account.invoice_supplier_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='analytic_tag_ids']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="invoice_form" model="ir.ui.view">
|
||||
<field name="name">account_no_analytic_tags.invoice.form</field>
|
||||
<field name="model">account.invoice</field>
|
||||
<field name="inherit_id" ref="account.invoice_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='analytic_tag_ids']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ACCOUNT MOVE LINE -->
|
||||
<record id="view_move_line_form" model="ir.ui.view">
|
||||
<field name="name">account_no_analytic_tags.move.line.form</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account.view_move_line_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="analytic_tag_ids" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
||||
@@ -1,96 +0,0 @@
|
||||
=================
|
||||
Account Usability
|
||||
=================
|
||||
|
||||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! 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-akretion%2Fodoo--usability-lightgray.png?logo=github
|
||||
:target: https://github.com/akretion/odoo-usability/tree/12.0/account_usability
|
||||
:alt: akretion/odoo-usability
|
||||
|
||||
|badge1| |badge2| |badge3|
|
||||
|
||||
This modules adds the following functions:
|
||||
|
||||
* Add an *Overdue* filter on invoice search view (this feature was previously
|
||||
located in te module *account_invoice_overdue_filter*)
|
||||
* Increase the default limit of 80 lines in account move and account move line view.
|
||||
* disable reconciliation "guessing"
|
||||
* fast search on *Reconcile Ref* for account move line.
|
||||
* add sale dates to invoice report to be compliant with
|
||||
https://www.service-public.fr/professionnels-entreprises/vosdroits/F31808
|
||||
* Sale date on qweb invoices
|
||||
* A wizard to mark several invoices as sent at once (forward from v8)
|
||||
* Default date for Account Move Reversal is now D+1 instead of today
|
||||
* Track more fields on invoice (see details in account.py)
|
||||
* Add boolean fields `has_discount` and `has_attachment` on invoice
|
||||
* Add button "Delete line qty = 0" on supplier invoice
|
||||
* Cut name_get() of invoice if too long
|
||||
* A script for if Odoo screws up invoice attachment filename
|
||||
* help functions for py3o reports
|
||||
* Show code on name_get of journal
|
||||
* add direct search of journal using code
|
||||
* add copy=False on some fields
|
||||
* Add unicity constraint on analytic codes per company
|
||||
* Better default values on account move
|
||||
* Add link from account move line to invoice
|
||||
* Add start_date and end_date on bank statements
|
||||
* Add transfer_account_id to invoicing config page
|
||||
* Improve domain reconciliation widget
|
||||
* account.reconcile.model don't copy name to label via onchange
|
||||
* Add method to get fiscal position without partner_id
|
||||
* Restore drill-through on sale and invoice reports
|
||||
* don't attach PDF upon invoice report generation on supplier invoices/refunds
|
||||
* Add filter on debit and credit amount for Move Lines
|
||||
* Add supplier invoice number in invoice tree view
|
||||
|
||||
Together with this module, I recommend the use of the following modules:
|
||||
|
||||
* account_invoice_supplier_ref_unique (OCA project account-invoicing)
|
||||
* account_move_line_no_default_search (OCA project account-financial-tools)
|
||||
* invoice_fiscal_position_update (OCA project account-invoicing)
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/akretion/odoo-usability/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 <https://github.com/akretion/odoo-usability/issues/new?body=module:%20account_usability%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Authors
|
||||
~~~~~~~
|
||||
|
||||
* Akretion
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
* David Beal <david.beal@akretion.com>
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
|
||||
This module is part of the `akretion/odoo-usability <https://github.com/akretion/odoo-usability/tree/12.0/account_usability>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute.
|
||||
@@ -1,4 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import account
|
||||
#from . import account_invoice_report
|
||||
from . import partner
|
||||
from . import wizard
|
||||
|
||||
@@ -1,28 +1,45 @@
|
||||
# Copyright 2015-2019 Akretion (http://www.akretion.com)
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2015-2016 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'Account Usability',
|
||||
'version': '12.0.1.0.0',
|
||||
'version': '10.0.1.0.0',
|
||||
'category': 'Accounting & Finance',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Small usability enhancements in account module',
|
||||
'description': """
|
||||
Account Usability
|
||||
=================
|
||||
|
||||
The usability enhancements include:
|
||||
* show the supplier invoice number in the tree view of supplier invoices
|
||||
* add an *Overdue* filter on invoice search view (this feature was previously located in te module *account_invoice_overdue_filter*)
|
||||
* Increase the default limit of 80 lines in account move and account move line view.
|
||||
* Fast search on *Reconcile Ref* for account move line.
|
||||
* disable reconciliation "guessing"
|
||||
|
||||
Together with this module, I recommend the use of the following modules:
|
||||
* account_invoice_supplier_ref_unique (OCA project account-invoicing)
|
||||
* account_move_line_no_default_search (OCA project account-financial-tools)
|
||||
* invoice_fiscal_position_update (OCA project account-invoicing)
|
||||
|
||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': [
|
||||
'account',
|
||||
'base_view_inheritance_extension',
|
||||
'base_usability', # needed only to access base_usability.group_nobody
|
||||
# in v12, I may create a module only for group_nobody
|
||||
],
|
||||
'data': [
|
||||
'account_view.xml',
|
||||
'account_report.xml',
|
||||
'account_invoice_report_view.xml',
|
||||
'partner_view.xml',
|
||||
'product_view.xml',
|
||||
'wizard/account_invoice_mark_sent_view.xml',
|
||||
'report/invoice_report.xml',
|
||||
],
|
||||
'installable': True,
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
# Copyright 2015-2019 Akretion (http://www.akretion.com)
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2015-2016 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models, fields, api, _
|
||||
from odoo.tools import float_compare, float_is_zero
|
||||
from odoo.tools.misc import formatLang
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
from odoo.osv import expression
|
||||
from odoo import SUPERUSER_ID
|
||||
import logging
|
||||
|
||||
@@ -27,6 +26,11 @@ class AccountInvoice(models.Model):
|
||||
partner_bank_id = fields.Many2one(track_visibility='onchange')
|
||||
fiscal_position_id = fields.Many2one(track_visibility='onchange')
|
||||
amount_total = fields.Monetary(track_visibility='onchange')
|
||||
# for those fields, the 'account' module sets track_visibility='always':
|
||||
partner_id = fields.Many2one(track_visibility='onchange')
|
||||
currency_id = fields.Many2one(track_visibility='onchange')
|
||||
type = fields.Selection(track_visibility='onchange')
|
||||
amount_untaxed = fields.Monetary(track_visibility='onchange')
|
||||
# I want to see the number of cancelled invoice in chatter
|
||||
move_id = fields.Many2one(track_visibility='onchange')
|
||||
# for invoice report
|
||||
@@ -38,11 +42,8 @@ class AccountInvoice(models.Model):
|
||||
has_attachment = fields.Boolean(
|
||||
compute='_compute_has_attachment',
|
||||
search='_search_has_attachment', readonly=True)
|
||||
sale_dates = fields.Char(
|
||||
compute="_compute_sales_dates", readonly=True,
|
||||
help="This information appears on invoice qweb report "
|
||||
"(you may use it for your own report)")
|
||||
|
||||
@api.multi
|
||||
def _compute_has_discount(self):
|
||||
prec = self.env['decimal.precision'].precision_get('Discount')
|
||||
for inv in self:
|
||||
@@ -74,26 +75,7 @@ class AccountInvoice(models.Model):
|
||||
('res_id', '!=', False)], ['res_id'])
|
||||
for att in search_res:
|
||||
att_inv_ids[att['res_id']] = True
|
||||
res = [('id', value and 'in' or 'not in', list(att_inv_ids))]
|
||||
return res
|
||||
|
||||
# when you have an invoice created from a lot of sale orders, the 'name'
|
||||
# field is very large, which makes the name_get() of that invoice very big
|
||||
# which screws-up the form view of that invoice because of the link at the
|
||||
# top of the screen
|
||||
# That's why we have to cut the name_get() when it's too long
|
||||
def name_get(self):
|
||||
old_res = super().name_get()
|
||||
res = []
|
||||
for old_re in old_res:
|
||||
name = old_re[1]
|
||||
if name and len(name) > 100:
|
||||
# nice cut
|
||||
name = u'%s ...' % ', '.join(name.split(', ')[:3])
|
||||
# if not enough, hard cut
|
||||
if len(name) > 120:
|
||||
name = u'%s ...' % old_re[1][:120]
|
||||
res.append((old_re[0], name))
|
||||
res = [('id', value and 'in' or 'not in', att_inv_ids.keys())]
|
||||
return res
|
||||
|
||||
# I really hate to see a "/" in the 'name' field of the account.move.line
|
||||
@@ -102,17 +84,17 @@ class AccountInvoice(models.Model):
|
||||
# write a rubbish '/' in it !
|
||||
# 2) the 'name' field of the account.move.line is used in the overdue
|
||||
# letter, and '/' is not meaningful for our customer !
|
||||
# TODO mig to v12
|
||||
# def action_move_create(self):
|
||||
# res = super().action_move_create()
|
||||
# for inv in self:
|
||||
# self._cr.execute(
|
||||
# "UPDATE account_move_line SET name= "
|
||||
# "CASE WHEN name='/' THEN %s "
|
||||
# "ELSE %s||' - '||name END "
|
||||
# "WHERE move_id=%s", (inv.number, inv.number, inv.move_id.id))
|
||||
# self.invalidate_cache()
|
||||
# return res
|
||||
@api.multi
|
||||
def action_move_create(self):
|
||||
res = super(AccountInvoice, self).action_move_create()
|
||||
for inv in self:
|
||||
self._cr.execute(
|
||||
"UPDATE account_move_line SET name= "
|
||||
"CASE WHEN name='/' THEN %s "
|
||||
"ELSE %s||' - '||name END "
|
||||
"WHERE move_id=%s", (inv.number, inv.number, inv.move_id.id))
|
||||
self.invalidate_cache()
|
||||
return res
|
||||
|
||||
def delete_lines_qty_zero(self):
|
||||
lines = self.env['account.invoice.line'].search([
|
||||
@@ -120,90 +102,19 @@ class AccountInvoice(models.Model):
|
||||
lines.unlink()
|
||||
return True
|
||||
|
||||
def fix_invoice_attachment_filename(self):
|
||||
# This script is designed to fix attachment of invoices
|
||||
# badly generated by Odoo v8. I found this problem in Nov 2018 at
|
||||
# Encres Dubuit when investigating a bug where Odoo would create a
|
||||
# new attachment when printing an old invoice that already had the
|
||||
# PDF of the invoice as attachment
|
||||
logger.info('START fix customer invoice attachment filename')
|
||||
# Run this script as admin to fix problem in all companies
|
||||
self = self.sudo()
|
||||
attachs = self.env['ir.attachment'].search([
|
||||
('res_model', '=', 'account.invoice'),
|
||||
('res_id', '!=', False),
|
||||
('type', '=', 'binary'),
|
||||
('name', '=like', 'INV%.pdf'),
|
||||
('datas_fname', '=like', 'INV%.pdf.pdf')])
|
||||
for attach in attachs:
|
||||
inv = self.browse(attach.res_id)
|
||||
if inv.type in ('out_invoice', 'out_refund'):
|
||||
attach.datas_fname = attach.name
|
||||
logger.info(
|
||||
'Fixed field datas_fname of attachment ID %s name %s',
|
||||
attach.id, attach.name)
|
||||
logger.info('END fix customer invoice attachment filename')
|
||||
|
||||
# for report
|
||||
def py3o_lines_layout(self):
|
||||
self.ensure_one()
|
||||
res = []
|
||||
has_sections = False
|
||||
subtotal = 0.0
|
||||
sign = self.type == 'out_refund' and -1 or 1
|
||||
for line in self.invoice_line_ids:
|
||||
if line.display_type == 'line_section':
|
||||
# insert line
|
||||
if has_sections:
|
||||
res.append({'subtotal': subtotal})
|
||||
subtotal = 0.0 # reset counter
|
||||
has_sections = True
|
||||
else:
|
||||
if not line.display_type:
|
||||
subtotal += line.price_subtotal * sign
|
||||
res.append({'line': line})
|
||||
if has_sections: # insert last subtotal line
|
||||
res.append({'subtotal': subtotal})
|
||||
# res:
|
||||
# [
|
||||
# {'line': account_invoice_line(1) with display_type=='line_section'},
|
||||
# {'line': account_invoice_line(2) without display_type},
|
||||
# {'line': account_invoice_line(3) without display_type},
|
||||
# {'line': account_invoice_line(4) with display_type=='line_note'},
|
||||
# {'subtotal': 8932.23},
|
||||
# ]
|
||||
return res
|
||||
|
||||
def _compute_sales_dates(self):
|
||||
""" French law requires to set sale order dates into invoice
|
||||
returned string: "sale1 (date1), sale2 (date2) ..."
|
||||
"""
|
||||
for inv in self:
|
||||
sales = inv.invoice_line_ids.mapped(
|
||||
'sale_line_ids').mapped('order_id')
|
||||
lang = inv.partner_id.commercial_partner_id.lang
|
||||
date_format = self.env["res.lang"]._lang_get(
|
||||
lang or "").date_format
|
||||
dates = ["%s%s" % (
|
||||
x.name,
|
||||
x.confirmation_date and " (%s)" %
|
||||
# only when confirmation_date display it
|
||||
x.confirmation_date.strftime(date_format) or "")
|
||||
for x in sales]
|
||||
inv.sale_dates = ", ".join(dates)
|
||||
|
||||
|
||||
class AccountInvoiceLine(models.Model):
|
||||
_inherit = 'account.invoice.line'
|
||||
|
||||
# In the 'account' module, we have related stored field for:
|
||||
# company_id, partner_id, currency_id
|
||||
invoice_type = fields.Selection(store=True)
|
||||
invoice_type = fields.Selection(
|
||||
related='invoice_id.type', store=True, readonly=True)
|
||||
date_invoice = fields.Date(
|
||||
related='invoice_id.date_invoice', store=True, readonly=True)
|
||||
commercial_partner_id = fields.Many2one(
|
||||
related='invoice_id.partner_id.commercial_partner_id',
|
||||
store=True, readonly=True, compute_sudo=True)
|
||||
store=True, readonly=True)
|
||||
state = fields.Selection(
|
||||
related='invoice_id.state', store=True, readonly=True,
|
||||
string='Invoice State')
|
||||
@@ -215,15 +126,7 @@ class AccountInvoiceLine(models.Model):
|
||||
class AccountJournal(models.Model):
|
||||
_inherit = 'account.journal'
|
||||
|
||||
hide_bank_statement_balance = fields.Boolean(
|
||||
string='Hide Bank Statement Balance',
|
||||
help="You may want to enable this option when your bank "
|
||||
"journal is generated from a bank statement file that "
|
||||
"doesn't handle start/end balance (QIF for instance) and "
|
||||
"you don't want to enter the start/end balance manually: it "
|
||||
"will prevent the display of wrong information in the accounting "
|
||||
"dashboard and on bank statements.")
|
||||
|
||||
@api.multi
|
||||
@api.depends(
|
||||
'name', 'currency_id', 'company_id', 'company_id.currency_id', 'code')
|
||||
def name_get(self):
|
||||
@@ -241,6 +144,20 @@ class AccountJournal(models.Model):
|
||||
res.append((journal.id, name))
|
||||
return res
|
||||
|
||||
# Also search on start of 'code', not only on 'name'
|
||||
@api.model
|
||||
def name_search(
|
||||
self, name='', args=None, operator='ilike', limit=80):
|
||||
if args is None:
|
||||
args = []
|
||||
if name:
|
||||
jrls = self.search(
|
||||
[('code', '=ilike', name + '%')] + args, limit=limit)
|
||||
if jrls:
|
||||
return jrls.name_get()
|
||||
return super(AccountJournal, self).name_search(
|
||||
name=name, args=args, operator=operator, limit=limit)
|
||||
|
||||
@api.constrains('default_credit_account_id', 'default_debit_account_id')
|
||||
def _check_account_type_on_bank_journal(self):
|
||||
bank_acc_type = self.env.ref('account.data_account_type_liquidity')
|
||||
@@ -269,7 +186,7 @@ class AccountJournal(models.Model):
|
||||
class AccountAccount(models.Model):
|
||||
_inherit = 'account.account'
|
||||
|
||||
@api.depends('name', 'code')
|
||||
@api.multi
|
||||
def name_get(self):
|
||||
if self._context.get('account_account_show_code_only'):
|
||||
res = []
|
||||
@@ -277,10 +194,9 @@ class AccountAccount(models.Model):
|
||||
res.append((record.id, record.code))
|
||||
return res
|
||||
else:
|
||||
return super().name_get()
|
||||
return super(AccountAccount, self).name_get()
|
||||
|
||||
# https://github.com/odoo/odoo/issues/23040
|
||||
# TODO mig to v12
|
||||
def fix_bank_account_types(self):
|
||||
aao = self.env['account.account']
|
||||
companies = self.env['res.company'].search([])
|
||||
@@ -309,7 +225,7 @@ class AccountAccount(models.Model):
|
||||
journal_accounts_bank_type += account
|
||||
accounts = aao.search([
|
||||
('user_type_id', '=', bank_type.id)], order='company_id, code')
|
||||
for account in accounts:
|
||||
for account in aao.search([('user_type_id', '=', bank_type.id)]):
|
||||
if account not in journal_accounts_bank_type:
|
||||
account.user_type_id = asset_type.id
|
||||
logger.info(
|
||||
@@ -318,55 +234,21 @@ class AccountAccount(models.Model):
|
||||
logger.info("END of the script 'fix bank and cash account types'")
|
||||
return True
|
||||
|
||||
@api.model
|
||||
def create_account_groups(self, level=2, name_prefix=u'Comptes '):
|
||||
'''Should be launched by a script. Make sure the account_group module is installed
|
||||
(the account_usability module doesn't depend on it currently'''
|
||||
assert level >= 1
|
||||
assert isinstance(level, int)
|
||||
companies = self.env['res.company'].search([])
|
||||
if len(companies) > 1:
|
||||
logger.info(
|
||||
'Multi-company detected: running script create_account_groups '
|
||||
'as admin')
|
||||
self = self.sudo()
|
||||
ago = self.env['account.group']
|
||||
groups = ago.search([])
|
||||
if groups:
|
||||
raise UserError(_("Some account groups already exists"))
|
||||
accounts = self.search([])
|
||||
struct = {'childs': {}}
|
||||
for account in accounts:
|
||||
assert len(account.code) > level
|
||||
n = 1
|
||||
parent = struct
|
||||
gparent = False
|
||||
while n <= level:
|
||||
group_code = account.code[:n]
|
||||
if group_code not in parent['childs']:
|
||||
new_group = ago.create({
|
||||
'name': u'%s%s' % (name_prefix or '', group_code),
|
||||
'code_prefix': group_code,
|
||||
'parent_id': gparent and gparent.id or False,
|
||||
})
|
||||
parent['childs'][group_code] = {'obj': new_group, 'childs': {}}
|
||||
parent = parent['childs'][group_code]
|
||||
gparent = parent['obj']
|
||||
n += 1
|
||||
account.group_id = gparent.id
|
||||
|
||||
|
||||
class AccountAnalyticAccount(models.Model):
|
||||
_inherit = 'account.analytic.account'
|
||||
|
||||
@api.multi
|
||||
def name_get(self):
|
||||
if self._context.get('analytic_account_show_code_only'):
|
||||
res = []
|
||||
for record in self:
|
||||
res.append((record.id, record.code or record.name))
|
||||
res.append((
|
||||
record.id,
|
||||
record.code or record._get_one_full_name(record)))
|
||||
return res
|
||||
else:
|
||||
return super().name_get()
|
||||
return super(AccountAnalyticAccount, self).name_get()
|
||||
|
||||
_sql_constraints = [(
|
||||
'code_company_unique',
|
||||
@@ -383,29 +265,6 @@ class AccountMove(models.Model):
|
||||
# By default, we can still modify "ref" when account move is posted
|
||||
# which seems a bit lazy for me...
|
||||
ref = fields.Char(states={'posted': [('readonly', True)]})
|
||||
date = fields.Date(copy=False)
|
||||
default_account_id = fields.Many2one(
|
||||
related='journal_id.default_debit_account_id', readonly=True)
|
||||
default_credit = fields.Float(
|
||||
compute='_compute_default_credit_debit', readonly=True)
|
||||
default_debit = fields.Float(
|
||||
compute='_compute_default_credit_debit', readonly=True)
|
||||
|
||||
@api.depends('line_ids.credit', 'line_ids.debit')
|
||||
def _compute_default_credit_debit(self):
|
||||
for move in self:
|
||||
total_debit = total_credit = default_debit = default_credit = 0.0
|
||||
for l in move.line_ids:
|
||||
total_debit += l.debit
|
||||
total_credit += l.credit
|
||||
# I could use float_compare, but I don't think it's really needed
|
||||
# in this context
|
||||
if total_debit > total_credit:
|
||||
default_credit = total_debit - total_credit
|
||||
else:
|
||||
default_debit = total_credit - total_debit
|
||||
move.default_credit = default_credit
|
||||
move.default_debit = default_debit
|
||||
|
||||
|
||||
class AccountMoveLine(models.Model):
|
||||
@@ -419,13 +278,6 @@ class AccountMoveLine(models.Model):
|
||||
|
||||
# Update field only to add a string (there is no string in account module)
|
||||
invoice_id = fields.Many2one(string='Invoice')
|
||||
account_reconcile = fields.Boolean(
|
||||
related='account_id.reconcile', readonly=True)
|
||||
full_reconcile_id = fields.Many2one(string='Full Reconcile')
|
||||
matched_debit_ids = fields.One2many(string='Partial Reconcile Debit')
|
||||
matched_credit_ids = fields.One2many(string='Partial Reconcile Credit')
|
||||
reconcile_string = fields.Char(
|
||||
compute='_compute_reconcile_string', string='Reconcile', store=True)
|
||||
|
||||
@api.onchange('credit')
|
||||
def _credit_onchange(self):
|
||||
@@ -463,6 +315,7 @@ class AccountMoveLine(models.Model):
|
||||
else:
|
||||
self.credit = amount_company_currency
|
||||
|
||||
@api.multi
|
||||
def show_account_move_form(self):
|
||||
self.ensure_one()
|
||||
action = self.env['ir.actions.act_window'].for_xml_id(
|
||||
@@ -475,34 +328,6 @@ class AccountMoveLine(models.Model):
|
||||
})
|
||||
return action
|
||||
|
||||
@api.depends(
|
||||
'full_reconcile_id', 'matched_debit_ids', 'matched_credit_ids')
|
||||
def _compute_reconcile_string(self):
|
||||
for line in self:
|
||||
rec_str = False
|
||||
if line.full_reconcile_id:
|
||||
rec_str = line.full_reconcile_id.name
|
||||
else:
|
||||
rec_str = ', '.join([
|
||||
'a%d' % pr.id for pr in line.matched_debit_ids + line.matched_credit_ids])
|
||||
line.reconcile_string = rec_str
|
||||
|
||||
|
||||
class AccountPartialReconcile(models.Model):
|
||||
_inherit = "account.partial.reconcile"
|
||||
_rec_name = "id"
|
||||
|
||||
def name_get(self):
|
||||
res = []
|
||||
for rec in self:
|
||||
# There is no seq for partial rec, so I simulate one with the ID
|
||||
# Prefix for full rec: 'A' (upper case)
|
||||
# Prefix for partial rec: 'a' (lower case)
|
||||
amount_fmt = formatLang(self.env, rec.amount, currency_obj=rec.company_currency_id)
|
||||
name = 'a%d (%s)' % (rec.id, amount_fmt)
|
||||
res.append((rec.id, name))
|
||||
return res
|
||||
|
||||
|
||||
class AccountBankStatement(models.Model):
|
||||
_inherit = 'account.bank.statement'
|
||||
@@ -513,9 +338,8 @@ class AccountBankStatement(models.Model):
|
||||
end_date = fields.Date(
|
||||
compute='_compute_dates', string='End Date', readonly=True,
|
||||
store=True)
|
||||
hide_bank_statement_balance = fields.Boolean(
|
||||
related='journal_id.hide_bank_statement_balance', readonly=True)
|
||||
|
||||
@api.multi
|
||||
@api.depends('line_ids.date')
|
||||
def _compute_dates(self):
|
||||
for st in self:
|
||||
@@ -523,23 +347,6 @@ class AccountBankStatement(models.Model):
|
||||
st.start_date = dates and min(dates) or False
|
||||
st.end_date = dates and max(dates) or False
|
||||
|
||||
def _balance_check(self):
|
||||
for stmt in self:
|
||||
if stmt.hide_bank_statement_balance:
|
||||
continue
|
||||
else:
|
||||
super(AccountBankStatement, stmt)._balance_check()
|
||||
return True
|
||||
|
||||
@api.depends('name', 'start_date', 'end_date')
|
||||
def name_get(self):
|
||||
res = []
|
||||
for statement in self:
|
||||
name = "%s (%s => %s)" % (
|
||||
statement.name, statement.start_date, statement.end_date)
|
||||
res.append((statement.id, name))
|
||||
return res
|
||||
|
||||
|
||||
class AccountBankStatementLine(models.Model):
|
||||
_inherit = 'account.bank.statement.line'
|
||||
@@ -568,14 +375,15 @@ class AccountBankStatementLine(models.Model):
|
||||
# search_reconciliation_proposition=False, context=None):
|
||||
# # Make variable name shorted for PEP8 !
|
||||
# search_rec_prop = search_reconciliation_proposition
|
||||
# return super().\
|
||||
# return super(AccountBankStatementLine, self).\
|
||||
# get_data_for_reconciliations(
|
||||
# cr, uid, ids, excluded_ids=excluded_ids,
|
||||
# search_reconciliation_proposition=search_rec_prop,
|
||||
# context=context)
|
||||
|
||||
def _prepare_reconciliation_move(self, move_ref):
|
||||
vals = super()._prepare_reconciliation_move(move_ref)
|
||||
vals = super(AccountBankStatementLine, self).\
|
||||
_prepare_reconciliation_move(move_ref)
|
||||
# By default, ref contains the name of the statement + name of the
|
||||
# statement line. It causes 2 problems:
|
||||
# 1) The 'ref' field is too big
|
||||
@@ -590,16 +398,17 @@ class AccountBankStatementLine(models.Model):
|
||||
vals['ref'] = False
|
||||
return vals
|
||||
|
||||
@api.multi
|
||||
def show_account_move(self):
|
||||
self.ensure_one()
|
||||
action = self.env['ir.actions.act_window'].for_xml_id(
|
||||
'account', 'action_move_line_form')
|
||||
'account', 'action_move_journal_line')
|
||||
if self.journal_entry_ids:
|
||||
action.update({
|
||||
'views': False,
|
||||
'view_id': False,
|
||||
'view_mode': 'form,tree',
|
||||
'res_id': self.journal_entry_ids[0].move_id.id,
|
||||
'res_id': self.journal_entry_ids[0].id,
|
||||
})
|
||||
return action
|
||||
else:
|
||||
@@ -610,7 +419,8 @@ class AccountBankStatementLine(models.Model):
|
||||
class AccountFiscalPosition(models.Model):
|
||||
_inherit = 'account.fiscal.position'
|
||||
|
||||
# TODO mig to v12 ?
|
||||
note = fields.Text(translate=True)
|
||||
|
||||
@api.model
|
||||
def get_fiscal_position_no_partner(
|
||||
self, company_id=None, vat_subjected=False, country_id=None):
|
||||
@@ -660,46 +470,3 @@ class AccountReconcileModel(models.Model):
|
||||
# Because it's much better to have the bank statement line label as
|
||||
# label of the counter-part move line, then the label of the button
|
||||
assert True # Stupid line of code just to have something...
|
||||
|
||||
|
||||
class AccountIncoterms(models.Model):
|
||||
_inherit = 'account.incoterms'
|
||||
|
||||
@api.depends('code', 'name')
|
||||
def name_get(self):
|
||||
res = []
|
||||
for rec in self:
|
||||
res.append((rec.id, '[%s] %s' % (rec.code, rec.name)))
|
||||
return res
|
||||
|
||||
|
||||
class AccountReconciliation(models.AbstractModel):
|
||||
_inherit = 'account.reconciliation.widget'
|
||||
|
||||
# Add ability to filter by account code in the work interface of the
|
||||
# bank statement
|
||||
@api.model
|
||||
def _domain_move_lines(self, search_str):
|
||||
str_domain = super()._domain_move_lines(search_str)
|
||||
account_code_domain = [('account_id.code', '=ilike', search_str + '%')]
|
||||
str_domain = expression.OR([str_domain, account_code_domain])
|
||||
return str_domain
|
||||
|
||||
@api.model
|
||||
def _domain_move_lines_for_reconciliation(
|
||||
self, st_line, aml_accounts, partner_id,
|
||||
excluded_ids=None, search_str=False):
|
||||
domain = super()._domain_move_lines_for_reconciliation(
|
||||
st_line, aml_accounts, partner_id,
|
||||
excluded_ids=excluded_ids, search_str=search_str)
|
||||
# We want to replace a domain item by another one
|
||||
position = domain.index(('payment_id', '<>', False))
|
||||
domain[position] = ['journal_id', '=', st_line.journal_id.id]
|
||||
return domain
|
||||
|
||||
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
_inherit = 'res.config.settings'
|
||||
|
||||
transfer_account_id = fields.Many2one(
|
||||
related='company_id.transfer_account_id', readonly=False)
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# Copyright 2018-2019 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class AccountInvoiceReport(models.Model):
|
||||
_inherit = 'account.invoice.report'
|
||||
|
||||
number = fields.Char(string="Number", readonly=True)
|
||||
|
||||
def _sub_select(self):
|
||||
select_str = super(AccountInvoiceReport, self)._sub_select()
|
||||
select_str += ", ai.number"
|
||||
return select_str
|
||||
|
||||
def _select(self):
|
||||
select_str = super(AccountInvoiceReport, self)._select()
|
||||
select_str += ", sub.number"
|
||||
return select_str
|
||||
|
||||
def _group_by(self):
|
||||
group_by_str = super(AccountInvoiceReport, self)._group_by()
|
||||
group_by_str += ", ai.number"
|
||||
return group_by_str
|
||||
@@ -1,51 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2018 Akretion (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
|
||||
<record id="account_invoice_report_tree" model="ir.ui.view">
|
||||
<field name="name">usability.account.invoice.report.tree</field>
|
||||
<field name="model">account.invoice.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Invoices Analysis">
|
||||
<field name="number"/>
|
||||
<field name="date"/>
|
||||
<field name="date_due"/>
|
||||
<field name="type"/>
|
||||
<field name="commercial_partner_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty" sum="1"/>
|
||||
<field name="uom_name" groups="uom.group_uom"/>
|
||||
<field name="price_total" sum="1"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account.action_account_invoice_report_all_supp" model="ir.actions.act_window">
|
||||
<field name="context">{'search_default_current': 1, 'search_default_supplier': 1, 'search_default_year': 1}</field> <!-- Remove group_by_no_leaf, which breaks tree view -->
|
||||
</record>
|
||||
|
||||
<record id="account.action_account_invoice_report_all" model="ir.actions.act_window">
|
||||
<field name="context">{'search_default_current': 1, 'search_default_customer': 1, 'search_default_year': 1}</field> <!-- Remove group_by_no_leaf, which breaks tree view -->
|
||||
</record>
|
||||
|
||||
<record id="view_account_invoice_report_pivot" model="ir.ui.view">
|
||||
<field name="name">usability.account.invoice.report</field>
|
||||
<field name="model">account.invoice.report</field>
|
||||
<field name="inherit_id" ref="account.view_account_invoice_report_pivot"/>
|
||||
<field name="arch" type="xml">
|
||||
<pivot position="attributes">
|
||||
<attribute name="disable_linking"></attribute>
|
||||
</pivot>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
||||
@@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2018-2019 Akretion (http://www.akretion.com/)
|
||||
Copyright 2018 Akretion (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
<record id="account.account_invoices" model="ir.actions.report">
|
||||
<record id="account.account_invoices" model="ir.actions.report.xml">
|
||||
<!-- Don't attach on supplier invoices/refunds ! -->
|
||||
<field name="attachment">(object.type in ('out_invoice', 'out_refund')) and (object.state in ('open','in_payment','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')</field>
|
||||
<field name="attachment">(object.type in ('out_invoice', 'out_refund')) and (object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -1,13 +1,53 @@
|
||||
diff --git a/addons/account/static/src/js/reconciliation/reconciliation_renderer.js b/addons/account/static/src/js/reconciliation/reconciliation_renderer.js
|
||||
index 53f28e0c620..1721d01edf9 100644
|
||||
--- a/addons/account/static/src/js/reconciliation/reconciliation_renderer.js
|
||||
+++ b/addons/account/static/src/js/reconciliation/reconciliation_renderer.js
|
||||
@@ -514,7 +514,7 @@ var LineRenderer = Widget.extend(FieldManagerMixin, {
|
||||
}
|
||||
return this.model.makeRecord('account.bank.statement.line', [field], {
|
||||
partner_id: {
|
||||
- domain: ["|", ["is_company", "=", true], ["parent_id", "=", false], "|", ["customer", "=", true], ["supplier", "=", true]],
|
||||
+ domain: ["|", ["is_company", "=", true], ["parent_id", "=", false]],
|
||||
options: {
|
||||
no_open: true
|
||||
}
|
||||
diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py
|
||||
index 8ed1e48..615da43 100644
|
||||
--- a/addons/account/models/account_bank_statement.py
|
||||
+++ b/addons/account/models/account_bank_statement.py
|
||||
@@ -563,7 +563,13 @@ class AccountBankStatementLine(models.Model):
|
||||
"""
|
||||
# Blue lines = payment on bank account not assigned to a statement yet
|
||||
reconciliation_aml_accounts = [self.journal_id.default_credit_account_id.id, self.journal_id.default_debit_account_id.id]
|
||||
- domain_reconciliation = ['&', '&', ('statement_id', '=', False), ('account_id', 'in', reconciliation_aml_accounts), ('payment_id','<>', False)]
|
||||
+ # AKRETION HACK 11/7/2017
|
||||
+ # Remove ('payment_id','<>', False) in order to allow to select move lines
|
||||
+ # generated from payment orders or check deposit
|
||||
+ # but I add ('journal_id', '=', self.journal_id.id) to exclude the
|
||||
+ # opening entry of the first fiscal year
|
||||
+ #domain_reconciliation = ['&', '&', ('statement_id', '=', False), ('account_id', 'in', reconciliation_aml_accounts), ('payment_id','<>', False)]
|
||||
+ domain_reconciliation = ['&', '&', ('statement_id', '=', False), ('account_id', 'in', reconciliation_aml_accounts), ('journal_id', '=', self.journal_id.id)]
|
||||
|
||||
# Black lines = unreconciled & (not linked to a payment or open balance created by statement
|
||||
domain_matching = [('reconciled', '=', False)]
|
||||
diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py
|
||||
index b60ffbe..6c27c57 100644
|
||||
--- a/addons/account/models/account_move.py
|
||||
+++ b/addons/account/models/account_move.py
|
||||
@@ -599,6 +599,7 @@ class AccountMoveLine(models.Model):
|
||||
domain = expression.AND([domain, [('id', 'not in', excluded_ids)]])
|
||||
if str:
|
||||
str_domain = [
|
||||
+ '|', ('account_id.code', '=ilike', str + '%'),
|
||||
'|', ('move_id.name', 'ilike', str),
|
||||
'|', ('move_id.ref', 'ilike', str),
|
||||
'|', ('date_maturity', 'like', str),
|
||||
diff --git a/addons/account/static/src/js/account_reconciliation_widgets.js b/addons/account/static/src/js/account_reconciliation_widgets.js
|
||||
index 453bd41..48c396e 100644
|
||||
--- a/addons/account/static/src/js/account_reconciliation_widgets.js
|
||||
+++ b/addons/account/static/src/js/account_reconciliation_widgets.js
|
||||
@@ -76,7 +76,7 @@ var abstractReconciliation = Widget.extend(ControlPanelMixin, {
|
||||
this.model_res_users = new Model("res.users");
|
||||
this.model_tax = new Model("account.tax");
|
||||
this.model_presets = new Model("account.reconcile.model");
|
||||
- this.max_move_lines_displayed = 5;
|
||||
+ this.max_move_lines_displayed = 15;
|
||||
// Number of reconciliations loaded initially and by clicking 'show more'
|
||||
this.num_reconciliations_fetched_in_batch = 10;
|
||||
this.animation_speed = 100; // "Blocking" animations
|
||||
@@ -1755,7 +1755,7 @@ var bankStatementReconciliationLine = abstractReconciliationLine.extend({
|
||||
relation: "res.partner",
|
||||
string: _t("Partner"),
|
||||
type: "many2one",
|
||||
- domain: [['parent_id','=',false], '|', ['customer','=',true], ['supplier','=',true]],
|
||||
+ domain: [['parent_id','=',false]], // AKRETION HACK 26/6/2017 allow all parent partners
|
||||
help: "",
|
||||
readonly: false,
|
||||
required: true,
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py
|
||||
index 4374528..aea1361 100644
|
||||
--- a/addons/account/models/account_bank_statement.py
|
||||
+++ b/addons/account/models/account_bank_statement.py
|
||||
@@ -1008,7 +1008,7 @@ class AccountBankStatementLine(models.Model):
|
||||
#record the move name on the statement line to be able to retrieve it in case of unreconciliation
|
||||
self.write({'move_name': move.name})
|
||||
payment.write({'payment_reference': move.name})
|
||||
- elif self.move_name:
|
||||
- raise UserError(_('Operation not allowed. Since your statement line already received a number, you cannot reconcile it entirely with existing journal entries otherwise it would make a gap in the numbering. You should book an entry and make a regular revert of it in case you want to cancel it.'))
|
||||
+ #elif self.move_name:
|
||||
+ # raise UserError(_('Operation not allowed. Since your statement line already received a number, you cannot reconcile it entirely with existing journal entries otherwise it would make a gap in the numbering. You should book an entry and make a regular revert of it in case you want to cancel it.'))
|
||||
counterpart_moves.assert_balanced()
|
||||
return counterpart_moves
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2015-2019 Akretion France (http://www.akretion.com/)
|
||||
© 2015-2016 Akretion (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
@@ -16,15 +16,9 @@
|
||||
<field name="fiscal_position_id" position="attributes">
|
||||
<attribute name="widget">selection</attribute>
|
||||
</field>
|
||||
<field name="incoterm_id" position="attributes">
|
||||
<attribute name="widget">selection</attribute>
|
||||
</field>
|
||||
<field name="invoice_line_ids" position="before">
|
||||
<button name="delete_lines_qty_zero" states="draft" string="⇒ Delete lines qty=0" type="object" class="oe_link oe_right" groups="account.group_account_invoice"/>
|
||||
</field>
|
||||
<xpath expr="//field[@name='tax_line_ids']/tree/field[@name='amount']" position="before">
|
||||
<field name="base" readonly="1"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -36,25 +30,11 @@
|
||||
<field name="fiscal_position_id" position="attributes">
|
||||
<attribute name="widget">selection</attribute>
|
||||
</field>
|
||||
<field name="incoterm_id" position="attributes">
|
||||
<attribute name="widget">selection</attribute>
|
||||
</field>
|
||||
<!-- move sent field and make it visible -->
|
||||
<field name="sent" position="replace"/>
|
||||
<field name="move_id" position="before">
|
||||
<field name="sent"/>
|
||||
</field>
|
||||
<xpath expr="//field[@name='tax_line_ids']/tree/field[@name='amount']" position="before">
|
||||
<field name="base" readonly="1"/>
|
||||
</xpath>
|
||||
<!-- Warning: there are 2 invoice_print buttons in the native view... probably a bug -->
|
||||
<!--
|
||||
<xpath expr="//button[@name='invoice_print']" position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('state', 'not in', ('open', 'paid'))]}</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//button[@name='invoice_print'][2]" position="attributes">
|
||||
<attribute name="attrs">{'invisible': True}</attribute>
|
||||
</xpath> -->
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -200,6 +180,17 @@ module -->
|
||||
<field name="context">{'show_invoice_fields': True}</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_invoice_report_search" model="ir.ui.view">
|
||||
<field name="name">usability.account.invoice.report.search</field>
|
||||
<field name="model">account.invoice.report</field>
|
||||
<field name="inherit_id" ref="account.view_account_invoice_report_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="categ_id" position="after">
|
||||
<field name="product_id"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_invoice_report_tree" model="ir.ui.view">
|
||||
<field name="name">usability.account.invoice.report.tree</field>
|
||||
<field name="model">account.invoice.report</field>
|
||||
@@ -250,17 +241,6 @@ module -->
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_payment_form" model="ir.ui.view">
|
||||
<field name="name">usability.account.payment.form</field>
|
||||
<field name="model">account.payment</field>
|
||||
<field name="inherit_id" ref="account.view_account_payment_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="communication" position="after">
|
||||
<field name="payment_reference"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- model account.move.line / Journal Items -->
|
||||
<record id="account.action_account_moves_all_a" model="ir.actions.act_window">
|
||||
<field name="limit">200</field>
|
||||
@@ -268,15 +248,20 @@ module -->
|
||||
<field name="context">{'journal_show_code_only': True}</field>
|
||||
</record>
|
||||
|
||||
<!-- replace group_account_manager on Journal Items-->
|
||||
<!-- remove base.group_no_one on Journal Items-->
|
||||
<record id="account.menu_action_account_moves_all" model="ir.ui.menu">
|
||||
<field name="groups_id" eval="[(6, 0, [ref('account.group_account_user')])]"/>
|
||||
</record>
|
||||
|
||||
<!-- accountant must be able to access the Adviser section ! -->
|
||||
<record id="account.menu_finance_entries" model="ir.ui.menu">
|
||||
<field name="groups_id" eval="[(4, ref('account.group_account_user'))]"/>
|
||||
</record>
|
||||
|
||||
<!-- model account.move / Journal Entries -->
|
||||
<record id="account.action_move_journal_line" model="ir.actions.act_window">
|
||||
<field name="limit">200</field>
|
||||
<field name="context">{'view_no_maturity': True}</field> <!-- Don't filter by default on misc journal -->
|
||||
<field name="context">{}</field> <!-- Don't filter by default on misc journal -->
|
||||
</record>
|
||||
|
||||
<record id="view_move_form" model="ir.ui.view">
|
||||
@@ -284,20 +269,14 @@ module -->
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="journal_id" position="after">
|
||||
<field name="ref" position="after">
|
||||
<field name="default_move_line_name"/>
|
||||
<field name="default_account_id" invisible="1"/>
|
||||
<field name="default_credit" invisible="1"/>
|
||||
<field name="default_debit" invisible="1"/>
|
||||
</field>
|
||||
<xpath expr="//field[@name='line_ids']" position="attributes">
|
||||
<attribute name="context" operation="python_dict" key="default_name">default_move_line_name</attribute>
|
||||
<attribute name="context" operation="python_dict" key="default_account_id">default_account_id</attribute>
|
||||
<attribute name="context" operation="python_dict" key="default_credit">default_credit</attribute>
|
||||
<attribute name="context" operation="python_dict" key="default_debit">default_debit</attribute>
|
||||
<attribute name="context">{'line_ids': line_ids, 'journal_id': journal_id, 'default_name': default_move_line_name}</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='line_ids']/tree/field[@name='credit']" position="after">
|
||||
<field name="reconcile_string"/>
|
||||
<xpath expr="//field[@name='line_ids']/tree/field[@name='date_maturity']" position="after">
|
||||
<field name="full_reconcile_id"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
@@ -308,8 +287,7 @@ module -->
|
||||
<field name="inherit_id" ref="account.view_account_move_line_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="partner_id" position="after">
|
||||
<field name="reconcile_string" />
|
||||
<field name="debit" filter_domain="['|', ('debit', '=', self), ('credit', '=', self)]" string="Debit or Credit"/>
|
||||
<field name="full_reconcile_id" />
|
||||
</field>
|
||||
<filter name="unreconciled" position="before">
|
||||
<filter name="reconciled" string="Fully Reconciled" domain="[('full_reconcile_id', '!=', False)]"/>
|
||||
@@ -321,9 +299,6 @@ module -->
|
||||
<field name="name" position="attributes">
|
||||
<attribute name="string">Name or Reference</attribute>
|
||||
</field>
|
||||
<field name="partner_id" position="attributes">
|
||||
<attribute name="domain">['|', ('parent_id', '=', False), ('is_company', '=', True)]</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -337,21 +312,7 @@ module -->
|
||||
</field>
|
||||
<field name="move_id" position="after">
|
||||
<field name="invoice_id"/>
|
||||
<field name="account_reconcile" invisible="1"/>
|
||||
</field>
|
||||
<xpath expr="//field[@name='full_reconcile_id']/.." position="replace">
|
||||
<field name="full_reconcile_id" nolabel="1"/> <!-- label is already in view -->
|
||||
<field name="matched_debit_ids" readonly="1" widget="many2many_tags" attrs="{'invisible': ['|', ('full_reconcile_id', '!=', False), ('matched_debit_ids', '=', [])]}"/>
|
||||
<field name="matched_credit_ids" readonly="1" widget="many2many_tags" attrs="{'invisible': ['|', ('full_reconcile_id', '!=', False), ('matched_credit_ids', '=', [])]}"/>
|
||||
<field name="reconciled" invisible="1"/>
|
||||
<button name="open_reconcile_view" class="oe_link" type="object"
|
||||
string="-> View partially reconciled entries" colspan="2"
|
||||
attrs="{'invisible': ['|', ('full_reconcile_id', '!=', False), '&', ('matched_debit_ids', '=', []), ('matched_credit_ids', '=', [])]}"/>
|
||||
<span colspan="2" attrs="{'invisible': ['|', '|', ('full_reconcile_id', '!=', False), ('matched_debit_ids', '!=', []), ('matched_credit_ids', '!=', [])]}" class="o_form_field">No Partial Reconcile</span>
|
||||
</xpath>
|
||||
<xpath expr="//label[@for='full_reconcile_id']/.." position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('account_reconcile', '=', False)]}</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -360,12 +321,10 @@ module -->
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account.view_move_line_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="full_reconcile_id" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
<!-- Move reconcile_id to a better position -->
|
||||
<field name="full_reconcile_id" position="replace"/>
|
||||
<field name="credit" position="after">
|
||||
<field name="balance" sum="Total Balance"/>
|
||||
<field name="reconcile_string"/>
|
||||
<field name="full_reconcile_id"/>
|
||||
</field>
|
||||
<field name="date_maturity" position="after">
|
||||
<button name="show_account_move_form" type="object" icon="fa-arrows-h" string="Show Journal Entry"/>
|
||||
@@ -373,17 +332,6 @@ module -->
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_move_filter" model="ir.ui.view">
|
||||
<field name="name">account_usability.account_move_search</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_account_move_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="partner_id" position="attributes">
|
||||
<attribute name="domain">['|', ('parent_id', '=', False), ('is_company', '=', True)]</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_search" model="ir.ui.view">
|
||||
<field name="name">account.account.search</field>
|
||||
<field name="model">account.account</field>
|
||||
@@ -409,42 +357,6 @@ module -->
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_journal_form" model="ir.ui.view">
|
||||
<field name="name">usability.account.journal.form</field>
|
||||
<field name="model">account.journal</field>
|
||||
<field name="inherit_id" ref="account.view_account_journal_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="bank_statements_source" position="after">
|
||||
<field name="hide_bank_statement_balance" groups="account.group_account_user"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="account_journal_dashboard_kanban_view" model="ir.ui.view">
|
||||
<field name="name">usability.account.journal.dashboard</field>
|
||||
<field name="model">account.journal</field>
|
||||
<field name="inherit_id" ref="account.account_journal_dashboard_kanban_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="kanban_dashboard" position="after">
|
||||
<field name="hide_bank_statement_balance"/>
|
||||
</field>
|
||||
<xpath expr="//div[@name='latest_statement']/.." position="attributes">
|
||||
<attribute name="t-if">dashboard.last_balance != dashboard.account_balance && !record.hide_bank_statement_balance.raw_value</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_journal_tree" model="ir.ui.view">
|
||||
<field name="name">usability.account.journal.tree</field>
|
||||
<field name="model">account.journal</field>
|
||||
<field name="inherit_id" ref="account.view_account_journal_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="name" position="after">
|
||||
<field name="code"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_journal_search" model="ir.ui.view">
|
||||
<field name="name">usability.account.journal.search</field>
|
||||
<field name="model">account.journal</field>
|
||||
@@ -466,32 +378,16 @@ module -->
|
||||
<xpath expr="//field[@name='line_ids']/tree/field[@name='bank_account_id']" position="after">
|
||||
<!-- The cancel button is provided by the account_cancel module, but we don't want to depend on it -->
|
||||
<button name="show_account_move" type="object"
|
||||
string="View Account Move" icon="fa-arrow-right"
|
||||
string="View Account Move" icon="fa fa-arrow-right"
|
||||
attrs="{'invisible': [('journal_entry_ids', '=', [])]}"/>
|
||||
</xpath>
|
||||
<field name="date" position="after">
|
||||
<field name="start_date"/>
|
||||
<field name="end_date"/>
|
||||
<field name="hide_bank_statement_balance" invisible="1"/>
|
||||
</field>
|
||||
<field name="date" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
<label for="balance_start" position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('hide_bank_statement_balance', '=', True)]}</attribute>
|
||||
</label>
|
||||
<label for="balance_end_real" position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('hide_bank_statement_balance', '=', True)]}</attribute>
|
||||
</label>
|
||||
<xpath expr="//field[@name='balance_start']/.." position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('hide_bank_statement_balance', '=', True)]}</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='balance_end_real']/.." position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('hide_bank_statement_balance', '=', True)]}</attribute>
|
||||
</xpath>
|
||||
<group name="sale_total" position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('hide_bank_statement_balance', '=', True)]}</attribute>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -522,10 +418,10 @@ module -->
|
||||
<field name="start_date"/>
|
||||
<field name="end_date"/>
|
||||
</field>
|
||||
<filter name="date" position="attributes">
|
||||
<filter context="{'group_by': 'date'}" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</filter>
|
||||
<filter name="date" position="after">
|
||||
<filter context="{'group_by': 'date'}" position="after">
|
||||
<filter name="start_date_groupby" string="Start Date"
|
||||
context="{'group_by': 'start_date'}"/>
|
||||
<filter name="end_date_groupby" string="End Date"
|
||||
@@ -534,17 +430,6 @@ module -->
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ACCOUNT TAX -->
|
||||
<record id="view_tax_tree" model="ir.ui.view">
|
||||
<field name="model">account.tax</field>
|
||||
<field name="inherit_id" ref="account.view_tax_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="company_id" position="before">
|
||||
<field name="price_include" string="Include"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ACCOUNT TAX GROUP -->
|
||||
<!-- in the account module, there is nothing for account.tax.group : no form/tree view, no menu... -->
|
||||
<record id="account_tax_group_form" model="ir.ui.view">
|
||||
@@ -579,28 +464,6 @@ module -->
|
||||
|
||||
<menuitem id="account_tax_group_menu" action="account_tax_group_action" parent="account.account_account_menu" sequence="2"/>
|
||||
|
||||
<!-- Account config page -->
|
||||
<record id="res_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="name">account_usability account config page</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='account_bank_reconciliation_start']/../.." position="after">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="transfer_account_id"/>
|
||||
<div class="text-muted">
|
||||
Transit account when you transfer money from a bank account of your company to another bank account of your company.
|
||||
</div>
|
||||
<field name="transfer_account_id"/>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Remove menu entry "Accounting > Configuration > Accounting > Bank Accounts"
|
||||
(account.journal filtered on type = 'bank' with special tree and form view)
|
||||
because it is useless and confusing -->
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
diff --git a/addons/account/models/account_payment.py b/addons/account/models/account_payment.py
|
||||
index f38f459c533..a475d6a82c7 100644
|
||||
--- a/addons/account/models/account_payment.py
|
||||
+++ b/addons/account/models/account_payment.py
|
||||
@@ -62,6 +62,7 @@ class account_abstract_payment(models.AbstractModel):
|
||||
payment_difference = fields.Monetary(compute='_compute_payment_difference', readonly=True)
|
||||
payment_difference_handling = fields.Selection([('open', 'Keep open'), ('reconcile', 'Mark invoice as fully paid')], default='open', string="Payment Difference Handling", copy=False)
|
||||
writeoff_account_id = fields.Many2one('account.account', string="Difference Account", domain=[('deprecated', '=', False)], copy=False)
|
||||
+ writeoff_analytic_account_id = fields.Many2one('account.analytic.account', string="Difference Analytic Account", copy=False)
|
||||
writeoff_label = fields.Char(
|
||||
string='Journal Item Label',
|
||||
help='Change label of the counterpart that will hold the payment difference',
|
||||
@@ -717,6 +718,7 @@ class account_payment(models.Model):
|
||||
debit_wo, credit_wo, amount_currency_wo, currency_id = aml_obj.with_context(date=self.payment_date)._compute_amount_fields(self.payment_difference, self.currency_id, self.company_id.currency_id)
|
||||
writeoff_line['name'] = self.writeoff_label
|
||||
writeoff_line['account_id'] = self.writeoff_account_id.id
|
||||
+ writeoff_line['analytic_account_id'] = self.writeoff_analytic_account_id.id or False
|
||||
writeoff_line['debit'] = debit_wo
|
||||
writeoff_line['credit'] = credit_wo
|
||||
writeoff_line['amount_currency'] = amount_currency_wo
|
||||
diff --git a/addons/account/views/account_payment_view.xml b/addons/account/views/account_payment_view.xml
|
||||
index 07230902ee8..1359009bf23 100644
|
||||
--- a/addons/account/views/account_payment_view.xml
|
||||
+++ b/addons/account/views/account_payment_view.xml
|
||||
@@ -277,6 +277,8 @@
|
||||
<div attrs="{'invisible': [('payment_difference_handling','=','open')]}">
|
||||
<label for="writeoff_account_id" class="oe_edit_only" string="Post Difference In"/>
|
||||
<field name="writeoff_account_id" string="Post Difference In" attrs="{'required': [('payment_difference_handling', '=', 'reconcile')]}"/>
|
||||
+ <label for="writeoff_analytic_account_id" class="oe_edit_only" string="Analytic Account" groups="analytic.group_analytic_accounting"/>
|
||||
+ <field name="writeoff_analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
<label for="journal_id" string="Journal" attrs="{'invisible': [('amount', '!=', 0)]}"/>
|
||||
<field name="journal_id" string="Journal" widget="selection" attrs="{'invisible': [('amount', '!=', 0)]}"/>
|
||||
<label for="writeoff_label" class="oe_edit_only" string="Label"/>
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright 2017-2019 Akretion France (https://akretion.com/)
|
||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models, fields
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2017-2019 Akretion (http://www.akretion.com/)
|
||||
© 2017 Akretion (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
@@ -16,6 +16,9 @@
|
||||
<field name="property_account_position_id" position="attributes">
|
||||
<attribute name="widget">selection</attribute>
|
||||
</field>
|
||||
<group name="accounting_entries" position="attributes">
|
||||
<attribute name="groups">account.group_account_user</attribute>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
24
account_usability/product_view.xml
Normal file
24
account_usability/product_view.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
© 2017 Akretion (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
|
||||
<record id="view_category_property_form" model="ir.ui.view">
|
||||
<field name="name">account_usability.product.category.form</field>
|
||||
<field name="model">product.category</field>
|
||||
<field name="inherit_id" ref="account.view_category_property_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<!-- On product form view, the group for Invoicing tab is limited to account.group_account_invoice... but on product category form, it is limited to account.group_account_manager -> we fix this and also use account.group_account_invoice -->
|
||||
<group name="account_property" position="attributes">
|
||||
<attribute name="groups">account.group_account_invoice</attribute>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
||||
@@ -1,2 +0,0 @@
|
||||
* Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
* David Beal <david.beal@akretion.com>
|
||||
@@ -1,39 +0,0 @@
|
||||
This modules adds the following functions:
|
||||
|
||||
* Add an *Overdue* filter on invoice search view (this feature was previously
|
||||
located in te module *account_invoice_overdue_filter*)
|
||||
* Increase the default limit of 80 lines in account move and account move line view.
|
||||
* disable reconciliation "guessing"
|
||||
* fast search on *Reconcile Ref* for account move line.
|
||||
* add sale dates to invoice report to be compliant with
|
||||
https://www.service-public.fr/professionnels-entreprises/vosdroits/F31808
|
||||
* Sale date on qweb invoices
|
||||
* A wizard to mark several invoices as sent at once (forward from v8)
|
||||
* Default date for Account Move Reversal is now D+1 instead of today
|
||||
* Track more fields on invoice (see details in account.py)
|
||||
* Add boolean fields `has_discount` and `has_attachment` on invoice
|
||||
* Add button "Delete line qty = 0" on supplier invoice
|
||||
* Cut name_get() of invoice if too long
|
||||
* A script for if Odoo screws up invoice attachment filename
|
||||
* help functions for py3o reports
|
||||
* Show code on name_get of journal
|
||||
* add direct search of journal using code
|
||||
* add copy=False on some fields
|
||||
* Add unicity constraint on analytic codes per company
|
||||
* Better default values on account move
|
||||
* Add link from account move line to invoice
|
||||
* Add start_date and end_date on bank statements
|
||||
* Add transfer_account_id to invoicing config page
|
||||
* Improve domain reconciliation widget
|
||||
* account.reconcile.model don't copy name to label via onchange
|
||||
* Add method to get fiscal position without partner_id
|
||||
* Restore drill-through on sale and invoice reports
|
||||
* don't attach PDF upon invoice report generation on supplier invoices/refunds
|
||||
* Add filter on debit and credit amount for Move Lines
|
||||
* Add supplier invoice number in invoice tree view
|
||||
|
||||
Together with this module, I recommend the use of the following modules:
|
||||
|
||||
* account_invoice_supplier_ref_unique (OCA project account-invoicing)
|
||||
* account_move_line_no_default_search (OCA project account-financial-tools)
|
||||
* invoice_fiscal_position_update (OCA project account-invoicing)
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
|
||||
<xpath expr="//div[@name='origin']/p" position="replace">
|
||||
<p class="m-0" t-field="o.sale_dates"/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
@@ -1,454 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
|
||||
<title>Account Usability</title>
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* used to remove borders from tables and images */
|
||||
.borderless, table.borderless td, table.borderless th {
|
||||
border: 0 }
|
||||
|
||||
table.borderless td, table.borderless th {
|
||||
/* Override padding for "table.docutils td" with "! important".
|
||||
The right padding separates the table cells. */
|
||||
padding: 0 0.5em 0 0 ! important }
|
||||
|
||||
.first {
|
||||
/* Override more specific margin styles with "! important". */
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
.subscript {
|
||||
vertical-align: sub;
|
||||
font-size: smaller }
|
||||
|
||||
.superscript {
|
||||
vertical-align: super;
|
||||
font-size: smaller }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title, .code .error {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin: 0 0 0.5em 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
||||
clear: left ;
|
||||
float: left ;
|
||||
margin-right: 1em }
|
||||
|
||||
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
||||
clear: right ;
|
||||
float: right ;
|
||||
margin-left: 1em }
|
||||
|
||||
img.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.align-center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left }
|
||||
|
||||
.align-center {
|
||||
clear: both ;
|
||||
text-align: center }
|
||||
|
||||
.align-right {
|
||||
text-align: right }
|
||||
|
||||
/* reset inner alignment in figures */
|
||||
div.align-right {
|
||||
text-align: inherit }
|
||||
|
||||
/* div.align-center * { */
|
||||
/* text-align: left } */
|
||||
|
||||
.align-top {
|
||||
vertical-align: top }
|
||||
|
||||
.align-middle {
|
||||
vertical-align: middle }
|
||||
|
||||
.align-bottom {
|
||||
vertical-align: bottom }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font: inherit }
|
||||
|
||||
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
pre.code .ln { color: grey; } /* line numbers */
|
||||
pre.code, code { background-color: #eeeeee }
|
||||
pre.code .comment, code .comment { color: #5C6576 }
|
||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
||||
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
||||
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
||||
pre.code .inserted, code .inserted { background-color: #A3D289}
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid 1px gray;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid 1px black;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
/* "booktabs" style (no vertical lines) */
|
||||
table.docutils.booktabs {
|
||||
border: 0px;
|
||||
border-top: 2px solid;
|
||||
border-bottom: 2px solid;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table.docutils.booktabs * {
|
||||
border: 0px;
|
||||
}
|
||||
table.docutils.booktabs th {
|
||||
border-bottom: thin solid;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="account-usability">
|
||||
<h1 class="title">Account Usability</h1>
|
||||
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/12.0/account_usability"><img alt="akretion/odoo-usability" src="https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github" /></a></p>
|
||||
<p>This modules adds the following functions:</p>
|
||||
<ul class="simple">
|
||||
<li>Add an <em>Overdue</em> filter on invoice search view (this feature was previously
|
||||
located in te module <em>account_invoice_overdue_filter</em>)</li>
|
||||
<li>Increase the default limit of 80 lines in account move and account move line view.</li>
|
||||
<li>disable reconciliation “guessing”</li>
|
||||
<li>fast search on <em>Reconcile Ref</em> for account move line.</li>
|
||||
<li>add sale dates to invoice report to be compliant with
|
||||
<a class="reference external" href="https://www.service-public.fr/professionnels-entreprises/vosdroits/F31808">https://www.service-public.fr/professionnels-entreprises/vosdroits/F31808</a></li>
|
||||
<li>Sale date on qweb invoices</li>
|
||||
<li>A wizard to mark several invoices as sent at once (forward from v8)</li>
|
||||
<li>Default date for Account Move Reversal is now D+1 instead of today</li>
|
||||
<li>Track more fields on invoice (see details in account.py)</li>
|
||||
<li>Add boolean fields <cite>has_discount</cite> and <cite>has_attachment</cite> on invoice</li>
|
||||
<li>Add button “Delete line qty = 0” on supplier invoice</li>
|
||||
<li>Cut name_get() of invoice if too long</li>
|
||||
<li>A script for if Odoo screws up invoice attachment filename</li>
|
||||
<li>help functions for py3o reports</li>
|
||||
<li>Show code on name_get of journal</li>
|
||||
<li>add direct search of journal using code</li>
|
||||
<li>add copy=False on some fields</li>
|
||||
<li>Add unicity constraint on analytic codes per company</li>
|
||||
<li>Better default values on account move</li>
|
||||
<li>Add link from account move line to invoice</li>
|
||||
<li>Add start_date and end_date on bank statements</li>
|
||||
<li>Add transfer_account_id to invoicing config page</li>
|
||||
<li>Improve domain reconciliation widget</li>
|
||||
<li>account.reconcile.model don’t copy name to label via onchange</li>
|
||||
<li>Add method to get fiscal position without partner_id</li>
|
||||
<li>Restore drill-through on sale and invoice reports</li>
|
||||
<li>don’t attach PDF upon invoice report generation on supplier invoices/refunds</li>
|
||||
<li>Add filter on debit and credit amount for Move Lines</li>
|
||||
<li>Add supplier invoice number in invoice tree view</li>
|
||||
</ul>
|
||||
<p>Together with this module, I recommend the use of the following modules:</p>
|
||||
<ul class="simple">
|
||||
<li>account_invoice_supplier_ref_unique (OCA project account-invoicing)</li>
|
||||
<li>account_move_line_no_default_search (OCA project account-financial-tools)</li>
|
||||
<li>invoice_fiscal_position_update (OCA project account-invoicing)</li>
|
||||
</ul>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#bug-tracker" id="id1">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="id2">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="id3">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="id4">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="id5">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#id1">Bug Tracker</a></h1>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/akretion/odoo-usability/issues">GitHub Issues</a>.
|
||||
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
|
||||
<a class="reference external" href="https://github.com/akretion/odoo-usability/issues/new?body=module:%20account_usability%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
<h1><a class="toc-backref" href="#id2">Credits</a></h1>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#id3">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Akretion</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#id4">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Alexis de Lattre <<a class="reference external" href="mailto:alexis.delattre@akretion.com">alexis.delattre@akretion.com</a>></li>
|
||||
<li>David Beal <<a class="reference external" href="mailto:david.beal@akretion.com">david.beal@akretion.com</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#id5">Maintainers</a></h2>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/12.0/account_usability">akretion/odoo-usability</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,2 +1,4 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
from . import account_invoice_mark_sent
|
||||
from . import account_move_reversal
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright 2017-2019 Akretion France (https://akretion.com/en)
|
||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2017-2019 Akretion France
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
Copyright 2017-2018 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
@@ -17,7 +16,7 @@
|
||||
</p>
|
||||
<footer>
|
||||
<button type="object" name="run" string="Mark as Sent" class="btn-primary"/>
|
||||
<button special="cancel" string="Cancel"/>
|
||||
<button special="cancel" string="Cancel" class="oe_link"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright 2018-2019 Akretion France (https://akretion.com/)
|
||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2018 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
3
aeroo_report_to_printer/__init__.py
Normal file
3
aeroo_report_to_printer/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import printing
|
||||
52
aeroo_report_to_printer/__manifest__.py
Normal file
52
aeroo_report_to_printer/__manifest__.py
Normal file
@@ -0,0 +1,52 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Aeroo Report to Printer module for Odoo
|
||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
{
|
||||
'name': 'Aeroo Report to Printer',
|
||||
'version': '0.1',
|
||||
'category': 'Aeroo',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Connect aeroo_report to base_report_to_printer',
|
||||
'description': """
|
||||
Aeroo Report to Printer
|
||||
=======================
|
||||
|
||||
There is a module *report_aeroo_direct_print* in https://github.com/aeroo/aeroo_reports that adds support for CUPS printing, but it's not as mature and clean as the OCA module *base_report_to_printer* from https://github.com/OCA/report-print-send.
|
||||
|
||||
And I want to use the best of both world : the best reporting engine (Aeroo) with the best CUPS printing module (base_report_to_printer). So I developped this small glue module.
|
||||
|
||||
You will find some sample code to use this module in the comments of the main Python file.
|
||||
|
||||
WARNING: you need this PR for base_report_to_printer to use this module: https://github.com/OCA/report-print-send/pull/39
|
||||
|
||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': [
|
||||
'base_report_to_printer',
|
||||
'report_aeroo',
|
||||
'base_other_report_engines',
|
||||
],
|
||||
'installable': False,
|
||||
}
|
||||
75
aeroo_report_to_printer/printing.py
Normal file
75
aeroo_report_to_printer/printing.py
Normal file
@@ -0,0 +1,75 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Aeroo Report to Printer module for Odoo
|
||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp import models, api, _
|
||||
from openerp.exceptions import Warning as UserError
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class PrintingPrinter(models.Model):
|
||||
_inherit = 'printing.printer'
|
||||
|
||||
@api.multi
|
||||
def aeroo_print_document(self, report_name, object_id, copies=1):
|
||||
'''
|
||||
Send an aeroo report to CUPS server for printing
|
||||
|
||||
Usage example :
|
||||
|
||||
Add this button in an inherit of the view 'stock.view_picking_form':
|
||||
<button name="print_delivery" type="object" states="done"
|
||||
string="Print 2 copies"/>
|
||||
|
||||
Add this code in the StockPicking class that inherit 'stock.picking'
|
||||
|
||||
@api.multi
|
||||
def print_delivery(self):
|
||||
if not self.env.user.printing_printer_id:
|
||||
raise UserError(_(
|
||||
"Missing 'Default Printer' in your preferences"))
|
||||
self.env.user.printing_printer_id.aeroo_print_document(
|
||||
'stock.report_picking', self.id, copies=2)
|
||||
'''
|
||||
self.ensure_one()
|
||||
report = self.env['ir.actions.report.xml']._lookup_report(report_name)
|
||||
report_xml = self.env['report']._get_report_from_name(report_name)
|
||||
data = {
|
||||
'model': report_xml.model,
|
||||
'id': object_id,
|
||||
'report_type': 'aeroo',
|
||||
}
|
||||
logger.info(
|
||||
'Request printing aeroo report %s model %s ID %d in %d copies',
|
||||
report_name, data['model'], data['id'], copies)
|
||||
aeroo_report_content, aeroo_report_format = report.create(
|
||||
self.env.cr, self.env.uid, [object_id],
|
||||
data, context=dict(self.env.context))
|
||||
if aeroo_report_format in ('pdf', 'raw'):
|
||||
self.print_document(
|
||||
report_name, aeroo_report_content, aeroo_report_format, copies)
|
||||
else:
|
||||
raise UserError(_(
|
||||
"Format '%s' is not supported for printing")
|
||||
% aeroo_report_format)
|
||||
return True
|
||||
1
attribute_usability/__init__.py
Normal file
1
attribute_usability/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import attribute
|
||||
25
attribute_usability/__manifest__.py
Normal file
25
attribute_usability/__manifest__.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# coding: utf-8
|
||||
# © 2016 Akretion
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
{
|
||||
'name': 'Attribute Usability',
|
||||
'version': '8.0.0.0.0',
|
||||
'category': 'Product',
|
||||
'summary': "Attribute views improved",
|
||||
'description': """
|
||||
- Create filter dynamically for each attributes in attribute values search view
|
||||
- Add a form view to Attribute and Attribute Value views
|
||||
|
||||
Contributors: David BEAL
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': [
|
||||
'product',
|
||||
],
|
||||
'data': [
|
||||
'view.xml',
|
||||
],
|
||||
'installable': False,
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user