Compare commits

...

494 Commits

Author SHA1 Message Date
Alexis de Lattre
533023c32d [IMP] base_partner_one2many_phone: improve mig script 2025-05-20 14:25:02 +02:00
Alexis de Lattre
eb2386d0cd product_category_tax: code cleanup 2023-02-19 23:46:33 +01:00
Alexis de Lattre
4a9bf263e3 product_category_tax: set taxes in all companies 2023-02-19 23:21:32 +01:00
Alexis de Lattre
0358127f0c product_category_tax: add field in constraint 2023-02-13 22:03:05 +01:00
Alexis de Lattre
00df54ee37 stock_valuation_xlsx: improve multi-company support
Other small minor improvements/fixes
2022-05-13 17:35:50 +02:00
Alexis de Lattre
fdf204b3aa mail_usability: Add display_address_mail_template on res.partner 2022-02-17 15:56:47 +01:00
Alexis de Lattre
ce2b927c35 fix return wizard "set qty to 0"
Add method to auto unpack on return
2022-02-17 15:56:11 +01:00
Alexis de Lattre
4e57866115 purchase_usability: fix perf issue: we can't show a non-computed field in tree view 2022-01-27 23:40:45 +01:00
Alexis de Lattre
2922b19e9e sale_order_add_bom: add kit wizard now available on pickings 2021-11-25 18:50:47 +01:00
Alexis de Lattre
b8132c7f2e stock_valuation_xlsx: add depreciation ratios 2021-06-21 19:09:20 +02:00
Alexis de Lattre
4e6d93c625 mrp_average_cost: Minor code improvements 2021-06-21 18:40:38 +02:00
Alexis de Lattre
45bc579e97 Add carrier_id in sale.report 2021-05-25 10:42:41 +02:00
Alexis de Lattre
24cc7e1eaa sale_stock_usability: update depends key in relation to my previous commit 2021-05-21 11:12:02 +02:00
Alexis de Lattre
1c11a768b4 sale_stock_usability: Add field to_refund_so in stock.move form 2021-05-21 10:39:47 +02:00
Alexis de Lattre
781e8989f5 Add filter no_attachment on sale.order (same as on account.invoice) 2021-05-20 12:25:33 +02:00
Alexis de Lattre
d858634b91 Add mass cancel procurement wizard 2021-04-26 11:50:11 +02:00
Alexis de Lattre
ff69a23e17 account_usability: improve name of account.move.line generated from invoices for customer/supplier account
Don't always prefix name of account.move.line generated from invoices
with invoice number, only for that when name is '/'
2021-03-08 15:30:00 +01:00
Alexis de Lattre
4f4d3323d4 stock_valuation_xlsx: fix crash when start valuation = current for variation wizard 2021-02-26 10:57:23 +01:00
Alexis de Lattre
ec7601c59d purchase_usability: set company_id as invisible in tree view of purchase order lines (to save space) 2021-01-28 22:17:52 +01:00
Alexis de Lattre
bbb556c30c Small improvements in stock_valuation_xlsx 2021-01-16 00:11:57 +01:00
Alexis de Lattre
cf93f340b4 stock_valuation_xlsx: add stock.variation.xlsx report 2021-01-14 21:52:02 +01:00
Alexis de Lattre
a17cdbcc60 Revive stock_account_usability in v10 ! 2021-01-12 16:30:03 +01:00
Alexis de Lattre
16d382ec42 Don't mark invoice as 'sent' when you just click on 'Print Invoice' 2020-11-03 18:03:02 +01:00
Alexis de Lattre
efed3e3880 [FIX] stock_valuation_xlsx: bad context key for past stock level 2020-11-03 17:18:26 +01:00
Alexis de Lattre
11882c712c account_usability: Use partner_id.display_name (instead of partner_id.name) in reconcile work interface
Update account_several_improvements.diff (only line number change, no code change)
2020-11-03 16:12:27 +01:00
Alexis de Lattre
278cf0713c sale_usability: inherit product_uom_change() to add a warning when price is updated upon qty change 2020-11-03 15:14:38 +01:00
Alexis de Lattre
18a2998bc3 sale_confirm_wizard: add ability to skip wizard via inherit in some scenarios 2020-11-03 14:54:47 +01:00
Alexis de Lattre
9172407699 sale_confirm_wizard: don't show main block when sale_warn = block 2020-11-02 17:59:10 +01:00
Alexis de Lattre
e1d026d2b8 sale_confirm_warning: add sale_warn 2020-11-02 17:52:08 +01:00
Alexis de Lattre
5c38be2122 Add HT/TTC field on product.template and supplierinfo
Add french translation (partial)
2020-10-24 00:01:16 +02:00
Alexis de Lattre
9152a2c1a4 mail_usability: show a nice (native) option on mail compose wizard 2020-10-24 00:00:32 +02:00
Alexis de Lattre
844c9cc08c base_partner_one2many_phone: add compute_sudo=True 2020-10-22 12:03:14 +02:00
Alexis de Lattre
58ddff0402 Add a filter "This year and previous" on account.invoice.report 2020-10-12 12:30:53 +02:00
Alexis de Lattre
a748de39ec [FIX] stock_valuation_xlsx: fix report when categ_subtotal is false 2020-09-26 00:01:27 +02:00
Alexis de Lattre
446c2c1f1d stock_valuation_xlsx: Improve perfs
Add ability to force cost price to current
Improve headers in XLSX
2020-09-25 22:50:20 +02:00
Alexis de Lattre
063924fdc7 stock_valuation_xlsx: Speed-up for past valuation when few of the total products are in stock
Closer to PEP8
2020-09-25 12:19:26 +02:00
Alexis de Lattre
1e4de02259 stock_valuation_xlsx: Improve module description 2020-09-22 23:57:38 +02:00
Alexis de Lattre
4b432ec207 stock_valuation_xlsx: add possibility to add custom products fields in report 2020-09-22 15:25:54 +02:00
Alexis de Lattre
1b4f9dfab1 stock_valuation_xlsx: Add button on inventory form
Display expiry date as date
Add debug messages
Don't hardcode currency in style
Use decimal precision for price too
2020-09-22 10:42:45 +02:00
Alexis de Lattre
3043ad11a8 stock_inventory_xlsx: small fixes 2020-09-22 00:15:07 +02:00
Alexis de Lattre
de5470e5bd Add module stock_valuation_xlsx
stock_inventory_valuation_ods: fix module description
2020-09-21 23:36:02 +02:00
Chafique
31483abb99 add mail_follower_option module 2020-07-17 11:38:22 +02:00
Alexis de Lattre
6377f0984d stock_usability: Add 'set qty to 0' button on return wizard 2020-07-06 17:26:31 +02:00
Alexis de Lattre
284f0a1e73 partner_products_shortcut: don't use truck logo for something that doesn't point to a picking, use list logo instead 2020-07-06 11:03:16 +02:00
Alexis de Lattre
da81278b17 Add archive filter 2020-05-26 22:38:38 +02:00
Alexis de Lattre
f792979456 Add index=True on domain 2020-05-26 17:11:07 +02:00
Alexis de Lattre
d9a598a3c4 Add new module base_dynamic_list 2020-05-26 17:09:53 +02:00
Alexis de Lattre
2b74514230 mass_mailing_usability: Fix dependencies 2020-04-24 09:27:40 +02:00
Alexis de Lattre
38f1eacf8f sale_stock_usability: add methods for report
move form view in picking: add date field
account_usability: amount in tax lines readonly on customer invoices
2020-03-06 18:33:49 +01:00
Alexis de Lattre
aa9ab68ca3 Add incoterm in sale config menu, because incoterms is managed by sales manager in 99% of companies 2020-03-05 19:44:50 +01:00
Alexis de Lattre
97a83b0615 stock_usability: Add compute_sudo=True on some related fields of stock.inventory.line to avoid ACL issues 2020-01-29 22:37:36 +01:00
Alexis de Lattre
f6642639cf one2many_phone: Workaround a bug "Record does not exist or has been deleted." 2020-01-27 23:32:38 +01:00
Alexis de Lattre
cc11aca053 one2many_phone: Update search view 2020-01-27 21:50:04 +01:00
Alexis de Lattre
104ae274e9 Update translation for base_partner_one2many_phone 2020-01-27 19:03:52 +01:00
Alexis de Lattre
2baf9167a4 Add mobile in partner tree view 2020-01-13 09:57:10 +01:00
Alexis de Lattre
af6550fd2b base_partner_one2many_phone: improve mig script, add form view for res.partner.phone 2020-01-10 16:35:03 +01:00
Alexis de Lattre
bb23254830 Big update of base_partner_one2many_phone: new types, add email support
Migration script provided
2020-01-10 16:02:03 +01:00
Alexis de Lattre
cc0da43bdc commission_simple: improve view 2019-12-10 00:16:21 +01:00
Alexis de Lattre
57236ba173 Small fixes in commission modules 2019-12-10 00:08:39 +01:00
Alexis de Lattre
80480c99cc commission_simple: fix error in sql constraint 2019-12-09 23:01:06 +01:00
Alexis de Lattre
edb93dda3d Add module commission_simple and commission_simple_sale
Improve view inheritance in account_usability
2019-12-09 22:52:33 +01:00
Alexis de Lattre
9020ab18f6 Remove _rec_name from mrp.bom because there is now a native name_get() 2019-12-02 11:37:41 +01:00
Alexis de Lattre
01cfcbf80d sale_order_add_bom: fix related field definition 2019-12-02 11:21:59 +01:00
Alexis de Lattre
69f283f387 Add group on wizard entry 2019-11-28 17:10:27 +01:00
Alexis de Lattre
e884489c9b Add mass backtodraft wizard on account.move 2019-11-28 17:08:09 +01:00
Alexis de Lattre
4eb7969264 base_partner_ref: proper invalidation for display_name 2019-10-29 15:39:47 +01:00
Alexis de Lattre
a8019b2c80 Add option "hide_bank_statement_balance" on account.journal 2019-09-06 23:45:31 +02:00
Alexis de Lattre
f616e23985 Add code in journal tree view
Remove inherit of name_search, because it was already native in a
slightly different implementation
2019-08-07 11:31:49 +02:00
Alexis de Lattre
651cd27118 Merge branch '10.0' of github.com:akretion/odoo-usability into 10.0 2019-06-20 23:27:47 +02:00
Alexis de Lattre
acdddf0d08 Improve views for sale.report and purchase.report, and search view for sale order 2019-06-20 23:27:12 +02:00
David Beal
c6cb2e197f Merge pull request #95 from MindAndGo/10.0-bad-menu-reference
[10.0]FIX : Bad menu used
2019-06-17 16:51:30 +02:00
Florent THOMAS
363f781acf Cahnge the menu used 2019-06-12 16:48:24 +02:00
Pierrick Brun
1364748052 Merge pull request #88 from akretion/10-account_report_qweb_horizontal
[IMP] 10.0 account report qweb horizontal
2019-06-11 10:21:21 +02:00
Alexis de Lattre
73ee7d4dec Add module mass_mailing_usability
Improve module link_tracker_usability
2019-05-24 19:12:29 +02:00
Alexis de Lattre
5f207046fb New module link_tracker_usability 2019-05-17 20:27:52 +02:00
Alexis de Lattre
b4dfab1bf9 "Show Inventory Lines" renamed to "Inventory Lines" 2019-05-13 23:21:25 +02:00
Alexis de Lattre
e56343c181 account_move_line_filter_wizard: improve module description
Update version number
2019-05-13 20:02:52 +02:00
Alexis de Lattre
a61f1e385a account_move_line_filter_wizard: improve to add direct access to general ledger or open items report 2019-05-13 18:56:13 +02:00
Alexis de Lattre
d9c340e513 stock_usability: add link to Inventory Lines on product form view (menu "Action") 2019-05-13 16:10:20 +02:00
Alexis de Lattre
ba68bbecda crm_partner_prospect: avoid post-write -> improve perf 2019-05-10 23:57:00 +02:00
Alexis de Lattre
794d28468b Fix context in action for prospect 2019-05-10 23:49:46 +02:00
Alexis de Lattre
2dad83b91e Improve search and pivot view of account.move.line 2019-04-29 18:39:16 +02:00
Alexis de Lattre
aa2f90f0d1 account_usability: add script _fix_debit_credit_round_bug 2019-04-06 00:48:26 +02:00
Alexis de Lattre
16e550d0d5 base_usability: Add new options to _display_full_address() 2019-04-01 18:11:17 +02:00
Pierrick Brun
5a95b771f9 Merge pull request #87 from akretion/10-account_view_search_deb_cred
[IMP] 10.0 account.move.line: Add filter on both debit and credit
2019-04-01 11:47:53 +02:00
Pierrick Brun
d4d0666349 [IMP] make PDF reports horizontal
Pas pour la balance
2019-03-20 10:45:21 +01:00
Alexis de Lattre
8180da1d6e FIX crash in account_invoice_margin 2019-03-03 21:45:24 +01:00
Alexis de Lattre
aec54baec5 Improve list view of res.partner.bank
Improve name_get of res.bank
Add filter on product categ on pos_sale_report
2019-02-27 17:30:36 +01:00
Alexis de Lattre
e33bee1f05 account_usability: improve create group script 2019-02-27 10:47:08 +01:00
Alexis de Lattre
6f0f0b0a0d Private methods for scripts
Use sudo() in scripts that require admin access
2019-02-25 22:02:05 +01:00
Sébastien BEAU
6ce749c70f [FIX] fix helper 2019-02-25 15:57:56 +01:00
Sébastien BEAU
27fa44c68f [IMP] by default do not send an email when user_id is fill on object 2019-02-19 23:05:32 +01:00
Alexis de Lattre
6ecc01c108 On product.template+product.categ, all accounting fields are groups="account.group_account_invoice" 2019-02-15 14:53:39 +01:00
Alexis de Lattre
b2cda5e522 account_usability: remove access to form view of invoice lines via dedicated action until we have a proper readonly system for non-draft invoices 2019-02-15 00:13:34 +01:00
Alexis de Lattre
351fc2038d account_usability: hide "Accounting > Configuration > Financial Reports" 2019-02-14 20:53:14 +01:00
Alexis de Lattre
9505c2d5cd purchase_usability: purchase report is now a 3rd level menu entry like almost all clickable menu entries 2019-02-14 20:48:30 +01:00
Alexis de Lattre
e9b56ce5dd Add multi-company ir.rule for crm.lead 2019-02-14 20:34:21 +01:00
Alexis de Lattre
55b044a1fc Add module account_financial_report_qweb_usability 2019-02-14 18:00:55 +01:00
Alexis de Lattre
8a8780b810 account_usability: fix onchange on amount_currency: invert debit and credit 2019-02-14 17:43:48 +01:00
Alexis de Lattre
6b3d2263c7 account_usability: Improve onchange for amount_currency 2019-02-14 17:31:17 +01:00
Hpar
2b89e57d72 Merge pull request #84 from akretion/10.0-fix-purchase_order_buyer
[10][FIX] purchase_ordre_buyer
2019-02-13 11:17:41 +01:00
hparfr
9477219b71 Call super in onchanger() 2019-02-13 11:15:59 +01:00
Alexis de Lattre
d191aadc4e Add button to view the items of a pricelist full screen, to be able to search on items 2019-02-05 23:15:24 +01:00
Alexis de Lattre
ff97e81105 Hide default_credit and default_debit, now that it works well 2019-02-04 18:06:41 +01:00
Alexis de Lattre
286b80bf95 stock_usability: code cleanup 2019-02-04 15:33:08 +01:00
Alexis de Lattre
5775ad651f Fix string 2019-01-30 19:39:23 +01:00
Adrien Peiffer
bec0a50a72 [IMP] Journal entry should be visible in done state. (#50) 2019-01-29 10:50:24 +01:00
Florent Jouatte
99cacec19d [FIX] 'hr_expense_usability.generic_private_car_expense' does not exist (#76)
* [FIX] 'hr_expense_usability.generic_private_car_expense' does not exist

* [FIX] wrong xmlid, replace the module name by the right one
2019-01-29 10:47:31 +01:00
Pierrick Brun
1913556368 account.move.line: Add filter on both debit and credit (#82)
picked from @alexis-via (d4fcaa7d14)
2019-01-15 10:09:17 +01:00
Pierrick brun
29481d91b7 account.move.line: Add filter on both debit and credit
picked from @alexis-via (d4fcaa7d14)
2019-01-14 16:28:04 +01:00
Sébastien BEAU
ea402d4cbe [REF] refactor the code in order to split it in several file 2019-01-11 11:10:45 +01:00
Sébastien BEAU
a2564f48a3 [IMP] add record_id on mail.message to be able to access to the record 2019-01-11 10:56:31 +01:00
Sébastien BEAU
fc45c44280 [IMP] add some extra style css support and add a debugger mode. Update readme 2019-01-08 23:27:23 +01:00
Sébastien BEAU
a370c9100c [IMP] remove the fucking auto_delete!!! 2019-01-08 23:26:12 +01:00
Sébastien BEAU
e5d6ef4bad [REF] refactor the code to make it simplifier and avoid hacking the _notify method 2019-01-08 23:24:59 +01:00
David Beal
c3f1d30bdd Merge pull request #81 from akretion/10.0-sale_partner_shipping_filter
10.0 sale partner shipping filter
2019-01-04 12:48:23 +01:00
Pierrick brun
6405be3fcf [MIG] 10.0 2019-01-04 11:11:39 +01:00
chafique-delli
7a65c63f99 replace partner_parent_id by commercial_partner_id 2019-01-04 11:00:33 +01:00
chafique-delli
13d8100d98 fix after @bealdav's comment 2019-01-04 11:00:33 +01:00
chafique-delli
0151c6a6e3 domain improvement 2019-01-04 11:00:33 +01:00
chafique-delli
ea5fdcf4df fix domain 2019-01-04 11:00:33 +01:00
chafique-delli
4ff06be1a6 add sale_partner_shipping_filter_with_customer module 2019-01-04 11:00:33 +01:00
David Beal
6c3c6cd43b Merge pull request #72 from akretion/10-fix-py3o-lines-sorting
[FIX] keep the order line sorted when creating the layout_lines dict
2019-01-02 18:56:18 +01:00
Benoît Guillot
3fef559aac [IMP] add domain on partner_id field in account_move and account_move_line search views (#73) 2019-01-02 18:55:15 +01:00
Alexis de Lattre
75d7b7eac4 Add script fix_invoice_attachment_filename 2018-12-20 11:20:31 +01:00
Sébastien BEAU
4a2fff177c [IMP] add balance in view 2018-12-18 23:25:23 +01:00
Sébastien BEAU
e83238becd [IMP] hide odoo report menu and hide the button_cancel on bacnk_statement as the code do not allow to cancel it 2018-12-18 19:53:39 +01:00
Alexis de Lattre
8bebd1e2ef Add @api.model on method that should use it
Improve log msg
2018-12-17 11:17:43 +01:00
Alexis de Lattre
b23f03f79d Add src and dest location on prodlot selection popup 2018-12-05 21:23:43 +01:00
Mourad EL HADJ MIMOUNE
dc8363d6d1 [FIX] add start_date,end_date in statement.display_name 2018-12-04 16:39:57 +01:00
Alexis de Lattre
ad850024ec Script for account.group now works in multi-company envir 2018-12-04 16:33:23 +01:00
Sébastien BEAU
03564a20b2 [IMP] add readme, remove auto following when sending an email, use light version of email notification to avoid injecting useless link in the mail sent 2018-12-04 11:55:57 +01:00
Alexis de Lattre
c1618166fb Improve account group generation 2018-11-29 21:57:19 +01:00
Alexis de Lattre
cf2464dfa4 Add module sale_order_full_dropship 2018-11-29 12:34:34 +01:00
Alexis de Lattre
80191002b8 Fix typo and code cleanup 2018-11-28 17:15:43 +01:00
Alexis de Lattre
694c800df3 Fix visibility of invoice_print button on invoice form 2018-11-28 16:04:18 +01:00
Alexis de Lattre
bdf51029c7 Add script to create account groups 2018-11-22 21:25:40 +01:00
Alexis de Lattre
478ab1fc2b account_usability: improve display of reconcile information, in particular partial reconcile
Warning: on existing big databases, this upgrade will take a long time
because there is a new computed stored field on account.move.line. But it is
required to keep good perfs on tree view of move lines.
2018-11-22 16:26:27 +01:00
Alexis de Lattre
362dba5f90 Restore drill-through on sale and invoice reports 2018-11-21 18:15:25 +01:00
Alexis de Lattre
ac2b70b66e Add margin in sale.report 2018-11-21 16:44:05 +01:00
Alexis de Lattre
b75a2e47a2 Add margin in invoice report
Consequence: no more need for module account_invoice_margin_report
2018-11-21 16:22:10 +01:00
Pierrick Brun
3f73f15e4a [ADD] confirm on reset_real_qty for stock.inventory 2018-11-20 15:27:01 +01:00
Alexis de Lattre
c196343ec0 Improve usability of account.move creation/edition
Default value for account_id, debit, credit, similar to v8 behavior
2018-11-19 19:21:23 +01:00
Alexis de Lattre
7d359d6730 Fix typo 2018-11-19 11:09:37 +01:00
Alexis de Lattre
904bf6c4f4 Cut name_get() of invoice if too long (which screws-up the invoice form view because of the ariane thread at the top) 2018-11-19 10:52:04 +01:00
Alexis de Lattre
e13a2aba3d Remove menu entry for analytic tags
Hide field tag_ids on form view of analytic accounts
2018-11-12 18:27:02 +01:00
Alexis de Lattre
8cb880771e Add module stock_user_default_warehouse_mrp
Fix module stock_user_default_warehouse_purchase
2018-11-02 11:54:21 +01:00
Alexis de Lattre
087bb1fde2 MRP production form: move src/dest loc to the top 2018-10-26 15:46:17 +02:00
Pierrick Brun
806b1b4a86 Merge pull request #68 from yvaucher/10.0-account_invoice_update_wizard-analytic
[10.0] account_invoice_update_wizard analytic fields
2018-10-22 13:56:46 +02:00
Yannick Vaucher
23519f4027 Merge pull request #1 from akretion/10.0-account_invoice_update_wizard-analytic
[FIX] only show analytics to users in group
2018-10-19 14:57:56 +02:00
Pierrick Brun
08cb6f2e86 [FIX] only show analytics to users in group 2018-10-17 10:59:34 +02:00
Pierrick Brun
b54ec10f10 Merge pull request #63 from akretion/10.0-mig-product_search_supplier_code
[MIG] 10.0 product_search_supplier_code
2018-10-17 10:08:06 +02:00
Benoit
118dd2a5c0 [FIX] keep invoice lines sorted when creating the layout_lines dict 2018-09-28 17:42:31 +02:00
Hpar
0afe9a39a6 Merge pull request #57 from akretion/10-product_unit_manager_group-migration
10 product unit manager group migration
2018-09-25 11:56:47 +02:00
Hpar
159f163da5 Merge pull request #61 from akretion/10-add-purchase_buyer
Add purchase buyer module
2018-09-21 14:30:29 +02:00
Hpar
d0620a4c83 Update README.rst 2018-09-21 14:30:18 +02:00
Alexis de Lattre
5d2d5b1e63 Revert my previous commit: use partner_bank_active instead
The module partner_bank_active is avail in OCA/partner-contact
2018-09-18 23:19:09 +02:00
Alexis de Lattre
ab1144850b Fix crash when several quotes are linked to the opportunity 2018-09-18 23:03:21 +02:00
Alexis de Lattre
4995403bf5 Add active field on res.partner.bank 2018-09-18 21:32:16 +02:00
Alexis de Lattre
a415744f11 Add widget=handle on sequence of res.partner.bank 2018-09-17 11:18:01 +02:00
Benoit
c943b4cd33 [FIX] keep the order line sorted when creating the layout_lines dict 2018-09-14 17:46:15 +02:00
Alexis de Lattre
8800b94e5b Fix bad port of name_get() of account.analytic.account to v10 2018-09-13 11:56:37 +02:00
beau sebastien
ca5238a03c Merge pull request #70 from akretion/10.0-better-wizard-for-mail-test
[IMP] improve the wizard for testing email, allow to search on object and to send email for real check
2018-09-04 15:54:59 +02:00
Sébastien BEAU
5f15d83c3c [IMP] improve the wizard for testing email, allow to search on object and to send email for real check 2018-09-04 15:50:02 +02:00
Alexis de Lattre
6370dc0ec8 Port base_user_auth_log to v10 2018-09-02 22:39:49 +02:00
Alexis de Lattre
0d27c0a830 Add module base_user_auth_log 2018-09-02 22:21:05 +02:00
mpanarin
d01820cd39 [FIX] not being able to change analytic account and tags 2018-08-13 15:34:39 +03:00
Alexis de Lattre
5f6107f2e8 Add a patch to have analytic in case of writeoff in the register payment
wizard
2018-07-23 16:20:38 +02:00
Alexis de Lattre
ebb8f1ad86 carrier_id not readonly on done picking (add tracking on it)
fix for formatLang inherit in base_usability
2018-07-18 14:27:21 +02:00
Alexis de Lattre
04118bbf46 account_usability: Add copy=False on some fields 2018-07-16 17:16:15 +02:00
Alexis de Lattre
9cba31b68a Show title not only on Contacts 2018-07-13 15:43:46 +02:00
Alexis de Lattre
21d1454ab9 Use untaxed amount in name_get of purchase orders
Add sum for qty in operation lines
2018-07-12 23:53:26 +02:00
Alexis de Lattre
d4e673103e Show 'base' field in tax lines on invoice form view 2018-07-09 17:44:55 +02:00
Alexis de Lattre
9ebf7cdb4c FIX my previous commit: related_sudo -> compute_sudo 2018-07-09 11:43:22 +02:00
Alexis de Lattre
f34a731d95 Add related_sudo where it may be needed
PEP8 fix
2018-07-09 10:41:53 +02:00
Alexis de Lattre
6ef322be4c Improve invoice line view 2018-07-06 22:26:38 +02:00
Alexis de Lattre
dd15e3d194 Add search on supplier on product search view
Move margin fields to sale order line form view (instead of tree view)
2018-07-06 19:33:35 +02:00
Yannick Vaucher
71ecc03001 Allow to change analytic fields with account_invoice_update 2018-07-02 12:42:26 +02:00
David Beal
913be476dd Merge pull request #66 from yvaucher/10.0-mig-account_invoice_update_wizard
[10.0] migration of account_invoice_update_wizard
2018-06-29 20:42:34 +02:00
Alexis de Lattre
de9871fd17 delivery_usability: display field invoice_shipping_on_delivery in SO form view 2018-06-29 11:02:05 +02:00
Yannick Vaucher
90a2e26e79 fixup! [10.0] Migration of account_invoice_update_wizard 2018-06-27 10:35:34 +02:00
Florian
21f3b14d7a Merge pull request #67 from akretion/10-add-purchase_order_line_views-change-sequence
[purchase_order_line_menu] change menu sequence
2018-06-25 10:19:35 +02:00
Alexis de Lattre
a7a8271a38 Port l10n_fr_intrastat_product_ods to v10 2018-06-22 22:51:28 +02:00
Florian da Costa
4cfd326398 Change purchase line sequence 2018-06-22 18:06:07 +02:00
Alexis de Lattre
295bb4edb5 Merge branch '10.0' of https://github.com/akretion/odoo-usability into 10.0 2018-06-21 23:00:39 +02:00
Alexis de Lattre
8c73a84c46 Add second_barcode to search of product.product
Improve delivery view
2018-06-21 22:59:56 +02:00
Alexis de Lattre
8f555c88ce Add widget="email" on email of contacts 2018-06-20 23:45:09 +02:00
Yannick Vaucher
b5af2e54b0 [10.0] Migration of account_invoice_update_wizard 2018-06-20 14:47:59 +02:00
mdietrichc2c
b298039af4 [9.0] Port of module account_invoice_update_wizard 2018-06-20 14:24:34 +02:00
Florian da Costa
8fbac5c221 Make modules uninstallable 2018-06-20 14:23:53 +02:00
Alexis de Lattre
96680c893f Add module account_invoice_update_wizard 2018-06-20 14:19:24 +02:00
Alexis de Lattre
cc3b9d73ae Remove write/create on products to stock user 2018-06-19 22:38:22 +02:00
Alexis de Lattre
8416216a77 account_usability: don't attach PDF upon invoice report generation on supplier invoices/refunds 2018-06-19 15:16:32 +02:00
Alexis de Lattre
1a9126d9a1 [MIG] port partner_aged_open_invoices to v10 and rename it to account_aged_balance_from_partner 2018-06-18 18:11:43 +02:00
Alexis de Lattre
4e8c6f47f6 Fix string for filter 2018-06-15 21:11:51 +02:00
Alexis de Lattre
1cabf721f4 Better order for stock moves 2018-06-15 20:49:56 +02:00
Alexis de Lattre
929f79cd98 Switch rights from account manager to accourt user 2018-06-15 12:32:09 +02:00
Alexis de Lattre
0fabc8c4c1 Add account.group_account_user on Adviser menu (by default, it is only accessible to account manager !) 2018-06-15 11:18:59 +02:00
Alexis de Lattre
c25747b474 Improve stock_usability 2018-06-14 23:40:33 +02:00
Alexis de Lattre
6fa8464ab7 Add unreserve buttons on moves + log in chatter 2018-06-13 17:59:37 +02:00
Alexis de Lattre
c02f539f8f Add and improve views for usability purposes 2018-06-13 01:15:19 +02:00
David Beal
27f96b8af2 Merge pull request #65 from akretion/10-mig-purchase-hide-report-print-menu
[MIG] [10.0] purchase_hide_report_print_menu
2018-06-11 11:20:31 +02:00
Chafique
8b3205cc35 [MIG] [10.0] purchase_hide_report_print_menu 2018-06-11 10:41:36 +02:00
Alexis de Lattre
7908943645 Port stock_picking_type_default_partner to v10 2018-06-07 16:56:48 +02:00
Alexis de Lattre
ffd6a409cc Add tree/form view + menu entry for account.tax.group 2018-06-05 20:11:26 +02:00
Alexis de Lattre
6446e087be Remove full rights on product.uom and product.uom.categ to sale manager (grant only to system group) 2018-05-25 17:15:58 +02:00
Alexis de Lattre
a4a9be78bc account_move_line_filter_wizard: Port to v10 2018-05-25 13:25:00 +02:00
Alexis de Lattre
567e7f1f6e Remove module purchase_date_planned_update (PO lines can now be edited after confirmation, which updates the date on the stock move) 2018-05-25 11:18:05 +02:00
Alexis de Lattre
a29384b817 Graph type="pivot" views must be migrated to pivot views ! 2018-05-11 16:04:38 +02:00
Alexis de Lattre
23bd22a009 Improve default date for reversal: D+1 instead of today 2018-05-09 18:43:47 +02:00
Alexis de Lattre
020ca72188 Add missing installable False 2018-05-07 15:25:08 +02:00
Pierrick Brun
e3fc2764fb [MIG] 10.0 product_search_supplier_code 2018-04-26 14:55:26 +02:00
Alexis de Lattre
2d9b133cf6 Code cleanup 2018-04-20 23:29:52 +02:00
Alexis de Lattre
4e9ca8fc5c Add module delivery_usability 2018-04-20 09:15:15 +02:00
Alexis de Lattre
3fdc3b4256 Add glue module account_invoice_transmit_method_street3 with auto_install=True 2018-04-15 00:45:03 +02:00
Alexis de Lattre
4d7102d699 Don't block when no read access on pos.config 2018-04-14 19:17:05 +02:00
Alexis de Lattre
bfb0f5380a Add module product_print_zpl_barcode 2018-04-14 16:00:14 +02:00
Alexis de Lattre
e02727e6ee Add method to group by order in invoice report
Move invoice class in dedicated file
2018-04-11 15:33:34 +02:00
Alexis de Lattre
7cb35a031d Remove outdated comment 2018-04-11 12:10:01 +02:00
hparfr
f0bb02edf1 Add purchase buyer module 2018-04-11 10:49:41 +02:00
hparfr
4f10be1bfe Add purchase_order_line_menu 2018-04-11 09:25:04 +02:00
Florian
d547fd6916 Merge pull request #59 from akretion/10-fix-sale-usability-view
Fix sale order view
2018-03-28 13:57:06 +02:00
Florian da Costa
357ad8d707 Fix sale order view 2018-03-28 13:48:20 +02:00
Alexis de Lattre
03bbe001ae Add script to fix partners related to users in multi-company setup where partners are NOT shared between companies 2018-03-23 17:27:42 +01:00
Alexis de Lattre
b199228e1d Add string on bank_name of res.partner.bank 2018-03-22 18:24:52 +01:00
Alexis de Lattre
7f0ea7fd0c Add optional patch 2018-03-21 22:48:02 +01:00
Alexis de Lattre
0c94dde977 Add module stock_history_ods 2018-03-13 00:27:05 +01:00
Alexis de Lattre
da92731607 Also port stock inventory ODS location-independant 2018-03-12 00:34:43 +01:00
Alexis de Lattre
2950f86219 Port stock_inventory_valuation_ods to v10 and py3o 2018-03-12 00:18:36 +01:00
Alexis de Lattre
744c0f487a Partners auto-created when you create a user should have customer=False and supplier=True 2018-03-09 11:22:28 +01:00
Alexis de Lattre
d9fe676cae openerp -> odoo 2018-03-06 11:38:05 +01:00
Alexis de Lattre
65d0d61c13 Add check on bank/cash journals 2018-03-02 15:12:55 +01:00
Alexis de Lattre
d61e48635b Port hr_usability to v10 2018-03-01 21:56:40 +01:00
Alexis de Lattre
a7b2bde9e9 Script to fix account types 2018-03-01 16:53:38 +01:00
Alexis de Lattre
74966a7f15 base_usability: add tracking on company_id on res.partner 2018-02-27 09:30:35 +01:00
Alexis de Lattre
3f47f7bf9f product_usability: use monetary widget also in tree view (not only in form view) 2018-02-22 11:10:07 +01:00
Alexis de Lattre
4d833d1c97 Move client_order_ref from the second tab to the top 2018-02-21 18:13:42 +01:00
Alexis de Lattre
a577c4bbbd Cosmetic change 2018-02-19 11:37:12 +01:00
hparfr
dc05ed3b5d Migration to v10 2018-02-14 11:28:03 +01:00
chafique-delli
2c1b8fe657 Moves product_unit_manager_group from 8.0 2018-02-14 11:27:22 +01:00
Alexis de Lattre
a2ea2534f0 sale_margin_no_onchange port to v10 2018-02-09 17:52:25 +01:00
Alexis de Lattre
1cae9ca021 [MIG] web_eradicate_duplicate to v10 2018-02-09 14:54:58 +01:00
Alexis de Lattre
953929cc4b Add groupby on partner on opportunity search view 2018-02-09 00:18:14 +01:00
Alexis de Lattre
068d57030a Stop re-developping modules that exists in OCA/sale-workflow ! 2018-02-02 18:39:55 +01:00
Alexis de Lattre
054bee90c0 Add module sale_force_invoice_status 2018-02-02 18:27:22 +01:00
Alexis de Lattre
782f1fdb92 Remove account_hide_analytic_line (replaced by the module account_analytic_no_lines from OCA/account-analytic) 2018-02-02 17:13:47 +01:00
Alexis de Lattre
72f7235c18 Avoid the use of > and < in the text of mail templates, because it is converted to &gt;/&lt; in translations, even when inside code 2018-02-02 11:51:50 +01:00
Alexis de Lattre
0a5c14b7f9 Improve menus under Accounting > Configuration about bank accounts 2018-01-24 22:18:20 +01:00
Alexis de Lattre
a4c382a546 Better handling of the origin field (which can be very long) on PO views 2018-01-24 21:29:25 +01:00
Alexis de Lattre
5c9b6dd702 FIX to make it work with lunch voucher on months when nobody took holidays 2018-01-23 17:05:40 +01:00
David Beal
da6ba9b75e FIX branding 2018-01-23 09:43:12 +01:00
Alexis de Lattre
1ed7034ee4 Port product_no_translation to v10 2018-01-18 18:18:26 +01:00
Alexis de Lattre
9a8d9616b7 Port module stock_my_operations_filter to v10 2018-01-18 18:08:54 +01:00
Alexis de Lattre
b9014e937d Add message in the chatter of the picking when using force availability
PEP8 fixes
2018-01-18 14:10:08 +01:00
David Beal
fc2dcbc359 Merge pull request #48 from akretion/10-update-branding
UPD branding 10.0
2018-01-10 08:47:14 +01:00
Alexis de Lattre
b95837fa86 account_usability: account.reconcile.model don't copy name to label via onchange 2018-01-10 00:05:55 +01:00
Alexis de Lattre
22a0d2b41b Remove module purchase_auto_invoice_method which is useless in v10 2017-12-19 18:47:23 +01:00
Alexis de Lattre
f9e554a312 Add currency_id on supplierinfo tree view 2017-12-19 12:38:52 +01:00
Alexis de Lattre
559c301f2c FIX hr_holidays_lunch_voucher and hr_holidays_lunch_voucher_natixis 2017-12-19 12:23:15 +01:00
Alexis de Lattre
295bf50cea Remove 'show_email': True now that this bug has been fixed in v10 https://github.com/odoo/odoo/pull/21600 2017-12-14 22:02:56 +01:00
Alexis de Lattre
8ed8c2bc70 Port account_fiscal_position_payable_receivable to v10 2017-12-13 22:13:41 +01:00
Alexis de Lattre
b8a015a01e Remove module account_invoice_partner_bank_usability useless in v10 2017-12-13 22:05:30 +01:00
Alexis de Lattre
3024889c41 Merge branch '10.0' of github.com:akretion/odoo-usability into 10.0 2017-12-13 17:59:56 +01:00
Alexis de Lattre
8a538c4e74 copy=False on ref field of res.partner 2017-12-13 17:59:37 +01:00
Alexis de Lattre
03ebc09eb0 Add pricelist_id in product.pricelist.item form view 2017-12-08 17:41:47 +01:00
Alexis de Lattre
81a4328531 Add categories in pos_sale report 2017-12-07 20:37:44 +01:00
Alexis de Lattre
1faecd98f7 Add show_email in context for PO 2017-12-07 19:38:08 +01:00
Alexis de Lattre
0f4193e7c4 Different colors on inventory lines when real qty < or > theorical qty 2017-12-07 19:26:07 +01:00
Alexis de Lattre
ecd05222a9 Add 'Print Order' on PO (there was already a 'Print RFQ button'...) 2017-12-07 18:25:55 +01:00
Alexis de Lattre
690a9196dd sale_usability purchase_usability: reload form view upon sale order and purchase order confirmation to display the 3 qty columns
PEP8 fixes
2017-12-07 14:52:10 +01:00
Alexis de Lattre
ab03ebe2cb pos_usability: Cannot do child_of, because there is no parent_left, parent_right on pos.category 2017-12-07 14:00:34 +01:00
Alexis de Lattre
074f4e517a pos_usability: add group by on pos category on products search view
Add link to products from pos.category form view (same as on product.category form view)
2017-12-07 13:50:46 +01:00
Alexis de Lattre
26b27c398d Add ACL to be able to open product form view with employee-only group 2017-12-07 09:27:57 +01:00
Alexis de Lattre
e7afaa2c78 account_usability: harmised groups on product.product and product.category views 2017-12-06 15:01:46 +01:00
Alexis de Lattre
72116a7374 Port sale_crm_usability from v8 to v10 2017-12-04 16:11:11 +01:00
Alexis de Lattre
5d1df0b654 Port sale_crm_usability to v10 2017-12-04 16:10:23 +01:00
Alexis de Lattre
522d3d5aa0 Port resource_usability from v8 to v10 2017-12-04 15:13:05 +01:00
Alexis de Lattre
bfd0c6f8cd Add module resource_usability 2017-12-04 15:08:53 +01:00
Alexis de Lattre
a05263be77 hr_holidays_lunch_voucher: Test before commit, not after, stupid ! 2017-12-04 15:06:33 +01:00
Alexis de Lattre
f9951890b5 Port hr_holidays_lunch_voucher and hr_holidays_lunch_voucher_natixis to v10 2017-12-04 15:01:04 +01:00
Alexis de Lattre
06a1d182e5 2 fixes in hr_holidays modules 2017-12-04 13:59:23 +01:00
Alexis de Lattre
c4256b3005 Add multi-company support hr_holidays_usability
Add modules hr_holidays_lunch_voucher and hr_holidays_lunch_voucher_natixis
2017-12-04 13:59:23 +01:00
Alexis de Lattre
c5776557cc Add multi-company support hr_holidays_usability
Add modules hr_holidays_lunch_voucher and hr_holidays_lunch_voucher_natixis
2017-12-04 13:58:53 +01:00
Alexis de Lattre
361eb380e4 Make sent field visible in customer invoice form view 2017-11-30 23:17:55 +01:00
Alexis de Lattre
1034cc2347 Upport the "mark invoice as sent" wizard from v8 to v10
PEP8 on account_usability
2017-11-30 23:13:14 +01:00
Alexis de Lattre
f74dc15d4b Add button 'delete lines qty = 0' on supplier invoices
Add filter missing attachment on invoices
Add filter on to_send, sent on invoices
2017-11-30 22:55:45 +01:00
Alexis de Lattre
c52412295f Restore drill-through on account.invoice.report 2017-11-30 16:04:09 +01:00
Alexis de Lattre
0d8e3a9066 sale_purchase_no_product_template_menu: Also use product.product on the Product menu entries of the Accounting menu 2017-11-30 15:54:39 +01:00
Alexis de Lattre
238344b964 Add sum=1 on several qty fields 2017-11-30 12:06:02 +01:00
Alexis de Lattre
6ff67694ab Add tax_id in account.invoice.tax form view 2017-11-24 11:24:35 +01:00
Alexis de Lattre
662c37670c Add post_install.py script for data migration 2017-11-23 17:11:38 +01:00
Alexis de Lattre
2b0c64b69e Revert my previous commit, sorry 2017-11-23 12:17:43 +01:00
Alexis de Lattre
b40e4eca05 Update patch for pos_second_ean13 2017-11-23 12:09:01 +01:00
Alexis de Lattre
cc5291ba52 Rename method 2017-11-23 10:29:57 +01:00
Alexis de Lattre
2f63e4e7a6 Add copy=False on default_code, to make duplicate work again 2017-11-23 09:15:14 +01:00
David Beal
9ec29082b8 UPD Branding 2017-11-22 11:18:22 +01:00
Alexis de Lattre
a11f9574ee Add track_visibility='onchange' on available_in_pos 2017-11-22 09:52:51 +01:00
Alexis de Lattre
ac05ca27a4 Add tracking on amount_total on invoices 2017-11-10 12:48:24 +01:00
Alexis de Lattre
746d23fb3a Improve purchase order line views 2017-11-08 19:13:16 +01:00
Alexis de Lattre
aba8e33d48 Add tracking on fiscal position on partner 2017-10-27 18:37:32 +02:00
Alexis de Lattre
d384b626e5 stock_usability: Add partner_id in stock form view embedde in picking 2017-10-17 19:01:22 +02:00
Alexis de Lattre
fcecfcc4e1 Port account_invoice_margin to v10 2017-10-17 00:11:51 +02:00
Benjamin Willig (ACSONE)
e6076c3f76 [10.0] Improvements (#44)
* [ADD] Display an icon when a note has been encoded in an expense

* [CHG] Expense report document smart button counts his own attachments + his lines attachments
2017-10-13 20:03:27 +02:00
Adrien Peiffer (ACSONE)
987e753a54 [CHG] hr_expense_usability: improve inheritance (#40) 2017-10-13 17:03:32 +02:00
Alexis de Lattre
080e3decbc purchase_usability: also search on origin 2017-10-12 11:32:08 +02:00
Alexis de Lattre
7d7424ad8a Display 3 qty columns when clicking on the purchase_id field from picking 2017-10-11 10:57:33 +02:00
Alexis de Lattre
a32d091d83 Port module pos_second_ean13 (still needs some improvements, but it works) 2017-09-14 19:54:08 +02:00
Alexis de Lattre
bb849c0228 Remove module sale_no_filter_myorder, which is not useful in v10 2017-09-14 18:59:56 +02:00
Alexis de Lattre
338d0d445d translate=False on 'name' field of crm.lead.tag and res.partner.category 2017-09-07 18:41:39 +02:00
Alexis de Lattre
f0adce0034 Improve README 2017-09-06 08:42:21 +02:00
Alexis de Lattre
2ebdc8e329 Add ACL + name_get() for one2many_phone module 2017-08-31 10:30:01 +02:00
Alexis de Lattre
748614ba34 base_partner_one2many_phone: make it work with the asterisk connector 2017-08-31 09:55:31 +02:00
David Beal
d0cdc96fbf IMP make module filter to installable 2017-08-16 13:45:12 +02:00
Alexis de Lattre
61d576451e Add modules stock_user_default_warehouse_base, stock_user_default_warehouse_purchase and stock_user_default_warehouse_sale 2017-07-19 15:16:28 +02:00
Alexis de Lattre
d56acb4a86 product_category_tax: improve product.categ form view 2017-07-18 21:17:37 +02:00
Alexis de Lattre
f3ad97de73 Show "description" field in product form view 2017-07-18 11:36:16 +02:00
Alexis de Lattre
03cec78dc7 Add patch for account module 2017-07-11 16:30:21 +02:00
Alexis de Lattre
d4a936deaa Add patch for POS module 2017-07-11 16:25:34 +02:00
Alexis de Lattre
9cfdaa88a3 Add filter on account.account dedicated to code 2017-07-11 12:34:39 +02:00
Alexis de Lattre
e0732689b8 refund by default on return picking 2017-07-10 19:11:15 +02:00
Stéphane Bidoul (ACSONE)
55d977914e [10.0] hr_expense_usability improvements (#37)
* [FIX] hr_expense_usability: set default move number

Otherwise it's not possible to post the account move.

* [FIX] hr_expense_usability: prevent deleting draft move

This prevents deleting a draft account move that is linked
to an expense. Without this the expense could stay in posted
while the related move has been deleted, which is inconsitent
and impossible to recover for the user.

* [IMP] hr_expense_usability: preserve product/quantity on move line

When possible, preserve product and quantity on move line. This is
important when generating analytic lines to reinvoice expenses

* add contributor

* [FIX] hr_expense_usability: readonly account move on expense sheet

* [IMP] hr_expense_usablility: preserve employee name in move line name

This is important when reinvoicing expenses, so the correct label
is visible on the sale order.
2017-07-01 14:39:08 +02:00
Alexis de Lattre
0da06febfc Small usability improvements in bank statements 2017-06-26 10:12:24 +02:00
Stéphane Bidoul (ACSONE)
a9d8137d1f [10.0] extract hr_expense_private_car (#36)
* remove private car stuff from hr_expense_usability

* hr_private_car_expenses
2017-06-23 16:55:01 +02:00
Alexis de Lattre
19d2614feb Switch some track_visibility='always' to track_visibility='onchange' 2017-06-22 19:32:39 +02:00
Alexis de Lattre
dd05dfab28 Merge branch '10.0' of github.com:akretion/odoo-usability into 10.0 2017-06-22 19:30:10 +02:00
Alexis de Lattre
a6e9568454 mail_usability: add intermediary level to notify_email parameter of res.partner 2017-06-22 19:28:49 +02:00
Stéphane Bidoul (ACSONE)
5a39df7423 [10.0] setup.py and addons versions (#35)
* [IMP] set 10.0 version prefix in all installable addons

* [FIX] 10.0 instead of 9.0 version prefix for sale_order_add_bom on 10.0 branch

* [ADD] setup.py for all installable addons
2017-06-13 22:41:20 +02:00
Alexis de Lattre
2f9584e04e Protect Cancel button with a confirmation pop-up 2017-06-13 12:36:02 +02:00
Alexis de Lattre
a3245985e5 Add module hr_expense_usability_dp 2017-06-08 11:58:06 +02:00
Alexis de Lattre
19909b6761 New implementation of KM cost to property support the decimal precision at 3 digits (without changing the decimal precision of all prices in Odoo) 2017-06-08 11:25:21 +02:00
Alexis de Lattre
aca7911d81 Fine tuning hr_expense_usability 2017-06-08 00:53:39 +02:00
Alexis de Lattre
1d765aa4f7 Update README 2017-06-07 19:40:44 +02:00
Alexis de Lattre
16094358c7 hr_expense_usability: re-write account move generation and fix multi-currency 2017-06-07 19:38:30 +02:00
Alexis de Lattre
2469c1f79d Add support for private car expenses 2017-06-07 14:30:25 +02:00
Alexis de Lattre
94926d188a Adapt hr_holidays post wiz to new field 2017-06-06 17:57:05 +02:00
Alexis de Lattre
e5221d6a96 hr_holidays_usability: add support for emails
Many small fixes and improvements
2017-06-06 16:27:44 +02:00
Alexis de Lattre
d55b01ca7b Avoid warning on odoo start 2017-05-30 23:54:56 +02:00
Alexis de Lattre
5fda678474 FIX compatibility with sale_rental (and other modules that auto-create products) 2017-05-24 14:36:16 +02:00
Alexis de Lattre
390363d7e1 [FIX] disable auto-delete of already imported lines of HSBC CB because experience shows we can have 2 payments same day, same hour, same merchant and same amount (in particular for internet payments that often have hour=00:00) 2017-05-24 12:00:40 +02:00
Alexis de Lattre
15a12feafd Add module account_bank_statement_import_fr_hsbc_card 2017-05-23 19:33:46 +02:00
Alexis de Lattre
479e1a2710 Handle multi-uom
Button to manually update standard from Bom now restricted to MRP manager
Improve module description
2017-05-23 10:27:00 +02:00
Alexis de Lattre
735495656c Avoid double write on standard_price: only need to write price_unit on finished stock move 2017-05-22 23:54:50 +02:00
Alexis de Lattre
b8255a5287 mrp_average_cost: Fix decimal precision
product_usability: add link to show history of standard price
2017-05-22 20:57:33 +02:00
Alexis de Lattre
08445ad370 Add module mrp_average_cost 2017-05-22 19:33:37 +02:00
Alexis de Lattre
9267fca881 Multi-company fixes in hr_holidays_usability 2017-05-22 19:33:14 +02:00
Alexis de Lattre
b8b307154a Add default value on company_id field of pricelist 2017-05-21 23:05:19 +02:00
Alexis de Lattre
8b06320204 base_partner_ref: improve tree view 2017-05-11 22:40:07 +02:00
Alexis de Lattre
181ffab457 Add module sale_confirm_wizard 2017-05-11 22:23:54 +02:00
Alexis de Lattre
4d2f7a47ff base_partner_ref: Copy=False on 'ref' field 2017-05-09 12:22:42 +02:00
Alexis de Lattre
216369f66c Add module account_bank_statement_no_reconcile_guess 2017-04-05 19:23:18 +02:00
Alexis de Lattre
348e0205a0 Add traking on warn fields
WORK IN PROGRESS: port hr_holidays_usability
2017-04-05 19:22:01 +02:00
Alexis de Lattre
ffda316d34 Add module base_mail_sender_bcc 2017-03-29 17:48:45 +02:00
Alexis de Lattre
37281620af Better log message for outgoing emails 2017-03-29 17:45:16 +02:00
Alexis de Lattre
933bf336aa Remove module account_payment_security (included in account_payment_order) 2017-03-28 14:36:36 +02:00
Alexis de Lattre
09b94dd01d account_usability: Fix _order on account.move.line 2017-03-27 14:15:43 +02:00
Alexis de Lattre
0af5c20727 Add module base_partner_ref for better use of 'ref' field on partners 2017-03-24 18:01:20 +01:00
Alexis de Lattre
e3b305f117 Display more fields on stock.quant form view
Better search view on partners
2017-03-24 18:00:53 +01:00
David Beal
1a191c9444 Merge pull request #30 from EBII/10-calendar-def-val
[MIG 10] calendar def val
2017-03-15 12:14:32 +01:00
MonsieurB
e30285caf7 remove add cascade from 8 2017-03-15 11:18:00 +01:00
Alexis de Lattre
fe7fec797f Add groupby on Type for account journals 2017-03-07 19:49:09 +01:00
Alexis de Lattre
5304bde100 Improve product.supplierinfo view 2017-03-06 16:03:56 +01:00
Alexis de Lattre
db7ea5681f Add missing file! 2017-03-04 23:15:24 +01:00
Alexis de Lattre
0b12805495 Add link from picking to PO 2017-03-03 09:29:41 +01:00
Alexis de Lattre
f91b5267fe Merge branch '10.0' of github.com:akretion/odoo-usability into 10.0 2017-03-02 09:18:58 +01:00
Alexis de Lattre
3396814a09 Remove module account_invoice_del_attachment_cancel (native feature on v10 2017-03-02 09:18:32 +01:00
Alexis de Lattre
83c4e095f6 Minor changes 2017-03-02 09:18:12 +01:00
Alexis de Lattre
84bf228d92 Add direct access to account.move form from account.move.line tree view
Show code on name_get of journal add direct search on code
2017-03-02 09:17:21 +01:00
MonsieurB
7f8c461122 add display name like in 8.0 2017-02-28 17:10:19 +01:00
MonsieurB
80b3d08ba5 add a vals before other to renew values : (5,0,0) 2017-02-28 17:03:45 +01:00
Alexis de Lattre
7750ed1834 Fix string 2017-02-13 16:56:15 +01:00
Alexis de Lattre
3b6973c4a2 Add actions for invoice lines
Add info in invoice chatter
2017-02-13 15:41:29 +01:00
Alexis de Lattre
b518594136 Prospect modules (different approch than the OCA module partner_prospect in sale-workflow) 2017-02-02 00:24:20 +01:00
Alexis de Lattre
e353cdcad1 Legal name in report header 2017-02-01 12:08:38 +01:00
Alexis de Lattre
ea20effa7e Fine tuning of the sale_layout_category_product module 2017-02-01 10:41:35 +01:00
Alexis de Lattre
c9bfc8bef2 Add module sale_layout_category_product 2017-02-01 10:28:48 +01:00
MonsieurB
6361e2e453 modifications V10 std 2017-01-31 14:51:32 +01:00
Alexis de Lattre
217afc8af0 Port product_manager_group_stock to v10 2017-01-26 10:44:44 +01:00
Alexis de Lattre
2d74753bea Add direct search on procurement.rule name 2017-01-13 15:55:35 +01:00
Alexis de Lattre
d507311091 Fix bad domain 2017-01-13 15:51:51 +01:00
Alexis de Lattre
84c1caaf16 Work on usability of CRM 2017-01-12 23:47:20 +01:00
Alexis de Lattre
895a92393c Small usability improvements 2017-01-12 23:42:52 +01:00
Alexis de Lattre
fcba3e4129 Add 3 modules: account_no_analytic_tags, purchase_no_analytic_tags and sale_no_analytic_tags 2017-01-12 23:41:39 +01:00
Alexis de Lattre
a22148329f Port to v10 the code that re-gen the name of move lines
Empty ref on move generated from bank statement, because it has unuseful info (and redundant)
2017-01-12 17:59:20 +01:00
Alexis de Lattre
b2a96f4db2 Add module sale_usability_b2b 2017-01-12 16:21:26 +01:00
Alexis de Lattre
a325a3a828 Add link to invoice from account move line form view (like in v8) 2017-01-11 15:43:28 +01:00
Alexis de Lattre
1c1855ec11 Add menu entry on product.pricelist.item 2017-01-10 17:51:15 +01:00
Alexis de Lattre
5bcfe45251 Add date_done in picking tree view 2017-01-10 10:33:14 +01:00
Alexis de Lattre
ddbdecd64e Update company/name in report 2017-01-09 22:56:35 +01:00
Alexis de Lattre
9e44400acd Set field partner_address_id on proc rule 2017-01-06 12:09:02 +01:00
Alexis de Lattre
67e3c9a199 Add stock location menu entry in regular menu (not only in configuration), because it is very useful for the users, to be able to answer the question "What do we have on stock location X ?" 2017-01-06 11:56:16 +01:00
Alexis de Lattre
da5d35b8cb Add 'website' on partner display 2017-01-04 18:52:29 +01:00
David Beal
9fdbebc591 Update __init__.py 2017-01-03 17:45:35 +01:00
Alexis de Lattre
7f3d465a24 Add tracking on important product fields 2017-01-03 16:31:38 +01:00
Alexis de Lattre
ad7a8d5e40 Add city and country in partner tree view 2017-01-03 15:34:44 +01:00
Alexis de Lattre
9617aedcb3 Move code at the right place ! 2017-01-01 23:16:10 +01:00
Alexis de Lattre
d8f0d061b7 The module l10n_fr_fix_thousands_sep is not needed in v10 2017-01-01 08:40:00 +01:00
Alexis de Lattre
5d7f512335 Add track_visibility='onchange' on important fields of picking
Code cleanup
2017-01-01 08:36:51 +01:00
Alexis de Lattre
a7dc7a51ce Add track_visibility on important product fields 2016-12-31 23:11:29 +01:00
Alexis de Lattre
da7ac67933 New prototype for method _display_full_address() (Py3o reports will need to be updated) 2016-12-31 17:42:44 +01:00
Alexis de Lattre
4d9659dee3 Add comment about py3o and icons 2016-12-23 00:23:17 +01:00
Alexis de Lattre
1f5887eb87 Add partner_id on private stock 2016-12-22 14:31:07 +01:00
Alexis de Lattre
84ee109bdf Add start_date and end_date on bank statements 2016-12-21 21:28:40 +01:00
Alexis de Lattre
80c90c7d35 Add methods for reports 2016-12-20 01:05:09 +01:00
Alexis de Lattre
bf4d613ed2 Monkey-patching of formatLang to have clean display of float that are integers 2016-12-19 02:06:11 +01:00
Alexis de Lattre
889fb28fd6 Add has_discount on SO + method for py3o report 2016-12-17 01:03:09 +01:00
Alexis de Lattre
265210b4f1 Add field delivery_partner_id for report 2016-12-16 15:29:59 +01:00
Alexis de Lattre
ec6975ce6a Add method for reports 2016-12-16 00:55:53 +01:00
Alexis de Lattre
b0f6832541 Add computed field has_discount on invoice 2016-12-15 19:45:39 +01:00
Alexis de Lattre
49f928199e Handle lang in name_title field 2016-12-15 17:39:48 +01:00
Alexis de Lattre
94fd30c4b3 Move account_fiscal_position_translate in account_usability
Update code conventions in base_company_extension
2016-12-15 11:13:26 +01:00
Alexis de Lattre
e51d19941b Add module sale_layout_category_per_order 2016-12-14 14:27:52 +01:00
Alexis de Lattre
3284953528 Add string in partner search view 2016-12-14 14:21:31 +01:00
Alexis de Lattre
52350ba5a7 Add 2 group by (type and category) on product template search view 2016-12-14 11:19:38 +01:00
Alexis de Lattre
95fb0d6f43 Merge branch '10.0' of github.com:akretion/odoo-usability into 10.0 2016-12-14 10:48:58 +01:00
Alexis de Lattre
e7191d3ee1 Remove invisible currency_id field, because my PR on Odoo has been merged https://github.com/odoo/odoo/pull/14714 2016-12-14 10:48:22 +01:00
Alexis de Lattre
8fc54fd37a Add unicity constraint on analytic codes per company 2016-12-13 12:01:44 +01:00
Alexis de Lattre
85f505bd2d Add module mrp_no_product_template_menu 2016-12-12 13:36:52 +01:00
Alexis de Lattre
777fc14908 Change menu position 2016-12-09 15:30:38 +01:00
Alexis de Lattre
115c0b36de Merge branch '10.0' of github.com:akretion/odoo-usability into 10.0 2016-12-09 08:35:35 +01:00
Alexis de Lattre
256c603796 Add module pos_config_single_user
Several usability enhancements in sale, purchase, product and account
2016-12-09 08:35:00 +01:00
Alexis de Lattre
985a894866 Port to v10 2016-12-08 15:10:33 +01:00
Alexis de Lattre
23cadc403c Add module partner_tree_default 2016-12-08 14:46:22 +01:00
Alexis de Lattre
23139916b2 FIX depend 2016-12-07 16:02:38 +01:00
Alexis de Lattre
42b3505966 Port product_category_tax to v10 2016-12-07 10:08:37 +01:00
Alexis de Lattre
a9139b9430 Port partner_products_shortcut to v10 (it is in fact a port of partner_product_variants_shortcut renamed to partner_products_shortcut, because I won't maintain 2 versions) 2016-12-06 10:47:28 +01:00
Alexis de Lattre
3eab0c9d7a Port base_other_report_engines to v10 2016-12-06 09:28:47 +01:00
Alexis de Lattre
07f646dca3 Remove module base_partner_always_multi_contacts, which is not needed in v10 2016-12-06 09:18:37 +01:00
Alexis de Lattre
4350679c22 Clean-up code for one2many_phone 2016-12-05 17:08:29 +01:00
Alexis de Lattre
5fb19a4a5e Remove product_no_translation, because it is possible to install only 1 language without installing English since Odoo 10 2016-12-05 15:55:33 +01:00
Alexis de Lattre
346de9be4b Port mail_usability to v10 2016-12-02 19:44:56 +01:00
Alexis de Lattre
e4dc38b963 Add stock/destination stock loc on move tree view inside pickings 2016-12-02 15:14:55 +01:00
Alexis de Lattre
67e6860ec1 Remove procurement_suggest* modules 2016-12-01 16:36:25 +01:00
Alexis de Lattre
bdeb1a4101 Show field even when not in dev mode 2016-12-01 12:33:05 +01:00
Alexis de Lattre
e1f8e95bce Include sale_stock_show_delivery_address in sale_usability and stock_usability 2016-11-24 14:18:43 +01:00
Alexis de Lattre
f16095e343 Add regular quant menu entry 2016-11-22 16:31:57 +01:00
Alexis de Lattre
c92ce72fd9 Fix sale_from_private_stock 2016-11-22 15:01:37 +01:00
Alexis de Lattre
f90aa12a9f Port to v10 2016-11-22 14:39:53 +01:00
Alexis de Lattre
35163d8613 Add sale_id on picking form 2016-11-22 10:50:48 +01:00
Alexis de Lattre
4e4d02aa14 Remove module that is not useful in v10 2016-11-22 09:31:40 +01:00
Alexis de Lattre
9e3d62b4ba Clean up 2016-11-21 18:24:58 +01:00
Alexis de Lattre
0bc2d19747 Add direct access to re-ordering rules from stock location 2016-11-21 18:17:24 +01:00
Alexis de Lattre
ed1937d501 Port stock_usability to v10 2016-11-21 17:51:10 +01:00
Alexis de Lattre
acfd2f18a7 Port procurement_usability to v10 2016-11-21 13:19:30 +01:00
David Beal
83140872ef IMP add icons 2016-11-18 10:39:40 +01:00
Alexis de Lattre
6abb743736 Add unicity of default_code, because I think it's important to have that by default. 2016-11-17 18:51:34 +01:00
Alexis de Lattre
5549139e5c Add groupby in search view 2016-11-17 17:47:57 +01:00
Alexis de Lattre
e878021e63 Improve invoice line views
Add related fields on invoice line
2016-11-16 20:04:25 +01:00
Alexis de Lattre
6d7dc61dee Port account_usability to v10 2016-11-16 15:46:45 +01:00
Alexis de Lattre
cebc0e3b84 Allow to customize stock location 2016-11-15 14:21:15 +01:00
Alexis de Lattre
ef85216271 Port sale_order_add_bom to v10 2016-11-15 11:36:34 +01:00
Alexis de Lattre
7c5ac7144c Migrate eradicate_quick_create to v10 2016-11-10 14:16:34 +01:00
Alexis de Lattre
a35f1a3a32 Remove SO from quotations menu
Port sale_quotation_title to v10
2016-11-02 19:57:53 +01:00
Alexis de Lattre
022d7a719d Add module partner_firstname_first 2016-10-31 15:42:58 +01:00
Alexis de Lattre
e505ce2ad4 Partial port of product_usability 2016-10-31 15:40:28 +01:00
Alexis de Lattre
8bcbb83a91 FIX key in manifest (would auto-install base_partner_one2many_phone !!!) 2016-10-28 13:18:07 +02:00
Alexis de Lattre
07781aa724 Merge branch '10.0' of github.com:akretion/odoo-usability into 10.0 2016-10-27 09:40:07 +02:00
Alexis de Lattre
42233bc0ce Port base_usability, sale_usability, sale_stock_usability to v10 2016-10-27 09:33:15 +02:00
Alexis de Lattre
10eacdf226 Merge branch '10.0' of https://github.com/akretion/odoo-usability into 10.0 2016-10-25 12:42:38 +02:00
Alexis de Lattre
1a46f39705 Port mrp_usability and pos_usability to v10 2016-10-25 12:42:05 +02:00
Alexis de Lattre
9e37c6e1ae Add module base_partner_one2many_phone 2016-10-24 19:18:13 +02:00
Alexis de Lattre
96a7e6e443 Rapid (partial ?) port of product_manager_group and sale_purchase_no_product_template_menu to v10
pos_no_product_template_menu is useless in v10 -> remove it
2016-10-24 15:33:18 +02:00
Alexis de Lattre
c2f4e2066a Add module partner_market 2016-10-18 00:06:28 +02:00
Alexis de Lattre
b861521571 Port account_bank_statement_import_usability to v10 2016-10-12 22:52:20 +02:00
Alexis de Lattre
245c605ef5 Merge branch '10.0' of github.com:akretion/odoo-usability into 10.0 2016-10-12 22:18:32 +02:00
Alexis de Lattre
aa278b3a0c Add modules sale_from_private_stock and sale_order_add_bom
Port base_company_extension to v10
Avoid blockage on l10n_fr_infogreffe_connector
2016-10-11 17:46:53 +02:00
Alexis de Lattre
a1ef881201 Mass rename from __openerp__.py to __manifest__.py 2016-10-11 15:40:03 +02:00
Alexis de Lattre
56095375d1 Set all modules as uninstallable 2016-10-11 15:32:30 +02:00
Alexis de Lattre
746a6926ea Remove modules that will be merged in ***_usability modules or that are not useful in v10
Rename some modules
2016-10-11 15:27:34 +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
Florian da Costa
9f331306af add possibility to search supplier code in stock.picking.in 2015-11-04 16:25:12 +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
997 changed files with 19898 additions and 10231 deletions

View File

@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Copyright 2015-2018 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Aged Partner Balance from Partner',
'version': '10.0.0.1.0',
'category': 'Accounting',
'license': 'AGPL-3',
'summary': 'Direct access to the aged partner balance report from the partner form',
'description': """
Aged Partner Balance from Partner
=================================
This module adds a button on the partner form view (the icon on the button is a banknote) to easily open the detailed aged partner balance of the partner in PDF format.
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['account_financial_report_qweb'],
'data': ['partner_view.xml'],
'installable': True,
}

View File

@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2015-2018 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields, api
class ResPartner(models.Model):
_inherit = 'res.partner'
@api.depends('credit', 'debit')
def _compute_balance(self):
for partner in self:
partner.balance = partner.credit - partner.debit
# The field 'currency_id' defined in the account module
# is a computed field that gets the company currency
balance = fields.Monetary(
compute='_compute_balance', readonly=True,
string="Account Balance")
def open_aged_open_invoices_report(self):
wiz = self.env['aged.partner.balance.wizard'].create({
'show_move_line_details': True,
'partner_ids': [(6, 0, self.ids)],
})
action = wiz.button_export_pdf()
return action

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015-2018 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="view_partner_form" model="ir.ui.view">
<field name="name">account.balance.button.partner.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="account.partner_view_buttons"/>
<field name="arch" type="xml">
<button name="open_partner_history" type="object" position="after">
<button class="oe_stat_button" type="object"
name="open_aged_open_invoices_report"
attrs="{'invisible': [('parent_id', '!=', False)]}"
icon="fa-money">
<div class="o_form_field o_stat_info">
<span class="o_stat_value"><field name="balance"/></span>
<span class="o_stat_text">Account Balance</span>
</div>
</button>
</button>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,35 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
=======================================
Import French HSBC Card Bank Statements
=======================================
This module allows you to import French HSBC credit cards bank statements (CSV version).
Configuration
=============
Create a bank journal dedicated to HSBC credit cards. Associate it with a new bank account on which you will set the account number to *HSBC_CARD_EUR*.
Usage
=====
In the dashboard of the *Accounting* menu, click on the button *Import Statement* located on the journal corresponding to the bank account of the statement file you are importing.
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<https://github.com/akretion/odoo-usability/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed feedback.
Credits
=======
Contributors
------------
* Alexis de Lattre <alexis.delattre@akretion.com>

View File

@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Import French HSBC Card Bank Statements',
'version': '10.0.1.0.0',
'license': 'AGPL-3',
'author': "Akretion",
'website': 'http://www.akretion.com',
'summary': 'Import French HSBC Card Bank Statements in Odoo (CSV version)',
'depends': ['account_bank_statement_import'],
'data': ['views/account_bank_statement_import.xml'],
'installable': True,
}

View File

@@ -0,0 +1,69 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_bank_statement_import_fr_cfonb
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-13 03:36+0000\n"
"PO-Revision-Date: 2017-01-13 03:36+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Norwegian Bokmål (Norway) (https://www.transifex.com/oca/teams/23907/nb_NO/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: nb_NO\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_bank_statement_import_fr_cfonb
#: code:addons/account_bank_statement_import_fr_cfonb/models/account_bank_statement_import.py:146
#, python-format
msgid "Account %s"
msgstr ""
#. module: account_bank_statement_import_fr_cfonb
#: model:ir.ui.view,arch_db:account_bank_statement_import_fr_cfonb.account_bank_statement_import_view
msgid "CFONB (French format, fixed-length text lines of 120 caracters)"
msgstr ""
#. module: account_bank_statement_import_fr_cfonb
#: model:ir.model,name:account_bank_statement_import_fr_cfonb.model_account_bank_statement_import
msgid "Import Bank Statement"
msgstr "Importer bankutsagn"
#. module: account_bank_statement_import_fr_cfonb
#: code:addons/account_bank_statement_import_fr_cfonb/models/account_bank_statement_import.py:70
#, python-format
msgid ""
"Line %d is %d caracters long. All lines of a CFONB bank statement file must "
"be 120 caracters long."
msgstr ""
"Linje %d er %d tegn langt. Alle linjer i en CFONB-bankutsagnsfil må være 120"
" tegn langt."
#. module: account_bank_statement_import_fr_cfonb
#: code:addons/account_bank_statement_import_fr_cfonb/models/account_bank_statement_import.py:110
#, python-format
msgid ""
"Only single-account files and single-currency files are supported for the "
"moment. It is not the case starting from line %d."
msgstr ""
"Kun enkeltkontofiler og enkeltmyntenhetsfiler støttes for øyeblikket. Dette "
"er ikke tilfellet fra og med linje %d og utover."
#. module: account_bank_statement_import_fr_cfonb
#: code:addons/account_bank_statement_import_fr_cfonb/models/account_bank_statement_import.py:99
#, python-format
msgid ""
"The 2 first letters of the first line are '%s'. A CFONB file should start "
"with '01'"
msgstr ""
#. module: account_bank_statement_import_fr_cfonb
#: code:addons/account_bank_statement_import_fr_cfonb/models/account_bank_statement_import.py:52
#, python-format
msgid "The file is empty."
msgstr "Filen er tom."

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" ?>
<!--
© 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="account_bank_statement_import_view" model="ir.ui.view">
<field name="name">hsbc.fr.csv.account.bank.statement.import.form</field>
<field name="model">account.bank.statement.import</field>
<field name="inherit_id" ref="account_bank_statement_import.account_bank_statement_import_view"/>
<field name="arch" type="xml">
<xpath expr="//ul[@id='statement_format']" position="inside">
<li>French HSBC Credit Cards (CSV format)</li>
</xpath>
</field>
</record>
</odoo>

View File

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

View File

@@ -0,0 +1,105 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
import unicodecsv
from tempfile import TemporaryFile
from datetime import datetime
from odoo import models, fields, api, _
from odoo.exceptions import UserError
_logger = logging.getLogger(__name__)
class AccountBankStatementImport(models.TransientModel):
_inherit = 'account.bank.statement.import'
@api.model
def _check_hsbc_card_csv(self, data_file):
return data_file.strip().startswith(
'Titulaire;Division;;Cpt Affaires;Num carte;')
@api.model
def _parse_file(self, data_file):
""" Import a file in French HSBC CSV Credit card format"""
hsbc_csv = self._check_hsbc_card_csv(data_file)
if not hsbc_csv:
return super(AccountBankStatementImport, self)._parse_file(
data_file)
transactions = []
fileobj = TemporaryFile('w+')
fileobj.write(data_file)
fileobj.seek(0)
reader = unicodecsv.DictReader(
fileobj,
fieldnames=[
'company', 'division', 'empty', 'account',
'card_num', 'title', 'lastname', 'firstname',
'op_code', 'seller_type', 'seller', 'date', 'acc_date',
'hour', 'city', 'code', 'label', 'local_amount',
'local_currency', 'acc_amount', 'acc_currency'],
delimiter=';',
quoting=unicodecsv.QUOTE_MINIMAL,
encoding='latin1')
i = 0
start_balance = end_balance = 0.0
currency_code = 'EUR'
account_number = 'HSBC_CARD_EUR'
for line in reader:
i += 1
if i == 1:
continue # skip title line
_logger.debug("Line %d: %s" % (i, line))
if not line:
continue
# cleanup
for key, value in line.iteritems():
line[key] = value and value.strip() or False
if not line['date'] or not line['acc_amount']:
continue
labels = [
'%s %s' % (line['firstname'], line['lastname']),
'%s (%s)' % (line['seller'], line['seller_type']),
line['city']]
if line['local_currency'] != currency_code:
labels.append(
'%s %s' % (line['local_amount'], line['local_currency']))
name = ', '.join(labels)
amount = float(
line['acc_amount'].replace(',', '.').replace(' ', '')) * -1
end_balance += amount
date_dt = datetime.strptime(line['date'], '%d/%m/%Y')
date_str = fields.Date.to_string(date_dt)
if line['acc_currency'] != currency_code:
raise UserError(_(
"On line %d of the HSBC CSV file, the column "
"'Dev Cpt Affaires' contains '%s' instead of 'EUR'")
% (line['acc_currency'], i))
vals_line = {
'date': date_str,
'name': name,
'ref': False,
# unfortunately, I'm obliged to include i in
# the unique_import_id, which will disable the auto-delete
# of already imported lines. But experice has proven that
# Internet payment often have hour=00:00, and it's possible
# to have 2 internet payments for the same supplier the same
# day with the same amount (e.g. purchase a return ticket)
'unique_import_id': '%s-%s-%.2f-%s-%d' % (
date_str, line['hour'], amount, name, i),
'amount': amount,
'partner_id': False,
}
transactions.append(vals_line)
vals_bank_statement = {
'name': _('HSBC Cards'),
'balance_start': start_balance,
'balance_end_real': end_balance,
'transactions': transactions,
}
fileobj.close()
# from pprint import pprint
# pprint(vals_bank_statement)
return currency_code, account_number, [vals_bank_statement]

View File

@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
# © 2015-2016 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Account Bank Statement Import Usability',
'version': '10.0.0.1.0',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Small usability enhancements in account_bank_statement_import module',
'description': """
Account Bank Statement Import Usability
=======================================
This module adds the following changes:
* Works if the bank statement file only contain the account number and not the full IBAN
* remove start balance and end balance (doesn't work with OFX, which is one of the most used file format !)
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['account_bank_statement_import'],
'data': ['account_view.xml'],
'installable': True,
}

View File

@@ -1,49 +0,0 @@
# -*- 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': True,
}

View File

@@ -1,64 +1,18 @@
# -*- 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/>.
#
##############################################################################
# © 2015-2016 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import models, api
from odoo 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
def _check_journal_bank_account(self, journal, account_number):
if account_number in journal.bank_account_id.sanitized_acc_number:
return True
return False
class AccountBankStatement(models.Model):
@@ -76,5 +30,6 @@ class AccountBankStatement(models.Model):
# 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):
@api.multi
def _balance_check(self):
return True

View File

@@ -1,12 +1,16 @@
<?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
© 2016 Akretion (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<openerp>
<data>
<odoo>
<!--
Let's try again to work with balance_start and balance_end_real
in v10 to see if we can work with it in v10 or not...
If we really can't, I'll re-activate this view inheritance again
<record id="view_bank_statement_form" model="ir.ui.view">
<field name="name">bank_statement_import_usability.account.bank.statement.form</field>
@@ -21,6 +25,7 @@
</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>
@@ -40,5 +45,4 @@
</record>
</data>
</openerp>
</odoo>

View File

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

View File

@@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Account Bank Statement No Reconcile Guess',
'version': '10.0.1.0.0',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': "Don't pre-select lines to reconcile in bank statements",
'description': """
Account Bank Statement No Reconcile Guess
=========================================
Here is a scenario where the "reconcile guess" feature is a problem for the accountant:
1) The accountant imports a large bank statement with 40 bank statement lines.
2) The "reconcile guess" feature will pre-select reconcile of line X with line 39 of the bank statement. But this guess is a mistake and line X should be reconciled with line 2 of the bank statement.
=> The accountant will not understand why he can't select line X to be reconciled with line 2 of the bank statement. To be able to reconcile line 2 correctif, he has to:
3) click several times on the "next page" button to reach line 39 of the bank statement and unselect line X.
4) Go back to line 2 of the bank statement and now he will be able to select line X.
This module disables the "reconcile guess" feature to avoid this problem.
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['account'],
'data': [],
'installable': True,
}

View File

@@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class AccountBankStatementLine(models.Model):
_inherit = 'account.bank.statement.line'
def get_reconciliation_proposition(self, excluded_ids=None):
self.ensure_one()
return self.env['account.move.line']

View File

@@ -42,5 +42,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['account_credit_control', 'partner_aged_open_invoices'],
'data': ['account_credit_control_view.xml'],
'installable': True,
'installable': False,
}

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

@@ -39,5 +39,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['account_cutoff_prepaid', 'report_aeroo'],
'data': ['report.xml'],
'installable': True,
'installable': False,
}

View File

@@ -43,5 +43,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['account_banking_sepa_direct_debit', 'account_payment_partner'],
'data': [],
'installable': True,
'installable': False,
}

View File

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

View File

@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
# © 2015-2016 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Account Financial Report Qweb Usability',
'version': '10.0.1.0.0',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Small usability enhancements in account_financial_report_qweb module',
'description': """
Account Financial Report Usability
==================================
The usability enhancements include:
TODO
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': [
'account_financial_report_qweb',
],
'data': [
'views/reports.xml',
'views/layouts.xml',],
'installable': True,
}

View File

@@ -0,0 +1,3 @@
.list_table, .data_table, .totals_table, .list_table .act_as_row {
font-size:15px;
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="assets_specific" inherit_id="account_financial_report_qweb.assets_specific">
<xpath expr="." position="inside">
<link href="/account_financial_report_qweb_usability/static/src/css/reports.css" rel="stylesheet"/>
</xpath>
</template>
</odoo>

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="report_qweb_paperformat_horizontal" model="report.paperformat">
<field name="name">Account financial report qweb horizontal paperformat</field>
<field name="default" eval="True"/>
<field name="format">custom</field>
<field name="page_height">297</field>
<field name="page_width">210</field>
<field name="orientation">Landscape</field>
<field name="margin_top">12</field>
<field name="margin_bottom">8</field>
<field name="margin_left">5</field>
<field name="margin_right">5</field>
<field name="header_line" eval="False"/>
<field name="header_spacing">10</field>
<field name="dpi">110</field>
</record>
<record id="account_financial_report_qweb.action_report_general_ledger_qweb" model="ir.actions.report.xml">
<field name="paperformat_id" ref="report_qweb_paperformat_horizontal"/>
</record>
<record id="account_financial_report_qweb.action_report_journal_qweb" model="ir.actions.report.xml">
<field name="paperformat_id" ref="report_qweb_paperformat_horizontal"/>
</record>
<record id="account_financial_report_qweb.action_report_open_items_qweb" model="ir.actions.report.xml">
<field name="paperformat_id" ref="report_qweb_paperformat_horizontal"/>
</record>
</odoo>

View File

@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
from . import general_ledger_wizard
from . import open_items_wizard

View File

@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# Copyright 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 fields, models
class GeneralLedgerReportWizard(models.TransientModel):
_inherit = 'general.ledger.report.wizard'
foreign_currency = fields.Boolean(default=False)
def onchange_partner_ids(self):
# Neutralize native onchange method
return

View File

@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
# Copyright 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 fields, models
class OpenItemsReportWizard(models.TransientModel):
_inherit = "open.items.report.wizard"
foreign_currency = fields.Boolean(default=False)

View File

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

View File

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# © 2016-2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Account Fiscal Position Payable Receivable',
'version': '10.0.1.0.0',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Configure payable/receivable accounts on fiscal positions',
'description': """
Account Fiscal Position Payable Receivable
==========================================
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': True,
}

View File

@@ -0,0 +1,35 @@
# -*- coding: utf-8 -*-
# © 2016-2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields, api
class AccountFiscalPosition(models.Model):
_inherit = 'account.fiscal.position'
receivable_account_id = fields.Many2one(
'account.account', string='Partner Receivable Account',
company_dependent=True, domain=[('internal_type', '=', 'receivable')])
payable_account_id = fields.Many2one(
'account.account', string='Partner Payable Account',
company_dependent=True, domain=[('internal_type', '=', 'payable')])
class ResPartner(models.Model):
_inherit = 'res.partner'
@api.onchange('property_account_position_id')
def fiscal_position_receivable_payable_change(self):
fp = self.property_account_position_id
ipo = self.env['ir.property']
if fp.receivable_account_id:
self.property_account_receivable_id = fp.receivable_account_id
else:
self.property_account_receivable_id = ipo.get(
'property_account_receivable_id', 'res.partner')
if fp.payable_account_id:
self.property_account_payable_id = fp.payable_account_id
else:
self.property_account_payable_id = ipo.get(
'property_account_payable_id', 'res.partner')

View File

@@ -0,0 +1,23 @@
<?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>
<record id="view_account_position_form" model="ir.ui.view">
<field name="name">receivable_payable.fiscal_position_form</field>
<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>
</field>
</record>
</odoo>

View File

@@ -1,23 +0,0 @@
# -*- 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

@@ -1,43 +0,0 @@
# -*- 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': True,
}

View File

@@ -1,32 +0,0 @@
# -*- 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

@@ -1,30 +0,0 @@
# -*- 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': True,
}

View File

@@ -1,63 +0,0 @@
<?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

@@ -1,23 +0,0 @@
# -*- 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

@@ -1,44 +0,0 @@
# -*- 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': True,
}

View File

@@ -1,57 +0,0 @@
# -*- 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

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

View File

@@ -1,43 +0,0 @@
# -*- 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': True,
}

View File

@@ -1,35 +0,0 @@
<?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,3 +1,4 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
from . import account_invoice
from . import account_invoice_report

View File

@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
# © 2015-2017 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
{
'name': 'Account Invoice Margin',
'version': '10.0.1.0.0',
'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': True,
}

View File

@@ -1,43 +0,0 @@
# -*- 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': True,
}

View File

@@ -1,27 +1,10 @@
# -*- 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/>.
#
##############################################################################
# -*- coding: utf-8 -*-
# © 2015-2017 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import models, fields, api
import openerp.addons.decimal_precision as dp
from odoo import models, fields, api
import odoo.addons.decimal_precision as dp
class AccountInvoiceLine(models.Model):
@@ -39,56 +22,53 @@ class AccountInvoiceLine(models.Model):
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.Float(
margin_invoice_currency = fields.Monetary(
string='Margin in Invoice Currency', readonly=True, store=True,
compute='_compute_margin',
digits=dp.get_precision('Account'))
margin_company_currency = fields.Float(
compute='_compute_margin', currency_field='currency_id')
margin_company_currency = fields.Monetary(
string='Margin in Company Currency', readonly=True, store=True,
compute='_compute_margin',
digits=dp.get_precision('Account'))
compute='_compute_margin', currency_field='company_currency_id')
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")
@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')
def _compute_margin(self):
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
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
standard_price_inv_cur =\
inv.company_id.currency_id.with_context(
date=inv.date_invoice).compute(
il.standard_price_company_currency,
inv.currency_id)
margin_inv_cur =\
il.price_subtotal - il.quantity * standard_price_inv_cur
margin_comp_cur = inv.currency_id.with_context(
date=inv.date_invoice).compute(
margin_inv_cur, inv.company_id.currency_id)
if il.price_subtotal:
margin_rate = 100 * margin_inv_cur / il.price_subtotal
# for a refund, margin should be negative
# 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
# We want to copy standard_price on invoice line for customer
# invoice/refunds. We can't do that via on_change of product_id,
@@ -101,10 +81,11 @@ class AccountInvoiceLine(models.Model):
if vals.get('product_id'):
pp = self.env['product.product'].browse(vals['product_id'])
std_price = pp.standard_price
inv_uom_id = vals.get('uos_id')
inv_uom_id = vals.get('uom_id')
if inv_uom_id and inv_uom_id != pp.uom_id.id:
std_price = self.env['product.uom']._compute_price(
pp.uom_id.id, std_price, inv_uom_id)
inv_uom = self.env['product.uom'].browse(inv_uom_id)
std_price = pp.uom_id._compute_price(
std_price, inv_uom)
vals['standard_price_company_currency'] = std_price
return super(AccountInvoiceLine, self).create(vals)
@@ -112,7 +93,7 @@ class AccountInvoiceLine(models.Model):
def write(self, vals):
if not vals:
vals = {}
if 'product_id' in vals or 'uos_id' in vals:
if 'product_id' in vals or 'uom_id' in vals:
for il in self:
if 'product_id' in vals:
if vals.get('product_id'):
@@ -122,21 +103,21 @@ class AccountInvoiceLine(models.Model):
pp = False
else:
pp = il.product_id or False
# uos_id is NOT a required field
if 'uos_id' in vals:
if vals.get('uos_id'):
# uom_id is NOT a required field
if 'uom_id' in vals:
if vals.get('uom_id'):
inv_uom = self.env['product.uom'].browse(
vals['uos_id'])
vals['uom_id'])
else:
inv_uom = False
else:
inv_uom = il.uos_id or False
inv_uom = il.uom_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 = self.env['product.uom']._compute_price(
pp.uom_id.id, std_price, inv_uom.id)
std_price = pp.uom_id._compute_price(
std_price, inv_uom)
il.write({'standard_price_company_currency': std_price})
return super(AccountInvoiceLine, self).write(vals)
@@ -144,26 +125,26 @@ class AccountInvoiceLine(models.Model):
class AccountInvoice(models.Model):
_inherit = 'account.invoice'
margin_invoice_currency = fields.Float(
margin_invoice_currency = fields.Monetary(
string='Margin in Invoice Currency',
readonly=True, compute='_compute_margin', store=True,
digits=dp.get_precision('Account'))
margin_company_currency = fields.Float(
currency_field='currency_id')
margin_company_currency = fields.Monetary(
string='Margin in Company Currency',
readonly=True, compute='_compute_margin', store=True,
digits=dp.get_precision('Account'))
currency_field='company_currency_id')
@api.one
@api.depends(
'type',
'invoice_line.margin_invoice_currency',
'invoice_line.margin_company_currency')
'invoice_line_ids.margin_invoice_currency',
'invoice_line_ids.margin_company_currency')
def _compute_margin(self):
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
for inv in self:
margin_inv_cur = 0.0
margin_comp_cur = 0.0
if inv.type in ('out_invoice', 'out_refund'):
for il in inv.invoice_line_ids:
margin_inv_cur += il.margin_invoice_currency
margin_comp_cur += il.margin_company_currency
inv.margin_invoice_currency = margin_inv_cur
inv.margin_company_currency = margin_comp_cur

View File

@@ -0,0 +1,62 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields, api
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', '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'],
'product.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):
context = dict(self._context or {})
user_currency_id = self.env.user.company_id.currency_id
currency_rate_id = self.env['res.currency.rate'].search([
('rate', '=', 1),
'|',
('company_id', '=', self.env.user.company_id.id),
('company_id', '=', False)], limit=1)
base_currency_id = currency_rate_id.currency_id
ctx = context.copy()
for record in self:
ctx['date'] = record.date
record.user_currency_margin = base_currency_id.with_context(
ctx).compute(record.margin, user_currency_id)
# 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,31 +1,32 @@
<?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
© 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).
-->
<openerp>
<data>
<odoo>
<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="arch" type="xml">
<field name="discount" position="after">
<field name="company_id" position="after">
<field name="standard_price_company_currency"
groups="account.group_account_user"/>
groups="base.group_no_one"/>
<field name="standard_price_invoice_currency"
widget="monetary"
options="{'currency_field': 'currency_id'}"
groups="account.group_account_user"/>
groups="base.group_no_one"/>
<field name="margin_invoice_currency"
widget="monetary"
options="{'currency_field': 'currency_id'}"
groups="account.group_account_user"/>
groups="base.group_no_one"/>
<field name="margin_company_currency"
groups="account.group_account_user"/>
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>
</field>
</field>
</record>
@@ -37,23 +38,12 @@
<field name="arch" type="xml">
<field name="move_id" position="after">
<field name="margin_invoice_currency"
string="Margin"
widget="monetary"
options="{'currency_field': 'currency_id'}"
groups="account.group_account_user"/>
string="Margin" groups="base.group_no_one"/>
<field name="margin_company_currency"
groups="account.group_account_user"/>
groups="base.group_no_one"/>
</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>
</data>
</openerp>
</odoo>

View File

@@ -1,41 +0,0 @@
# -*- 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': True,
}

View File

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

View File

@@ -1,39 +0,0 @@
# -*- 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,3 +0,0 @@
# -*- coding: utf-8 -*-
from . import account_invoice

View File

@@ -1,43 +0,0 @@
# -*- 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': True,
}

View File

@@ -1,48 +0,0 @@
# -*- 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

@@ -1,26 +0,0 @@
<?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

@@ -1,23 +0,0 @@
# -*- 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

@@ -1,42 +0,0 @@
# -*- 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': True,
'active': False,
}

View File

@@ -1,52 +0,0 @@
# -*- 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

@@ -1,23 +0,0 @@
# -*- 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

@@ -1,46 +0,0 @@
# -*- 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': True,
'active': False,
}

View File

@@ -1,36 +0,0 @@
# -*- 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

@@ -1,25 +0,0 @@
<?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

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'partner_address_street3 / account_invoice_transmit_method compat.',
'version': '10.0.0.1.0',
'category': 'Partner',
'license': 'AGPL-3',
'summary': 'Compatibility between partner_address_street3 and account_invoice_transmit_method',
'description': """
Glue module between partner_address_street3 and account_invoice_transmit_method
===============================================================================
Stupid technical module to workaround an Odoo framework limitation about the inherit of the context attribute in a view.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['partner_address_street3', 'account_invoice_transmit_method'],
'data': [
'partner_view.xml',
],
'installable': True,
'auto_install': True,
}

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="view_partner_form" model="ir.ui.view">
<field name="name">Compatibility partner_address_street3 / account_invoice_transmit_method</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="priority">1000</field>
<field name="arch" type="xml">
<field name="child_ids" position="attributes">
<attribute name="context">{'default_parent_id': active_id, 'default_street': street, 'default_street2': street2, 'default_city': city, 'default_state_id': state_id, 'default_zip': zip, 'default_country_id': country_id, 'default_supplier': supplier, 'default_customer': customer, 'default_lang': lang, 'default_customer_invoice_transmit_method_code': customer_invoice_transmit_method_code, 'default_supplier_invoice_transmit_method_code': supplier_invoice_transmit_method_code, 'default_street3': street3}</attribute>
</field>
</field>
</record>
</odoo>

View File

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

View File

@@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# Copyright 2018 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Account Invoice Update Wizard',
'version': '8.0.1.0.0',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Wizard to update non-legal fields of an open/paid invoice',
'description': """
Account Invoice Update Wizard
=============================
This module adds a button *Update Invoice* on Customer and Supplier invoices in Open or Paid state. This button starts a wizard which allows the user to update non-legal fields of the invoice:
* Source Document
* Reference/Description
* Payment terms (update allowed only to a payment term with same number of terms of the same amount and on invoices without any payment)
* Bank Account
* Salesman
* Notes
* Description of invoice lines
* Analytic account
* Analytic tags
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['account'],
'data': [
'wizard/account_invoice_update_view.xml',
'views/account_invoice.xml',
],
'installable': True,
}

View File

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

View File

@@ -0,0 +1,198 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
from odoo.exceptions import UserError
class TestAccountInvoiceUpdateWizard(TransactionCase):
def setUp(self):
super(TestAccountInvoiceUpdateWizard, self).setUp()
self.customer12 = self.env.ref('base.res_partner_12')
self.product16 = self.env.ref('product.product_product_16')
self.product24 = self.env.ref('product.product_product_24')
uom_unit = self.env.ref('product.product_uom_categ_unit')
self.invoice1 = self.env['account.invoice'].create({
'name': 'Test invoice',
'partner_id': self.customer12.id,
})
self.inv_line1 = self.env['account.invoice.line'].create({
'invoice_id': self.invoice1.id,
'name': "Line1",
'product_id': self.product16.id,
'product_uom_id': uom_unit.id,
'account_id': self.invoice1.account_id.id,
'price_unit': 42.0,
})
self.inv_line2 = self.env['account.invoice.line'].create({
'invoice_id': self.invoice1.id,
'name': "Line2",
'product_id': self.product24.id,
'product_uom_id': uom_unit.id,
'account_id': self.invoice1.account_id.id,
'price_unit': 1111.1,
})
self.aa1 = self.env.ref('analytic.analytic_partners_camp_to_camp')
self.aa2 = self.env.ref('analytic.analytic_nebula')
self.atag1 = self.env.ref('analytic.tag_contract')
self.atag2 = self.env['account.analytic.tag'].create({
'name': u'',
})
def create_wizard(self):
UpdateWizard = self.env['account.invoice.update'].with_context(
active_model='account.invoice',
active_id=self.invoice1.id)
self.wiz = UpdateWizard.create({})
def test_add_analytic_account_line1(self):
""" Add analytic account on an invoice line
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()
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()
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()
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()
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()
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()
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()
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

@@ -0,0 +1,29 @@
<?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="invoice_supplier_form" model="ir.ui.view">
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<button name="action_invoice_cancel" position="before">
<button name="%(account_invoice_update_action)d" type="action" string="Update Invoice" states="open,paid" groups="account.group_account_invoice"/>
</button>
</field>
</record>
<record id="invoice_form" model="ir.ui.view">
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<button name="action_invoice_cancel" position="before">
<button name="%(account_invoice_update_action)d" type="action" string="Update Invoice" states="open,paid" groups="account.group_account_invoice"/>
</button>
</field>
</record>
</odoo>

View File

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

View File

@@ -0,0 +1,308 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# Copyright 2018 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields, api, _
from odoo.exceptions import UserError
import odoo.addons.decimal_precision as dp
class AccountInvoiceUpdate(models.TransientModel):
_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')
line_ids = fields.One2many(
'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']
@api.model
def _m2o_fields2update(self):
return ['payment_term_id', 'user_id', 'partner_bank_id']
@api.model
def _prepare_default_get(self, invoice):
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,
}])
return res
@api.model
def default_get(self, fields_list):
res = super(AccountInvoiceUpdate, self).default_get(fields_list)
assert self._context.get('active_model') == 'account.invoice',\
'active_model should be account.invoice'
inv = self.env['account.invoice'].browse(self._context['active_id'])
res = self._prepare_default_get(inv)
return res
@api.onchange('type')
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])]"
else:
res['domain']['partner_bank_id'] =\
"[('partner_id', '=', partner_id)]"
return res
@api.multi
def _prepare_invoice(self):
vals = {}
inv = self.invoice_id
for sfield in self._simple_fields2update():
if self[sfield] != inv[sfield]:
vals[sfield] = self[sfield]
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 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)]
return vals
@api.multi
def _prepare_move(self):
mvals = {}
inv = self.invoice_id
ini_ref = inv.move_id.ref
ref = inv.reference or inv.name
if ini_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):
# 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]
new_pterm = {} # key = int(amount * 100), value = [date1, date2]
for entry in term_res:
amount = int(entry[1] * 10 * prec)
if amount in new_pterm:
new_pterm[amount].append(entry[0])
else:
new_pterm[amount] = [entry[0]]
mlines = {} # key = int(amount * 100), value : [line1, line2]
for line in inv.move_id.line_ids:
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.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))
for line in lines:
line.date_maturity = new_pterm[iamount].pop()
@api.multi
def run(self):
self.ensure_one()
inv = self.invoice_id
updated = False
# re-write date_maturity on move line
self._update_payment_term_move()
ivals = self._prepare_invoice()
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 updated:
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'
parent_id = fields.Many2one(
'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)
quantity = fields.Float(
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')

View File

@@ -0,0 +1,53 @@
<?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">
<field name="invoice_line_id" invisible="1"/>
<field name="name"/>
<field name="quantity"/>
<field name="price_subtotal"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
<field name="analytic_tag_ids" groups="analytic.group_analytic_accounting" widget="many2many_tags"/>
</tree>
</field>
</group>
<footer>
<button name="run" type="object" class="oe_highlight" string="Update"/>
<button special="cancel" string="Cancel" class="oe_link"/>
</footer>
</form>
</field>
</record>
<record id="account_invoice_update_action" model="ir.actions.act_window">
<field name="name">Invoice Update Wizard</field>
<field name="res_model">account.invoice.update</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</odoo>

View File

@@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2016-2018 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Account Move Line Filter Wizard',
'version': '10.0.2.0.0',
'category': 'Accounting',
'license': 'AGPL-3',
'summary': 'Easy and fast access to the details of an account',
'description': """
Account Move Line Filter Wizard
===============================
This module adds a *Show Account* wizard under *Accounting > Adviser*. This wizard gives an easy and fast access to the details of an account:
* access to the General Ledger Report,
* access to the Open Items Report (if the user selected a reconciliable account and the Unreconciled filter),
* access to the Journal Items view.
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',
'account_financial_report_qweb',
'account_fiscal_year',
],
'data': ['wizard/account_move_line_filter_view.xml'],
'installable': True,
}

View File

@@ -1,43 +0,0 @@
# -*- 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': True,
}

View File

@@ -1,54 +1,62 @@
# -*- 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/>.
#
##############################################################################
# Copyright 2016-2018 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import models, fields, api
from odoo import models, fields, api, _
from odoo.exceptions import UserError
class AccountMoveLineFilterWizard(models.TransientModel):
_name = 'account.move.line.filter.wizard'
_description = 'Wizard for easy and fast access to account move lines'
date_range_id = fields.Many2one(
'date.range', string='Date Range (only for General Ledger)')
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')
domain=[('deprecated', '=', False)], required=True)
account_reconcile = fields.Boolean(
related='account_id.reconcile', readonly=True)
reconcile = fields.Selection([
('unreconciled', 'Unreconciled'),
('unreconciled', 'Unreconciled or Partially Reconciled'),
('reconciled', 'Fully Reconciled'),
('partial_reconciled', 'Partially Reconciled'),
# ('partial_reconciled', 'Partially Reconciled'),
], string='Reconciliation Filter')
@api.model
def default_get(self, fields_list):
res = super(AccountMoveLineFilterWizard, self).default_get(fields_list)
today = fields.Date.context_today(self)
fy_type_id = self.env.ref('account_fiscal_year.fiscalyear').id
dro = self.env['date.range']
date_range = dro.search([
('type_id', '=', fy_type_id),
('company_id', '=', self.env.user.company_id.id),
('date_start', '<=', today),
('date_end', '>=', today)
], limit=1)
if not date_range:
date_range = dro.search([
('type_id', '=', fy_type_id),
('company_id', '=', self.env.user.company_id.id),
], order='date_start desc', limit=1)
if date_range:
res['date_range_id'] = date_range.id
return res
@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
self.partner_id.property_account_receivable_id.id
else:
self.account_id = self.partner_id.property_account_payable.id
self.account_id =\
self.partner_id.property_account_payable_id.id
@api.multi
def go(self):
self.ensure_one()
action = self.env['ir.actions.act_window'].for_xml_id(
@@ -60,3 +68,33 @@ class AccountMoveLineFilterWizard(models.TransientModel):
if self.reconcile:
action['context']['search_default_%s' % self.reconcile] = True
return action
def show_report_general_ledger(self):
self.ensure_one()
if self.account_reconcile:
assert self.reconcile != 'unreconciled'
if not self.date_range_id:
raise UserError(_(
"Select a date range to show the General Ledger report."))
wvals = {
'account_ids': [(6, 0, [self.account_id.id])],
'date_from': self.date_range_id.date_start,
'date_to': self.date_range_id.date_end,
}
if self.partner_id:
wvals['partner_ids'] = [(6, 0, [self.partner_id.id])]
wiz = self.env['general.ledger.report.wizard'].create(wvals)
action = wiz.button_export_html()
return action
def show_report_open_items(self):
self.ensure_one()
assert self.account_reconcile and self.reconcile == 'unreconciled'
wvals = {
'account_ids': [(6, 0, [self.account_id.id])],
}
if self.partner_id:
wvals['partner_ids'] = [(6, 0, [self.partner_id.id])]
wiz = self.env['open.items.report.wizard'].create(wvals)
action = wiz.button_export_html()
return action

View File

@@ -1,36 +1,38 @@
<?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
Copyright (C) 2016-2019 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<openerp>
<data>
<odoo>
<record id="account_move_line_filter_wizard_form" model="ir.ui.view">
<field name="name">account_move_line_filter_wizard_form</field>
<field name="model">account.move.line.filter.wizard</field>
<field name="arch" type="xml">
<form string="Account Move Lines">
<form string="Show Account">
<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)]}"/>
<field name="date_range_id" attrs="{'invisible': [('account_reconcile', '=', True), ('reconcile', '=', 'unreconciled')]}"/>
</group>
<footer>
<button type="object" name="go" string="Go" class="oe_highlight"/>
<button special="cancel" string="Cancel" class="oe_link"/>
<button type="object" name="show_report_general_ledger" string="General Ledger Report" class="btn-primary" attrs="{'invisible': [('account_reconcile', '=', True), ('reconcile', '=', 'unreconciled')]}"/>
<button type="object" name="show_report_open_items" string="Open Items Report" class="btn-primary" attrs="{'invisible': ['|', ('account_reconcile', '=', False), ('reconcile', '!=', 'unreconciled')]}"/>
<button type="object" name="go" string="Journal Items" class="btn-primary"/>
<button special="cancel" string="Cancel" class="btn-default"/>
</footer>
</form>
</field>
</record>
<record id="account_move_line_filter_wizard_action" model="ir.actions.act_window">
<field name="name">Journal Items of Account</field>
<field name="name">Show Account</field>
<field name="res_model">account.move.line.filter.wizard</field>
<field name="view_mode">form</field>
<field name="target">new</field>
@@ -42,5 +44,4 @@
sequence="-1"/>
</data>
</openerp>
</odoo>

View File

@@ -40,5 +40,5 @@ This module has been written by Alexis de Lattre from Akretion
'website': 'http://www.akretion.com/',
'depends': ['account_cutoff_prepaid', 'account_move_line_report_xls'],
'data': [],
'installable': True,
'installable': False,
}

View File

@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Account No Analytic Tags',
'version': '10.0.1.0.0',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'No Analytic Tags in Accounting',
'description': """
Account No Analytic Tags
========================
This module hides analytic tags on invoices and move lines.
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['account', 'base_usability'],
'data': ['account_view.xml'],
'installable': True,
}

View File

@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2017 Akretion (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<!-- INVOICE -->
<record id="invoice_supplier_form" model="ir.ui.view">
<field name="name">account_no_analytic_tags.supplier.invoice.form</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='analytic_tag_ids']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
</field>
</record>
<record id="invoice_form" model="ir.ui.view">
<field name="name">account_no_analytic_tags.invoice.form</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='analytic_tag_ids']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
</field>
</record>
<!-- ACCOUNT MOVE LINE -->
<record id="view_move_line_form" model="ir.ui.view">
<field name="name">account_no_analytic_tags.move.line.form</field>
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.view_move_line_form"/>
<field name="arch" type="xml">
<field name="analytic_tag_ids" position="attributes">
<attribute name="invisible">1</attribute>
</field>
</field>
</record>
<!-- ANALYTIC ACCOUNT -->
<record id="view_account_analytic_account_form" model="ir.ui.view">
<field name="name">account_no_analytic_tags.analytic.account.form</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
<field name="arch" type="xml">
<field name="tag_ids" position="attributes">
<attribute name="invisible">1</attribute>
</field>
</field>
</record>
<record id="account.account_analytic_tag_menu" model="ir.ui.menu">
<field name="groups_id" eval="[(6, 0, [ref('base_usability.group_nobody')])]"/>
</record>
</odoo>

