Compare commits

..

476 Commits

Author SHA1 Message Date
Florian da Costa
da53473b60 migrate eradicate_quick_create to version 9.0 2017-10-04 10:43:32 +02:00
Florian da Costa
667775d466 Migrate product_search_supplier_code to v9 2017-07-21 14:47:39 +02:00
Florian da Costa
25de048402 Make modules uninstallable 2017-07-21 14:37:51 +02:00
Alexis de Lattre
817fadd167 Add groupby on commercial partner on invoice line search 2017-06-30 17:19:39 +02:00
Alexis de Lattre
25ea1991cf Add module account_invoice_update_wizard 2017-06-21 23:57:29 +02:00
Alexis de Lattre
c8c1f78e66 FIX my previous commit in mail_usability 2017-06-21 15:34:35 +02:00
Alexis de Lattre
0bc6cb32d9 Merge branch '8.0' of github.com:akretion/odoo-usability into 8.0 2017-06-21 14:53:13 +02:00
Alexis de Lattre
db736d95a3 Add "All Messages Except Notifications" for notify_email on res.partner 2017-06-21 14:52:47 +02:00
Alexis de Lattre
f83c948889 Add check methods for accounting and improve search view of account.invoice.report 2017-06-14 17:31:45 +02:00
Alexis de Lattre
d736663f3f Fix view 2017-05-19 09:47:10 +02:00
David Beal
f051537a92 FIX import report_xls in account_move_line_start_end_dates_xls 2017-05-15 12:01:49 +02:00
Alexis de Lattre
193e5e6ecc Add multi-company support hr_holidays_usability
Add modules hr_holidays_lunch_voucher and hr_holidays_lunch_voucher_natixis
2017-05-11 00:29:22 +02:00
Alexis de Lattre
00592100f7 Add module resource_usability 2017-05-09 17:09:34 +02:00
Alexis de Lattre
0d524f27d8 Merge branch '8.0' of github.com:akretion/odoo-usability into 8.0 2017-05-09 12:10:18 +02:00
Alexis de Lattre
4509b2631a Add multi-company record rule on leads
Small view improvement in crm_usability
2017-05-09 12:09:39 +02:00
Alexis de Lattre
2ff7943c62 Account_usability now compatible with account_analytic_plans 2017-05-04 17:13:48 +02:00
beau sebastien
d85e7270b3 Merge pull request #28 from akretion/sale-partner-shipping-filter-with-customer
[8.0] sale_partner_shipping_filter_with_customer module
2017-04-21 13:51:47 +02:00
beau sebastien
7b6916ce16 Merge pull request #29 from akretion/8.0-product-unit-manager-group
[8.0] product_unit_manager_group module
2017-04-21 11:27:26 +02:00
chafique-delli
a9c6f9ed69 replace partner_parent_id by commercial_partner_id 2017-04-13 21:50:12 +02:00
Alexis de Lattre
7a11966992 Better views for product.ul
Track partner_id on stock.picking
Improve stock.quant.package view
2017-04-13 20:05:15 +02:00
Alexis de Lattre
d4fcaa7d14 account.move.line: Add filter on both debit and credit 2017-03-23 14:38:15 +01:00
chafique-delli
77fb97f273 The units of measurement menus are visible only to the group_uom_manager group 2017-03-17 17:07:29 +01:00
Sébastien BEAU
9670eb7c10 [IMP] improve attribute view 2017-03-16 15:33:45 +01:00
chafique-delli
f8e955d5b7 remove dependency to point_of_sale to be more generic 2017-03-14 12:37:13 +01:00
chafique-delli
a803d1dcb9 add a dependency to the mrp and point_of_sale module 2017-03-14 12:14:44 +01:00
chafique-delli
a141f0506b add product_unit_manager_group module 2017-03-14 11:20:47 +01:00
chafique-delli
7c554aee33 fix after @bealdav's comment 2017-03-09 18:02:04 +01:00
chafique-delli
07c81e441d domain improvement 2017-03-09 15:14:05 +01:00
Alexis de Lattre
4c3c8e50db Remove show_account_move_form because of the fact that the context is kept from the account.move.line form view, so it triggers a crash when creating a line from the account.move form
Fix domain on analytic account on move lines
2017-03-08 00:31:23 +01:00
chafique-delli
60beb99580 fix domain 2017-03-07 19:13:30 +01:00
chafique-delli
709bde8fb7 add sale_partner_shipping_filter_with_customer module 2017-03-07 18:42:07 +01:00
Alexis de Lattre
281c0b7052 Cut ref field to 32 chars, to avoid trouble with PDF webkit accounting reports 2017-03-04 22:34:31 +01:00
Alexis de Lattre
8d55f9aaa5 Restore description field 2017-03-04 22:34:18 +01:00
Alexis de Lattre
964b1fca67 Better context from wizard 2017-03-03 09:36:44 +01:00
Alexis de Lattre
e20f88baf0 Add button for direct access to journal entry from journal items 2017-03-03 09:36:08 +01:00
Benoit
15d9c31f6f [FIX] change pattern for mail footer because it changes is there is user signature or not 2017-02-15 11:37:29 +01:00
Alexis de Lattre
e74864e54f Add FR translation 2017-02-14 14:25:41 +01:00
Alexis de Lattre
146c0e6b7d Add a link from incoming picking to PO 2017-02-10 17:27:27 +01:00
Alexis de Lattre
869c7176f7 Supplierinfo: remove field that is not usefull for everybody ; fix addition of supplier on products 2017-02-09 22:23:36 +01:00
Alexis de Lattre
4b26ab78be Better views on product.supplierinfo 2017-02-09 16:51:00 +01:00
Alexis de Lattre
662494db35 Better selection of picking type 2017-02-09 14:09:41 +01:00
Alexis de Lattre
aafc36dfdb Fix XMLID name 2017-02-07 17:37:01 +01:00
Alexis de Lattre
e94168ad27 Better procurement order search view 2017-02-07 16:48:24 +01:00
Sébastien BEAU
9b62198115 [FIX] fix missing dependency for partner_split_menu 2017-02-06 19:21:36 +01:00
Alexis de Lattre
309027198a Add module product_expiry_simple 2017-02-03 23:24:08 +01:00
Alexis de Lattre
c8f1517881 Add traking on some import product fields 2017-02-03 15:13:40 +01:00
Alexis de Lattre
6cb195a3eb Remove stored field product_supplier_code on stock.move because it takes a very very long time to compute on existing large DB and it is not needed by everybody. (#27) 2017-02-03 12:06:09 +01:00
Alexis de Lattre
b85f5184c2 Add track_visibility on important fields 2017-02-02 09:40:26 +01:00
Sébastien BEAU
2d392ce465 [FIX] fix product view with variant 2017-01-31 15:41:40 +01:00
Sébastien BEAU
e71ad5f952 [IMP] add module partner split menu to avoid the mix of contact and main partner 2017-01-26 14:40:47 +01:00
Alexis de Lattre
3905a826fa Small improvements on contracts view 2017-01-20 19:54:22 +01:00
Alexis de Lattre
18ea374d8c Add module account_analytic_analysis_usability 2017-01-20 19:27:55 +01:00
Alexis de Lattre
f8d3340e48 Better name 2017-01-20 18:43:12 +01:00
Alexis de Lattre
9761c7527b Improvement on invoice lines and analytic accounts 2017-01-20 18:22:37 +01:00
Alexis de Lattre
baf7359cc7 Show state column in all crm.phonecall tree view 2017-01-19 18:43:40 +01:00
Sébastien BEAU
33561ed930 [FIX] create variant manually is not allowed 2017-01-16 11:52:07 +01:00
Sébastien BEAU
aad2121f20 [IMP] add module product_variant_usability 2017-01-10 15:29:37 +01:00
Sébastien BEAU
880cf7c7a9 [ADD] add module product_simple_accounting to simplify the product form regarding accounting 2017-01-09 19:35:46 +01:00
Alexis de Lattre
d3eef1e5a5 Add start_date and end_date on bank statements 2016-12-21 21:13:40 +01:00
David Beal
b41f188eb4 IMP add filter Not company on supplierinfo 2016-11-30 12:14:42 +01:00
Levent Karakaş
891c64bb1f [FIX] Fix to get purchase suggest work without the need to patch (#24)
* Fix to get it work without the need to patch
2016-11-22 09:45:03 +01:00
David Beal
b9e07ea986 IMP add icons 2016-11-18 10:37:43 +01:00
David Beal
12fbd5dc2c IMP add product.supplierinfo standalone view 2016-11-16 18:56:02 +01:00
David Beal
7948193fe0 FIX only get supplier code, not default code to avoid confusing 2016-11-11 21:58:03 +01:00
David Beal
64cb3d44ad Merge pull request #22 from akretion/supplier-code
IMP field product_supplier_code added to stk.move
2016-11-11 18:35:24 +01:00
David Beal
08f434b6a0 FIX store field product_code in stock.move 2016-11-11 18:31:56 +01:00
David Beal
6176b37fa6 IMP field product_supplier_code added to stk.move 2016-11-10 14:51:13 +01:00
Alexis de Lattre
4015f5b1c9 Add module crm_usability 2016-11-07 19:05:25 +01:00
Alexis de Lattre
ef920f58f4 noupdate for email template 2016-11-07 10:27:03 +01:00
Alexis de Lattre
c108f617c2 Update ACL 2016-10-23 17:42:41 +02:00
David Beal
4acce9509f [DOC] add TODO in code 2016-10-20 19:32:53 +02:00
Alexis de Lattre
e9ab3187e7 Add module account_fiscal_position_payable_receivable 2016-10-18 15:50:27 +02:00
David Beal
13e6facec5 Merge pull request #21 from akretion/8-sale_id_field
[IMP] move sale_id in picking
2016-10-09 21:04:13 +02:00
David Beal
6c53b3c1ae [IMP] move sale_id in picking 2016-09-27 09:46:48 +02:00
David Beal
a379b59597 Update fr.po 2016-09-21 17:37:19 +02:00
Alexis de Lattre
2f179995bf Add module account_cutoff_accrual_picking_ods 2016-09-21 17:23:36 +02:00
Alexis de Lattre
7c5f04a39e Also avoid to have '/' on move line label of supplier invoices 2016-09-21 17:23:05 +02:00
David Beal
b814ec11bf [ADD] stock_picking_zip module 2016-09-21 12:48:25 +02:00
Alexis de Lattre
7d39e50ba3 Remove code for a feature that is available in the OCA module account_invoice_constraint_chronology 2016-09-19 17:58:21 +02:00
Alexis de Lattre
77995aa125 Track changes on hr.employee object 2016-09-15 00:20:56 +02:00
Alexis de Lattre
314350efee Migration script should be perfect now 2016-09-14 19:21:33 +02:00
Alexis de Lattre
40ef119999 Handle the case where name of account_move_line has the name field of the invoice 2016-09-14 18:25:01 +02:00
Alexis de Lattre
6583ea0cd9 Raise an error when the coherence of the sequence of customer invoices vs invoice date is not respected 2016-09-14 17:37:08 +02:00
Alexis de Lattre
7def6a85e4 Better name field in account.move.line for move generated from customer invoice (WARNING : migration script included) 2016-09-14 16:52:46 +02:00
Alexis de Lattre
618ad6d6d6 Add partial reconcile field in account move line tree view 2016-09-12 12:54:07 +02:00
Alexis de Lattre
05c0f74420 Auto-reset period when changing date on invoice 2016-09-12 12:58:02 +02:00
Alexis de Lattre
78ff16436d Better name_get for incoterm: [EXW] Ex-Works 2016-09-12 12:51:42 +02:00
Mourad Elhadj Mimoune
b4dc9da272 [MIG] migration of product_search_supplier_code from 7.0 2016-09-07 16:17:22 +02:00
Mourad Elhadj Mimoune
3aa16cdacf Merge branch '7.0-extract' into 8.0 2016-09-07 15:44:26 +02:00
Alexis de Lattre
d823e3ae75 Fix readonly state on hr.holidays fields 2016-09-05 11:53:42 +02:00
Alexis de Lattre
a1f57e1ab5 Block refusal of his own holidays 2016-09-05 11:08:54 +02:00
Alexis de Lattre
c2d2e93f07 Replace narrow_no_break_space by no_break_space for Mac OS X 2016-07-19 01:16:12 +02:00
David Beal
56bdeb3ee9 [TRANS] sale_stock_usability 2016-07-13 14:38:36 +02:00
David Beal
b811ae890a [TRANS] sale_usability_extension 2016-07-13 14:12:17 +02:00
Alexis de Lattre
07a444367b Use float_is_zero, code cleanup 2016-07-06 10:31:04 +02:00
Alexis de Lattre
8a7a3c670f Add unit of measure on stock quant tree/form view 2016-06-28 10:06:50 +02:00
Benoît Guillot
7f2589c9bf Merge pull request #19 from akretion/mail_usability
[ADD] mail_usability module for improvements on mails
2016-06-23 15:58:09 +02:00
Benoit
93e63b74b6 [ADD] mail_usability module for improvements on mails 2016-06-23 15:50:43 +02:00
Alexis de Lattre
c2accec411 Merge branch '8.0' of github.com:akretion/odoo-usability into 8.0 2016-06-19 23:41:25 +02:00
Alexis de Lattre
62b01c781f Add support for max_qty in purchase_suggest 2016-06-19 23:40:52 +02:00
David Beal
33b99de09e Merge pull request #17 from akretion/8-module
[IMP] usability module
2016-06-19 10:46:12 +02:00
David Beal
e134153a40 Update __openerp__.py 2016-06-19 10:45:12 +02:00
Alexis de Lattre
6812d2e68b Make the computation of product domain inheritable 2016-06-18 17:29:49 +02:00
Alexis de Lattre
25d8a50d3a Fix duplicate 2016-06-18 15:23:22 +02:00
Alexis de Lattre
54b74f01c0 Display view account move button only when move exists 2016-06-01 22:51:08 +02:00
Alexis de Lattre
5ac6b777b2 Better handling of translation to avoid to have a menu entry "Variantes d'articles" 2016-05-30 17:29:35 +02:00
David Beal
fd05834ffe Update README.rst 2016-05-30 17:22:18 +02:00
Alexis de Lattre
34a763d894 Add inventory valuation without per stock location analysis 2016-05-30 15:55:57 +02:00
beau sebastien
30089555c5 Merge pull request #16 from akretion/8.0-purchase-hide-report-print-menu
add purchase_hide_report_print_menu
2016-05-30 15:17:47 +02:00
Alexis de Lattre
7f62369a06 Fix formula
Add column dedicated to product code
2016-05-30 12:35:51 +02:00
David Beal
005063e8c6 [IMP] hide description field on product 2016-05-24 11:36:13 +02:00
chafique-delli
08ad828da7 refactor code 2016-05-24 11:36:12 +02:00
David Beal
31c6246e2c [IMP] usability module 2016-05-24 11:14:12 +02:00
Alexis de Lattre
b7dd2a6a07 Forgot a file 2016-05-20 12:52:13 +02:00
Alexis de Lattre
ef97656b42 Add module account_hide_analytic_line 2016-05-20 12:51:12 +02:00
chafique-delli
16627ba6f0 new api for fields_view_get method in purchase_hide_report_print_menu module 2016-05-19 11:13:52 +02:00
Alexis de Lattre
7cf98a1001 Add constrains and onchange 2016-05-18 14:52:53 +02:00
Alexis de Lattre
6e8e9fa1aa Avoid privacy issues 2016-05-11 18:42:52 +02:00
Alexis de Lattre
02940c08cd FIX precision of field 2016-05-05 00:26:58 +02:00
Alexis de Lattre
2dd4a7d577 Small improvements :
- when lead is marked as lost, related quotes are cancelled
- when you create a lead from a quote, its stage will be "proposition"
2016-05-03 18:30:51 +02:00
Alexis de Lattre
e1c660d90c Allow to force a date in the computation of the prefix of a sequence 2016-05-03 18:30:25 +02:00
chafique-delli
aa3568e986 add purchase_hide_report_print_menu 2016-05-03 15:27:13 +02:00
Alexis de Lattre
9c67a6df5d Add sudo to allow a user to do a back2draft even if he that doesn't have rights to delete an invoice 2016-04-26 23:30:34 +02:00
Alexis de Lattre
5be71f05b3 Remove cost from quant form, because I figured out that this field was not interesting 2016-04-16 13:30:01 +02:00
Alexis de Lattre
0498f6e24e Add module intrastat_product_type 2016-04-15 22:01:45 +02:00
Alexis de Lattre
80763de94b Add cost field in stock quant view 2016-04-15 15:07:29 +02:00
Alexis de Lattre
18753eadf9 Remove start/end balance in bank statement 2016-04-15 15:06:57 +02:00
Alexis de Lattre
932de847b6 FIX obvious error in my previous commit 2016-04-14 13:42:44 +02:00
Alexis de Lattre
b7ab16477a Add button to show account move from bank statement line 2016-04-14 11:52:53 +02:00
Alexis de Lattre
72bd441617 Display fields in stock move form view 2016-04-04 00:45:42 +02:00
Alexis de Lattre
c7908c38ed Add scheduler.procurement.log
Re-organize the code, so that each module xxx_usability only depend on xxx
2016-04-03 10:53:35 +02:00
Alexis de Lattre
ad786e892f Add sale_quotation_title module 2016-04-01 12:09:14 +02:00
Alexis de Lattre
744c721950 Add sale_crm_usability module 2016-03-31 23:03:49 +02:00
Alexis de Lattre
7c2f10423f Add company_id in product.pricelist tree view 2016-03-31 11:55:33 +02:00
Alexis de Lattre
9c666ba4d9 Modify default values for lang wizards 2016-03-30 14:17:10 +02:00
David Beal
c62a163f93 [IMP] order by sequence in attribute 2016-03-25 12:37:33 +01:00
Alexis de Lattre
9ad2d0f7e1 Same change on purchase order: widget=selection on fiscal position 2016-03-18 19:07:42 +01:00
Alexis de Lattre
907022b31d Easier selection of fiscal position on SO with widget="selection" 2016-03-18 19:04:13 +01:00
Alexis de Lattre
2cbb4dcfb6 Add FR translation 2016-03-18 09:54:55 +01:00
Alexis de Lattre
8cdf8c68e8 Better layout of form view 2016-03-17 23:58:39 +01:00
Alexis de Lattre
10ebf47612 Better labels 2016-03-17 23:55:57 +01:00
Alexis de Lattre
3a69e7bf69 Port/rewrite purchase_date_planned_update to v8 2016-03-17 23:46:13 +01:00
Alexis de Lattre
69c975bfc5 Better layout 2016-03-17 15:13:24 +01:00
David Beal
9d8d2cf8cc [FIX] module version, icon path 2016-03-17 12:58:09 +01:00
David Beal
9356ccc497 [FIX] attributes filter sort 2016-03-16 18:54:15 +01:00
David Beal
3e702f0186 [IMP] add attribute filters in attribute view 2016-03-16 18:29:40 +01:00
David Beal
b0110ca542 [ADD] module attribute_usability 2016-03-16 17:37:08 +01:00
David Beal
ecf5f6f843 [IMP] translation and reload menu 2016-03-16 17:36:28 +01:00
David Beal
d90bd9dd8e [ADD] module_usability 2016-03-16 09:35:39 +01:00
Alexis de Lattre
d794e3fcd2 Add note field on credit control line 2016-03-15 18:28:11 +01:00
Alexis de Lattre
e519cf89cd Lower risk on summer time savings 2016-03-15 18:18:21 +01:00
Alexis de Lattre
15ebf4a756 Inherit another hr_holiday view, for better usability 2016-03-15 17:59:10 +01:00
Alexis de Lattre
7a6a38aa1d Revert to previous code for order on pickings
Don't inherit the 2 fields to add digits=, it seems it is not needed any more
2016-03-03 10:02:43 +01:00
Alexis de Lattre
0971fb48e4 Move view code from sale_usability_extension to sale_stock_usability (pickings_ids belongs to sale_stock !) 2016-03-01 17:48:52 +01:00
Alexis de Lattre
41f012e0b4 Better help msg 2016-03-01 17:36:14 +01:00
Alexis de Lattre
dba79c83c4 Add good support of unit of measures in purchase_suggest 2016-03-01 17:35:39 +01:00
Alexis de Lattre
f2e48cb977 Remove restriction to view the period_id field on invoices 2016-03-01 09:25:42 +01:00
Alexis de Lattre
8b3dd37c33 stock_usability : Only do the change of precision on function fields, not on real field. In fact, when we change the precision on "real" fields, it will convert them from type "double precision" in postgres to type "numeric". One of the consequences of this it that it deletes the stock.history SQL view that is defined in stock_account/wizard/stock_valuation_history.py... but this SQL view is never re-created until you reload the module stock_account.
So it's not a good idea of thix to bug in this stock_usability module ; it needs to be fixed in the stock module itself. More work needs to be done on https://github.com/odoo/odoo/pull/10038
2016-02-29 14:50:21 +01:00
Alexis de Lattre
549ab31e82 Remove code that is not usefull anymore 2016-02-29 14:23:07 +01:00
Alexis de Lattre
3bedaa076c Code cleanup in partner_products_shortcut 2016-02-27 00:25:47 +01:00
Alexis de Lattre
518628ec8c Add module partner_product_variants_shortcut 2016-02-27 00:25:35 +01:00
Alexis de Lattre
14518c7f9f Improve mrp_usability 2016-02-26 16:15:32 +01:00
Alexis de Lattre
354137d101 Better invalidation 2016-02-26 12:16:55 +01:00
Alexis de Lattre
cb2ec53062 FIX one precision
Add help message to inform about the unit of measure of the field
2016-02-26 11:18:09 +01:00
David Beal
d806d1cf81 Merge pull request #13 from akretion/8-partner-search
[ADD] module partner_search
2016-02-24 22:56:53 +01:00
Alexis de Lattre
b640290962 account_invoice_partner_bank_usability: ability to choose which bank account is selected by default on customer invoices 2016-02-14 00:33:12 +01:00
Alexis de Lattre
447e5a7d82 Resize fiscal year code from 6 to 9 (want to write '2015-2016') 2016-02-12 15:48:23 +01:00
David Beal
3bc6bb2900 Merge pull request #14 from akretion/8.0_fix_no_filter_myorder
[FIX] dependency of sale_no_filter_myorder
2016-02-11 14:37:53 +01:00
Benoît
9a55c50563 [FIX] dependency of sale_no_filter_myorder 2016-02-11 14:31:41 +01:00
Alexis de Lattre
a88c3e7f6d Update report 2016-02-10 23:21:11 +01:00
Alexis de Lattre
9c63ea19d3 Add module stock_inventory_valuation_ods 2016-02-10 23:20:07 +01:00
David Beal
38f0f5eb78 [IMP] replace name in search by name, ref, email 2016-02-05 23:50:58 +01:00
David Beal
53f85a6b8e [ADD] module partner_search 2016-02-04 17:49:20 +01:00
Alexis de Lattre
5b7cdcff37 Update account_move_line_start_end_dates_xls 2016-02-03 16:08:15 +01:00
Alexis de Lattre
30bc6ff801 Add module account_cutoff_prepaid_ods 2016-02-02 18:46:53 +01:00
Alexis de Lattre
f4574647dd Add option no_email_notification on hr_holidays, to be able to skip email notification (dirty workaround to the fact that workflow doesn't pass context) 2016-02-01 11:07:10 +01:00
Alexis de Lattre
1b2fada686 Add Go to Partner button
Remove file added by error
2016-02-01 11:04:51 +01:00
Alexis de Lattre
db55e148c3 Better module desc 2016-01-30 00:05:04 +01:00
Alexis de Lattre
2ceb626723 Add possibility to make an exception on some form views in web_eradicate_duplicate 2016-01-29 23:42:15 +01:00
Alexis de Lattre
90a2f719ef Block when you try to validate an invoice with a date in the future
PEP8
2016-01-29 17:36:10 +01:00
Alexis de Lattre
4883570131 Small enhancements in account_credit_control_usability 2016-01-29 16:44:23 +01:00
Alexis de Lattre
110d8b6982 Small enhancement in account_usability 2016-01-29 16:43:22 +01:00
Alexis de Lattre
6d29f236fd Add totals as SUM() 2016-01-27 20:55:00 +01:00
Alexis de Lattre
dd784fa245 Better name_get on stock_move, to make it easier to analyse the reservation of the quants 2016-01-27 18:35:29 +01:00
Alexis de Lattre
7d0ea7967c Add module account_move_line_filter_wizard 2016-01-27 18:33:27 +01:00
Alexis de Lattre
111a42c2da Add reconcile filters 2016-01-27 18:32:59 +01:00
Alexis de Lattre
f66d74499f Add module account_credit_control_usability 2016-01-27 18:21:29 +01:00
Alexis de Lattre
ea195e6c75 Merge pull request #10 from akretion/8-default-tax-on-product
[IMP] play onchange while import
2016-01-27 00:08:20 +01:00
Alexis de Lattre
f74828e3ea Update DEB ODS report 2016-01-26 15:26:21 +01:00
Alexis de Lattre
3ef6312f65 Add module l10n_fr_intrastat_product_ods 2016-01-26 10:50:10 +01:00
Alexis de Lattre
9701eb1986 Better description 2016-01-25 14:50:19 +01:00
Alexis de Lattre
dbb427e70e Avoid a raise if your have 2 bank accounts with the same number (different currencies) and you force the journal 2016-01-25 14:48:55 +01:00
Sébastien BEAU
91ad3f0f05 [IMP] add sale_no_filter_myorder module to remove default filter on sale order 2016-01-22 11:26:14 +01:00
Alexis de Lattre
2c760935af FIX access rights because by missing readonly=True on related field 2016-01-21 23:15:00 +01:00
Alexis de Lattre
607968983b Add module purchase_line_product_required 2016-01-21 21:32:11 +01:00
Alexis de Lattre
e1f8611ef3 Add logs in procurement scheduler
Add method in account_usability : get fiscal position without partner_id
2016-01-18 00:07:23 +01:00
Alexis de Lattre
0a154e4314 Add close_method in tree view of account.account.type 2016-01-15 14:09:36 +01:00
Alexis de Lattre
25d593710e Add reverse M2M field invoice_line <-> sale_line 2016-01-14 22:10:05 +01:00
David Beal
9f2ce9dd14 Merge pull request #11 from akretion/8-fix-line_start_end_dates_xls
[FIX] account_move_line_start_end_dates_xls installable key
2016-01-13 23:35:30 +01:00
Alexis de Lattre
7fdf51be31 Better stock move view when using the shortcut button on the product form 2016-01-13 20:49:14 +01:00
Alexis de Lattre
ccc0684312 Add patch for POS 2016-01-13 12:04:38 +01:00
Alexis de Lattre
140349e4d8 Add search on EAN13 in product_usability 2016-01-13 11:51:13 +01:00
Alexis de Lattre
540d7cf82c Add module second_ean13 2016-01-13 11:50:51 +01:00
Alexis de Lattre
f745388f37 On partner form view, 2 buttons for journal items: one for payable (seen if supplier = True) and one for receivable (seen if customer=True) 2016-01-12 20:09:55 +01:00
Alexis de Lattre
ad0e2f43c4 Add module l10n_fr_fix_thousands_sep 2016-01-08 23:25:39 +01:00
Alexis de Lattre
12d9934889 Remove module sale_markup_group_user (won't port it to v7) 2016-01-08 17:04:22 +01:00
Alexis de Lattre
32553d0042 Add module sale_margin_report 2016-01-08 16:57:30 +01:00
Alexis de Lattre
823e9ad208 don't make name field of product too wide, for screens with small resolutions 2016-01-07 18:55:53 +01:00
Alexis de Lattre
f5c54ce9d0 Fix code sample in aeroo_report_to_printer 2016-01-07 11:22:38 +01:00
Alexis de Lattre
b24182c5b6 Add module web_eradicate_duplicate 2016-01-07 09:50:51 +01:00
Alexis de Lattre
91f400be09 Remove module account_invoice_overdue_filter (feature present in account_usability) 2016-01-06 22:49:12 +01:00
beau sebastien
4c7dc09979 Merge pull request #12 from akretion/8-calendar
[ADD] calendar usability
2016-01-06 18:40:49 +01:00
David Beal
15c0400805 [FIX] variable name 2016-01-06 18:36:32 +01:00
Alexis de Lattre
b3bc3c923d Do not show cancelled quotations by default in Requests for Quotation 2016-01-06 16:01:45 +01:00
David Beal
623dca3cbf [FIX] module name 2016-01-05 18:51:04 +01:00
David Beal
490b203943 [IMP] attendance_ids at default value 2016-01-05 15:27:34 +01:00
David Beal
a41d5bc3ce [ADD] calendar usability 2016-01-05 09:18:39 +01:00
Alexis de Lattre
55d1f66d0e Remove module product_disable_quick_create (use eradicate quick_create instead) 2016-01-04 21:40:49 +01:00
Alexis de Lattre
2617170314 Adapt to the revolution branch of OCA/bank-payment 2016-01-04 20:56:03 +01:00
Alexis de Lattre
f436a651cf Minor changes 2016-01-04 10:09:19 +01:00
Alexis de Lattre
0eedae22c6 Better search and form views for countries and states 2016-01-01 11:39:15 +01:00
Alexis de Lattre
26930e6a84 Add modules pos_no_product_template_menu and pos_usability 2016-01-01 10:14:51 +01:00
Alexis de Lattre
b26164e05c Really remove group on products variants entry 2015-12-31 19:06:55 +01:00
Alexis de Lattre
fcaf342d2a Hide re-ordering rules when using purchase_suggest_min_qty_on_product 2015-12-31 17:38:55 +01:00
Alexis de Lattre
b5d814860e Add outgoing_qty in product form view (under incoming_qty) 2015-12-31 16:56:01 +01:00
Alexis de Lattre
ad6a8f28eb Better module desc 2015-12-30 11:11:15 +01:00
Alexis de Lattre
5252ed95cd Update sale_purchase_no_product_template_menu: now usable by companies who have multi-variants, because we keep one menu entry of product.template in Sales > Configuration > Products Categ and Attributes menu 2015-12-30 11:08:02 +01:00
Alexis de Lattre
a068c534bb Add module purchase_suggest_min_qty_on_product 2015-12-30 10:37:01 +01:00
David Beal
c67d51b303 [FIX] account_move_line_start_end_dates_xls installable key 2015-12-15 11:49:17 +01:00
David Beal
91886211ae [FIX] write in product_category_tax 2015-12-15 10:34:02 +01:00
Mourad
473b97fd7e ADD fr translation 2015-12-15 10:34:02 +01:00
David Beal
92c89b0756 [IMP] play onchange while import
[FIX] play onchange with write
2015-12-15 10:33:30 +01:00
Alexis de Lattre
abe79d1c48 Port projct_issue_extension to v8 2015-12-14 15:56:28 +01:00
Alexis de Lattre
81e923def2 FIX a bug in stock module: add decimal precision ! (we should not do that in a 'usability' module, but...)
Add sum on quant tree view
2015-12-11 15:28:37 +01:00
Alexis de Lattre
fb9e05b5b9 Add module account_invoice_margin_report 2015-12-11 13:50:42 +01:00
Alexis de Lattre
96796ebe05 Small vue update 2015-12-11 13:49:43 +01:00
Alexis de Lattre
72eef666eb Add sale_stock_usability
sale_usability_extension now only depend on sale (not on sale_stock)
2015-12-10 15:10:22 +01:00
Alexis de Lattre
03f4a1438c Add state in translation tree view 2015-12-08 11:09:48 +01:00
Alexis de Lattre
8d64f799d1 Module in tree view by default, filtered on Installed modules (not Apps) 2015-12-07 10:04:16 +01:00
Alexis de Lattre
725314e497 Merge pull request #9 from isabellerichard/8.0
[TRAD] Translate product_category_tax in french
2015-12-05 18:45:53 +01:00
Isabelle RICHARD
45f3294249 [TRAD] Translate product_category_tax in french 2015-12-04 18:30:30 +01:00
Alexis de Lattre
7ed3a38cb2 Add log message when sending en email to the outside world ! 2015-12-04 17:35:29 +01:00
Alexis de Lattre
ab464db930 Add module l10n_fr_usability 2015-12-01 22:50:20 +01:00
Alexis de Lattre
704667e71e Add module stock_transfer_continue_later 2015-12-01 19:13:32 +01:00
Alexis de Lattre
badaa404a4 Better "Journal items" shortcut button on partner form view, to go directly to the "account" of the customer or supplier 2015-11-24 16:33:59 +01:00
Alexis de Lattre
0fb70e97aa Remove raise which is not required any more since a1e7e10ef2 2015-11-23 22:01:18 +01:00
Alexis de Lattre
1a38600aeb Continue modifications for better security management 2015-11-23 10:26:32 +01:00
Alexis de Lattre
c3a55088ed Merge pull request #8 from akretion/8-stock-location-route-no-translate
[FIX] Missing :
2015-11-17 17:36:53 +01:00
Raph
5c3716dfe1 [FIX] Missing : 2015-11-17 17:11:09 +01:00
Alexis de Lattre
fec06bbb59 Add module hr_expense_usability 2015-11-16 18:57:55 +01:00
Alexis de Lattre
9b4c770382 Better access rights on hr_holidays_usability
Remove force_send on emails
2015-11-16 18:57:21 +01:00
Alexis de Lattre
2d7f151543 Merge pull request #7 from akretion/8-stock-location-route-no-translate
[IMP] don't translate stock.location.route
2015-11-16 09:38:57 +01:00
Raph
8c9c30b604 [IMP] don't translate stock.location.route
And incr num version
And tell it in the description
2015-11-12 14:29:07 +01:00
Alexis de Lattre
cfc24eeeee Advice on purchase_suggest 2015-11-10 17:01:21 +01:00
Alexis de Lattre
fdbc003ac7 Code cleanup 2015-11-06 11:05:54 +01:00
Alexis de Lattre
44fcf386ee Add graph view on pickings 2015-11-06 11:02:35 +01:00
Alexis de Lattre
a1e4829455 Add one line of log 2015-11-06 09:56:03 +01:00
Alexis de Lattre
0bac95c085 Lower limit for better perfs 2015-11-04 22:30:06 +01:00
Florian da Costa
9f331306af add possibility to search supplier code in stock.picking.in 2015-11-04 16:25:12 +01:00
Alexis de Lattre
613d6d688d Add stock_account_usability module 2015-11-03 13:26:21 +01:00
Alexis de Lattre
152e94b116 Add warning in description 2015-11-02 23:09:29 +01:00
Alexis de Lattre
60e9caf2e7 Add module aeroo_report_to_printer
Minor code update in base_other_report_engines
2015-11-02 23:04:29 +01:00
Alexis de Lattre
214aafd243 Add name_title field 2015-11-02 10:28:47 +01:00
Alexis de Lattre
b140aa2abf Wider name field for product 2015-10-30 23:23:35 +01:00
Alexis de Lattre
da2c22329c pos_sale_report: Now works well when you select multiple products in product tree view
Add Today and Yesterday filter, for easy analysis of recent sales
2015-10-30 23:17:37 +01:00
Florian da Costa
83bca9318d add french translation to product search supplier code 2015-10-30 13:58:10 +01:00
Florian da Costa
32e2ecea37 add product_search_supplier_code 2015-10-30 11:52:22 +01:00
Alexis de Lattre
27fc5070ec Add domain 2015-10-29 15:23:40 +01:00
Alexis de Lattre
d3080b90a7 Port base_company_extension to new API 2015-10-29 14:03:21 +01:00
Alexis de Lattre
dddc24dc02 Fix access rights issue 2015-10-29 10:25:55 +01:00
Alexis de Lattre
6c073b7d4d Add total untaxed in sale order tree view 2015-10-19 17:30:29 +02:00
Alexis de Lattre
2114ce5da5 Add tracking on active on res.partner 2015-10-19 11:25:18 +02:00
Alexis de Lattre
27abfa0880 Add module account_bank_statement_import_usability 2015-10-16 18:35:10 +02:00
Alexis de Lattre
340bd0857d Add option on employees to exclude from mass allocation 2015-10-15 18:35:00 +02:00
Alexis de Lattre
13f9a51bff Port stock_invoice_try_again to v8 2015-10-15 11:21:53 +02:00
Alexis de Lattre
d4b979979a Better search view of stock.location 2015-10-09 19:50:53 +02:00
Alexis de Lattre
6aadd49592 Add monitoring on a field 2015-10-09 16:38:45 +02:00
Alexis de Lattre
b2ce56755f Small enhancement on picking search view 2015-10-09 12:51:20 +02:00
Alexis de Lattre
7070f7f1ec Small usability enhancement for account
PEP8 stuff
2015-10-09 12:50:22 +02:00
Alexis de Lattre
6d50815196 Port purchase_auto_invoice_method to v8 2015-10-07 17:21:59 +02:00
Alexis de Lattre
99f3bc3778 date_done should be visible to everybody 2015-10-07 15:43:29 +02:00
Alexis de Lattre
e081876473 Better view of stock move, to fit vertically in one screen
Unreserve button on form view of stock move
2015-10-07 08:59:39 +02:00
Alexis de Lattre
1fbd4281ba Add fields in view 2015-10-06 16:45:36 +02:00
Alexis de Lattre
45593e94fc Display unreserve button even when partially available 2015-10-06 14:56:37 +02:00
Alexis de Lattre
f967e0007b Add module stock_my_operations_filter 2015-10-05 00:00:03 +02:00
Alexis de Lattre
3e5af98552 FIX module sale_purchase_no_product_template_menu 2015-09-30 12:01:03 +02:00
Alexis de Lattre
d365286bdf Show analytic account even if there are no journal selected 2015-09-28 14:57:10 +02:00
Alexis de Lattre
63d06b285a Don't block manual creation of warehouse 2015-09-28 14:39:54 +02:00
Alexis de Lattre
d67e82926a Add module sale_purchase_no_product_template_menu 2015-09-28 11:51:28 +02:00
Alexis de Lattre
e11a62dd90 Add Unreserve button on move line 2015-09-21 09:46:38 +02:00
Alexis de Lattre
9a787e88b3 Merge branch '8.0' of https://github.com/akretion/odoo-usability into 8.0
Conflicts:
	purchase_suggest/i18n/fr.po
2015-09-21 09:44:03 +02:00
Alexis de Lattre
f086cb9d29 FR translation contributed by Christophe Dubuit 2015-09-21 09:34:55 +02:00
Alexis de Lattre
0b3c1ff510 Update translation templates 2015-09-16 23:22:06 +02:00
Alexis de Lattre
8cd265cae3 Remove unneeded if 2015-09-16 18:17:41 +02:00
Alexis de Lattre
a5507fadfc Wider 'name' field on partner form 2015-09-16 10:34:42 +02:00
Alexis de Lattre
7713a1178f partner_products_shortcut: tree view by default 2015-09-16 10:21:02 +02:00
Alexis de Lattre
ea41ed7663 is_company is now readonly when the partner is a contact 2015-09-16 10:17:00 +02:00
Alexis de Lattre
1f04ef8b92 Add reverse one2many field 2015-09-14 23:57:21 +02:00
Alexis de Lattre
165d042a6b Generate aged open invoices with all moves from all FY 2015-09-03 15:51:07 +02:00
Alexis de Lattre
44b3e74398 Move features of account_invoice_overdue_filter in account_usability
Disable reconcile guessing in account_usability
2015-08-09 18:43:46 +02:00
Alexis de Lattre
215cb70cea Port module account_invoice_del_attachment_cancel to v8/newAPI 2015-07-31 18:06:06 +02:00
Alexis de Lattre
d9f8da2b9e Add margin rate in percentage
Margin is now negative on refunds (not only in account.invoice, but also on account.invoice.line)
2015-07-31 17:35:53 +02:00
Alexis de Lattre
58203941df Small improvements 2015-07-31 16:24:36 +02:00
Alexis de Lattre
f717761aa2 account_invoice_margin: add support for multi-UoMs for margins 2015-07-31 15:42:27 +02:00
Alexis de Lattre
2ea24123da Add module sale_margin_no_onchange 2015-07-31 15:19:54 +02:00
Alexis de Lattre
e67d9a6a3a Small code enhancements to purchase_suggest
WARNING : this code changes the method to select the location_id and pick_type_id on PO
2015-07-30 18:09:17 +02:00
Alexis de Lattre
9fdfaf9d49 Show user_type in account.accout tree view 2015-07-30 15:58:39 +02:00
Alexis de Lattre
154104e5a8 Add tracking in PO fields 2015-07-30 15:51:47 +02:00
Alexis de Lattre
9f1c82aeca Better position of button 2015-07-30 15:45:02 +02:00
Alexis de Lattre
8eb87d249b Minor code enhancements 2015-07-30 15:40:34 +02:00
Alexis de Lattre
9a3fa8dbe0 Add date_confirm in sale order view !
Add onchange on important sale.order fields
2015-07-30 10:09:10 +02:00
Alexis de Lattre
cdfbc427d1 Horrible hack to avoid blocking the installion of the module pos_debt_notebook 2015-07-29 13:33:11 +02:00
Alexis de Lattre
beed014aca Fix product_category_tax : replace taxes instead of adding them 2015-07-29 13:11:30 +02:00
Alexis de Lattre
6347327b58 Better description 2015-07-29 09:47:02 +02:00
Alexis de Lattre
c52a8e901f Show resa in quant tree view 2015-07-27 15:29:38 +02:00
Alexis de Lattre
db8f78e5cf Show margins to Accoutant group 2015-07-27 09:49:41 +02:00
Alexis de Lattre
54efe13723 Add module account_invoice_margin 2015-07-27 09:26:09 +02:00
Alexis de Lattre
2a5f3c460e Add module product_usability 2015-07-27 09:23:35 +02:00
Alexis de Lattre
9a678154c9 Add supplier invoice number in invoice tree view 2015-07-23 14:26:06 +02:00
Alexis de Lattre
4e8f9bbf97 Add new module partner_aged_open_invoices 2015-07-10 19:36:04 +02:00
Alexis de Lattre
4e40393b14 rename module account_move_usability to account_usability 2015-07-08 11:40:46 +02:00
Alexis de Lattre
5c95d9bd88 Add module phone_directory_report 2015-07-01 10:29:47 +02:00
Alexis de Lattre
a6480df8c5 FIX crash
PEP8
2015-06-30 23:29:15 +02:00
Alexis de Lattre
db690e77ea FIX access rights issue 2015-06-29 16:25:57 +02:00
Alexis de Lattre
b2a7741fd3 Better view for mass allocation wizard 2015-06-29 14:59:53 +02:00
Alexis de Lattre
053911edca Up-port from 7 to 8 new stuff for hr_holidays_usability 2015-06-23 20:01:17 +02:00
Alexis de Lattre
1ff2416435 Up-port new stuff from hr_holidays_usability from 7.0 to 8.0 2015-06-23 16:29:47 +02:00
Alexis de Lattre
219ec0e671 We can do a child_of with a list 2015-06-22 16:40:42 +02:00
Alexis de Lattre
fe46134a43 Add price_unit on stock move form view 2015-06-18 10:49:51 +00:00
Alexis de Lattre
43ce9daf2e Show me those important hidden fields !!! 2015-06-17 16:05:23 +02:00
Alexis de Lattre
4842386aac Display additionnal fields on stock views 2015-06-16 14:28:13 +00:00
Alexis de Lattre
f20145d06a Upport fix to 8.0 2015-06-11 09:49:27 +02:00
Alexis de Lattre
f986bf05fd Update 2015-06-10 19:01:11 +02:00
Alexis de Lattre
21f657616b Port module hr_holidays_usability to v8 2015-06-10 19:00:37 +02:00
Alexis de Lattre
ac91927ea1 Merge branch '8.0' of https://github.com/akretion/odoo-usability into 8.0 2015-05-29 16:29:34 +02:00
Alexis de Lattre
74d8f0c23d Revert to OLD api to avoid bug fat bug found by Brother Jean-de-Dieu 2015-05-29 16:27:17 +02:00
Alexis de Lattre
ddb802b31a Small fixes/enhancements in purchase_suggest 2015-05-29 16:26:33 +02:00
Alexis de Lattre
979c33a457 Better handling of companies
Fix issue where the location_id was not taken into account on the PO
Now merge with existing draft PO if exists
2015-05-28 23:15:11 +02:00
Alexis de Lattre
681be2ec9e Add uid in log msg 2015-05-28 21:29:48 +02:00
Alexis de Lattre
b217a504e6 Convert M2O fields to M2M
Add explainations to the user about the algo
Update translation files
2015-05-28 18:03:27 +02:00
Alexis de Lattre
2f8e57ae28 Update module purchase_suggest: much better perfs and several small enhancements 2015-05-28 14:02:37 +02:00
Alexis de Lattre
4373d5ff4b Add SQL constraint on orderpoint to avoid duplicates 2015-05-28 11:10:17 +02:00
Alexis de Lattre
3526e98a00 Add module purchase_suggest 2015-05-28 09:53:35 +02:00
Alexis de Lattre
6bd38857d1 Enhance procurement_suggest 2015-05-27 18:23:58 +02:00
Alexis de Lattre
2abab0caaa Fix orderpoint view 2015-05-27 14:34:42 +02:00
Alexis de Lattre
de76a64f7e Split procurement_suggest in 2 modules : procurement_suggest + procurement_suggest_purchase 2015-05-27 11:02:07 +02:00
Alexis de Lattre
604dab1bb9 procurement_suggest: code enhancements 2015-05-26 18:10:15 +02:00
Alexis de Lattre
1bfa265278 Merge branch '8.0' of https://github.com/akretion/odoo-usability into 8.0 2015-05-26 18:09:39 +02:00
Alexis de Lattre
7e868f3faa Add sequence on purchase order lines 2015-05-26 18:08:40 +02:00
Alexis de Lattre
7e19809cff Remove module base_title_on_partner (feature integrated in base_usability) 2015-05-26 15:05:52 +02:00
David Béal
f5d86f7bc8 [ADD] mrp_export_field_profile module 2015-05-24 18:43:47 +02:00
David Béal
db89d01739 [ADD] product_export_field_profile module 2015-05-24 14:34:29 +02:00
Alexis de Lattre
0bae792e79 Add total qty in transfer form view 2015-05-17 14:56:47 +02:00
Alexis de Lattre
2a311b8cb8 Add module account_payment_force_maturity_date
Better inherit in account_payment_hide_communication2 (invisible=1 instead of replace)
2015-05-06 17:05:34 +02:00
Alexis de Lattre
ae0bd93403 Merge branch '8.0' of github.com:akretion/odoo-usability into 8.0 2015-04-28 16:14:16 +02:00
Alexis de Lattre
36929e5f48 Update description 2015-04-28 16:13:57 +02:00
Alexis de Lattre
413f8ca0fd Use _prepare methods that are easy to inherit
Add support for multi-term invoices
2015-04-27 10:34:13 +00:00
Alexis de Lattre
0d1f1961af Add module stock_picking_type_default_partner 2015-04-15 14:26:28 +00:00
Alexis de Lattre
749dd367fa Display more fields
Add menu entry for push rules
2015-04-15 10:06:28 +00:00
Alexis de Lattre
5849a2fecd stock_usability : display more fields 2015-04-15 07:53:28 +00:00
Alexis de Lattre
343e92439c Display more fields on stock move 2015-04-14 15:28:25 +00:00
Alexis de Lattre
82c8243978 Add patch needed on odoo 2015-04-10 22:31:15 +02:00
Alexis de Lattre
35d13bfc53 Fix import lib 2015-04-10 15:48:56 +02:00
Alexis de Lattre
af975d3055 Add tracking on important fields of partner 2015-04-01 09:53:58 +00:00
Alexis de Lattre
aeb64790d0 Add module hr_usability 2015-03-30 17:21:52 +02:00
Alexis de Lattre
8d23f49c05 account_payment_security : inherit existing ACLs instead of deleting and adding new ones 2015-03-30 11:44:43 +02:00
Alexis de Lattre
496a2ad710 New module base_usability, that replaces base_title_on_partner and adds new stuff 2015-03-30 11:26:09 +02:00
Alexis de Lattre
7af3778761 Remove the menu entry for reconcile, because I already have the search on reconcile in account move lines, and it's enough 2015-03-26 15:13:38 +00:00
Alexis de Lattre
0035b197c2 Add reconcile tags menu entry 2015-03-24 10:17:50 +01:00
Alexis de Lattre
522e5299f1 Add module procurement_suggest 2015-03-20 17:56:57 +01:00
Alexis de Lattre
13d28af70d No translation on stock location and stock pick type 2015-03-19 09:02:18 +00:00
Alexis de Lattre
7e8cad4fcc partner_products_shortcut : Port to new API 2015-03-19 00:36:13 +01:00
Alexis de Lattre
4c04109ba4 Add missing dependancy 2015-03-14 18:24:12 +01:00
Alexis de Lattre
5341c120cc Add module account_direct_debit_autogenerate 2015-03-13 15:18:16 +01:00
Alexis de Lattre
215e5a7b90 Take refunds into account 2015-03-07 00:01:27 +01:00
Alexis de Lattre
9e6c8b28ba Add account_voucher_default_amount 2015-03-06 22:05:33 +01:00
Alexis de Lattre
e6761de367 Add module product_category_tax 2015-03-05 08:26:09 +01:00
Alexis de Lattre
18d24ebfdd Order stock pickings 2015-02-20 08:59:54 +01:00
Alexis de Lattre
c7d66ac1ab Merge branch '8.0' of github.com:akretion/odoo-usability into 8.0 2015-02-19 17:57:05 +01:00
Alexis de Lattre
9039f26eab account.move.line : If I set a credit, the debit is automatically set to 0 (same if I set a debit) 2015-02-19 17:55:49 +01:00
Alexis de Lattre
a91d3f79c3 Add module pos_sale_report 2015-02-18 17:04:42 +01:00
Alexis de Lattre
587403d009 add mrp_usability 2015-02-18 09:34:18 +01:00
Alexis de Lattre
30585ec690 Revert my previous modif on dependencies 2015-02-17 22:26:28 +01:00
Alexis de Lattre
1b591a83ca Add logging on start/end of procurement scheduler 2015-02-17 11:31:39 +01:00
Alexis de Lattre
189c3062f0 Add group by partner in pickings 2015-02-17 09:24:02 +01:00
Alexis de Lattre
37b8bb1ce4 Rename stock_display_src_location to stock_usability with one improvement 2015-02-17 08:50:08 +01:00
Alexis de Lattre
de89795eed Add module delivery_no_invoice_shipping 2015-02-16 20:51:35 +01:00
Alexis de Lattre
a8b122e1c4 Add module procurement_usability
Display move_dest_id on procurement.order
2015-02-11 01:06:03 +01:00
Alexis de Lattre
eba9a4bce5 Rename module account_move_view_more_lines to account_move_usability 2015-02-05 15:15:49 +01:00
Alexis de Lattre
14e6acad4d Same on account.invoice.report 2015-02-03 17:50:01 +01:00
Alexis de Lattre
b2b073a2d7 Add module account_invoice_groupby_commercial_partner 2015-02-03 17:30:04 +01:00
Alexis de Lattre
59a5181e80 Add module account_move_view_more_lines 2015-02-03 15:50:16 +01:00
Alexis de Lattre
b800a639a2 Merge pull request #3 from akretion/8-icon2
[IMP] icon product variant
2015-01-30 21:55:32 +01:00
Alexis de Lattre
4852a84ab8 Remove module account_statement_operation_multicompany, which is moving to OCA/bank-statement-reconcile 2015-01-26 21:57:56 +01:00
Alexis de Lattre
2a9882e7af FIX account_statement_operation_multicompany 2015-01-21 22:47:05 +01:00
Alexis de Lattre
6c3b3749b1 Merge branch '8.0' of https://github.com/akretion/odoo-usability into 8.0 2015-01-20 22:23:13 +01:00
Alexis de Lattre
eae6766995 Add module account_statement_operation_multicompany
Add gitignore
2015-01-20 22:21:48 +01:00
david.beal@akretion.com
67b49d9917 [IMP] icon again 2015-01-19 09:59:44 +01:00
david.beal@akretion.com
b8f0db3e69 [IMP] icon product variant 2015-01-19 09:37:24 +01:00
Alexis de Lattre
55fe513c50 Merge pull request #2 from akretion/8-icon2
[IMP] add icons
2015-01-19 09:36:47 +01:00
david.beal@akretion.com
1653ac5453 [IMP] icon translation 2015-01-19 09:23:32 +01:00
Alexis de Lattre
6889fdf8a1 Merge pull request #1 from akretion/8-icon
[IMP] icons infogreffe, quick_create
2015-01-19 00:11:14 +01:00
david.beal@akretion.com
5f1fc280bb [IMP] icons partner products short 2015-01-18 20:32:40 +01:00
david.beal@akretion.com
76b510fabc [IMP] icons infogreffe, quick_create 2015-01-18 20:12:51 +01:00
Alexis de Lattre
706c29231c Merge branch '8.0' of https://github.com/akretion/odoo-usability into 8.0 2015-01-16 10:05:22 +01:00
Alexis de Lattre
4048a8cdc4 Add company_id in property 2015-01-16 10:04:58 +01:00
Alexis de Lattre
703757dc1f Merge branch '8.0' of https://github.com/akretion/odoo-usability into 8.0 2015-01-16 10:03:31 +01:00
Alexis de Lattre
924e4011ee Add dep on purchase_partner_invoice_method + default value to picking 2015-01-16 10:02:24 +01:00
Alexis de Lattre
cbfebd6fdb product_no_translation : translate=False now on all fields declared in addons/product/product.py 2015-01-09 00:30:03 +01:00
Alexis de Lattre
6c8f51b311 account_invoice_sale_link: add sale_ids field in invoice form view. 2015-01-07 12:24:15 +01:00
Alexis de Lattre
484baa832d Add module product_no_translation 2014-12-29 18:21:29 +01:00
Alexis de Lattre
c89ca60777 Remove module stock_invoice_service_from_delivery 2014-12-15 20:47:56 +01:00
Alexis de Lattre
aeb0c2f5e7 Add attribute_line_ids 2014-12-15 19:05:52 +01:00
Alexis de Lattre
6a0d9043a2 Add module product_variant_csv_import 2014-12-15 18:45:38 +01:00
Alexis de Lattre
b54b69d48f Add module sale_stock_show_delivery_address 2014-12-05 00:08:01 +01:00
Alexis de Lattre
5052b233dd pos_journal_sequence : pos_sequence -> sequence, to have the same as v9 2014-12-02 15:42:36 +01:00
Alexis de Lattre
7f1c5a9b7e Remove module stock_picking_package_link (not usefull for its initial goal) 2014-12-01 17:12:52 +01:00
Alexis de Lattre
f17ca54c77 Add module stock_picking_package_link 2014-12-01 15:13:01 +01:00
Alexis de Lattre
a33c3a1a21 Add module pos_journal_sequence. 2014-11-17 23:13:49 +01:00
Alexis de Lattre
7c515b6273 I won't port it to v8, so I remove it for the moment. 2014-10-28 00:41:31 +01:00
Alexis de Lattre
e7dbeaea52 Remove base_partner_link_on_users (native on v8) 2014-10-28 00:37:53 +01:00
Alexis de Lattre
46b08d22ac Add module eradicate_quick_create 2014-10-22 18:22:25 +02:00
Alexis de Lattre
eef739806e Add module base_other_report_engines. 2014-10-22 00:10:10 +02:00
Alexis de Lattre
4eb3bdbb5c Add module account_fiscal_position_translate 2014-10-17 15:13:00 +02:00
Alexis de Lattre
ee6915dd47 Port purchase_usability_extension to v8 2014-10-17 11:54:52 +02:00
Alexis de Lattre
45c23df381 Add currency in PO tree view. 2014-10-16 23:36:15 +02:00
Alexis de Lattre
79a700f9b3 Add currency_id in sale order view 2014-10-16 23:18:57 +02:00
Alexis de Lattre
0074a23631 Add widget=monetary 2014-10-16 14:57:01 +02:00
Alexis de Lattre
7cd8d59fba Add module base_company_extension 2014-10-16 12:19:11 +02:00
Alexis de Lattre
188730318e Add account_invoice_overdue_filter. 2014-10-16 11:58:46 +02:00
Alexis de Lattre
044f2addbe FIX XMLID 2014-10-06 09:57:21 +02:00
Alexis de Lattre
f0715c53c4 Add module product_manager_group_stock
Fix dependancies
2014-10-03 11:17:10 +02:00
Alexis de Lattre
46e3a86c81 Add ACLs
Automatically add admin to this group
2014-09-19 19:06:44 +02:00
Alexis de Lattre
06808dde92 Add module sale_line_product_required 2014-09-19 17:45:49 +02:00
Alexis de Lattre
cffd57797b Add module product_manager_group 2014-09-05 10:27:55 +02:00
Alexis de Lattre
1b918f3655 Enhance base_partner_always_multi_contacts 2014-09-04 15:24:41 +02:00
Alexis de Lattre
9f4e25be09 Handle when we have 2 consecutive empty lines 2014-09-02 22:36:00 +02:00
Alexis de Lattre
d552909adf Port module stock_display_destination_move to v8 2014-09-02 22:10:02 +02:00
Alexis de Lattre
81ae120a11 Port to v8 2014-09-02 22:03:52 +02:00
Alexis de Lattre
28d820e5ad Add module stock_display_src_location 2014-09-02 21:52:53 +02:00
Alexis de Lattre
d32796ce8f Module stock_hide_journal_id is not needed in v8 2014-09-02 10:20:02 +02:00
Alexis de Lattre
527424db79 Remove module asterisk_click2dial_project_issue following update of the asterisk connector 2014-08-30 00:07:58 +02:00
Alexis de Lattre
762419f037 Add module account_invoice_picking_label. 2014-07-04 17:59:13 +02:00
Alexis de Lattre
7c09ab2ea2 Add module partner_products_shortcut. 2014-07-02 22:06:55 +02:00
Alexis de Lattre
14bacaeba5 Add module base_partner_link_on_users. 2014-06-11 10:06:28 +02:00
Alexis de Lattre
fe08942e39 Move button. 2014-05-23 19:25:34 +02:00
Alexis de Lattre
bc4dd21316 Add € symbol. 2014-05-23 19:24:02 +02:00
Alexis de Lattre
0c5a496ba2 Add module l10n_fr_infogreffe_connector. 2014-05-23 17:43:06 +02:00
Alexis de Lattre
0a626f39ae Add module asterisk_click2dial_project_issue. 2014-05-23 09:09:07 +02:00
Alexis de Lattre
e9806b73c6 Add module base_partner_always_multi_contacts. 2014-05-15 23:20:03 +02:00
Alexis de Lattre
2b522f5702 Add base_title_on_partner module. 2014-05-15 11:29:34 +02:00
Alexis de Lattre
082c133128 Add link to issues on partner form. 2014-04-23 16:32:54 +02:00
Alexis de Lattre
c33ef19086 Add module stock_hide_journal_id. 2014-04-23 16:20:44 +02:00
Alexis de Lattre
6f07d50d90 Add translation files. 2014-04-18 18:18:17 +02:00
Alexis de Lattre
037e4d4214 Add module project_issue_extension. 2014-04-18 18:08:17 +02:00
Alexis de Lattre
53b1ff6ed4 Add module product_disable_quick_create. 2014-04-18 17:06:43 +02:00
Alexis de Lattre
2847f14dc7 Add module account_invoice_sale_link. 2014-04-10 18:26:19 +02:00
Alexis de Lattre
4fb4ed9ca4 Add module sale_markup_group_user to address this issue : https://bugs.launchpad.net/sale-financial/+bug/1305987 2014-04-10 18:23:11 +02:00
Alexis de Lattre
98bc291b54 Add module base_fix_display_address. 2014-04-10 12:52:03 +02:00
Alexis de Lattre
532b9cb53c Remove the module sale_auto_order_policy, which was in fact useless because the feature was native ! 2014-04-10 12:44:43 +02:00
Alexis de Lattre
5075221428 Remove code... it was native ! 2014-04-09 12:13:58 +02:00
Alexis de Lattre
3ee3edb8ce Add module stock_display_sale_id 2014-03-25 00:10:01 +01:00
Alexis de Lattre
f3085a163f Add module account_payment_hide_communication2. 2014-03-22 01:48:30 +01:00
Alexis de Lattre
7b04e578af Add ship_except to list of states. 2014-03-07 16:01:47 +01:00
Alexis de Lattre
9daeeca997 Better label on the second tab of PO. 2014-02-20 17:32:53 +01:00
Alexis de Lattre
0c5366420f Add purchase_usability_extension and sale_usability_extension. 2014-02-20 16:47:28 +01:00
Alexis de Lattre
f388d0d10f Add module account_payment_security. 2014-02-19 11:02:40 +01:00
Alexis de Lattre
e588686d5f Add module account_move_line_start_end_dates_xls. 2014-02-17 14:46:01 +01:00
Alexis de Lattre
2e6e1c07bf Add module stock_display_destination_move. 2014-01-17 17:16:56 +01:00
Alexis de Lattre
a98dbc0b1c Cosmetic. 2014-01-08 23:56:40 +01:00
Alexis de Lattre
529b585d07 Add module sale_auto_order_policy. 2014-01-08 23:30:47 +01:00
Alexis de Lattre
46d177fb9f Add sale_fiscal_position_update_button. 2014-01-08 23:29:59 +01:00
Alexis de Lattre
24abaec406 Add module purchase_auto_invoice_method. 2013-12-16 18:50:27 +01:00
Alexis de Lattre
673afbac0f FIX module description. 2013-12-12 11:16:02 +01:00
Alexis de Lattre
5dc05f3c81 Add module stock_invoice_try_again 2013-12-09 18:12:45 +01:00
Alexis de Lattre
dce0604e7d Add module stock_invoice_service_from_delivery 2013-12-09 18:12:38 +01:00
1063 changed files with 21228 additions and 23277 deletions

View File

@@ -1,14 +0,0 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.3.6
_src_path: https://github.com/OCA/oca-addons-repo-template.git
ci: Travis
dependency_installation_mode: OCA
generate_requirements_txt: true
include_wkhtmltopdf: false
odoo_version: 14.0
rebel_module_groups: []
repo_description: Modules that improve UX sensibly
repo_name: Odoo Usability modules
repo_slug: odoo-usability
travis_apt_packages: []
travis_apt_sources: []

View File

@@ -1,20 +0,0 @@
# Configuration for known file extensions
[*.{css,js,json,less,md,py,rst,sass,scss,xml,yaml,yml}]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.{json,yml,yaml,rst,md}]
indent_size = 2
# Do not configure editor for libs and autogenerated content
[{*/static/{lib,src/lib}/**,*/static/description/index.html,*/readme/../README.rst}]
charset = unset
end_of_line = unset
indent_size = unset
indent_style = unset
insert_final_newline = false
trim_trailing_whitespace = false

View File

@@ -1,187 +0,0 @@
env:
browser: true
es6: true
# See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449
parserOptions:
ecmaVersion: 2017
overrides:
- files:
- "**/*.esm.js"
parserOptions:
sourceType: module
# Globals available in Odoo that shouldn't produce errorings
globals:
_: readonly
$: readonly
fuzzy: readonly
jQuery: readonly
moment: readonly
odoo: readonly
openerp: readonly
owl: readonly
# Styling is handled by Prettier, so we only need to enable AST rules;
# see https://github.com/OCA/maintainer-quality-tools/pull/618#issuecomment-558576890
rules:
accessor-pairs: warn
array-callback-return: warn
callback-return: warn
capitalized-comments:
- warn
- always
- ignoreConsecutiveComments: true
ignoreInlineComments: true
complexity:
- warn
- 15
constructor-super: warn
dot-notation: warn
eqeqeq: warn
global-require: warn
handle-callback-err: warn
id-blacklist: warn
id-match: warn
init-declarations: error
max-depth: warn
max-nested-callbacks: warn
max-statements-per-line: warn
no-alert: warn
no-array-constructor: warn
no-caller: warn
no-case-declarations: warn
no-class-assign: warn
no-cond-assign: error
no-const-assign: error
no-constant-condition: warn
no-control-regex: warn
no-debugger: error
no-delete-var: warn
no-div-regex: warn
no-dupe-args: error
no-dupe-class-members: error
no-dupe-keys: error
no-duplicate-case: error
no-duplicate-imports: error
no-else-return: warn
no-empty-character-class: warn
no-empty-function: error
no-empty-pattern: error
no-empty: warn
no-eq-null: error
no-eval: error
no-ex-assign: error
no-extend-native: warn
no-extra-bind: warn
no-extra-boolean-cast: warn
no-extra-label: warn
no-fallthrough: warn
no-func-assign: error
no-global-assign: error
no-implicit-coercion:
- warn
- allow: ["~"]
no-implicit-globals: warn
no-implied-eval: warn
no-inline-comments: warn
no-inner-declarations: warn
no-invalid-regexp: warn
no-irregular-whitespace: warn
no-iterator: warn
no-label-var: warn
no-labels: warn
no-lone-blocks: warn
no-lonely-if: error
no-mixed-requires: error
no-multi-str: warn
no-native-reassign: error
no-negated-condition: warn
no-negated-in-lhs: error
no-new-func: warn
no-new-object: warn
no-new-require: warn
no-new-symbol: warn
no-new-wrappers: warn
no-new: warn
no-obj-calls: warn
no-octal-escape: warn
no-octal: warn
no-param-reassign: warn
no-path-concat: warn
no-process-env: warn
no-process-exit: warn
no-proto: warn
no-prototype-builtins: warn
no-redeclare: warn
no-regex-spaces: warn
no-restricted-globals: warn
no-restricted-imports: warn
no-restricted-modules: warn
no-restricted-syntax: warn
no-return-assign: error
no-script-url: warn
no-self-assign: warn
no-self-compare: warn
no-sequences: warn
no-shadow-restricted-names: warn
no-shadow: warn
no-sparse-arrays: warn
no-sync: warn
no-this-before-super: warn
no-throw-literal: warn
no-undef-init: warn
no-undef: error
no-unmodified-loop-condition: warn
no-unneeded-ternary: error
no-unreachable: error
no-unsafe-finally: error
no-unused-expressions: error
no-unused-labels: error
no-unused-vars: error
no-use-before-define: error
no-useless-call: warn
no-useless-computed-key: warn
no-useless-concat: warn
no-useless-constructor: warn
no-useless-escape: warn
no-useless-rename: warn
no-void: warn
no-with: warn
operator-assignment: [error, always]
prefer-const: warn
radix: warn
require-yield: warn
sort-imports: warn
spaced-comment: [error, always]
strict: [error, function]
use-isnan: error
valid-jsdoc:
- warn
- prefer:
arg: param
argument: param
augments: extends
constructor: class
exception: throws
func: function
method: function
prop: property
return: returns
virtual: abstract
yield: yields
preferType:
array: Array
bool: Boolean
boolean: Boolean
number: Number
object: Object
str: String
string: String
requireParamDescription: false
requireReturn: false
requireReturnDescription: false
requireReturnType: false
valid-typeof: warn
yoda: warn

12
.flake8
View File

@@ -1,12 +0,0 @@
[flake8]
max-line-length = 88
max-complexity = 16
# B = bugbear
# B9 = bugbear opinionated (incl line length)
select = C,E,F,W,B,B9
# E203: whitespace before ':' (black behaviour)
# E501: flake8 line length (covered by bugbear B950)
# W503: line break before binary operator (black behaviour)
ignore = E203,E501,W503
per-file-ignores=
__init__.py:F401

View File

@@ -1,20 +0,0 @@
name: pre-commit
on:
pull_request:
push:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
# The pylint-odoo version we use here does not support python 3.10
# https://github.com/OCA/oca-addons-repo-template/issues/80
# We also need to pin to an older version of python for older odoo versions
# where we are not using black > 21. Older black versions won't work with
# Python 3.9.8+, and we can't bump black without reformatting.
python-version: "3.9.7"
- uses: pre-commit/action@v2.0.0

View File

@@ -1,69 +0,0 @@
name: Mark stale issues and pull requests
on:
schedule:
- cron: "0 12 * * 0"
jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Stale PRs and issues policy
uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# General settings.
ascending: true
remove-stale-when-updated: true
# Pull Requests settings.
# 120+30 day stale policy for PRs
# * Except PRs marked as "no stale"
days-before-pr-stale: 120
days-before-pr-close: 30
exempt-pr-labels: "no stale"
stale-pr-label: "stale"
stale-pr-message: >
There hasn't been any activity on this pull request in the past 4 months, so
it has been marked as stale and it will be closed automatically if no
further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply
the "no stale" label.
# Issues settings.
# 180+30 day stale policy for open issues
# * Except Issues marked as "no stale"
days-before-issue-stale: 180
days-before-issue-close: 30
exempt-issue-labels: "no stale,needs more information"
stale-issue-label: "stale"
stale-issue-message: >
There hasn't been any activity on this issue in the past 6 months, so it has
been marked as stale and it will be closed automatically if no further
activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to
apply the "no stale" label.
# 15+30 day stale policy for issues pending more information
# * Issues that are pending more information
# * Except Issues marked as "no stale"
- name: Needs more information stale issues policy
uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
ascending: true
only-labels: "needs more information"
exempt-issue-labels: "no stale"
days-before-stale: 15
days-before-close: 30
days-before-pr-stale: -1
days-before-pr-close: -1
remove-stale-when-updated: true
stale-issue-label: "stale"
stale-issue-message: >
This issue needs more information and there hasn't been any activity
recently, so it has been marked as stale and it will be closed automatically
if no further activity occurs in the next 30 days.
If you think this is a mistake, please ask a PSC member to remove the "needs
more information" label.

19
.gitignore vendored
View File

@@ -1,8 +1,6 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
/.venv
/.pytest_cache
# C extensions
*.so
@@ -23,7 +21,6 @@ var/
*.egg-info/
.installed.cfg
*.egg
*.eggs
# Installer logs
pip-log.txt
@@ -43,19 +40,6 @@ coverage.xml
# Pycharm
.idea
# Eclipse
.settings
# Visual Studio cache/options directory
.vs/
.vscode
# OSX Files
.DS_Store
# Django stuff:
*.log
# Mr Developer
.mr.developer.cfg
.project
@@ -70,6 +54,3 @@ docs/_build/
# Backup files
*~
*.swp
# OCA rules
!static/lib/

View File

@@ -1,13 +0,0 @@
[settings]
; see https://github.com/psf/black
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
combine_as_imports=True
use_parentheses=True
line_length=88
known_odoo=odoo
known_odoo_addons=odoo.addons
sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER
default_section=THIRDPARTY
ensure_newline_before_comments = True

View File

@@ -1,160 +0,0 @@
exclude: |
(?x)
# NOT INSTALLABLE ADDONS
^account_fiscal_position_payable_receivable/|
^account_invoice_margin/|
^account_invoice_update_wizard/|
^company_code/|
^developer_menu/|
^intrastat_product_type/|
^mass_mailing_usability/|
^mrp_average_cost/|
^mrp_no_product_template_menu/|
^mrp_product_tree_default/|
^sale_down_payment/|
^sale_margin_no_onchange/|
^sale_no_configurator_button/|
^sale_quotation_title/|
^service_line_qty_update_base/|
^service_line_qty_update_purchase/|
^service_line_qty_update_sale/|
^stock_no_product_template_menu/|
^stock_user_default_warehouse_base/|
^stock_user_default_warehouse_mrp/|
^stock_user_default_warehouse_purchase/|
^stock_user_default_warehouse_sale/|
^volume_precision/|
# END NOT INSTALLABLE ADDONS
# Files and folders generated by bots, to avoid loops
^setup/|/static/description/index\.html$|
# We don't want to mess with tool-generated files
.svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|
# Maybe reactivate this when all README files include prettier ignore tags?
^README\.md$|
# Library files can have extraneous formatting (even minimized)
/static/(src/)?lib/|
# Repos using Sphinx to generate docs don't need prettying
^docs/_templates/.*\.html$|
# You don't usually want a bot to modify your legal texts
(LICENSE.*|COPYING.*)
default_language_version:
python: python3
node: "14.13.0"
repos:
- repo: local
hooks:
# These files are most likely copier diff rejection junks; if found,
# review them manually, fix the problem (if needed) and remove them
- id: forbidden-files
name: forbidden files
entry: found forbidden files; remove them
language: fail
files: "\\.rej$"
- repo: https://github.com/oca/maintainer-tools
rev: ab1d7f6
hooks:
# update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons
- id: oca-fix-manifest-website
args: ["https://github.com/OCA/odoo-usability"]
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args:
- --expand-star-imports
- --ignore-init-module-imports
- --in-place
- --remove-all-unused-imports
- --remove-duplicate-keys
- --remove-unused-variables
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.1.2
hooks:
- id: prettier
name: prettier (with plugin-xml)
additional_dependencies:
- "prettier@2.1.2"
- "@prettier/plugin-xml@0.12.0"
args:
- --plugin=@prettier/plugin-xml
files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v7.8.1
hooks:
- id: eslint
verbose: true
args:
- --color
- --fix
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
# exclude autogenerated files
exclude: /README\.rst$|\.pot?$
- id: end-of-file-fixer
# exclude autogenerated files
exclude: /README\.rst$|\.pot?$
- id: debug-statements
- id: fix-encoding-pragma
args: ["--remove"]
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-merge-conflict
# exclude files where underlines are not distinguishable from merge conflicts
exclude: /README\.rst$|^docs/.*\.rst$
- id: check-symlinks
- id: check-xml
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.2
hooks:
- id: pyupgrade
args: ["--keep-percent-format"]
- repo: https://github.com/PyCQA/isort
rev: 5.5.1
hooks:
- id: isort
name: isort except __init__.py
args:
- --settings=.
exclude: /__init__\.py$
- repo: https://github.com/acsone/setuptools-odoo
rev: 2.6.0
hooks:
- id: setuptools-odoo-make-default
- id: setuptools-odoo-get-requirements
args:
- --output
- requirements.txt
- --header
- "# generated from manifests external_dependencies"
- repo: https://gitlab.com/PyCQA/flake8
rev: 3.8.3
hooks:
- id: flake8
name: flake8
additional_dependencies: ["flake8-bugbear==20.1.4"]
- repo: https://github.com/PyCQA/pylint
rev: pylint-2.5.3
hooks:
- id: pylint
name: pylint with optional checks
args:
- --rcfile=.pylintrc
- --exit-zero
verbose: true
additional_dependencies: &pylint_deps
- pylint-odoo==3.5.0
- id: pylint
name: pylint with mandatory checks
args:
- --rcfile=.pylintrc-mandatory
additional_dependencies: *pylint_deps

View File

@@ -1,8 +0,0 @@
# Defaults for all prettier-supported languages.
# Prettier will complete this with settings from .editorconfig file.
bracketSpacing: false
printWidth: 88
proseWrap: always
semi: true
trailingComma: "es5"
xmlWhitespaceSensitivity: "strict"

View File

@@ -1,86 +0,0 @@
[MASTER]
load-plugins=pylint_odoo
score=n
[ODOOLINT]
readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
manifest_required_authors=Odoo Community Association (OCA)
manifest_required_keys=license
manifest_deprecated_keys=description,active
license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
valid_odoo_versions=14.0
[MESSAGES CONTROL]
disable=all
# This .pylintrc contains optional AND mandatory checks and is meant to be
# loaded in an IDE to have it check everything, in the hope this will make
# optional checks more visible to contributors who otherwise never look at a
# green travis to see optional checks that failed.
# .pylintrc-mandatory containing only mandatory checks is used the pre-commit
# config as a blocking check.
enable=anomalous-backslash-in-string,
api-one-deprecated,
api-one-multi-together,
assignment-from-none,
attribute-deprecated,
class-camelcase,
dangerous-default-value,
dangerous-view-replace-wo-priority,
development-status-allowed,
duplicate-id-csv,
duplicate-key,
duplicate-xml-fields,
duplicate-xml-record-id,
eval-referenced,
eval-used,
incoherent-interpreter-exec-perm,
license-allowed,
manifest-author-string,
manifest-deprecated-key,
manifest-required-key,
method-compute,
method-inverse,
method-required-super,
method-search,
openerp-exception-warning,
pointless-statement,
pointless-string-statement,
print-used,
redundant-keyword-arg,
redundant-modulename-xml,
reimported,
relative-import,
return-in-init,
rst-syntax-error,
sql-injection,
too-few-format-args,
translation-field,
translation-required,
unreachable,
use-vim-comment,
wrong-tabs-instead-of-spaces,
xml-syntax-error,
# messages that do not cause the lint step to fail
consider-merging-classes-inherited,
create-user-wo-reset-password,
dangerous-filter-wo-user,
deprecated-module,
file-not-used,
invalid-commit,
missing-manifest-dependency,
missing-newline-extrafiles,
missing-readme,
no-utf8-coding-comment,
odoo-addons-relative-import,
old-api7-method-defined,
redefined-builtin,
too-complex,
unnecessary-utf8-coding-comment
[REPORTS]
msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg}
output-format=colorized
reports=no

View File

@@ -1,62 +0,0 @@
[MASTER]
load-plugins=pylint_odoo
score=n
[ODOOLINT]
readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
manifest_required_authors=Odoo Community Association (OCA)
manifest_required_keys=license
manifest_deprecated_keys=description,active
license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
valid_odoo_versions=14.0
[MESSAGES CONTROL]
disable=all
enable=anomalous-backslash-in-string,
api-one-deprecated,
api-one-multi-together,
assignment-from-none,
attribute-deprecated,
class-camelcase,
dangerous-default-value,
dangerous-view-replace-wo-priority,
development-status-allowed,
duplicate-id-csv,
duplicate-key,
duplicate-xml-fields,
duplicate-xml-record-id,
eval-referenced,
eval-used,
incoherent-interpreter-exec-perm,
license-allowed,
manifest-author-string,
manifest-deprecated-key,
manifest-required-key,
method-compute,
method-inverse,
method-required-super,
method-search,
openerp-exception-warning,
pointless-statement,
pointless-string-statement,
print-used,
redundant-keyword-arg,
redundant-modulename-xml,
reimported,
relative-import,
return-in-init,
rst-syntax-error,
sql-injection,
too-few-format-args,
translation-field,
translation-required,
unreachable,
use-vim-comment,
wrong-tabs-instead-of-spaces,
xml-syntax-error
[REPORTS]
msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg}
output-format=colorized
reports=no

View File

@@ -1,41 +0,0 @@
language: python
cache:
directories:
- $HOME/.cache/pip
- $HOME/.cache/pre-commit
python:
- "3.6"
addons:
postgresql: "9.6"
apt:
packages:
- expect-dev # provides unbuffer utility
stages:
- test
jobs:
include:
- stage: test
env:
- TESTS=1 ODOO_REPO="odoo/odoo" MAKEPOT="1"
- stage: test
env:
- TESTS=1 ODOO_REPO="OCA/OCB"
env:
global:
- VERSION="14.0" TESTS="0" LINT_CHECK="0" MAKEPOT="0"
install:
- git clone --depth=1 https://github.com/OCA/maintainer-quality-tools.git
${HOME}/maintainer-quality-tools
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
- travis_install_nightly
script:
- travis_run_tests
after_success:
- travis_after_tests_success

661
LICENSE
View File

@@ -1,661 +0,0 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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 <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.

View File

@@ -1,36 +0,0 @@
[![Runbot Status](https://runbot.odoo-community.org/runbot/badge/flat//14.0.svg)](https://runbot.odoo-community.org/runbot/repo/github-com-oca-odoo-usability-)
[![Build Status](https://travis-ci.com/OCA/odoo-usability.svg?branch=14.0)](https://travis-ci.com/OCA/odoo-usability)
[![codecov](https://codecov.io/gh/OCA/odoo-usability/branch/14.0/graph/badge.svg)](https://codecov.io/gh/OCA/odoo-usability)
[![Translation Status](https://translation.odoo-community.org/widgets/odoo-usability-14-0/-/svg-badge.svg)](https://translation.odoo-community.org/engage/odoo-usability-14-0/?utm_source=widget)
<!-- /!\ do not modify above this line -->
# Odoo Usability modules
Modules that improve UX sensibly
<!-- /!\ do not modify below this line -->
<!-- prettier-ignore-start -->
[//]: # (addons)
This part will be replaced when running the oca-gen-addons-table script from OCA/maintainer-tools.
[//]: # (end addons)
<!-- prettier-ignore-end -->
## Licenses
This repository is licensed under [AGPL-3.0](LICENSE).
However, each module can have a totally different license, as long as they adhere to OCA
policy. Consult each module's `__manifest__.py` file, which contains a `license` key
that explains its license.
----
OCA, or the [Odoo Community Association](http://odoo-community.org/), is a nonprofit
organization whose mission is to support the collaborative development of Odoo features
and promote its widespread use.

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import account_analytic_analysis

View File

@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Account Analytic Analysis Usability',
'version': '8.0.1.0.0',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Usability improvements on Account Analytic Analysis',
'description': """
Account Analytic Analysis Usability
===================================
Usability improvements include:
* add next invoice date in tree view of contrats (and add a group by)
This module has been written by Alexis de Lattre from Akretion
<alexis.delattre@akretion.com>.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['account_analytic_analysis'],
'data': [
'analytic_view.xml',
],
'installable': False,
}

View File

@@ -0,0 +1,14 @@
# -*- 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 openerp import models, fields
class AccountAnalyticAccount(models.Model):
_inherit = "account.analytic.account"
recurring_next_date = fields.Date(track_visibility='onchange')
recurring_rule_type = fields.Selection(track_visibility='onchange')
recurring_interval = fields.Integer(track_visibility='onchange')
recurring_invoices = fields.Boolean(track_visibility='onchange')

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<openerp>
<data>
<record id="view_account_analytic_account_tree_c2c_3" model="ir.ui.view">
<field name="name">usability.analytic_analysis.account.analytic.account.tree.contract</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="account_analytic_analysis.view_account_analytic_account_tree_c2c_3"/>
<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
<field name="arch" type="xml">
<field name="date" position="after">
<field name="recurring_rule_type"/>
<field name="recurring_next_date"/>
</field>
</field>
</record>
<record id="view_account_analytic_account_overdue_search" model="ir.ui.view">
<field name="name">usability.analytic_analysis.account.analytic.account.search</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="account_analytic_analysis.view_account_analytic_account_overdue_search"/>
<field name="arch" type="xml">
<filter context="{'group_by' : 'pricelist_id'}" position="after">
<filter name="recurring_rule_type_groupby" string="Invoicing Frequency" context="{'group_by': 'recurring_rule_type'}"/>
<filter name="recurring_next_date_groupby" string="Next Invoice Date" context="{'group_by': 'recurring_next_date'}"/>
</filter>
<filter name="cancelled" position="after">
<separator/>
<filter name="recurring_invoices" string="Recurring Invoicing" domain="[('recurring_invoices', '=', True)]"/>
</filter>
</field>
</record>
</data>
</openerp>

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import account_bank_statement_import

View File

@@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Account Bank Statement Import Usability 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 Bank Statement Import Usability',
'version': '0.1',
'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:
* Blocks the *Automagically create bank account*, because it's too dangerous : it creates new bank accounts and new account journal... and the user doesn't even realize that !
* Works if the bank statement file only contain the account number and not the full IBAN
* If you have 2 accounts with the same number (I know a company that has an account in EUR and an account in USD with the same number), you should force the journal and it will work (instead of blocking with an error message)
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': False,
}

View File

@@ -0,0 +1,80 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Account Bank Statement Import Usability 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
class AccountBankStatementImport(models.TransientModel):
"""Extend model account.bank.statement."""
_inherit = 'account.bank.statement.import'
@api.model
def _find_bank_account_id(self, account_number):
"""Compared to the code in the module account_bank_statement_import,
this code:
- works when the account_number is not a complete IBAN,
but just an account number (most statement files only have the
account number)
- works if you have 2 bank accounts with the same number
(I have seen that at Crédit du Nord: the company had 1 account in USD
and 1 account in EUR with the same number !)
-> for that, I filter on the journal if the journal_id field is set
"""
bank_account_id = None
if account_number and len(account_number) > 4:
if self.journal_id:
self._cr.execute("""
SELECT id FROM res_partner_bank
WHERE replace(replace(acc_number,' ',''),'-','') like %s
AND journal_id=%s
ORDER BY id
""", ('%' + account_number + '%', self.journal_id.id))
else:
self._cr.execute("""
SELECT id FROM res_partner_bank
WHERE replace(replace(acc_number,' ',''),'-','') like %s
AND journal_id is not null
ORDER BY id
""", ('%' + account_number + '%', ))
bank_account_ids = [id[0] for id in self._cr.fetchall()]
if bank_account_ids:
bank_account_id = bank_account_ids[0]
return bank_account_id
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
def balance_check(self, cr, uid, st_id, journal_type='bank', context=None):
return True

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016 Akretion (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<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>
</data>
</openerp>

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import account_credit_control

View 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,
}

View 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)

View 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>

View File

@@ -0,0 +1 @@
# -*- coding: utf-8 -*-

View 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,
}

Binary file not shown.

View 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>

View File

@@ -0,0 +1 @@
# -*- coding: utf-8 -*-

View 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,
}

Binary file not shown.

View 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>

View 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

View 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,
}

View 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

View File

@@ -1 +1,3 @@
from . import models
# -*- coding: utf-8 -*-
from . import account_fiscal_position

View File

@@ -1,23 +0,0 @@
# © 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": """
Account Fiscal Position Payable Receivable
==========================================
This module allows to configure a special *Partner Receivable Account* and a special *Partner Payable Account* on fiscal positions. This is used in the onchange of the fiscal position of partners.
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
""",
"author": "Akretion",
"website": "https://github.com/OCA/odoo-usability",
"depends": ["account"],
"data": ["views/account_fiscal_position_view.xml"],
"installable": False,
}

View File

@@ -0,0 +1,26 @@
# -*- 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 Fiscal Position Payable Receivable',
'version': '8.0.1.0.0',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Configure payable/receivable accounts on fiscal positions',
'description': """
Account Fiscal Position Payable Receivable
==========================================
This module allows to configure a special *Partner Receivable Account* and a special *Partner Payable Account* on fiscal positions. This is used in the onchange of the fiscal position of partners.
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_fiscal_position_view.xml',
],
'installable': False,
}

View File

@@ -0,0 +1,35 @@
# -*- coding: utf-8 -*-
# © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp 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=[('type', '=', 'receivable')])
payable_account_id = fields.Many2one(
'account.account', string='Partner Payable Account',
company_dependent=True, domain=[('type', '=', 'payable')])
class ResPartner(models.Model):
_inherit = 'res.partner'
@api.onchange('property_account_position')
def fiscal_position_receivable_payable_change(self):
fp = self.property_account_position
ipo = self.env['ir.property']
if fp.receivable_account_id:
self.property_account_receivable = fp.receivable_account_id
else:
self.property_account_receivable = ipo.get(
'property_account_receivable', 'res.partner')
if fp.payable_account_id:
self.property_account_payable = fp.payable_account_id
else:
self.property_account_payable = ipo.get(
'property_account_payable', 'res.partner')

View File

@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<openerp>
<data>
<record id="view_account_position_form" model="ir.ui.view">
@@ -11,12 +13,16 @@
<field name="model">account.fiscal.position</field>
<field name="inherit_id" ref="account.view_account_position_form" />
<field name="arch" type="xml">
<field name="company_id" position="after">
<field name="receivable_account_id" />
<field name="payable_account_id" />
</field>
<xpath expr="//field[@name='country_group_id']/.." position="after">
<group string="Payable and Receivable Accounts"
name="payable_receivable_account" col="4">
<field name="receivable_account_id"/>
<field name="payable_account_id"/>
</group>
</xpath>
</field>
</record>
</odoo>
</data>
</openerp>

View File

@@ -1,2 +0,0 @@
from . import account_fiscal_position
from . import res_partner

View File

@@ -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 fields, models
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")],
)

View File

@@ -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 api, models
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"
)

View File

@@ -0,0 +1,23 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Account Fiscal Position Translate module for OpenERP
# Copyright (C) 2014 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

View File

@@ -0,0 +1,43 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Account Fiscal Position Translate module for OpenERP
# Copyright (C) 2014 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 Fiscal Position Translate',
'version': '0.1',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Make the Notes field on fiscal position translatable',
'description': """
Account Fiscal Position Translate
=================================
Makes the Notes field on the fiscal position translatable (it was native on 7.0, but it is not on 8.0).
Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for any help or question about this module.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['account'],
'data': [],
'installable': False,
}

View File

@@ -0,0 +1,32 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Account Fiscal Position Translate module for OpenERP
# Copyright (C) 2014 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.osv import orm, fields
class account_fiscal_position(orm.Model):
_inherit = 'account.fiscal.position'
_columns = {
# add translate=True
'note': fields.text('Notes', translate=True),
}

View File

@@ -0,0 +1 @@
# -*- coding: utf-8 -*-

View File

@@ -0,0 +1,30 @@
# -*- 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 Hide Analytic Lines',
'version': '8.0.1.0.0',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Hide analytic lines',
'description': """
Account Hide Analytic Lines
===========================
This module hides analytic lines. If you don't use timesheets, you should
not use analytic lines at all. Instead, you should only use
account move lines with the analytic account field (technical name: *analytic_account_id*).
Why ? Because, when you change the analytic account on an account move line,
the analytic line is not updated by Odoo. So, if you use the report available in *Reporting > Accounting > Analytic Entries Analysis*, as this report is based on analytic lines, the results will not take into account the changes of analytic account that you made on some 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', 'base_usability'],
'data': ['account_view.xml'],
'installable': False,
}

View File

@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<openerp>
<data>
<record id="account.account_analytic_journal_entries" model="ir.ui.menu">
<field name="groups_id" eval="[(6, 0, [ref('base_usability.group_nobody')])]"/>
</record>
<!-- Chart of analytic accounts -->
<record id="account.menu_action_analytic_account_tree2" model="ir.ui.menu">
<field name="groups_id" eval="[(6, 0, [ref('base_usability.group_nobody')])]"/>
</record>
<record id="account.next_id_40" model="ir.ui.menu">
<field name="groups_id" eval="[(6, 0, [ref('base_usability.group_nobody')])]"/>
</record>
<record id="account.account_analytic_journal_values" model="ir.values">
<field name="value" eval="False"/>
</record>
<record id="view_move_line_form" model="ir.ui.view">
<field name="name">account_hide_analytic_line.account_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">
<page groups="analytic.group_analytic_accounting" position="attributes">
<attribute name="invisible">1</attribute>
</page>
</field>
</record>
<record id="view_account_entries_report_search" model="ir.ui.view">
<field name="name">account.entries.report.search: add groupby</field>
<field name="model">account.entries.report</field>
<field name="inherit_id" ref="account.view_account_entries_report_search"/>
<field name="arch" type="xml">
<group expand="1" position="inside">
<filter name="account_groupby" string="Account" context="{'group_by': 'account_id'}"/>
<filter name="analytic_account_groupby" string="Analytic Account" context="{'group_by': 'analytic_account_id'}"/>
</group>
</field>
</record>
<!-- Natively, this action is based on analytic.entries.report
We switch that to account.entries.report with good context value to
have a similar result -->
<record id="account.action_analytic_entries_report" model="ir.actions.act_window">
<field name="res_model">account.entries.report</field>
<field name="context">{'search_default_thisyear': 1, 'search_default_analytic_account_groupby': 1}</field>
<field name="search_view_id" ref="view_account_entries_report_search"/>
<field name="domain">[('analytic_account_id', '!=', False)]</field>
</record>
</data>
</openerp>

View File

@@ -0,0 +1,23 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Account Invoice Del Attachment Cancel module for OpenERP
# 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

View File

@@ -0,0 +1,44 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Account Invoice Del Attachment Cancel 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 Delete Attachment on Cancel',
'version': '0.1',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Delete the attachment on the invoice when it is set back to draft',
'description': """
Account Invoice Delete Attachment on Cancel
===========================================
When a customer invoice is validated, on the first generation of the invoice report, a copy of the report is stored as attachment on the invoice. After that, every time a user asks for the Invoice report, it will be taken from the attachment. But, when a customer invoice/refund is cancelled, set back to draft, modified and re-validated, the Invoice report is still the old PDF file, which is often raised as a bug by the users.
With this module, when a customer invoice/refund is set back to draft, the attachment is deleted.
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['account'],
'installable': False,
}

View File

@@ -0,0 +1,57 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Account Invoice Del Attachment Cancel 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, _
class AccountInvoice(models.Model):
_inherit = 'account.invoice'
@api.multi
def invoice_filename_to_match(self):
return 'INV%.pdf'
@api.multi
def action_cancel_draft(self):
res = super(AccountInvoice, self).action_cancel_draft()
iao = self.env['ir.attachment']
for invoice in self:
# search for attachments
if 'out' in invoice.type:
filename_to_match = invoice.invoice_filename_to_match()
attachs = iao.search([
('res_id', '=', invoice.id),
('res_model', '=', self._name),
('type', '=', 'binary'),
('datas_fname', '=like', filename_to_match),
])
if len(attachs) == 1:
# delete attachment
attach = attachs[0]
attach_name = attach.name
# I need sudo() because the user that has the right to
# do a "back2draft" on an invoice may not have the right
# to delete an account.invoice
attachs.sudo().unlink()
invoice.message_post(
_('Attachement %s has been deleted') % attach_name)
return res

View File

@@ -0,0 +1 @@
# -*- encoding: utf-8 -*-

View File

@@ -0,0 +1,43 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Account Invoice Groupby Commercial Partner 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 Groupby Commercial Partner',
'version': '0.1',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Group by commercial partner instead of partner in invoices',
'description': """
Account Invoice Group-by Commercial Partner
===========================================
By default Odoo v8 makes a groupby on partner_id on invoice ; this module changes this to groupby commercial_partner_id.
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_invoice_view.xml'],
'installable': False,
}

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 Akretion (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<record id="view_account_invoice_filter" model="ir.ui.view">
<field name="name">account.invoice.groupby.commercial.partner</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.view_account_invoice_filter"/>
<field name="arch" type="xml">
<filter name="group_by_partner_id" position="attributes">
<attribute name="context">{'group_by':'commercial_partner_id'}</attribute>
</filter>
</field>
</record>
<record id="view_account_invoice_report_search" model="ir.ui.view">
<field name="name">account.invoice.groupby.commercial.partner.invoice.report</field>
<field name="model">account.invoice.report</field>
<field name="inherit_id" ref="account.view_account_invoice_report_search"/>
<field name="arch" type="xml">
<filter name="partner_id" position="attributes">
<attribute name="context">{'group_by':'commercial_partner_id','residual_visible':True}</attribute>
</filter>
</field>
</record>
</data>
</openerp>

View File

@@ -1,2 +1,3 @@
# -*- encoding: utf-8 -*-
from . import account_invoice
from . import account_invoice_report

View File

@@ -1,24 +0,0 @@
# Copyright 2015-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).
{
"name": "Account Invoice Margin",
"version": "12.0.1.0.0",
"category": "Invoicing Management",
"license": "AGPL-3",
"summary": "Copy standard price on invoice line and compute margins",
"description": """
This module copies the field *standard_price* of the product on the invoice line when the invoice line is created. The allows the computation of the margin of the invoice.
This module has been written by Alexis de Lattre from Akretion
<alexis.delattre@akretion.com>.
""",
"author": "Akretion",
"website": "https://github.com/OCA/odoo-usability",
"depends": ["account"],
"data": [
"account_invoice_view.xml",
],
"installable": False,
}

View File

@@ -0,0 +1,43 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Account Invoice Margin 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',
'version': '0.1',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Copy standard price on invoice line and compute margins',
'description': """
This module copies the field *standard_price* of the product on the invoice line when the invoice line is created. The allows the computation of the margin of the 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'],
'data': [
'account_invoice_view.xml',
],
'installable': False,
}

View File

@@ -1,98 +1,94 @@
# Copyright 2015-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).
# -*- encoding: utf-8 -*-
##############################################################################
#
# Account Invoice Margin 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 odoo import api, fields, models
import odoo.addons.decimal_precision as dp
from openerp import models, fields, api
import openerp.addons.decimal_precision as dp
class AccountInvoiceLine(models.Model):
_inherit = "account.invoice.line"
_inherit = 'account.invoice.line'
standard_price_company_currency = fields.Float(
string="Cost Price in Company Currency",
readonly=True,
digits=dp.get_precision("Product Price"),
string='Cost Price in Company Currency', readonly=True,
digits=dp.get_precision('Product Price'),
help="Cost price in company currency in the unit of measure "
"of the invoice line (which may be different from the unit "
"of measure of the product).",
)
"of measure of the product).")
standard_price_invoice_currency = fields.Float(
string="Cost Price in Invoice Currency",
readonly=True,
compute="_compute_margin",
store=True,
digits=dp.get_precision("Product Price"),
string='Cost Price in Invoice Currency', readonly=True,
compute='_compute_margin', store=True,
digits=dp.get_precision('Product Price'),
help="Cost price in invoice currency in the unit of measure "
"of the invoice line",
)
margin_invoice_currency = fields.Monetary(
string="Margin in Invoice Currency",
readonly=True,
store=True,
compute="_compute_margin",
currency_field="currency_id",
)
margin_company_currency = fields.Monetary(
string="Margin in Company Currency",
readonly=True,
store=True,
compute="_compute_margin",
currency_field="company_currency_id",
)
"of the invoice line")
margin_invoice_currency = fields.Float(
string='Margin in Invoice Currency', readonly=True, store=True,
compute='_compute_margin',
digits=dp.get_precision('Account'))
margin_company_currency = fields.Float(
string='Margin in Company Currency', readonly=True, store=True,
compute='_compute_margin',
digits=dp.get_precision('Account'))
margin_rate = fields.Float(
string="Margin Rate",
readonly=True,
store=True,
compute="_compute_margin",
digits=(16, 2),
help="Margin rate in percentage of the sale price",
)
string="Margin Rate", readonly=True, store=True,
compute='_compute_margin',
digits=(16, 2), help="Margin rate in percentage of the sale price")
@api.one
@api.depends(
"standard_price_company_currency",
"invoice_id.currency_id",
"invoice_id.type",
"invoice_id.company_id",
"invoice_id.date_invoice",
"quantity",
"price_subtotal",
)
'standard_price_company_currency', 'invoice_id.currency_id',
'invoice_id.type', 'invoice_id.company_id',
'invoice_id.date_invoice', 'quantity', 'price_subtotal')
def _compute_margin(self):
for il in self:
standard_price_inv_cur = 0.0
margin_inv_cur = 0.0
margin_comp_cur = 0.0
margin_rate = 0.0
inv = il.invoice_id
if inv and inv.type in ("out_invoice", "out_refund"):
# 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
)
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
)
if il.price_subtotal:
margin_rate = 100 * margin_inv_cur / il.price_subtotal
# for a refund, margin should be negative
# but margin rate should stay positive
if inv.type == "out_refund":
margin_inv_cur *= -1
margin_comp_cur *= -1
il.standard_price_invoice_currency = standard_price_inv_cur
il.margin_invoice_currency = margin_inv_cur
il.margin_company_currency = margin_comp_cur
il.margin_rate = margin_rate
standard_price_inv_cur = 0.0
margin_inv_cur = 0.0
margin_comp_cur = 0.0
margin_rate = 0.0
if (
self.invoice_id and
self.invoice_id.type in ('out_invoice', 'out_refund')):
# 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
standard_price_inv_cur =\
self.invoice_id.company_id.currency_id.with_context(
date=self.invoice_id.date_invoice).compute(
self.standard_price_company_currency,
self.invoice_id.currency_id)
margin_inv_cur =\
self.price_subtotal - self.quantity * standard_price_inv_cur
margin_comp_cur = self.invoice_id.currency_id.with_context(
date=self.invoice_id.date_invoice).compute(
margin_inv_cur, self.invoice_id.company_id.currency_id)
if self.price_subtotal:
margin_rate = 100 * margin_inv_cur / self.price_subtotal
# for a refund, margin should be negative
# but margin rate should stay positive
if self.invoice_id.type == 'out_refund':
margin_inv_cur *= -1
margin_comp_cur *= -1
self.standard_price_invoice_currency = standard_price_inv_cur
self.margin_invoice_currency = margin_inv_cur
self.margin_company_currency = margin_comp_cur
self.margin_rate = margin_rate
# We want to copy standard_price on invoice line for customer
# invoice/refunds. We can't do that via on_change of product_id,
@@ -102,77 +98,72 @@ class AccountInvoiceLine(models.Model):
# because we don't have access to the 'type' of the invoice
@api.model
def create(self, vals):
if vals.get("product_id"):
pp = self.env["product.product"].browse(vals["product_id"])
if vals.get('product_id'):
pp = self.env['product.product'].browse(vals['product_id'])
std_price = pp.standard_price
inv_uom_id = vals.get("uom_id")
inv_uom_id = vals.get('uos_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)
vals["standard_price_company_currency"] = std_price
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 = {}
if "product_id" in vals or "uom_id" in vals:
if 'product_id' in vals or 'uos_id' in vals:
for il in self:
if "product_id" in vals:
if vals.get("product_id"):
pp = self.env["product.product"].browse(vals["product_id"])
if 'product_id' in vals:
if vals.get('product_id'):
pp = self.env['product.product'].browse(
vals['product_id'])
else:
pp = False
else:
pp = il.product_id or False
# uom_id is NOT a required field
if "uom_id" in vals:
if vals.get("uom_id"):
inv_uom = self.env["uom.uom"].browse(vals["uom_id"])
# uos_id is NOT a required field
if 'uos_id' in vals:
if vals.get('uos_id'):
inv_uom = self.env['product.uom'].browse(
vals['uos_id'])
else:
inv_uom = False
else:
inv_uom = il.uom_id or False
inv_uom = il.uos_id or False
std_price = 0.0
if pp:
std_price = pp.standard_price
if inv_uom and inv_uom != pp.uom_id:
std_price = pp.uom_id._compute_price(std_price, inv_uom)
il.write({"standard_price_company_currency": std_price})
std_price = self.env['product.uom']._compute_price(
pp.uom_id.id, std_price, inv_uom.id)
il.write({'standard_price_company_currency': std_price})
return super(AccountInvoiceLine, self).write(vals)
class AccountInvoice(models.Model):
_inherit = "account.invoice"
_inherit = 'account.invoice'
margin_invoice_currency = fields.Monetary(
string="Margin in Invoice Currency",
compute="_compute_margin",
store=True,
readonly=True,
currency_field="currency_id",
)
margin_company_currency = fields.Monetary(
string="Margin in Company Currency",
compute="_compute_margin",
store=True,
readonly=True,
currency_field="company_currency_id",
)
margin_invoice_currency = fields.Float(
string='Margin in Invoice Currency',
readonly=True, compute='_compute_margin', store=True,
digits=dp.get_precision('Account'))
margin_company_currency = fields.Float(
string='Margin in Company Currency',
readonly=True, compute='_compute_margin', store=True,
digits=dp.get_precision('Account'))
@api.one
@api.depends(
"type",
"invoice_line_ids.margin_invoice_currency",
"invoice_line_ids.margin_company_currency",
)
'type',
'invoice_line.margin_invoice_currency',
'invoice_line.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"]
margin_inv_cur = 0.0
margin_comp_cur = 0.0
if self.type in ('out_invoice', 'out_refund'):
for il in self.invoice_line:
margin_inv_cur += il.margin_invoice_currency
margin_comp_cur += il.margin_company_currency
self.margin_invoice_currency = margin_inv_cur
self.margin_company_currency = margin_comp_cur

View File

@@ -1,83 +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

View File

@@ -1,64 +1,59 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="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).
Copyright (C) 2015 Akretion (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<odoo>
<openerp>
<data>
<record id="view_invoice_line_form" model="ir.ui.view">
<field name="name">margin.account.invoice.line.form</field>
<field name="model">account.invoice.line</field>
<field name="inherit_id" ref="account.view_invoice_line_form" />
<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="standard_price_company_currency"
string="Cost Price in Comp. Cur."
groups="base.group_no_one"
/>
<field
name="standard_price_invoice_currency"
string="Cost Price in Inv. Cur."
groups="base.group_no_one"
/>
<field
name="margin_invoice_currency"
string="Margin in Inv. Cur."
groups="base.group_no_one"
/>
<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>
<field name="discount" position="after">
<field name="standard_price_company_currency"
groups="account.group_account_user"/>
<field name="standard_price_invoice_currency"
widget="monetary"
options="{'currency_field': 'currency_id'}"
groups="account.group_account_user"/>
<field name="margin_invoice_currency"
widget="monetary"
options="{'currency_field': 'currency_id'}"
groups="account.group_account_user"/>
<field name="margin_company_currency"
groups="account.group_account_user"/>
</field>
</field>
</record>
<record id="invoice_form" model="ir.ui.view">
<field name="name">margin.account.invoice.form</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form" />
<field name="inherit_id" ref="account.invoice_form"/>
<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"
/>
<field
name="margin_company_currency"
string="Margin in Comp. Cur."
groups="base.group_no_one"
/>
<field name="margin_invoice_currency"
string="Margin"
widget="monetary"
options="{'currency_field': 'currency_id'}"
groups="account.group_account_user"/>
<field name="margin_company_currency"
groups="account.group_account_user"/>
</field>
<xpath expr="//field[@name='invoice_line']/tree/field[@name='price_subtotal']" position="after">
<field name="standard_price_invoice_currency" groups="base.group_no_one"/>
<field name="standard_price_company_currency" groups="base.group_no_one"/>
<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"/>
</xpath>
</field>
</record>
</odoo>
</data>
</openerp>

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import report

View 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,
}

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import invoice_report

View 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

View File

@@ -1 +1,3 @@
# -*- coding: utf-8 -*-
from . import account_invoice

View File

@@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Account Invoice Partner Bank Usability module for Odoo
# Copyright (C) 2013-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 Invoice Partner Bank Usability',
'version': '0.1',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Configure a bank account by default for customer invoices',
'description': """
Account Invoice Partner Bank Usability
======================================
This module adds a configuration parameter on the company that allows you to choose which bank account of your company will be selected by default on customer invoices.
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': ['company_view.xml'],
'installable': False,
}

View File

@@ -0,0 +1,48 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Account Invoice Partner Bank Usability module for Odoo
# Copyright (C) 2013-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
class ResCompany(models.Model):
_inherit = 'res.company'
default_out_invoice_partner_bank_id = fields.Many2one(
'res.partner.bank',
string='Default Bank Account for Customer Invoices',
copy=False, ondelete='restrict',
help="This is the bank account of your company that will be selected "
"by default when you create a customer invoice.")
class AccountInvoice(models.Model):
_inherit = "account.invoice"
def invoice_out_default_bank_account(self):
partner_bank_id = False
if self._context.get('type') == 'out_invoice' or \
self._context.get('inv_type') == 'out_invoice':
partner_bank_id = self.env.user.company_id.\
default_out_invoice_partner_bank_id.id or False
return partner_bank_id
partner_bank_id = fields.Many2one(default=invoice_out_default_bank_account)

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<record id="view_company_form" model="ir.ui.view">
<field name="name">account_invoice_partner_bank_usability.company.form</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="base.view_company_form" />
<field name="arch" type="xml">
<group name="account_grp" position="inside">
<field name="default_out_invoice_partner_bank_id"
domain="[('company_id', '=', id)]"/>
</group>
</field>
</record>
</data>
</openerp>

View File

@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Account Invoice Picking Label module for OpenERP
# Copyright (C) 2013-2014 Akretion
# @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

View File

@@ -0,0 +1,42 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Account Invoice Picking Label module for OpenERP
# Copyright (C) 2014 Akretion
# @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 Picking Label',
'version': '0.1',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Adds field picking_ids_label on account.invoice',
'description': """
Account Invoice Picking Label
=============================
Adds a function field named *picking_ids_label* on invoices. This field contains the list of pickings related to the invoice as a string. This field is designed to be displayed in the invoice report.""",
'author': 'Akretion',
'website': 'http://www.akretion.com/',
'depends': ['stock_account'],
'data': [],
'installable': False,
'active': False,
}

View File

@@ -0,0 +1,52 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Account Invoice Picking Label module for OpenERP
# Copyright (C) 2013-2014 Akretion
# @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.osv import orm, fields
class account_invoice(orm.Model):
_inherit = "account.invoice"
def _compute_picking_ids_label(
self, cr, uid, ids, name, arg, context=None):
res = {}
for invoice in self.read(
cr, uid, ids, ['picking_ids'], context=context):
label = ''
if invoice['picking_ids']:
pickings = self.pool['stock.picking'].read(
cr, uid, invoice['picking_ids'], ['name'],
context=context)
first = True
for picking in pickings:
if first:
label += picking['name']
first = False
else:
label += ', %s' % picking['name']
res[invoice['id']] = label
return res
_columns = {
'picking_ids_label': fields.function(
_compute_picking_ids_label, type='char', string='Pickings'),
}

View File

@@ -0,0 +1,23 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Account Invoice Sale Link module for OpenERP
# Copyright (C) 2013 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

View File

@@ -0,0 +1,46 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Account Invoice Sale Link module for OpenERP
# Copyright (C) 2013 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 Sale Link',
'version': '0.1',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Add the reverse link from invoices to sale orders',
'description': """
Account Invoice Sale Link
=========================
On the customer invoice report, you usually need to display the customer order number. For that, you need to have the link from invoices to sale orders, and this link is not available in the official addons.
This module adds a field *sale_ids* on the object account.invoice, which is the reverse many2many field of the field *invoice_ids* of the object sale.order. It is displayed in a dedicated tab on the invoice form view.
Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for any help or question about this module.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['sale'],
'data': ['account_invoice_view.xml'],
'installable': False,
'active': False,
}

View File

@@ -0,0 +1,36 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Account Invoice Sale Link module for OpenERP
# Copyright (C) 2013 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.osv import orm, fields
class account_invoice(orm.Model):
_inherit = 'account.invoice'
_columns = {
# This is the reverse link of the field 'invoice_ids' of sale.order
# defined in addons/sale/sale.py
'sale_ids': fields.many2many(
'sale.order', 'sale_order_invoice_rel', 'invoice_id',
'order_id', 'Sale Orders', readonly=True,
help="This is the list of sale orders related to this invoice."),
}

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2014 Akretion (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<record id="invoice_form" model="ir.ui.view">
<field name="name">account_invoice_sale_link.invoice.form</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<notebook position="inside">
<page name="sale_ids" string="Sale Orders">
<field name="sale_ids"/>
</page>
</notebook>
</field>
</record>
</data>
</openerp>

View File

@@ -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>

View File

@@ -1,2 +1,3 @@
from . import models
# -*- coding: utf-8 -*-
from . import wizard

View File

@@ -1,21 +0,0 @@
# Copyright 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# Copyright 2018-2019 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Account Invoice Update Wizard",
"version": "12.0.1.0.0",
"category": "Accounting & Finance",
"license": "AGPL-3",
"summary": "Wizard to update non-legal fields of an open/paid invoice",
"author": "Akretion",
"website": "https://github.com/OCA/odoo-usability",
"depends": [
"account",
],
"data": [
"wizard/account_invoice_update_view.xml",
"views/account_invoice.xml",
],
"installable": False,
}

View File

@@ -0,0 +1,34 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Account Invoice Update Wizard',
'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
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['account'],
'data': [
'wizard/account_invoice_update_view.xml',
'views/account_invoice.xml',
],
'installable': False,
}

View File

@@ -1,19 +0,0 @@
# Copyright 2019 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
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

View File

@@ -1 +0,0 @@
from . import test_account_invoice_update_wizard

View File

@@ -1,215 +0,0 @@
# Copyright 2018-2019 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.exceptions import UserError
from odoo.tests.common import SavepointCase
class TestAccountInvoiceUpdateWizard(SavepointCase):
@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")
cls.invoice1 = cls.env["account.invoice"].create(
{
"name": "Test invoice",
"partner_id": cls.customer12.id,
}
)
cls.inv_line1 = cls.env["account.invoice.line"].create(
{
"invoice_id": cls.invoice1.id,
"name": "Line1",
"product_id": cls.product16.id,
"product_uom_id": uom_unit.id,
"account_id": cls.invoice1.account_id.id,
"price_unit": 42.0,
}
)
cls.inv_line2 = cls.env["account.invoice.line"].create(
{
"invoice_id": cls.invoice1.id,
"name": "Line2",
"product_id": cls.product24.id,
"product_uom_id": uom_unit.id,
"account_id": cls.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": "",
}
)
def create_wizard(self, invoice):
res = self.invoice1.prepare_update_wizard()
self.wiz = self.env["account.invoice.update"].browse(res["res_id"])
def test_add_analytic_account_line1(self):
"""Add analytic account on an invoice line
after the invoice has been approved.
This will:
- update the move line
- create a new analytic line.
"""
self.invoice1.action_invoice_open()
self.create_wizard(self.invoice1)
wiz_line = self.wiz.line_ids.filtered(
lambda rec: rec.invoice_line_id == self.inv_line1
)
wiz_line.account_analytic_id = self.aa1
self.wiz.run()
related_ml = self.invoice1.move_id.line_ids.filtered(
lambda rec: rec.product_id == self.product16
)
self.assertEqual(related_ml.analytic_account_id, self.aa1)
self.assertEqual(related_ml.analytic_line_ids.account_id, self.aa1)
def test_change_analytic_account_line1(self):
"""Change analytic account on an invoice line
after the invoice has been approved.
This will:
- update the move line
- update the existing analytic line."""
self.inv_line1.account_analytic_id = self.aa2
self.invoice1.action_invoice_open()
self.create_wizard(self.invoice1)
wiz_line = self.wiz.line_ids.filtered(
lambda rec: rec.invoice_line_id == self.inv_line1
)
wiz_line.account_analytic_id = self.aa1
self.wiz.run()
related_ml = self.invoice1.move_id.line_ids.filtered(
lambda rec: rec.product_id == self.product16
)
self.assertEqual(related_ml.analytic_account_id, self.aa1)
self.assertEqual(related_ml.analytic_line_ids.account_id, self.aa1)
def test_error_grouped_move_lines(self):
"""Change analytic account on an invoice line
after the invoice has been approved where both
lines were grouped in the same move line.
This will raise an error.
"""
self.invoice1.journal_id.group_invoice_lines = True
self.inv_line2.product_id = self.product16
self.inv_line2.unit_price = 42.0
self.invoice1.action_invoice_open()
self.create_wizard(self.invoice1)
line1 = self.wiz.line_ids[0]
line1.account_analytic_id = self.aa1
with self.assertRaises(UserError):
self.wiz.run()
def test_add_analytic_tags_line1(self):
"""Add analytic tags on an invoice line
after the invoice has been approved.
This will update move line.
"""
self.invoice1.action_invoice_open()
self.create_wizard(self.invoice1)
wiz_line = self.wiz.line_ids.filtered(
lambda rec: rec.invoice_line_id == self.inv_line1
)
wiz_line.analytic_tag_ids = self.atag2
self.wiz.run()
related_ml = self.invoice1.move_id.line_ids.filtered(
lambda rec: rec.product_id == self.product16
)
self.assertEqual(related_ml.analytic_tag_ids, self.atag2)
self.assertFalse(related_ml.analytic_line_ids)
def test_change_analytic_tags_line1(self):
"""Change analytic tags on an invoice line
after the invoice has been approved.
It will update move line and analytic line
"""
self.inv_line1.account_analytic_id = self.aa2
self.inv_line1.analytic_tag_ids = self.atag1
self.invoice1.action_invoice_open()
self.create_wizard(self.invoice1)
wiz_line = self.wiz.line_ids.filtered(
lambda rec: rec.invoice_line_id == self.inv_line1
)
wiz_line.analytic_tag_ids = self.atag2
self.wiz.run()
related_ml = self.invoice1.move_id.line_ids.filtered(
lambda rec: rec.product_id == self.product16
)
self.assertEqual(related_ml.analytic_tag_ids, self.atag2)
self.assertEqual(related_ml.analytic_line_ids.tag_ids, self.atag2)
def test_add_analytic_info_line1(self):
"""Add analytic account and tags on an invoice line
after the invoice has been approved.
This will:
- update move line
- create an analytic line
"""
self.invoice1.action_invoice_open()
self.create_wizard(self.invoice1)
wiz_line = self.wiz.line_ids.filtered(
lambda rec: rec.invoice_line_id == self.inv_line1
)
wiz_line.account_analytic_id = self.aa1
wiz_line.analytic_tag_ids = self.atag2
self.wiz.run()
related_ml = self.invoice1.move_id.line_ids.filtered(
lambda rec: rec.product_id == self.product16
)
self.assertEqual(related_ml.analytic_account_id, self.aa1)
self.assertEqual(related_ml.analytic_tag_ids, self.atag2)
self.assertEqual(related_ml.analytic_line_ids.account_id, self.aa1)
self.assertEqual(related_ml.analytic_line_ids.tag_ids, self.atag2)
def test_empty_analytic_account_line1(self):
"""Remove analytic account
after the invoice has been approved.
This will raise an error as it is not implemented.
"""
self.inv_line1.account_analytic_id = self.aa2
self.invoice1.action_invoice_open()
self.create_wizard(self.invoice1)
wiz_line = self.wiz.line_ids.filtered(
lambda rec: rec.invoice_line_id == self.inv_line1
)
wiz_line.account_analytic_id = False
self.wiz.run()
related_ml = self.invoice1.move_id.line_ids.filtered(
lambda rec: rec.product_id == self.product16
)
self.assertFalse(related_ml.analytic_account_id)
self.assertFalse(related_ml.analytic_line_ids)

View File

@@ -1,40 +1,31 @@
<?xml version="1.0" encoding="utf-8" ?>
<?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).
-->
<odoo>
<openerp>
<data>
<record id="invoice_supplier_form" model="ir.ui.view">
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_supplier_form" />
<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="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>
<record id="invoice_form" model="ir.ui.view">
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form" />
<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="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>
</odoo>
</data>
</openerp>

View File

@@ -1 +1,3 @@
# -*- coding: utf-8 -*-
from . import account_invoice_update

View File

@@ -1,79 +1,83 @@
# 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>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import UserError
import odoo.addons.decimal_precision as dp
from openerp import models, fields, api, _
from openerp.exceptions import Warning as UserError
import openerp.addons.decimal_precision as dp
class AccountInvoiceUpdate(models.TransientModel):
_name = "account.invoice.update"
_description = "Wizard to update non-legal fields of invoice"
_name = 'account.invoice.update'
_description = 'Wizard to update non-legal fields of invoice'
invoice_id = fields.Many2one(
"account.invoice", string="Invoice", required=True, readonly=True
)
type = fields.Selection(related="invoice_id.type", readonly=True)
company_id = fields.Many2one(related="invoice_id.company_id", readonly=True)
partner_id = fields.Many2one(related="invoice_id.partner_id", readonly=True)
user_id = fields.Many2one("res.users", string="Salesperson")
payment_term_id = fields.Many2one("account.payment.term", string="Payment Term")
reference = fields.Char(string="Invoice Reference")
name = fields.Char(string="Reference/Description")
origin = fields.Char(string="Source Document")
comment = fields.Text("Additional Information")
partner_bank_id = fields.Many2one("res.partner.bank", string="Bank Account")
'account.invoice', string='Invoice', required=True,
readonly=True)
type = fields.Selection(related='invoice_id.type', readonly=True)
company_id = fields.Many2one(
related='invoice_id.company_id', readonly=True)
commercial_partner_id = fields.Many2one(
related='invoice_id.commercial_partner_id', readonly=True)
user_id = fields.Many2one('res.users', string='Salesperson')
# I use the same field name as the original invoice field name
# even if it the name is "bad"
# Updating payment_term will not work if you use
# the OCA module account_constraints (you will just get an error)
payment_term = fields.Many2one(
'account.payment.term', string='Payment Terms')
reference = fields.Char(string='Invoice Reference')
name = fields.Char(string='Reference/Description')
origin = fields.Char(string='Source Document')
comment = fields.Text('Additional Information')
partner_bank_id = fields.Many2one(
'res.partner.bank', string='Bank Account')
line_ids = fields.One2many(
"account.invoice.line.update", "parent_id", string="Invoice Lines"
)
'account.invoice.line.update', 'parent_id', string='Invoice Lines')
@api.model
def _simple_fields2update(self):
"""List boolean, date, datetime, char, text fields"""
return ["reference", "name", "origin", "comment"]
'''List boolean, date, datetime, char, text fields'''
return ['reference', 'name', 'origin', 'comment']
@api.model
def _m2o_fields2update(self):
return ["payment_term_id", "user_id", "partner_bank_id"]
return ['payment_term', 'user_id', 'partner_bank_id']
@api.model
def _prepare_default_get(self, invoice):
res = {"invoice_id": invoice.id, "line_ids": []}
res = {'invoice_id': invoice.id, 'line_ids': []}
for sfield in self._simple_fields2update():
res[sfield] = invoice[sfield]
for m2ofield in self._m2o_fields2update():
res[m2ofield] = invoice[m2ofield].id or False
for line in invoice.invoice_line_ids:
aa_tags = line.analytic_tag_ids
aa_tags = [(6, 0, aa_tags.ids)] if aa_tags else False
res["line_ids"].append(
[
0,
0,
{
"invoice_line_id": line.id,
"name": line.name,
"quantity": line.quantity,
"price_subtotal": line.price_subtotal,
"account_analytic_id": line.account_analytic_id.id,
"analytic_tag_ids": aa_tags,
"display_type": line.display_type,
},
]
)
for line in invoice.invoice_line:
res['line_ids'].append({
'invoice_line_id': line.id,
'name': line.name,
'quantity': line.quantity,
'price_subtotal': line.price_subtotal,
})
return res
@api.onchange("type")
@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')
def type_on_change(self):
res = {"domain": {}}
if self.type in ("out_invoice", "out_refund"):
res["domain"][
"partner_bank_id"
] = "[('partner_id.ref_company_ids', 'in', [company_id])]"
res = {'domain': {}}
if self.type in ('out_invoice', 'out_refund'):
res['domain']['partner_bank_id'] =\
"[('partner_id.ref_companies', 'in', [company_id])]"
else:
res["domain"]["partner_bank_id"] = "[('partner_id', '=', partner_id)]"
res['domain']['partner_bank_id'] =\
"[('partner_id', '=', commercial_partner_id)]"
return res
@api.multi
@@ -86,44 +90,18 @@ class AccountInvoiceUpdate(models.TransientModel):
for m2ofield in self._m2o_fields2update():
if self[m2ofield] != inv[m2ofield]:
vals[m2ofield] = self[m2ofield].id or False
if "payment_term_id" in vals:
pterm_list = self.payment_term_id.compute(
value=1, date_ref=inv.date_invoice
)[0]
if 'payment_term' in vals:
pterm_list = self.payment_term.compute(
value=1, date_ref=inv.date_invoice)[0]
if pterm_list:
vals["date_due"] = max(line[0] for line in pterm_list)
vals['date_due'] = max(line[0] for line in pterm_list)
return vals
@api.model
def _line_simple_fields2update(self):
return [
"name",
]
@api.model
def _line_m2o_fields2update(self):
return [
"account_analytic_id",
]
@api.model
def _line_m2m_fields2update(self):
return [
"analytic_tag_ids",
]
@api.model
def _prepare_invoice_line(self, line):
vals = {}
for field in self._line_simple_fields2update():
if line[field] != line.invoice_line_id[field]:
vals[field] = line[field]
for field in self._line_m2o_fields2update():
if line[field] != line.invoice_line_id[field]:
vals[field] = line[field].id
for field in self._line_m2m_fields2update():
if line[field] != line.invoice_line_id[field]:
vals[field] = [(6, 0, line[field].ids)]
if line.name != line.invoice_line_id.name:
vals['name'] = line.name
return vals
@api.multi
@@ -133,89 +111,31 @@ class AccountInvoiceUpdate(models.TransientModel):
ini_ref = inv.move_id.ref
ref = inv.reference or inv.name
if ini_ref != ref:
mvals["ref"] = ref
mvals['ref'] = ref
return mvals
@api.multi
def _get_matching_inv_line(self, move_line):
""" Find matching invoice line by product """
# TODO make it accept more case as lines won't
# 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:
raise UserError(
"Cannot match a single invoice line to move line %s" % move_line.name
)
return inv_line
@api.multi
def _prepare_move_line(self, inv_line):
mlvals = {}
inv_line_upd = self.line_ids.filtered(
lambda rec: rec.invoice_line_id == inv_line
)
ini_aa = inv_line.account_analytic_id
new_aa = inv_line_upd.account_analytic_id
if ini_aa != new_aa:
mlvals["analytic_account_id"] = new_aa.id
ini_aa_tags = inv_line.analytic_tag_ids
new_aa_tags = inv_line_upd.analytic_tag_ids
if ini_aa_tags != new_aa_tags:
mlvals["analytic_tag_ids"] = [(6, None, new_aa_tags.ids)]
return mlvals
@api.multi
def _prepare_analytic_line(self, inv_line):
alvals = {}
inv_line_upd = self.line_ids.filtered(
lambda rec: rec.invoice_line_id == inv_line
)
ini_aa = inv_line.account_analytic_id
new_aa = inv_line_upd.account_analytic_id
if ini_aa != new_aa:
alvals["account_id"] = new_aa.id
ini_aa_tags = inv_line.analytic_tag_ids
new_aa_tags = inv_line_upd.analytic_tag_ids
if ini_aa_tags != new_aa_tags:
alvals["tag_ids"] = [(6, None, new_aa_tags.ids)]
return alvals
@api.multi
def _update_payment_term_move(self):
self.ensure_one()
inv = self.invoice_id
if (
self.payment_term_id
and self.payment_term_id != inv.payment_term_id
and inv.move_id
):
self.payment_term and
self.payment_term != inv.payment_term and
inv.move_id and
inv.move_id.period_id.state == 'draft'):
# I don't update pay term when the invoice is partially (or fully)
# paid because if you have a payment term with several lines
# of the same amount, you would also have to take into account
# the reconcile marks to put the new maturity date on the right
# lines
if inv.payment_ids:
raise UserError(
_(
"This wizard doesn't support the update of payment "
"terms on an invoice which is partially or fully "
"paid."
)
)
prec = self.env["decimal.precision"].precision_get("Account")
term_res = self.payment_term_id.compute(inv.amount_total, inv.date_invoice)[
0
]
raise UserError(_(
"This wizard doesn't support the update of payment "
"terms on an invoice which is partially or fully "
"paid."))
prec = self.env['decimal.precision'].precision_get('Account')
term_res = self.payment_term.compute(
inv.amount_total, inv.date_invoice)[0]
new_pterm = {} # key = int(amount * 100), value = [date1, date2]
for entry in term_res:
amount = int(entry[1] * 10 * prec)
@@ -224,25 +144,22 @@ class AccountInvoiceUpdate(models.TransientModel):
else:
new_pterm[amount] = [entry[0]]
mlines = {} # key = int(amount * 100), value : [line1, line2]
for line in inv.move_id.line_ids:
for line in inv.move_id.line_id:
if line.account_id == inv.account_id:
amount = int(abs(line.credit - line.debit) * 10 * prec)
if amount in mlines:
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 "
"same terms (number of terms and/or amount) as the "
"new payment term '%s'. You can only switch to a "
"payment term that has the same number of terms "
"with the same amount."
)
% (inv.payment_term_id.name, self.payment_term_id.name)
)
raise UserError(_(
"The original payment term '%s' doesn't have the "
"same terms (number of terms and/or amount) as the "
"new payment term '%s'. You can only switch to a "
"payment term that has the same number of terms "
"with the same amount.") % (
inv.payment_term.name, self.payment_term.name))
for line in lines:
line.date_maturity = new_pterm[iamount].pop()
@@ -257,78 +174,33 @@ class AccountInvoiceUpdate(models.TransientModel):
if ivals:
updated = True
inv.write(ivals)
if inv.move_id:
mvals = self._prepare_move()
if mvals:
inv.move_id.write(mvals)
for ml in inv.move_id.line_ids.filtered(
# we are only interested in invoice lines, not tax lines
lambda rec: bool(rec.product_id)
):
if ml.credit == 0.0:
continue
inv_line = self._get_matching_inv_line(ml)
mlvals = self._prepare_move_line(inv_line)
if mlvals:
updated = True
ml.write(mlvals)
aalines = ml.analytic_line_ids
alvals = self._prepare_analytic_line(inv_line)
if aalines and alvals:
updated = True
if "account_id" in alvals and alvals["account_id"] is False:
former_aa = inv_line.account_analytic_id
to_remove_aalines = aalines.filtered(
lambda rec: rec.account_id == former_aa
)
# remove existing analytic line
to_remove_aalines.unlink()
else:
aalines.write(alvals)
elif "account_id" in alvals:
# Create analytic lines if analytic account
# is added later
ml.create_analytic_lines()
for line in self.line_ids:
ilvals = self._prepare_invoice_line(line)
if ilvals:
updated = True
line.invoice_line_id.write(ilvals)
if inv.move_id and inv.move_id.period_id.state == 'draft':
mvals = self._prepare_move()
if mvals:
inv.move_id.write(mvals)
if updated:
inv.message_post(
body=_(
"Non-legal fields of invoice updated via the Invoice Update "
"wizard."
)
)
inv.message_post(_(
'Non-legal fields of invoice updated via the Invoice Update '
'wizard.'))
return True
class AccountInvoiceLineUpdate(models.TransientModel):
_name = "account.invoice.line.update"
_description = "Update non-legal fields of invoice lines"
_name = 'account.invoice.line.update'
_description = 'Update non-legal fields of invoice lines'
parent_id = fields.Many2one(
"account.invoice.update", string="Wizard", ondelete="cascade"
)
'account.invoice.update', string='Wizard', ondelete='cascade')
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.",
)
'account.invoice.line', string='Invoice Line', readonly=True)
name = fields.Text(string='Description', required=True)
quantity = fields.Float(
string="Quantity",
digits=dp.get_precision("Product Unit of Measure"),
readonly=True,
)
string='Quantity', digits=dp.get_precision('Product Unit of Measure'),
readonly=True)
price_subtotal = fields.Float(
string="Amount", readonly=True, digits=dp.get_precision("Account")
)
account_analytic_id = fields.Many2one(
"account.analytic.account", string="Analytic Account"
)
analytic_tag_ids = fields.Many2many("account.analytic.tag", string="Analytic Tags")
string='Amount', readonly=True, digits=dp.get_precision('Account'))

View File

@@ -1,81 +1,54 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<!--
© 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_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"
/>
<openerp>
<data>
<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="commercial_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" 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"/>
</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>
</field>
</group>
<footer>
<button name="run" type="object" class="oe_highlight" string="Update"/>
or
<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>
</data>
</openerp>

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import wizard

View File

@@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Account Move Line Filter Wizard 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 Move Line Filter Wizard',
'version': '0.1',
'category': 'Accounting & Finance',
'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': False,
}

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import account_move_line_filter

View File

@@ -0,0 +1,65 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Account Move Line Filter Wizard 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 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=[('type', 'not in', ('view', 'closed'))], required=True)
account_reconcile = fields.Boolean(related='account_id.reconcile')
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
else:
self.account_id = self.partner_id.property_account_payable.id
@api.multi
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],
'journal_show_code_only': True,
}
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

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<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="oe_highlight"/>
<button special="cancel" string="Cancel" class="oe_link"/>
</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"/>
</data>
</openerp>

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import account_move_line

View 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,
}

View File

@@ -0,0 +1,73 @@
# -*- 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
import logging
from openerp import models, api
_logger = logging.getLogger(__name__)
try:
from openerp.addons.report_xls.utils import _render
from openerp.addons.report_xls.report_xls import report_xls
except (ImportError, IOError) as err:
_logger.debug(err)
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

View File

@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Account Payment Force Maturity Date 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 payment_line

Some files were not shown because too many files have changed in this diff Show More