View File

@@ -1,24 +0,0 @@
# -*- 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

View File

@@ -1,40 +0,0 @@
# -*- 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/>.
#
##############################################################################
{
'name': 'Account Payment Force Maturity Date',
'version': '1.0',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Add a Force Maturity Date field on payment lines',
'description': """
Account Payment Force Maturity Date
===================================
This module adds a field *Force Maturity Date* on payment lines. If this field is set, the maturity date of the payment line will take the value of this field instead of taking the value of the maturity date of the related account move line.
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
""",
'author': 'Akretion',
'depends': ['account_payment'],
'data': ['payment_view.xml'],
}

View File

@@ -1,27 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_force_maturity_date
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-05-06 15:02+0000\n"
"PO-Revision-Date: 2015-05-06 15:02+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_payment_force_maturity_date
#: field:payment.line,force_maturity_date:0
msgid "Force Due Date"
msgstr ""
#. module: account_payment_force_maturity_date
#: model:ir.model,name:account_payment_force_maturity_date.model_payment_line
msgid "Payment Line"
msgstr ""

View File

@@ -1,27 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_force_maturity_date
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-05-06 15:03+0000\n"
"PO-Revision-Date: 2015-05-06 15:03+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_payment_force_maturity_date
#: field:payment.line,force_maturity_date:0
msgid "Force Due Date"
msgstr "Force la date d'échéance"
#. module: account_payment_force_maturity_date
#: model:ir.model,name:account_payment_force_maturity_date.model_payment_line
msgid "Payment Line"
msgstr "Ligne de paiement"

View File

@@ -1,42 +0,0 @@
# -*- 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 openerp import models, fields, api
class PaymentLine(models.Model):
_inherit = 'payment.line'
@api.one
@api.depends(
'move_line_id', 'move_line_id.date_maturity', 'force_maturity_date')
def _compute_ml_maturity_date(self):
ml_maturity_date = False
if self.force_maturity_date:
ml_maturity_date = self.force_maturity_date
elif self.move_line_id:
ml_maturity_date = self.move_line_id.date_maturity
self.ml_maturity_date = ml_maturity_date
ml_maturity_date = fields.Date(compute='_compute_ml_maturity_date')
force_maturity_date = fields.Date(string='Force Due Date')

View File

@@ -1,23 +0,0 @@
<?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_payment_order_form" model="ir.ui.view">
<field name="name">hide.communication2.on.payment.line.form</field>
<field name="model">payment.order</field>
<field name="inherit_id" ref="account_payment.view_payment_order_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='line_ids']/form//field[@name='ml_inv_ref']" position="after">
<field name="force_maturity_date"/>
</xpath>
</field>
</record>
</data>
</openerp>

View File

@@ -1,21 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Account Payment Hide Communication2 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/>.
#
##############################################################################

View File

@@ -1,43 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Account Payment Hide Communication2 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 Payment Hide Communication2',
'version': '1.0',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Hide the field Communication2 on Payment Lines',
'description': """
Account Payment Hide Communication2
===================================
This module hides the field 'Communication2' on the form view of Payment Lines. I consider that is field is useless and tend to confuse users.
Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for any help or question about this module.
""",
'author': 'Akretion',
'depends': ['account_payment'],
'data': [
'payment_view.xml',
],
'active': False,
}

View File

@@ -1,23 +0,0 @@
<?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="view_payment_order_form" model="ir.ui.view">
<field name="name">hide.communication2.on.payment.line.form</field>
<field name="model">payment.order</field>
<field name="inherit_id" ref="account_payment.view_payment_order_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='line_ids']/form//field[@name='communication2']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
</field>
</record>
</data>
</openerp>

View File

@@ -1,21 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Account Payment Security 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/>.
#
##############################################################################

View File

@@ -1,45 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Account Payment Security 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 Payment Security',
'version': '1.0',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Only members of Account Payment can create/write on bank accounts',
'description': """
Account Payment Security
========================
By default in OpenERP, members of the group *Contact Creation* can create and modify bank accounts ; this can be a risk, as explained in this mail : https://lists.launchpad.net/openerp-community/msg01035.html
With this module, only the members of the group *Accounting / Payments* can create and modify bank accounts. Also, some rights on the configuration of bank accounts (res.partner.bank.type and res.partner.bank.type.field) are moved from the group *Contact Creation* to *Financial Manager*.
Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for any help or question about this module.
""",
'author': 'Akretion',
'depends': ['account_payment'],
'data': [
'security/ir.model.access.csv',
],
'active': False,
}

View File

@@ -1,5 +0,0 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
base.access_res_partner_bank_group_partner_manager,Full access on res.partner.bank to Account Payment,base.model_res_partner_bank,account_payment.group_account_payment,1,1,1,1
base.access_res_bank_group_partner_manager,Full access on res.bank to Account Payment,base.model_res_bank,account_payment.group_account_payment,1,1,1,1
base.access_res_partner_bank_type_group_partner_manager,Full access on res.partner.bank.type to Financial Manager,base.model_res_partner_bank_type,account.group_account_manager,1,1,1,1
base.access_res_partner_bank_type_field_group_partner_manager,Full access on res.partner.bank.type.field to Financial Manager,base.model_res_partner_bank_type_field,account.group_account_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 base.access_res_partner_bank_group_partner_manager Full access on res.partner.bank to Account Payment base.model_res_partner_bank account_payment.group_account_payment 1 1 1 1
3 base.access_res_bank_group_partner_manager Full access on res.bank to Account Payment base.model_res_bank account_payment.group_account_payment 1 1 1 1
4 base.access_res_partner_bank_type_group_partner_manager Full access on res.partner.bank.type to Financial Manager base.model_res_partner_bank_type account.group_account_manager 1 1 1 1
5 base.access_res_partner_bank_type_field_group_partner_manager Full access on res.partner.bank.type.field to Financial Manager base.model_res_partner_bank_type_field account.group_account_manager 1 1 1 1

View File

@@ -1,3 +1,7 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
from . import account
from . import account_invoice_report
from . import partner
from . import product
from . import wizard

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