Compare commits

..

716 Commits

Author SHA1 Message Date
clementmbr
9333386663 [UPD] french translation on purchase_usability 2021-12-06 12:28:27 +01:00
clementmbr
34793b639f [IMP] purchase_usability: add invoice_status on PO line 2021-12-06 12:28:27 +01:00
Kev-Roche
4520b7d761 [TRAD][14.0] French traduction purchase_usability 2021-12-06 12:28:27 +01:00
Kevin.roche
dbedf6145f [ADD] stock_reception_usability 2021-12-06 12:28:27 +01:00
Alexis de Lattre
e5cad2635d stock_valuation_xlsx: first port to v14 without price history (when you ask for a past price, you get the current price for the moment) 2021-12-06 12:28:27 +01:00
Alexis de Lattre
6322930535 [MIG] link_tracker_usability from v10 to v14
Prepare port of mass_mailing_usability... but no real port for the moment
2021-12-06 12:28:27 +01:00
Alexis de Lattre
747d2fa71d mass_mailing_usability: Fix dependencies 2021-12-06 12:28:27 +01:00
Alexis de Lattre
d3c0ad87a7 Add module mass_mailing_usability
Improve module link_tracker_usability
2021-12-06 12:28:27 +01:00
Alexis de Lattre
5c55ac7f1c New module link_tracker_usability 2021-12-06 12:28:27 +01:00
Alexis de Lattre
4873b8bd21 [MIG] base_partner_ref from v12 to v14 2021-12-06 12:28:27 +01:00
Alexis de Lattre
5e4d1b3c8d [MIG] crm_usability from v10 to v14
New module sales_team_usability (remove translation on crm.tag, which
was in crm_usability in v10)
2021-12-06 12:28:27 +01:00
Alexis de Lattre
646833ca66 Add multi-company ir.rule for crm.lead 2021-12-06 12:28:27 +01:00
Alexis de Lattre
c656c36bd6 Add groupby on partner on opportunity search view 2021-12-06 12:28:27 +01:00
David Beal
c3da55844d FIX branding 2021-12-06 12:28:27 +01:00
Alexis de Lattre
008e88455b translate=False on 'name' field of crm.lead.tag and res.partner.category 2021-12-06 12:28:27 +01:00
Alexis de Lattre
6d6c8da3eb Work on usability of CRM 2021-12-06 12:28:27 +01:00
David Beal
243e839cd9 IMP add icons 2021-12-06 12:28:27 +01:00
clementmbr
227a6f1568 [IMP] add domain on origin and destination location for stock.moves in picking view 2021-12-06 12:28:27 +01:00
clementmbr
a9721bae90 product_usability: Improve filter domain on supplier product names 2021-12-06 12:28:27 +01:00
Alexis de Lattre
60ef95ad81 account_usability: FIX display of decimal precision of sale price in product form view 2021-12-06 12:28:27 +01:00
Alexis de Lattre
4862bbc8d6 Remove modules pos_no_product_template_menu and sale_purchase_no_product_template_menu
We won't port those modules to v14
2021-12-06 12:28:27 +01:00
Alexis de Lattre
e4c50723e3 Improve register payment wizard view 2021-12-06 12:28:27 +01:00
Alexis de Lattre
0be112dc84 Improve pos_usability
Fix FR translation of base_partner_one2many_phone to avoid a crash when loading the FR translation
2021-10-30 00:40:33 +02:00
Kevin.roche
2854d4fdda [IMP] sale_usability: access to sale orders from invoice view 2021-10-21 22:51:08 +02:00
Alexis de Lattre
6c51a92acc account_usability: delete invoice PDF attachment when putting a customer invoice/refund back to draft
This feature was native up to v12, but was forgotten in the invoice/move merge of v13
2021-10-21 22:48:51 +02:00
Alexis de Lattre
f3910ab528 account_usability: remove field default_move_line_name which we don't use any more 2021-10-20 23:29:04 +02:00
clementmbr
05374c4b4a [FIX] mrp_usability: button action for BoMs needs _for_xml_id()
Avoiding blocking access for users without Admin rigts
2021-10-11 22:16:59 +02:00
Alexis de Lattre
f6ddbb48ac [MIG] stock_picking_type_default_partner from v10 to v14 2021-10-01 21:21:31 +02:00
Alexis de Lattre
d3bddf5fda Port stock_picking_type_default_partner to v10 2021-10-01 21:13:11 +02:00
Alexis de Lattre
6f3a468a7c Mass rename from __openerp__.py to __manifest__.py 2021-10-01 21:13:11 +02:00
Alexis de Lattre
0bfa960153 Set all modules as uninstallable 2021-10-01 21:13:11 +02:00
Alexis de Lattre
a520ccff51 Add module stock_picking_type_default_partner 2021-10-01 21:13:11 +02:00
Alexis de Lattre
fa7611eb08 Push missing file 2021-10-01 21:11:30 +02:00
Alexis de Lattre
b2eda2a23b [MIG] sale_confirm_wizard from v10 to v14 2021-10-01 21:10:54 +02:00
Alexis de Lattre
74ff1b5cb5 sale_confirm_wizard: add ability to skip wizard via inherit in some scenarios 2021-10-01 20:52:44 +02:00
Alexis de Lattre
a7b4ed65eb sale_confirm_wizard: don't show main block when sale_warn = block 2021-10-01 20:52:44 +02:00
Alexis de Lattre
7dfb32c2d6 sale_confirm_warning: add sale_warn 2021-10-01 20:52:44 +02:00
Alexis de Lattre
d081bb0fd2 Add module sale_force_invoice_status 2021-10-01 20:52:44 +02:00
Alexis de Lattre
f3fdbec140 Add module sale_confirm_wizard 2021-10-01 20:52:44 +02:00
Alexis de Lattre
ac54c5cc75 Register payment on account.move form view is not highlighted any more 2021-09-30 20:37:00 +02:00
Alexis de Lattre
78c11411c3 Add filter on inventory lines
Always show field prefill_counted_quantity on inventory form
2021-09-26 22:49:24 +02:00
Alexis de Lattre
28ce11b216 stock.inventory improvement 2021-09-26 20:10:58 +02:00
Alexis de Lattre
00e034dacf Show invoice_origin on move form 2021-09-22 14:56:40 +02:00
Alexis de Lattre
8510b9518a Add module hr_contract_usability 2021-09-14 23:45:05 +02:00
Alexis de Lattre
15ef5df155 account_usability: add account_type in res.partner.bank tree view embedded in partner form view 2021-09-09 18:06:56 +00:00
Alexis de Lattre
a28a853f45 base_usabilty: translate=False on print_report_name 2021-08-28 00:00:07 +02:00
Alexis de Lattre
82b9a1e502 Move tracking=True for res.partner fields to mail_usability 2021-08-27 12:10:34 +02:00
Alexis de Lattre
b05abba064 [MIG] sale_order_route to v14 2021-08-26 23:18:37 +02:00
Alexis de Lattre
75e3463a76 Add name_search in base_partner_ref 2021-08-26 23:06:38 +02:00
Alexis de Lattre
3066c0545d Add print buttons in direct access on sale.order and account.invoice 2021-08-26 12:44:50 +02:00
Alexis de Lattre
62a84469c8 [FIX] account_usability: line order in py3o report 2021-08-26 10:45:59 +02:00
Alexis de Lattre
00339e44b6 MIG delivery_usability to v14 2021-08-25 21:57:43 +02:00
Alexis de Lattre
d1ae620079 Add product_barcode with optional=hide in tree view of inventory lines and quants 2021-08-25 20:29:46 +02:00
Alexis de Lattre
3db9f0f096 MIG eradicate_quick_create to v14 2021-08-25 18:25:17 +02:00
Alexis de Lattre
732ee2c55b base_dynamic_list: update module desc 2021-08-24 22:59:25 +02:00
Alexis de Lattre
e08d658b25 [MIG] base_dynamic_list from v10 to v14 2021-08-24 21:54:06 +02:00
Alexis de Lattre
2a7ec92a37 Add archive filter 2021-08-24 21:43:14 +02:00
Alexis de Lattre
dc30ce4e69 Add index=True on domain 2021-08-24 21:43:14 +02:00
Alexis de Lattre
32d45d228b Add new module base_dynamic_list 2021-08-24 21:43:14 +02:00
Alexis de Lattre
939de0c9bd base_partner_one2many_phone: improve country handling in phone reformat 2021-08-23 18:50:43 +02:00
Alexis de Lattre
48a19b8f97 stock_usability: remove unnecessary inherit (native colors ok) 2021-07-20 13:09:11 +02:00
Alexis de Lattre
8a2e662d43 base_usability: update FR translation 2021-07-01 19:20:59 +02:00
Alexis de Lattre
de2e5f2121 stock_account_usability: show to_refund on stock.move form 2021-05-21 11:29:18 +02:00
Alexis de Lattre
42e014bcb1 sale_usability: add no-attachment filter on sale.order
account_usability: small code improvement on has_attachment
2021-05-20 19:29:31 +02:00
Alexis de Lattre
e70e3b23cf Improve picking view 2021-04-28 11:51:30 +02:00
Alexis de Lattre
50b4944c8b Always show location_id on stock inventory line 2021-04-28 11:34:28 +02:00
Alexis de Lattre
96bfda6e1b Add product_barcode in SO lines, PO lines, stock move lines and invoice lines with optional="hide"
Show warning about double VAT partner even when not in editable mode
2021-04-28 11:27:04 +02:00
Alexis de Lattre
cfb58ed80f Add inherit of account.move.line filter view 2021-04-27 16:25:50 +02:00
Alexis de Lattre
91e9c1fe33 account_usability: allow to manually create a journal item in cash and check journals 2021-04-22 23:58:03 +02:00
Alexis de Lattre
dff4e47cf5 Add sudo() to access ir.actions.act_windows... stupid v14! 2021-04-14 08:13:53 +02:00
Alexis de Lattre
452cc399c5 stock_usability: add button to access stock moves before button to access product moves, because stock moves are more important than product moves 2021-04-12 21:29:23 +02:00
Clément Mombereau
f4c22501a7 Merge pull request #144 from akretion/14.0-fix-message-post-picking
[FIX] picking.message_post() needs explicit 'body' argument
2021-04-07 00:53:22 +02:00
clementmbr
9e8874eb4b [FIX] picking.message_post() needs explicit 'body' argument 2021-04-07 00:04:02 +02:00
Alexis de Lattre
fc6c0384ed stock_usability: create ir.config_parameter stock.no_default_immediate_tranfer=True upon install 2021-04-01 11:47:12 +02:00
Alexis de Lattre
96bd915c4f Add reconcile field in account.account form view 2021-03-04 11:30:32 +01:00
beau sebastien
f61296cafc Merge pull request #140 from akretion/14.0-mig-product_no_translation
[14.0][MIG] product_no_translation: Migrate to 14.0
2021-02-18 18:47:25 +01:00
Sébastien BEAU
b585d06489 [FIX] fix duplicated label 2021-02-18 18:43:02 +01:00
Alexis de Lattre
cef81ad749 Add Tax include / tax exclude next the prices on product form view 2021-02-18 09:48:17 +01:00
Alexis de Lattre
7c1a2fabd3 base_usability: add supplier_ref in display_full_address, to have the proper label for POs 2021-02-17 18:07:43 +01:00
Alexis de Lattre
c3f72a9b68 base_usability: Add vat, ref and commercial_ref in _display_full_address()
Add fr translation
2021-02-17 17:49:00 +01:00
Alexis de Lattre
a0d73834ad sale_usability: code cleanup 2021-02-17 15:37:52 +01:00
Alexis de Lattre
66ebc5c6ad account_usability: Fix py3o method 2021-02-17 15:14:54 +01:00
Alexis de Lattre
5c06d79b69 base_partner_one2many_phone: email field on res.partner is now really invisible in form view (it was replaced by the mail module) 2021-02-04 12:34:01 +01:00
Alexis de Lattre
034c89b399 Forgot a file in my previous commit ! 2021-02-03 18:54:31 +01:00
Alexis de Lattre
6356171619 Merge branch '14.0' of github.com:akretion/odoo-usability into 14.0 2021-02-03 18:48:10 +01:00
Alexis de Lattre
771001ca2e [MIG] purchase_stock_usability to v14 2021-02-03 18:47:44 +01:00
Alexis de Lattre
45d734badf Fix access rights in product_print_zpl_barcode
In odoo v14, read of ir.actions.act_windows is restricted to base.group_system
2021-02-03 18:05:03 +01:00
Alexis de Lattre
0d4ff37786 pos_usability: add missing check_company=True on pos.payment.method, field cash_journal_id 2021-02-03 11:53:22 +01:00
Alexis de Lattre
9c30d4ef53 stock_usability: responsible_id is now hidden by default in tree view 2021-02-02 18:40:27 +01:00
Alexis de Lattre
b2ce8f0aca MIG *_product_tree_default to v14
Add module pos_product_tree_default
Improve orderpoint views
2021-02-02 18:33:03 +01:00
Alexis de Lattre
183bba3752 product_usability: make seller_id a stored field, for those who want to display in tree view
Add tracking on some fields
2021-02-02 09:59:26 +01:00
Alexis de Lattre
92742dfc9d product_usability: Improve tree view of supplierinfo 2021-02-01 19:55:43 +01:00
Alexis de Lattre
f30bf4791a purchase_usability: add py3o_lines_layout() 2021-02-01 17:54:26 +01:00
Alexis de Lattre
ca6de3adf6 [MIG] pos_usability to v14 2021-02-01 13:41:38 +01:00
Kevin Khao
5e2d25f7c4 [14.0][MIG] product_no_translation: Migrate to 14.0 2021-01-26 11:45:42 +01:00
Alexis de Lattre
d64262099b Update readme 2021-01-22 17:12:02 +01:00
Alexis de Lattre
6ad589d4bd Merge branch '14.0' of github.com:akretion/odoo-usability into 14.0 2021-01-22 15:01:14 +01:00
Alexis de Lattre
5496aa38f8 product_print_zpl_barcode: Add support for barcode generation
Add support for EAN-8 (in additional to EAN-13)
2021-01-22 15:00:14 +01:00
Sébastien BEAU
b7c0b4720c [FIX] remove dependency on sale_product_configurator 2021-01-22 07:36:22 +01:00
Sébastien BEAU
bd25fe4866 [FIX] fix inherit 2021-01-21 22:44:18 +01:00
beau sebastien
c3da933e62 Merge pull request #135 from akretion/14.0-mig-sale_no_optional_product-sale_no_preview_button
[14.0][MIG] sale_no_optional_product, sale_no_preview_button: migration to 14.0
2021-01-21 16:18:45 +01:00
Kevin Khao
1d8a72828c [14.0][MIG] sale_no_optional_product, sale_no_preview_button: migration to 14.0 2021-01-21 11:49:48 +01:00
Alexis de Lattre
20af679569 Add tracking on bom fields 2021-01-13 16:01:20 +01:00
Alexis de Lattre
48dc98d08b [FIX] product_print_zpl_barcode: don't block when printer field is empty in default_get() 2020-12-18 20:40:20 +01:00
Alexis de Lattre
835a7e3c35 stock_usability: remote import of wizard 2020-12-17 12:22:18 +01:00
Alexis de Lattre
a3cac9e82d [MIG] product_manager_group and product_manager_group_stock
Avoid problems when installing base_partner_one2many_phone
2020-12-16 18:38:08 +01:00
Alexis de Lattre
a90965109d [MIG] base_company_extension to v14
product_usability: add seller_id field
base_usability: write/create rights on res.partner.title to base.group_system (instead of partner manager)
sale_stock_usability: move warehouse_id to top
stock_usabiluty: type on product set to 'product' by default
2020-12-15 18:34:20 +01:00
Alexis de Lattre
6682c9e048 [MIG] pos_config_single_user 2020-12-15 12:56:07 +01:00
Alexis de Lattre
5a9476422c [MIG] base_partner_one2many_phone from v10 to v14 2020-12-15 12:35:14 +01:00
Alexis de Lattre
bf27beadae base_partner_one2many_phone: add compute_sudo=True 2020-12-15 11:33:38 +01:00
Alexis de Lattre
3b67f46b4c one2many_phone: Workaround a bug "Record does not exist or has been deleted." 2020-12-15 11:33:38 +01:00
Alexis de Lattre
dd00d34d43 one2many_phone: Update search view 2020-12-15 11:33:38 +01:00
Alexis de Lattre
94ca97d3f0 Update translation for base_partner_one2many_phone 2020-12-15 11:33:38 +01:00
Alexis de Lattre
3d4354cd67 base_partner_one2many_phone: improve mig script, add form view for res.partner.phone 2020-12-15 11:33:38 +01:00
Alexis de Lattre
cb625d4e1a Big update of base_partner_one2many_phone: new types, add email support
Migration script provided
2020-12-15 11:33:38 +01:00
Alexis de Lattre
ee0dfb29d6 Add post_install.py script for data migration 2020-12-15 11:33:38 +01:00
David Beal
78ef2a0ebe UPD Branding 2020-12-15 11:33:38 +01:00
Alexis de Lattre
977dae3eae Add ACL + name_get() for one2many_phone module 2020-12-15 11:33:38 +01:00
Alexis de Lattre
210ac987a0 base_partner_one2many_phone: make it work with the asterisk connector 2020-12-15 11:33:38 +01:00
Alexis de Lattre
ad362a11ce Change menu position 2020-12-15 11:33:38 +01:00
Alexis de Lattre
c268e28b3d Add module pos_config_single_user
Several usability enhancements in sale, purchase, product and account
2020-12-15 11:33:38 +01:00
Alexis de Lattre
9aa4613dd7 FIX depend 2020-12-15 11:33:38 +01:00
Alexis de Lattre
4d177801c5 Clean-up code for one2many_phone 2020-12-15 11:33:38 +01:00
Alexis de Lattre
937a4e612f FIX key in manifest (would auto-install base_partner_one2many_phone !!!) 2020-12-15 11:33:38 +01:00
Alexis de Lattre
7e461670dd Add module base_partner_one2many_phone 2020-12-15 11:33:38 +01:00
Alexis de Lattre
87341b2cf3 [MIG] product_category_tax from v10 to v14 2020-12-15 11:01:03 +01:00
Alexis de Lattre
dc45655441 product_print_zpl_barcode: Avoid python warning 2020-12-15 10:30:26 +01:00
Alexis de Lattre
25df0f8837 MIG product_print_zpl_barcode from v10 to v14 2020-12-15 10:25:40 +01:00
Alexis de Lattre
0acc4a3439 Don't block when no read access on pos.config 2020-12-15 09:33:55 +01:00
Alexis de Lattre
dbc0f07caa Add module product_print_zpl_barcode 2020-12-15 09:33:55 +01:00
Alexis de Lattre
aeaa699638 product_category_tax: improve product.categ form view 2020-12-15 09:33:55 +01:00
Alexis de Lattre
40dc5485a9 Port product_category_tax to v10 2020-12-15 09:33:55 +01:00
Alexis de Lattre
eb91ae6a48 Mass rename from __openerp__.py to __manifest__.py 2020-12-15 09:33:55 +01:00
Alexis de Lattre
82f5f56438 Set all modules as uninstallable 2020-12-15 09:33:55 +01:00
David Beal
e8e2ccd1c2 [FIX] write in product_category_tax 2020-12-15 09:33:55 +01:00
David Beal
6711001019 [IMP] play onchange while import
[FIX] play onchange with write
2020-12-15 09:33:55 +01:00
Isabelle RICHARD
acb0c88ce1 [TRAD] Translate product_category_tax in french 2020-12-15 09:33:55 +01:00
Alexis de Lattre
444786c971 Horrible hack to avoid blocking the installion of the module pos_debt_notebook 2020-12-15 09:33:55 +01:00
Alexis de Lattre
1783ceb26a Fix product_category_tax : replace taxes instead of adding them 2020-12-15 09:33:55 +01:00
Alexis de Lattre
4feb258814 Add module product_category_tax 2020-12-15 09:33:55 +01:00
Alexis de Lattre
75b8bef3c4 Finalize migration of account_usability 2020-12-08 11:58:57 +01:00
Alexis de Lattre
17549ca457 [MIG] beta migration of account_usability 2020-12-07 23:48:29 +01:00
Alexis de Lattre
d72872eb90 [MIG] partner_tree_default to 3 modules: partner_tree_default_base, partner_tree_default_account and partner_tree_default_contacts 2020-12-03 23:48:14 +01:00
Alexis de Lattre
86ec56b610 Remove un-needed code in stock_account_usability
As the module is now empty, don't make it installable for the moment
2020-12-03 23:26:16 +01:00
Alexis de Lattre
7110f5afcc [MIG] mrp_usability to v14 2020-12-03 23:18:48 +01:00
Alexis de Lattre
92cf447add [MIG] sale_stock_usability 2020-12-03 22:43:10 +01:00
Alexis de Lattre
e060de7efc [MIG] stock_usability to v14 2020-12-03 00:17:57 +01:00
Alexis de Lattre
f818bb5895 [MIG] purchase_usability to v14 2020-12-02 21:32:47 +01:00
Alexis de Lattre
44a4f795d0 [MIG] sale_usability to v14 (with up-ports from v10) 2020-12-02 15:12:41 +01:00
Alexis de Lattre
e505e7e07f [MIG] product_usability to v14 2020-12-02 00:23:27 +01:00
Alexis de Lattre
f3782cfa2b [MIG] base_usability to v14 2020-12-01 23:38:42 +01:00
Alexis de Lattre
9592097487 Initialize v14.0 branch
Remove module stock_inventory_valuation_ods
2020-12-01 10:53:20 +01:00
Alexis de Lattre
03a57798b6 Add drill-through on purchase.report 2020-11-27 10:05:36 +01:00
Florian da Costa
22e9234d23 [FIX] Import failure if element is not part of the domain 2020-11-25 15:44:13 +01:00
Alexis de Lattre
ac89271d5b mrp_average_cost: Remove ACL that depend on sales_team (this module doesn't
depend on sales_team)
2020-11-15 14:36:10 +01:00
Alexis de Lattre
261442d903 Work it work with mrp_subcontracting (without depending on it) 2020-11-12 18:21:04 +01:00
Alexis de Lattre
d63c4b2433 [FIX] stock_valuation_xlsx: bad context key for past stock level 2020-11-03 17:24:36 +01:00
Florian
4dadc8047e Merge pull request #132 from akretion/12-account-fiscal-pos-pay-receivable
12 account fiscal pos pay receivable
2020-11-02 11:54:23 +01:00
Florian da Costa
34ec0dfa27 Black on account_fiscal_position_payable_receivable 2020-11-02 11:33:07 +01:00
Florian da Costa
7a6600431c Migrate account_fiscal_position_payable_receivable to v12 2020-11-02 11:32:38 +01:00
Alexis de Lattre
341717b75d Port account_fiscal_position_payable_receivable to v10 2020-11-02 11:25:52 +01:00
Raphaël Valyi
1061111f9b Merge pull request #130 from akretion/12.0-remove_oe_title_width
[FIX] Remove hard-coded width on product's title
2020-10-31 21:58:41 -03:00
Alexis de Lattre
d28a40e035 Update comment 2020-10-31 17:50:54 +01:00
clementmbr
3f06231c22 [FIX] Remove hard-coded width on product's title 2020-10-20 21:16:37 -03:00
Alexis de Lattre
67d31f9658 Display advanced fields in stock move form views 2020-10-13 17:22:34 +02:00
Alexis de Lattre
1b931d066b stock_usability: add tracking on is_locked field of pickings 2020-10-13 10:07:36 +02:00
David Beal
f605b56a5e FIX mrp_usability: define sold out in bottom page 2020-10-06 16:28:43 +02:00
David Beal
58f01d9673 FIX mrp_usability: round rupture value 2020-10-02 18:23:46 +02:00
David Beal
8878ab5bd1 IMP mrp_usability: define stock move in rupture 2020-10-02 18:13:59 +02:00
Alexis de Lattre
80f5341da0 [FIX] stock_valuation_xlsx: fix report when categ_subtotal is false 2020-09-25 23:57:56 +02:00
Alexis de Lattre
a4ca584e90 stock_valuation_xlsx: Add ability to force cost price to current
Improve headers in XLSX
Improve code
2020-09-25 22:51:39 +02:00
Alexis de Lattre
4d81dee7b4 stock_valuation_xlsx: Replace the right menu 2020-09-25 16:28:24 +02:00
Alexis de Lattre
140217da6e Port module stock_valuation_xlsx from v10 to v12 2020-09-25 16:16:14 +02:00
Sébastien BEAU
a9a0a2a999 [IMP] add module for hiding unwanted feature 2020-09-17 01:03:53 +02:00
Alexis de Lattre
d7f3a70d48 mrp_average_cost: improve code perf 2020-09-11 15:34:29 +02:00
Alexis de Lattre
1074fcba21 Show property_cost_method on product form view 2020-09-11 14:33:05 +02:00
beau sebastien
0ae76be885 Merge pull request #126 from akretion/12.0-MIG-product_no_translation
12.0 mig product no translation
2020-08-20 22:47:33 +02:00
Sébastien BEAU
59cdcbd173 [MIG] migrate product_no_tranlation 2020-08-20 22:44:21 +02:00
david.beal@akretion.com
7cf224cf23 [IMP] icon translation 2020-08-20 22:30:11 +02:00
Alexis de Lattre
d0d65ebbca product_no_translation : translate=False now on all fields declared in addons/product/product.py 2020-08-20 22:30:11 +02:00
Alexis de Lattre
ca10381be8 Add module product_no_translation 2020-08-20 22:30:11 +02:00
clementmbr
44b19dfe60 Merge pull request #124 from akretion/12.0-imp-button-prod-to-bom
[IMP] mrp_usability: improve smart button from products to BoMs
2020-08-05 16:04:24 -03:00
clementmbr
c082baa340 [IMP] mrp_usability: improve smart button from products to BoMs 2020-08-05 14:33:07 -03:00
Alexis de Lattre
15ee1b2f59 Up-port hide_bank_statement_balance on journal from v10
Inherit balance_check on account.bank.statement
2020-06-25 15:51:04 +02:00
clementmbr
b080dd11ab Merge pull request #123 from akretion/12.0-base-usability-remove-oe-title-width
[FIX] Remove hard-coded oe_title class width
2020-06-19 13:26:49 -03:00
clementmbr
568e6b41ac [FIX] Remove hard-coded oe_title class width
I've noticed that this hard-coded `width: 650px` was more than 5 years
old.
Now some specific CSS modules exists like OCA `web_responsive`
or Openworx `backend_theme` that are doing this kind of job in a much
better way... And this kind of hard-code is blocking them, so it looks
better to remove it and use these modules for CSS purpose.
2020-06-18 19:50:55 -03:00
David Beal
0dee23aeba Merge pull request #121 from ACT-Brideco/12-stock_user_default_warehouse_mrp
[12.0][MIG] stock_user_default_warehouse_mrp
2020-06-03 10:12:43 +02:00
David Beal
c7d1e13d0d Merge pull request #120 from ACT-Brideco/12-stock_user_default_warehouse_purchase
[12.0][MIG] stock_user_default_warehouse_purchase
2020-06-03 10:08:07 +02:00
David Beal
e7fae291ee Merge pull request #122 from ACT-Brideco/12-stock_user_default_warehouse_sale
[12.0][MIG] stock_user_default_warehouse_sale
2020-06-03 10:06:20 +02:00
David Beal
bdfe0ce20a Merge pull request #119 from ACT-Brideco/12-stock_user_default_warehouse_base
[12.0][MIG] stock_user_default_warehouse_base
2020-06-03 09:36:28 +02:00
Daniel Luque
32eafedf04 Adds README to stock_user_default_warehouse_base
Also removes class reference in super()
2020-06-02 15:08:30 +02:00
Daniel Luque
ba78791ab1 Adds README to stock_user_default_warehouse_sale 2020-06-02 15:00:12 +02:00
Daniel Luque
946d169665 Adds README to stock_user_default_warehouse_mrp 2020-06-02 14:54:09 +02:00
Daniel Luque
cd51a6784f Adds README to stock_user_default_warehouse_purchase 2020-06-02 14:45:36 +02:00
Alexis de Lattre
c01942b1a8 Add module service_line_qty_update_sale 2020-05-29 23:49:04 +02:00
Alexis de Lattre
e11b29deab Improve view 2020-05-29 23:23:27 +02:00
Alexis de Lattre
28be3e4e6a First working version of service_line_qty_update_* 2020-05-29 23:21:54 +02:00
Alexis de Lattre
5c7985a15c Add modules service_line_qty_update_base service_line_qty_update_purchase 2020-05-29 17:46:57 +02:00
Alexis de Lattre
9b6c34a860 Migrate stock_user_default_warehouse_sale from 10.0 2020-05-28 16:22:41 +02:00
Alexis de Lattre
f735f8a34d Migrate stock_user_default_warehouse_purchase from 10.0 2020-05-28 16:21:06 +02:00
Alexis de Lattre
74665bb2e8 Migrate stock_user_default_warehouse_mrp from 10.0 2020-05-28 15:33:38 +02:00
Alexis de Lattre
d1deeeac31 Migrate stock_user_default_warehouse_base from 10.0 2020-05-28 15:29:16 +02:00
Pierrick Brun
e96c3d72eb [ADD] Simple OCA-style Readme to several modules (#114) 2020-03-18 15:55:42 +01:00
Alexis de Lattre
a545c8dbb6 product-usability: remove field that was added in native view
Add delay in supplierinfo tree view
2020-02-20 22:00:40 +01:00
Alexis de Lattre
07824a0570 Add sale_id in procurement.group form view 2020-02-20 18:45:02 +01:00
Alexis de Lattre
12bd157ad4 sale_order_route: take into account the scenario where route_id has a value, then SO is cancelled+back to draft, then route_id = False and SO is confirmed again 2020-02-13 10:55:25 +01:00
Alexis de Lattre
53f6ab5d0f Fix version number 2020-02-04 16:15:04 +01:00
Mourad
cc88dd994b [FIX] update fr.po 2020-01-30 14:47:51 +01:00
Alexis de Lattre
b99659dcc9 Merge branch '12.0' of https://github.com/akretion/odoo-usability into 12.0 2020-01-14 16:58:36 +01:00
Alexis de Lattre
581bfe78d8 Finish port of intrastat_product_type 2020-01-14 16:58:20 +01:00
Alexis de Lattre
9a174c257d account_usability: add transfer_account_id to invoicing config page 2020-01-03 13:29:49 +01:00
Alexis de Lattre
941c610c96 sale_usability: add product categ menu entry 2019-12-12 20:26:18 +01:00
David Beal
34a4c573b1 FIX inactive view_production_lot_form_simple (#112) 2019-12-03 09:20:16 +01:00
Alexis de Lattre
f64d190ac3 account_usability: FIX potential problem in view inheritance 2019-11-27 22:59:37 +01:00
David Beal
c633660e73 REMove pos_usability: delete index.html file 2019-11-27 11:38:06 +01:00
Alexis de Lattre
0dfe8df8e4 Remove code from patch, because david Beal added it via inherit of code 2019-11-27 00:31:48 +01:00
David Beal
0e4a562263 IMP acc_usability: improve domain reconciliation widget (#111) 2019-11-27 00:30:36 +01:00
Alexis de Lattre
253a5ebebe FIX show move from bank statement line button 2019-11-27 00:20:18 +01:00
Alexis de Lattre
73c622956f Port account_several_improvements.diff to v12 2019-11-26 00:04:25 +01:00
Alexis de Lattre
38db0da20a Update sale_down_payment 2019-11-25 17:13:03 +01:00
Alexis de Lattre
361f5d3aae Update patch invoice_register_payment_writeoff_analytic.diff for v12 2019-11-20 13:53:16 +01:00
Alexis de Lattre
499d363daf Fix icon display on bank statement 2019-11-15 00:12:45 +01:00
Alexis de Lattre
035a3dfd1e Rename module sale_advance_payment_management to sale_down_payment
Add field amount_down_payment on sale.order
2019-11-14 23:02:42 +01:00
Alexis de Lattre
83fec9264f Initial check-in of the module sale_advance_payment_management 2019-11-13 00:53:56 +01:00
David Beal
9762b5392b IMP branding 2019-10-11 15:12:46 +02:00
David Beal
fc4ea217e0 ADD module pos_usability 2019-10-11 15:12:21 +02:00
David Beal
1812c7f5af IMP base_usa: sequence view and FIX module view
- add prefix field in sequence search view
- replace @class by hasclass() in module view
2019-10-10 10:38:06 +02:00
Alexis de Lattre
92a4b0d6ac Add module stock_no_product_template_menu 2019-09-30 22:44:05 +02:00
Alexis de Lattre
33f67279fb stock_usability: Add patch stock_add_product_reserved_qty_free_qty.diff for those who want to know the reserved/free qty of a product (and not use for OCA modules for perf. reasons) 2019-09-19 18:33:20 +02:00
Alexis de Lattre
66c845f3cf stock_usability: add/improve unreserve buttons 2019-09-19 18:31:18 +02:00
Alexis de Lattre
8a9c75790a sale_usability: Add sale_ids and sale_count on account.invoice
Show sale_line_ids on invoice line form view
2019-09-17 18:53:47 +02:00
Alexis de Lattre
0de8425cfa base_partner_ref: display_name on res.partner is a stored field defined in base. As we inherit this field, we need a hack to be able to invalidate it to force recompute. 2019-09-17 11:29:38 +02:00
Alexis de Lattre
f8563c1667 account_usability: add ability to search by account code in the bank statement work intf 2019-09-17 11:28:54 +02:00
Alexis de Lattre
60cda426a9 base_usability: partner search view: add separator between inactive and customer/supplier filters 2019-09-17 11:28:13 +02:00
Alexis de Lattre
fe7f2c00c5 sale_stock_usability: Minor view improvement for field picking status 2019-09-17 11:27:28 +02:00
Alexis de Lattre
76b113ed28 Fix crash upon click on "Show History" on product form 2019-09-17 11:27:04 +02:00
mourad-ehm
5140094633 [IMP] ADD picking_status on sale order (#104)
* [IMP] ADD picking_status on sale order
2019-09-16 10:24:15 +02:00
David Beal
e220da006f IMP account_usability: set sale date on invoice (#101)
* IMP account_usability: set sale date on invoice
2019-08-19 13:06:41 +02:00
David Beal
c5ffe375a5 Merge pull request #100 from i-vyshnevska/12.0-mig_account_invoice_update_wizard
[12.0] [MIG] account invoice update wizard
2019-08-15 12:31:00 +02:00
David Beal
dd8487bf0f Merge pull request #98 from akretion/12.0-ref-mrp_cost_average
[12.0][REF] mrp cost average
2019-08-14 11:51:13 +02:00
David Beal
a62d1e01f4 [12.0][REF] product_usability (#99)
[12.0][REF] product_usability
2019-08-14 11:49:51 +02:00
Alexis de Lattre
e397f3908e [MIG] sale_margin_no_onchange from v10 to v12 2019-08-13 20:52:32 +02:00
Alexis de Lattre
7b51c993ec Add margin in sale.report 2019-08-13 19:31:25 +02:00
Alexis de Lattre
f480332d3a FIX my previous commit: related_sudo -> compute_sudo 2019-08-13 19:31:25 +02:00
Alexis de Lattre
2f875867c5 Add related_sudo where it may be needed
PEP8 fix
2019-08-13 19:31:25 +02:00
Alexis de Lattre
e9049570ee Add search on supplier on product search view
Move margin fields to sale order line form view (instead of tree view)
2019-08-13 19:31:25 +02:00
Alexis de Lattre
52eff801b6 sale_margin_no_onchange port to v10 2019-08-13 19:31:25 +02:00
Alexis de Lattre
d84ef2e8c5 Mass rename from __openerp__.py to __manifest__.py 2019-08-13 19:31:25 +02:00
Alexis de Lattre
9298378e62 Set all modules as uninstallable 2019-08-13 19:31:25 +02:00
Alexis de Lattre
a7f5e10be4 FIX precision of field 2019-08-13 19:31:25 +02:00
Alexis de Lattre
ea5f679a59 Small vue update 2019-08-13 19:31:25 +02:00
Alexis de Lattre
d63706f764 Add margin rate in percentage
Margin is now negative on refunds (not only in account.invoice, but also on account.invoice.line)
2019-08-13 19:31:25 +02:00
Alexis de Lattre
d9b8da5799 Add module sale_margin_no_onchange 2019-08-13 19:31:25 +02:00
i-vyshnevska
4896075c7d [IMP] Migration account_invoice_update_wizard
Co-Authored-By: jcoux <julien.coux@camptocamp.com>
2019-08-13 17:15:08 +03:00
Iryna Vyshnevska
78b0e416fa [IMP] add section and note functionality 2019-08-13 13:23:28 +03:00
Iryna Vyshnevska
beb0a27ad6 [FIX] save wizard before run
we must save 'account.invoice.line.update' to be able match them to real invoice lines,
2019-08-13 13:23:28 +03:00
Iryna Vushnevska
5b620a6c5f [12.0][MIG] account_invoice_update_wizard 2019-08-13 00:01:18 +03:00
Pierrick Brun
8c1089e138 [FIX] only show analytics to users in group 2019-08-12 23:14:04 +03:00
mpanarin
765be077cd [FIX] not being able to change analytic account and tags 2019-08-12 23:14:04 +03:00
Yannick Vaucher
4f6dc99319 Allow to change analytic fields with account_invoice_update 2019-08-12 23:14:04 +03:00
Yannick Vaucher
59b0a5ac10 fixup! [10.0] Migration of account_invoice_update_wizard 2019-08-12 23:14:04 +03:00
Yannick Vaucher
2d755be1d7 [10.0] Migration of account_invoice_update_wizard 2019-08-12 23:14:04 +03:00
mdietrichc2c
61768a34e9 [9.0] Port of module account_invoice_update_wizard 2019-08-12 23:14:04 +03:00
Florian da Costa
140f2d54ee Make modules uninstallable 2019-08-12 23:14:04 +03:00
Alexis de Lattre
e4d4bcd7ca Add module account_invoice_update_wizard 2019-08-12 23:14:04 +03:00
Alexis de Lattre
e193df7def Simplify usability code for stock.quantity.history 2019-08-12 01:16:20 +02:00
Alexis de Lattre
cadbd840d9 Add support for filter by location on inventory report and inventory valuation
Refund option enabled by default on Return wizard
2019-08-12 00:25:20 +02:00
Alexis de Lattre
3052d7c905 Add code in account.journal tree view 2019-08-07 11:31:14 +02:00
Renato
f59f2ad8ec [REF] product price history action 2019-08-04 21:24:24 -03:00
Renato
fa22c63176 [REF] Separate xml views in new files 2019-08-04 20:24:14 -03:00
Renato
4437afb7d5 [REF] Separate python objects in new files 2019-08-04 20:07:24 -03:00
Renato
b762af222d [REF] moved view xml file to new folder views 2019-08-04 19:49:03 -03:00
Renato
f258bf6fdb [REF] Move python object files to models folder 2019-08-04 19:44:20 -03:00
Renato Lima
43c60dcb30 [REF] mrp models 2019-08-04 19:15:20 -03:00
Renato Lima
f4f99647d2 [REF] Organized files 2019-08-04 19:15:20 -03:00
Renato Lima
a75e14dc8d [FIX] file headers 2019-08-04 19:15:20 -03:00
Alexis de Lattre
dbd600bcd9 Add name_get() on ir.model
Show state on sale.order tree view
2019-07-30 23:06:07 +02:00
Alexis de Lattre
4b442bd11b stock_usability: add colors in inventory tree view 2019-07-30 22:30:40 +02:00
Alexis de Lattre
d2978475b8 stock_usability: Add fields in stock views 2019-07-30 22:26:29 +02:00
Alexis de Lattre
c57d2a0564 Add module sale_order_route 2019-07-30 09:31:10 +02:00
Alexis de Lattre
7e0c438ae8 stock_usability: Improve visibility on reservations 2019-07-24 10:08:55 +02:00
Alexis de Lattre
7d7a42ba8e Fix crash in invoice report 2019-07-23 15:27:46 +02:00
Alexis de Lattre
a21ec776c1 MIG account_invoice_margin adn stock_inventory_valudation_ods
FIX for my PR is merged https://github.com/odoo/odoo/pull/35073
Fix in stock_usability for manual creation of stock moves
2019-07-22 16:35:38 +02:00
Alexis de Lattre
62d0af15ac FIX crash in account_invoice_margin 2019-07-22 09:22:40 +02:00
Alexis de Lattre
24c4dd0225 Add margin in invoice report
Consequence: no more need for module account_invoice_margin_report
2019-07-22 09:22:40 +02:00
Alexis de Lattre
16c2833252 Improve invoice line view 2019-07-22 09:22:40 +02:00
Alexis de Lattre
f9552e7271 Also port stock inventory ODS location-independant 2019-07-22 09:22:40 +02:00
Alexis de Lattre
19ad0eff78 Port stock_inventory_valuation_ods to v10 and py3o 2019-07-22 09:22:40 +02:00
Alexis de Lattre
9f28bc6703 Port account_invoice_margin to v10 2019-07-22 09:22:40 +02:00
Alexis de Lattre
11ae6e1297 Mass rename from __openerp__.py to __manifest__.py 2019-07-22 09:22:40 +02:00
Alexis de Lattre
b2bf902a78 Set all modules as uninstallable 2019-07-22 09:22:40 +02:00
Alexis de Lattre
790c55e607 Add inventory valuation without per stock location analysis 2019-07-22 09:22:40 +02:00
Alexis de Lattre
694a0d4d29 Fix formula
Add column dedicated to product code
2019-07-22 09:22:40 +02:00
Alexis de Lattre
c2ed859534 Better layout 2019-07-22 09:22:40 +02:00
Alexis de Lattre
a4765c6cb2 Better invalidation 2019-07-22 09:22:40 +02:00
Alexis de Lattre
9cb99db2b3 FIX one precision
Add help message to inform about the unit of measure of the field
2019-07-22 09:22:40 +02:00
Alexis de Lattre
8b0e59b22f Add module stock_inventory_valuation_ods 2019-07-22 09:22:40 +02:00
Alexis de Lattre
dccfead879 Add margin rate in percentage
Margin is now negative on refunds (not only in account.invoice, but also on account.invoice.line)
2019-07-22 09:22:40 +02:00
Alexis de Lattre
9cae5e00b6 account_invoice_margin: add support for multi-UoMs for margins 2019-07-22 09:22:40 +02:00
Alexis de Lattre
620b459415 Add module sale_margin_no_onchange 2019-07-22 09:22:40 +02:00
Alexis de Lattre
2062a1f307 Show margins to Accoutant group 2019-07-22 09:22:40 +02:00
Alexis de Lattre
79172fcc45 Add module account_invoice_margin 2019-07-22 09:22:40 +02:00
Alexis de Lattre
d937d954ab New version of eradicate_quick_create that use web_m2x_options 2019-07-18 10:41:49 +02:00
Alexis de Lattre
3bb11966dd First working v12 version of mrp_average_cost 2019-07-17 17:47:39 +02:00
Alexis de Lattre
0bd3b0412c MIG eradicate_quick_create 2019-07-17 10:24:49 +02:00
Alexis de Lattre
5a72d2b1b9 Improvement for incoterm 2019-07-17 09:46:39 +02:00
David Beal
682f85b2d7 UPD Branding 2019-07-17 09:46:24 +02:00
Alexis de Lattre
087e4d6333 Migrate eradicate_quick_create to v10 2019-07-17 09:46:24 +02:00
Alexis de Lattre
d5bf1f1a24 Mass rename from __openerp__.py to __manifest__.py 2019-07-17 09:46:24 +02:00
david.beal@akretion.com
317d4fdd42 icons infogreffe, quick_create 2019-07-17 09:46:24 +02:00
Alexis de Lattre
9657f1bcfd Add module eradicate_quick_create 2019-07-17 09:46:24 +02:00
David Beal
dc95c30f60 IMP report_mrporder 2019-07-16 16:02:32 +02:00
David Beal
2fb715905a FIX stk_usab: mess_post() call 2019-07-10 16:57:25 +02:00
Alexis de Lattre
60a5fa7a33 Better display of technical name of module in kanban view
Small improvements in stock_usability, sale_purchase_no_product_template_menu and mrp_no_product_template_menu
2019-07-10 10:45:14 +02:00
Alexis de Lattre
06e0617026 Merge branch '12.0' of github.com:akretion/odoo-usability into 12.0 2019-07-09 17:41:14 +02:00
Alexis de Lattre
fa3e483026 MIG delivery_usability from v10 to v12 2019-07-09 17:40:50 +02:00
Alexis de Lattre
1957018a14 carrier_id not readonly on done picking (add tracking on it)
fix for formatLang inherit in base_usability
2019-07-09 17:25:08 +02:00
Alexis de Lattre
cfebb6c99c delivery_usability: display field invoice_shipping_on_delivery in SO form view 2019-07-09 17:25:08 +02:00
Alexis de Lattre
cd745c74a9 Add second_barcode to search of product.product
Improve delivery view
2019-07-09 17:25:08 +02:00
Alexis de Lattre
e1f9f2ea92 Add module delivery_usability 2019-07-09 17:25:08 +02:00
David Beal
ce08af35bf Merge pull request #97 from akretion/12.0-fix-price-history
fix price history link bug #96
2019-06-20 08:38:44 +02:00
Raphaël Valyi
475993422e fix price history link bug #96 2019-06-19 12:44:57 -03:00
Alexis de Lattre
ce4fac8a10 Several small fixes 2019-06-04 17:24:16 +02:00
Alexis de Lattre
a848181bee purchase_usability: FIX group XMLID 2019-05-07 17:36:42 +02:00
Raphaël Valyi
13b9109fc0 Merge pull request #94 from akretion/12.0-stock-product-tree-default
New module stock_product_tree_default
2019-04-12 17:15:10 -03:00
clementmbr
ec0e3c1868 New module stock_product_tree_default 2019-04-12 17:12:16 -03:00
David Beal
b42474a3c2 IMP purchase_usability: add invoice_status in tree view 2019-04-11 16:09:01 +02:00
David Beal
e5323fb968 IMP acc_usa: add column to tax tree view 2019-04-11 13:17:48 +02:00
Florian
d806fa48f4 Merge pull request #91 from akretion/12-sale-product-tree-default
[12.0] Add sale_product_tree_default module
2019-04-01 14:37:11 +02:00
David Beal
c38d533557 Merge pull request #92 from akretion/12-purchase-product-tree-default
[12.0]Add purchase_product_tree_default module
2019-04-01 08:54:21 +02:00
David Beal
4c145c12af Merge pull request #93 from akretion/12-mrp-product-tree-default
[12.0] mrp_product_tree_default
2019-04-01 08:53:45 +02:00
Florian da Costa
0a2f129ed8 mrp_product_tree_default 2019-03-31 15:26:14 +02:00
Florian da Costa
4d75ef9fb5 Add purchase_product_tree_default module 2019-03-31 15:24:56 +02:00
Florian da Costa
bebc328a7b Add sale_product_tree_default module 2019-03-31 15:22:50 +02:00
Raphaël Valyi
08fde42217 Merge pull request #89 from akretion/12-pick-type-code
IMP stock_usability: picking with picking_type_code
2019-03-28 11:19:44 -03:00
David Beal
a3f4f94109 IMP stock_usability: picking with picking_type_code 2019-03-28 13:12:26 +01:00
David Beal
4e1b285204 IMP mrp_usability: add lot in report 2019-03-26 15:55:28 +01:00
David Beal
71e30f2872 PORT v12 mrp_usability 2019-03-26 10:01:46 +01:00
Alexis de Lattre
8e4798dbfc MRP production form: move src/dest loc to the top 2019-03-26 09:02:33 +01:00
David Beal
0ffa8b19ea UPD Branding 2019-03-26 09:02:33 +01:00
Alexis de Lattre
0422c16c97 Protect Cancel button with a confirmation pop-up 2019-03-26 09:02:33 +01:00
Alexis de Lattre
67f0690659 Display more fields on stock.quant form view
Better search view on partners
2019-03-26 09:02:33 +01:00
Alexis de Lattre
2e2aff229e Show field even when not in dev mode 2019-03-26 09:02:33 +01:00
David Beal
8aa2f60763 IMP add icons 2019-03-26 09:02:33 +01:00
Alexis de Lattre
55b9b1a619 Port mrp_usability and pos_usability to v10 2019-03-26 09:02:33 +01:00
Alexis de Lattre
7165d113b6 Mass rename from __openerp__.py to __manifest__.py 2019-03-26 09:02:33 +01:00
Alexis de Lattre
ea471c2e01 Set all modules as uninstallable 2019-03-26 09:02:33 +01:00
Alexis de Lattre
7997f267b7 Display fields in stock move form view 2019-03-26 09:02:33 +01:00
Alexis de Lattre
8dc9fdcfa0 Improve mrp_usability 2019-03-26 09:02:33 +01:00
Alexis de Lattre
3bd50e49eb add mrp_usability 2019-03-26 09:02:33 +01:00
David Beal
4733b6b903 FIX typo 2019-03-20 13:05:55 +01:00
David Beal
c0ca9eeab0 ADD module volume_precision 2019-03-20 12:57:15 +01:00
David Beal
8e29f5a396 ADD developer menu 2019-03-15 15:58:44 +01:00
David Beal
29c41d9dea FIX pos_no_product_template_menu: action 2019-03-08 09:38:20 +01:00
David Beal
953ca6d01e Merge pull request #86 from akretion/12-pos-no
12 pos no
2019-03-07 10:56:40 +01:00
David Beal
e57122de31 ADD module pos_no_product_template_menu 2019-03-07 10:55:08 +01:00
David Beal
82bc47905b MIGR v12 mrp_no_product_template 2019-03-07 10:39:42 +01:00
Alexis de Lattre
730a3e99bf Add module mrp_no_product_template_menu 2019-03-07 09:39:56 +01:00
David Beal
e5072cbb63 Merge pull request #85 from akretion/12-no-prd-tmpl
12 no prd tmpl
2019-03-06 18:05:03 +01:00
David Beal
5378ad8ee6 PORT v12 2019-03-06 18:02:54 +01:00
Alexis de Lattre
66174e1cb0 Add py3o_lines_layout on invoice report
Fix crash on print order button in purchase_usability
2019-03-06 17:50:36 +01:00
Alexis de Lattre
2db41cfd6f sale_purchase_no_product_template_menu: Also use product.product on the Product menu entries of the Accounting menu 2019-03-06 16:42:59 +01:00
Alexis de Lattre
5d440b3c61 Minor changes 2019-03-06 16:42:59 +01:00
Alexis de Lattre
41882b3529 Clean up 2019-03-06 16:42:59 +01:00
Alexis de Lattre
eab4cdf17f 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
2019-03-06 16:42:59 +01:00
Alexis de Lattre
120a1b8c16 Mass rename from __openerp__.py to __manifest__.py 2019-03-06 16:42:59 +01:00
Alexis de Lattre
ba19c3c76f Set all modules as uninstallable 2019-03-06 16:42:59 +01:00
Alexis de Lattre
3e26d60503 Better handling of translation to avoid to have a menu entry "Variantes d'articles" 2019-03-06 16:42:59 +01:00
Alexis de Lattre
92ef5170e0 Add search on EAN13 in product_usability 2019-03-06 16:42:59 +01:00
Alexis de Lattre
8eb0f8b6a2 Really remove group on products variants entry 2019-03-06 16:42:59 +01:00
Alexis de Lattre
b29c938044 Better module desc 2019-03-06 16:42:59 +01:00
Alexis de Lattre
7f0ff6e36e Update sale_purchase_no_product_template_menu: now usable by companies who have multi-variants, because we keep one menu entry of product.template in Sales > Configuration > Products Categ and Attributes menu 2019-03-06 16:42:59 +01:00
Alexis de Lattre
119bb936fa FIX module sale_purchase_no_product_template_menu 2019-03-06 16:42:59 +01:00
Alexis de Lattre
31c67cb923 Add module sale_purchase_no_product_template_menu 2019-03-06 16:42:59 +01:00
Alexis de Lattre
e7638c239f Merge branch '12.0' of github.com:akretion/odoo-usability into 12.0 2019-03-05 17:17:59 +01:00
Alexis de Lattre
528438586c Update for sale_report_py3o
Code cleanup
2019-03-05 17:17:36 +01:00
David Beal
f07d416034 FIX stock_usability: stk.move name_get 2019-02-19 17:34:22 +01:00
David Beal
905437e026 Update price.history view with create_uid 2019-02-11 16:08:17 +01:00
Alexis de Lattre
9f1cf7af1e Mig account_usability, sale_stock_usability, sale_usability, stock_usability
New module stock_account_usability
2019-02-04 20:00:41 +01:00
Alexis de Lattre
1a193dcbec Merge branch '12.0' of github.com:akretion/odoo-usability into 12.0 2019-02-01 19:46:30 +01:00
Alexis de Lattre
92a175ea97 Add module purchase_stock_usability
Port purchase_usability to v12
2019-02-01 19:45:59 +01:00
David Beal
80843719a6 IMP cron tree view with model name (#83) 2019-02-01 17:43:34 +01:00
Pierrick Brun
ee3b872e66 account.move.line: Add filter on both debit and credit (#82)
picked from @alexis-via (d4fcaa7d14)
2019-02-01 10:38:58 +01:00
Benoît Guillot
c199853d4e add domain on partner_id field in account_move and account_move_line search views (#73) 2019-02-01 10:38:58 +01:00
Alexis de Lattre
1491cbd2d0 Add script fix_invoice_attachment_filename 2019-02-01 10:38:58 +01:00
Sébastien BEAU
f8c1ba6c28 add balance in view 2019-02-01 10:38:58 +01:00
Sébastien BEAU
51b49249f0 hide odoo report menu and hide the button_cancel on bacnk_statement as the code do not allow to cancel it 2019-02-01 10:38:58 +01:00
Alexis de Lattre
66532aec75 Add @api.model on method that should use it
Improve log msg
2019-02-01 10:38:58 +01:00
Alexis de Lattre
813c123517 Add src and dest location on prodlot selection popup 2019-02-01 10:38:58 +01:00
Mourad EL HADJ MIMOUNE
90271a7ffe add start_date,end_date in statement.display_name 2019-02-01 10:38:58 +01:00
Alexis de Lattre
5ad4c6fb4a Script for account.group now works in multi-company envir 2019-02-01 10:38:58 +01:00
Alexis de Lattre
12d9393279 Improve account group generation 2019-02-01 10:38:58 +01:00
Alexis de Lattre
30e62353e6 Fix typo and code cleanup 2019-02-01 10:38:58 +01:00
Alexis de Lattre
1070c68c55 Fix visibility of invoice_print button on invoice form 2019-02-01 10:38:58 +01:00
Alexis de Lattre
49e9cd0d06 Add script to create account groups 2019-02-01 10:38:58 +01:00
Alexis de Lattre
441df56422 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.
2019-02-01 10:38:58 +01:00
Alexis de Lattre
94959f459a Restore drill-through on sale and invoice reports 2019-02-01 10:38:58 +01:00
Pierrick Brun
ec40108896 confirm on reset_real_qty for stock.inventory 2019-02-01 10:38:58 +01:00
Alexis de Lattre
f651126f25 Improve usability of account.move creation/edition
Default value for account_id, debit, credit, similar to v8 behavior
2019-02-01 10:38:58 +01:00
Alexis de Lattre
edf701d79c Fix typo 2019-02-01 10:38:58 +01:00
Alexis de Lattre
b31082377d Cut name_get() of invoice if too long (which screws-up the invoice form view because of the ariane thread at the top) 2019-02-01 10:38:58 +01:00
Benoit
6e0907dabe keep invoice lines sorted when creating the layout_lines dict 2019-02-01 10:38:58 +01:00
Benoit
ab7c61b796 keep the order line sorted when creating the layout_lines dict 2019-02-01 10:38:58 +01:00
Alexis de Lattre
400a633753 Fix bad port of name_get() of account.analytic.account to v10 2019-02-01 10:38:58 +01:00
Alexis de Lattre
2a97ffb6d9 Add a patch to have analytic in case of writeoff in the register payment wizard 2019-02-01 10:38:58 +01:00
Alexis de Lattre
c5548caee4 account_usability: Add copy=False on some fields 2019-02-01 10:38:58 +01:00
Alexis de Lattre
f880c02038 Use untaxed amount in name_get of purchase orders
Add sum for qty in operation lines
2019-02-01 10:38:58 +01:00
Alexis de Lattre
af4c5a20cc Show 'base' field in tax lines on invoice form view 2019-02-01 10:38:58 +01:00
Alexis de Lattre
d722727918 FIX my previous commit: related_sudo -> compute_sudo 2019-02-01 10:38:58 +01:00
Alexis de Lattre
51eb9c4a58 Add related_sudo where it may be needed
PEP8 fix
2019-02-01 10:38:58 +01:00
Alexis de Lattre
fbb05fe4c6 Add search on supplier on product search view
Move margin fields to sale order line form view (instead of tree view)
2019-02-01 10:38:58 +01:00
Alexis de Lattre
0767469cd6 Remove write/create on products to stock user 2019-02-01 10:38:58 +01:00
Alexis de Lattre
924f332702 account_usability: don't attach PDF upon invoice report generation on supplier invoices/refunds 2019-02-01 10:38:58 +01:00
Alexis de Lattre
02c0fbdf4e Fix string for filter 2019-02-01 10:38:58 +01:00
Alexis de Lattre
6100e65a8a Better order for stock moves 2019-02-01 10:38:58 +01:00
Alexis de Lattre
0dd436a2c8 Switch rights from account manager to accourt user 2019-02-01 10:38:58 +01:00
Alexis de Lattre
faabfe2659 Add account.group_account_user on Adviser menu (by default, it is only accessible to account manager !) 2019-02-01 10:38:58 +01:00
Alexis de Lattre
76538eecd5 Improve stock_usability 2019-02-01 10:38:58 +01:00
Alexis de Lattre
9a48f7d3b8 Add unreserve buttons on moves + log in chatter 2019-02-01 10:38:58 +01:00
Alexis de Lattre
1e5024d02e Add and improve views for usability purposes 2019-02-01 10:38:58 +01:00
Alexis de Lattre
ae632f3cf9 Add tree/form view + menu entry for account.tax.group 2019-02-01 10:38:58 +01:00
Alexis de Lattre
55929f4b26 Remove full rights on product.uom and product.uom.categ to sale manager (grant only to system group) 2019-02-01 10:38:58 +01:00
Alexis de Lattre
fbbd1beb08 account_move_line_filter_wizard: Port to v10 2019-02-01 10:38:58 +01:00
Alexis de Lattre
400a084d9b Graph type="pivot" views must be migrated to pivot views ! 2019-02-01 10:38:58 +01:00
Alexis de Lattre
532e2637dc Improve default date for reversal: D+1 instead of today 2019-02-01 10:38:58 +01:00
Alexis de Lattre
dd8bae81be Add method to group by order in invoice report
Move invoice class in dedicated file
2019-02-01 10:38:58 +01:00
Alexis de Lattre
30d92b40f2 Remove outdated comment 2019-02-01 10:38:58 +01:00
Florian da Costa
fcf5081531 Fix sale order view 2019-02-01 10:38:58 +01:00
Alexis de Lattre
6f75c06889 Add optional patch 2019-02-01 10:38:58 +01:00
Alexis de Lattre
ec9b7ee02d openerp -> odoo 2019-02-01 10:38:58 +01:00
Alexis de Lattre
d9df99789d Add check on bank/cash journals 2019-02-01 10:38:58 +01:00
Alexis de Lattre
5fd36697c4 Script to fix account types 2019-02-01 10:38:58 +01:00
Alexis de Lattre
224fb7c189 Move client_order_ref from the second tab to the top 2019-02-01 10:38:58 +01:00
Alexis de Lattre
2e601e75fd Add module sale_force_invoice_status 2019-02-01 10:38:58 +01:00
Alexis de Lattre
19f7f8c74a Improve menus under Accounting > Configuration about bank accounts 2019-02-01 10:38:58 +01:00
Alexis de Lattre
5955d15934 Better handling of the origin field (which can be very long) on PO views 2019-02-01 10:38:58 +01:00
Alexis de Lattre
5ca272565e Add message in the chatter of the picking when using force availability
PEP8 fixes
2019-02-01 10:38:58 +01:00
Alexis de Lattre
6f702d8b70 account_usability: account.reconcile.model don't copy name to label via onchange 2019-02-01 10:38:58 +01:00
Alexis de Lattre
4b0d3f9796 Remove 'show_email': True now that this bug has been fixed in v10 https://github.com/odoo/odoo/pull/21600 2019-02-01 10:38:58 +01:00
Alexis de Lattre
d30c0f9b37 Add show_email in context for PO 2019-02-01 10:38:58 +01:00
Alexis de Lattre
fe727a92bc Different colors on inventory lines when real qty < or > theorical qty 2019-02-01 10:38:58 +01:00
Alexis de Lattre
034f01287b Add 'Print Order' on PO (there was already a 'Print RFQ button'...) 2019-02-01 10:38:58 +01:00
Alexis de Lattre
54bd62d2d9 sale_usability purchase_usability: reload form view upon sale order and purchase order confirmation to display the 3 qty columns
PEP8 fixes
2019-02-01 10:38:58 +01:00
Alexis de Lattre
0ca880add4 Add ACL to be able to open product form view with employee-only group 2019-02-01 10:38:58 +01:00
Alexis de Lattre
618ced700a account_usability: harmised groups on product.product and product.category views 2019-02-01 10:38:58 +01:00
Alexis de Lattre
7b6fae6247 Make sent field visible in customer invoice form view 2019-02-01 10:38:58 +01:00
Alexis de Lattre
760ba7877e Upport the "mark invoice as sent" wizard from v8 to v10
PEP8 on account_usability
2019-02-01 10:38:58 +01:00
Alexis de Lattre
17d8964db8 Add button 'delete lines qty = 0' on supplier invoices
Add filter missing attachment on invoices
Add filter on to_send, sent on invoices
2019-02-01 10:38:58 +01:00
Alexis de Lattre
2107b52fe6 Restore drill-through on account.invoice.report 2019-02-01 10:38:58 +01:00
Alexis de Lattre
ecf4634601 Add sum=1 on several qty fields 2019-02-01 10:38:58 +01:00
Alexis de Lattre
e0f627c48b Add tax_id in account.invoice.tax form view 2019-02-01 10:38:58 +01:00
David Beal
d850162da8 UPD Branding 2019-02-01 10:38:58 +01:00
Alexis de Lattre
bda4fccb32 Add tracking on amount_total on invoices 2019-02-01 10:38:58 +01:00
Alexis de Lattre
29741ebd68 Improve purchase order line views 2019-02-01 10:38:58 +01:00
Alexis de Lattre
6eeaffa8c4 Add tracking on fiscal position on partner 2019-02-01 10:38:58 +01:00
Alexis de Lattre
7fd2d26336 stock_usability: Add partner_id in stock form view embedde in picking 2019-02-01 10:38:58 +01:00
Alexis de Lattre
fe21c5f8af purchase_usability: also search on origin 2019-02-01 10:38:58 +01:00
Alexis de Lattre
f3172cd715 Display 3 qty columns when clicking on the purchase_id field from picking 2019-02-01 10:38:58 +01:00
Alexis de Lattre
07d2f238d1 Add patch for account module 2019-02-01 10:38:58 +01:00
Alexis de Lattre
90f439e045 Add filter on account.account dedicated to code 2019-02-01 10:38:58 +01:00
Alexis de Lattre
0a8e3c4452 refund by default on return picking 2019-02-01 10:38:58 +01:00
Alexis de Lattre
91d4a8c767 Small usability improvements in bank statements 2019-02-01 10:38:58 +01:00
Alexis de Lattre
67bbee61a0 Switch some track_visibility='always' to track_visibility='onchange' 2019-02-01 10:38:58 +01:00
Stéphane Bidoul (ACSONE)
1748663a42 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
2019-02-01 10:38:58 +01:00
Alexis de Lattre
ba821dbd06 Protect Cancel button with a confirmation pop-up 2019-02-01 10:38:58 +01:00
Alexis de Lattre
a5bd385e45 Add traking on warn fields
WORK IN PROGRESS: port hr_holidays_usability
2019-02-01 10:38:58 +01:00
Alexis de Lattre
b6accd6edd account_usability: Fix _order on account.move.line 2019-02-01 10:38:58 +01:00
Alexis de Lattre
b0be02ea48 Add groupby on Type for account journals 2019-02-01 10:38:58 +01:00
Alexis de Lattre
274bca281a Add missing file! 2019-02-01 10:38:58 +01:00
Alexis de Lattre
9aa723bf06 Add link from picking to PO 2019-02-01 10:38:58 +01:00
Alexis de Lattre
dc90787030 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
2019-02-01 10:38:58 +01:00
Alexis de Lattre
a138418518 Add actions for invoice lines
Add info in invoice chatter
2019-02-01 10:38:58 +01:00
Alexis de Lattre
354c8d7b34 Small usability improvements 2019-02-01 10:38:58 +01:00
Alexis de Lattre
c831a25c92 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)
2019-02-01 10:38:58 +01:00
Alexis de Lattre
68f4c183e2 Add module sale_usability_b2b 2019-02-01 10:38:58 +01:00
Alexis de Lattre
414b939623 Add link to invoice from account move line form view (like in v8) 2019-02-01 10:38:58 +01:00
Alexis de Lattre
1c523cfdcb Add menu entry on product.pricelist.item 2019-02-01 10:38:58 +01:00
Alexis de Lattre
da93011a07 Add date_done in picking tree view 2019-02-01 10:38:58 +01:00
Alexis de Lattre
4cb0c3e77c 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 ?" 2019-02-01 10:38:58 +01:00
David Beal
b656c9b930 Update __init__.py 2019-02-01 10:38:58 +01:00
Alexis de Lattre
37252b1e6a Add tracking on important product fields 2019-02-01 10:38:58 +01:00
Alexis de Lattre
6d62bcce06 Move code at the right place ! 2019-02-01 10:38:58 +01:00
Alexis de Lattre
990855baaa Add track_visibility='onchange' on important fields of picking
Code cleanup
2019-02-01 10:38:58 +01:00
Alexis de Lattre
e0df8d1763 Add start_date and end_date on bank statements 2019-02-01 10:38:58 +01:00
Alexis de Lattre
e3ed65d296 Add methods for reports 2019-02-01 10:38:58 +01:00
Alexis de Lattre
eaa64ce5f2 Add has_discount on SO + method for py3o report 2019-02-01 10:38:58 +01:00
Alexis de Lattre
c64f09f830 Add field delivery_partner_id for report 2019-02-01 10:38:58 +01:00
Alexis de Lattre
54c762ebaf Add computed field has_discount on invoice 2019-02-01 10:38:58 +01:00
Alexis de Lattre
b7b42f12fe Move account_fiscal_position_translate in account_usability
Update code conventions in base_company_extension
2019-02-01 10:38:58 +01:00
Alexis de Lattre
83acc2822d Remove invisible currency_id field, because my PR on Odoo has been merged https://github.com/odoo/odoo/pull/14714 2019-02-01 10:38:58 +01:00
Alexis de Lattre
fdce87925b Add unicity constraint on analytic codes per company 2019-02-01 10:38:58 +01:00
Alexis de Lattre
0d54c5c91f Add module pos_config_single_user
Several usability enhancements in sale, purchase, product and account
2019-02-01 10:38:58 +01:00
Alexis de Lattre
4d892552b0 Add stock/destination stock loc on move tree view inside pickings 2019-02-01 10:38:58 +01:00
Alexis de Lattre
36716f063f Include sale_stock_show_delivery_address in sale_usability and stock_usability 2019-02-01 10:38:58 +01:00
Alexis de Lattre
2eda6328c9 Add regular quant menu entry 2019-02-01 10:38:58 +01:00
Alexis de Lattre
582b1c4275 Port to v10 2019-02-01 10:38:58 +01:00
Alexis de Lattre
27e876e0c8 Add sale_id on picking form 2019-02-01 10:38:58 +01:00
Alexis de Lattre
4c12fd0b29 Add direct access to re-ordering rules from stock location 2019-02-01 10:38:58 +01:00
Alexis de Lattre
91320397e3 Port stock_usability to v10 2019-02-01 10:38:58 +01:00
David Beal
7cb3b37766 IMP add icons 2019-02-01 10:38:58 +01:00
Alexis de Lattre
21fce89b15 Add groupby in search view 2019-02-01 10:38:58 +01:00
Alexis de Lattre
6b01a881b0 Improve invoice line views Add related fields on invoice line 2019-02-01 10:38:58 +01:00
Alexis de Lattre
64b340e585 Port account_usability to v10 2019-02-01 10:38:58 +01:00
Alexis de Lattre
a7bcc3eaf5 Remove SO from quotations menu
Port sale_quotation_title to v10
2019-02-01 10:38:58 +01:00
Alexis de Lattre
ef5779cedb Port base_usability, sale_usability, sale_stock_usability to v10 2019-02-01 10:38:58 +01:00
Alexis de Lattre
74c399009a Mass rename from __openerp__.py to __manifest__.py 2019-02-01 10:38:58 +01:00
Alexis de Lattre
8c19bd1b25 Set all modules as uninstallable 2019-02-01 10:38:58 +01:00
Alexis de Lattre
e786204d06 Remove modules that will be merged in ***_usability modules or that are not useful in v10
Rename some modules
2019-02-01 10:38:58 +01:00
Alexis de Lattre
0e60089010 Also avoid to have '/' on move line label of supplier invoices 2019-02-01 10:38:58 +01:00
Alexis de Lattre
f69c634c71 Remove code for a feature that is available in the OCA module account_invoice_constraint_chronology 2019-02-01 10:38:58 +01:00
Alexis de Lattre
17948ce2ef Migration script should be perfect now 2019-02-01 10:38:58 +01:00
Alexis de Lattre
b90bda2aab Handle the case where name of account_move_line has the name field of the invoice 2019-02-01 10:38:58 +01:00
Alexis de Lattre
e98249f016 Raise an error when the coherence of the sequence of customer invoices vs invoice date is not respected 2019-02-01 10:38:58 +01:00
Alexis de Lattre
29d84c5e2b Better name field in account.move.line for move generated from customer invoice (WARNING : migration script included) 2019-02-01 10:38:58 +01:00
Alexis de Lattre
af4a7798b2 Add partial reconcile field in account move line tree view 2019-02-01 10:38:58 +01:00
Alexis de Lattre
4f7abe3354 Auto-reset period when changing date on invoice 2019-02-01 10:38:58 +01:00
Alexis de Lattre
5707feeb42 Better name_get for incoterm: [EXW] Ex-Works 2019-02-01 10:38:58 +01:00
David Beal
a3475adc83 sale_stock_usability 2019-02-01 10:38:58 +01:00
Alexis de Lattre
3bc744f143 Add unit of measure on stock quant tree/form view 2019-02-01 10:38:58 +01:00
Alexis de Lattre
f1ad1dd547 Display view account move button only when move exists 2019-02-01 10:38:58 +01:00
Alexis de Lattre
7f239bdc87 Remove cost from quant form, because I figured out that this field was not interesting 2019-02-01 10:38:58 +01:00
Alexis de Lattre
53da0d37a2 Add cost field in stock quant view 2019-02-01 10:38:58 +01:00
Alexis de Lattre
da85c222e9 FIX obvious error in my previous commit 2019-02-01 10:38:58 +01:00
Alexis de Lattre
53a1f50f10 Add button to show account move from bank statement line 2019-02-01 10:38:58 +01:00
Alexis de Lattre
d7085dad70 Add scheduler.procurement.log
Re-organize the code, so that each module xxx_usability only depend on xxx
2019-02-01 10:38:58 +01:00
Alexis de Lattre
8b361d54e1 Revert to previous code for order on pickings
Don't inherit the 2 fields to add digits=, it seems it is not needed any more
2019-02-01 10:38:58 +01:00
Alexis de Lattre
0bf83bab19 Move view code from sale_usability_extension to sale_stock_usability (pickings_ids belongs to sale_stock !) 2019-02-01 10:38:58 +01:00
Alexis de Lattre
7d51c25430 Remove restriction to view the period_id field on invoices 2019-02-01 10:38:58 +01:00
Alexis de Lattre
786f005b65 stock_usability : Only do the change of precision on function fields, not on real field. In fact, when we change the precision on "real" fields, it will convert them from type "double precision" in postgres to type "numeric". One of the consequences of this it that it deletes the stock.history SQL view that is defined in stock_account/wizard/stock_valuation_history.py... but this SQL view is never re-created until you reload the module stock_account.
So it's not a good idea of thix to bug in this stock_usability module ; it needs to be fixed in the stock module itself. More work needs to be done on https://github.com/odoo/odoo/pull/10038
2019-02-01 10:38:58 +01:00
Alexis de Lattre
458bb3f5a3 Remove code that is not usefull anymore 2019-02-01 10:38:58 +01:00
Alexis de Lattre
5f6a0a1bdf Resize fiscal year code from 6 to 9 (want to write '2015-2016') 2019-02-01 10:38:58 +01:00
Alexis de Lattre
324580ec79 Block when you try to validate an invoice with a date in the future PEP8 2019-02-01 10:38:58 +01:00
Alexis de Lattre
21ab3fb466 Small enhancement in account_usability 2019-02-01 10:38:58 +01:00
Alexis de Lattre
9b4566a9ec Better name_get on stock_move, to make it easier to analyse the reservation of the quants 2019-02-01 10:38:58 +01:00
Alexis de Lattre
f585405498 Add reconcile filters 2019-02-01 10:38:58 +01:00
Alexis de Lattre
ca34cd2f09 FIX access rights because by missing readonly=True on related field 2019-02-01 10:38:58 +01:00
Alexis de Lattre
17ba157e67 Add logs in procurement scheduler
Add method in account_usability : get fiscal position without partner_id
2019-02-01 10:38:58 +01:00
Alexis de Lattre
7bb0a8649f Add close_method in tree view of account.account.type 2019-02-01 10:38:58 +01:00
Alexis de Lattre
402b503a4e Better stock move view when using the shortcut button on the product form 2019-02-01 10:38:58 +01:00
Alexis de Lattre
dde9b5b767 On partner form view, 2 buttons for journal items: one for payable (seen if supplier = True) and one for receivable (seen if customer=True) 2019-02-01 10:38:58 +01:00
Alexis de Lattre
41c31f9207 Minor changes 2019-02-01 10:38:58 +01:00
Alexis de Lattre
23c9b085e6 Add outgoing_qty in product form view (under incoming_qty) 2019-02-01 10:38:58 +01:00
Alexis de Lattre
631ea737b0 FIX a bug in stock module: add decimal precision ! (we should not do that in a 'usability' module, but...)
Add sum on quant tree view
2019-02-01 10:38:58 +01:00
Alexis de Lattre
ceb8adafc3 Add sale_stock_usability sale_usability_extension now only depend on sale (not on sale_stock) 2019-02-01 10:38:58 +01:00
Alexis de Lattre
fa68b2b22a Add module l10n_fr_usability 2019-02-01 10:38:58 +01:00
Alexis de Lattre
b098150580 Add module stock_transfer_continue_later 2019-02-01 10:38:58 +01:00
Alexis de Lattre
d699052b6a Better "Journal items" shortcut button on partner form view, to go directly to the "account" of the customer or supplier 2019-02-01 10:38:58 +01:00
Raph
ccd7df2f3b Missing : 2019-02-01 10:38:58 +01:00
Raph
7a3f9f8a3b don't translate stock.location.route
And incr num version
And tell it in the description
2019-02-01 10:38:58 +01:00
Alexis de Lattre
20c43fbb49 Code cleanup 2019-02-01 10:38:58 +01:00
Alexis de Lattre
c1d3ccc2cb Add graph view on pickings 2019-02-01 10:38:58 +01:00
Alexis de Lattre
db75a2529f Lower limit for better perfs 2019-02-01 10:38:58 +01:00
Alexis de Lattre
9035ebc5a3 Better search view of stock.location 2019-02-01 10:38:58 +01:00
Alexis de Lattre
b6fb8bb2e4 Small enhancement on picking search view 2019-02-01 10:38:58 +01:00
Alexis de Lattre
a34d47a13b Small usability enhancement for account
PEP8 stuff
2019-02-01 10:38:58 +01:00
Alexis de Lattre
72b1333bb2 date_done should be visible to everybody 2019-02-01 10:38:58 +01:00
Alexis de Lattre
5e28829325 Better view of stock move, to fit vertically in one screen
Unreserve button on form view of stock move
2019-02-01 10:38:58 +01:00
Alexis de Lattre
d20c3bebed Display unreserve button even when partially available 2019-02-01 10:38:58 +01:00
Alexis de Lattre
6bcd620f0e Show analytic account even if there are no journal selected 2019-02-01 10:38:58 +01:00
Alexis de Lattre
02e5a23fec Don't block manual creation of warehouse 2019-02-01 10:38:58 +01:00
Alexis de Lattre
d0c50c7319 Add Unreserve button on move line 2019-02-01 10:38:58 +01:00
Alexis de Lattre
d34adc04ae Add reverse one2many field 2019-02-01 10:38:58 +01:00
Alexis de Lattre
d48af14e10 Move features of account_invoice_overdue_filter in account_usability
Disable reconcile guessing in account_usability
2019-02-01 10:38:58 +01:00
Alexis de Lattre
91dad14704 Small improvements 2019-02-01 10:38:58 +01:00
Alexis de Lattre
3d56951504 Show user_type in account.accout tree view 2019-02-01 10:38:58 +01:00
Alexis de Lattre
bfaf7658df Show resa in quant tree view 2019-02-01 10:38:58 +01:00
Alexis de Lattre
da36d22946 Add supplier invoice number in invoice tree view 2019-02-01 10:38:58 +01:00
Alexis de Lattre
5415322302 rename module account_move_usability to account_usability 2019-02-01 10:38:58 +01:00
Alexis de Lattre
fa30eefc4e Add price_unit on stock move form view 2019-02-01 10:38:58 +01:00
Alexis de Lattre
6ec6b8ae38 Display additionnal fields on stock views 2019-02-01 10:38:58 +01:00
Alexis de Lattre
288749e585 Add SQL constraint on orderpoint to avoid duplicates 2019-02-01 10:38:58 +01:00
Alexis de Lattre
929021b0c0 Add total qty in transfer form view 2019-02-01 10:38:58 +01:00
Alexis de Lattre
2a3d944078 Display more fields Add menu entry for push rules 2019-02-01 10:38:58 +01:00
Alexis de Lattre
71aa26efcf stock_usability : display more fields 2019-02-01 10:38:58 +01:00
Alexis de Lattre
025ed0860e Display more fields on stock move 2019-02-01 10:38:58 +01:00
Alexis de Lattre
56a01d3056 No translation on stock location and stock pick type 2019-02-01 10:38:58 +01:00
Alexis de Lattre
92f68df6c9 Order stock pickings 2019-02-01 10:38:58 +01:00
Alexis de Lattre
c15be9ebb9 Add group by partner in pickings 2019-02-01 10:38:58 +01:00
Alexis de Lattre
1c2865f34c Rename stock_display_src_location to stock_usability with one improvement 2019-02-01 10:38:58 +01:00
Alexis de Lattre
c5a0aa82ad MIG sale_quotation_title to v12 2019-01-31 19:35:07 +01:00
Alexis de Lattre
97ddaeedd8 Add module sale_force_invoice_status 2019-01-31 19:26:03 +01:00
Alexis de Lattre
79826ab525 Remove SO from quotations menu
Port sale_quotation_title to v10
2019-01-31 19:26:03 +01:00
Alexis de Lattre
e4fb2c8363 Mass rename from __openerp__.py to __manifest__.py 2019-01-31 19:26:03 +01:00
Alexis de Lattre
1dbc339176 Set all modules as uninstallable 2019-01-31 19:26:03 +01:00
Alexis de Lattre
e4dae53dba Add sale_quotation_title module 2019-01-31 19:26:03 +01:00
Alexis de Lattre
ae17f5752e Mig product_manager_group and product_manager_group_stock to v12
Partial port of intrastat_product_type to v12
2019-01-30 20:00:26 +01:00
Alexis de Lattre
3cdc1c1dd4 Cosmetic change 2019-01-30 19:38:05 +01:00
Stéphane Bidoul (ACSONE)
c2fe917ad0 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
2019-01-30 19:38:05 +01:00
Alexis de Lattre
ac84bf6468 Port product_manager_group_stock to v10 2019-01-30 19:38:05 +01:00
Alexis de Lattre
fdde407c9d 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
2019-01-30 19:38:05 +01:00
Alexis de Lattre
72e355e17c Mass rename from __openerp__.py to __manifest__.py 2019-01-30 19:38:05 +01:00
Alexis de Lattre
1e4d119076 FIX XMLID 2019-01-30 19:38:05 +01:00
Alexis de Lattre
d71b1fe7b8 Add module product_manager_group_stock Fix dependancies 2019-01-30 19:38:05 +01:00
Alexis de Lattre
8abc01fac6 Add ACLs Automatically add admin to this group 2019-01-30 19:38:05 +01:00
Alexis de Lattre
c54da74e1f Add module product_manager_group 2019-01-30 19:38:05 +01:00
Alexis de Lattre
54db503a65 FIX compatibility with sale_rental (and other modules that auto-create products) 2019-01-30 17:40:06 +01:00
Alexis de Lattre
bb7ecae874 Add module pos_config_single_user
Several usability enhancements in sale, purchase, product and account
2019-01-30 17:40:06 +01:00
Alexis de Lattre
241041f863 Mass rename from __openerp__.py to __manifest__.py 2019-01-30 17:40:06 +01:00
Alexis de Lattre
21b6b7c694 Set all modules as uninstallable 2019-01-30 17:40:06 +01:00
Alexis de Lattre
dfc3457358 Add constrains and onchange 2019-01-30 17:40:06 +01:00
Alexis de Lattre
e3c0050755 Add module intrastat_product_type 2019-01-30 17:40:06 +01:00
Alexis de Lattre
00160a48d6 Partial port of mrp_average_cost (I just maked it installable) 2019-01-30 17:36:16 +01:00
Alexis de Lattre
5e854b1b1f Avoid a division by zero 2019-01-30 16:40:38 +01:00
Alexis de Lattre
6dab81a65b Add possibility to make a manual update of standard_price from BOM
Add script to automate the update of standard_price for phantom BOM
Add user_id on price.history
2019-01-30 16:40:38 +01:00
Alexis de Lattre
155b5c205c Add components cost and total cost on BOM
Add standard price in BOM lines
2019-01-30 16:40:38 +01:00
Alexis de Lattre
21a32bf6c6 FIX computation for products partially produced
Disable raise when labor cost is null
2019-01-30 16:40:38 +01:00
Alexis de Lattre
b9e0e55764 Add mrp.bom.labour.line, to be able to have several labor cost profile on a single BOM 2019-01-30 16:40:38 +01:00
Alexis de Lattre
783a979232 Add Extra cost on BOM
Split the method to write standard_price on product in 2: one to compute the unit price of the MO, another one to update the standard_price on the product
2019-01-30 16:40:38 +01:00
Alexis de Lattre
74cad7f48e Add module mrp_average_cost 2019-01-30 16:40:38 +01:00
Alexis de Lattre
9fe71ae92e FIX group XMLID 2019-01-29 12:36:36 +01:00
Alexis de Lattre
981f2ad858 MIG base_company_extension and base_partner_ref from v10 to v12 2019-01-29 12:09:47 +01:00
Alexis de Lattre
94f2858c68 base_partner_ref: improve tree view 2019-01-29 11:20:40 +01:00
Alexis de Lattre
7a1528d93d base_partner_ref: Copy=False on 'ref' field 2019-01-29 11:20:40 +01:00
Alexis de Lattre
2df224cb0a Add module base_partner_ref for better use of 'ref' field on partners 2019-01-29 11:20:40 +01:00
Alexis de Lattre
bf6123e10f Legal name in report header 2019-01-29 11:20:40 +01:00
Alexis de Lattre
b0086cf8e0 Move account_fiscal_position_translate in account_usability
Update code conventions in base_company_extension
2019-01-29 11:20:40 +01:00
Alexis de Lattre
f50a10c637 Add modules sale_from_private_stock and sale_order_add_bom
Port base_company_extension to v10
Avoid blockage on l10n_fr_infogreffe_connector
2019-01-29 11:20:40 +01:00
Alexis de Lattre
79a093e250 Set all modules as uninstallable 2019-01-29 11:20:40 +01:00
Alexis de Lattre
3cc1104b27 Add domain 2019-01-29 11:20:40 +01:00
Alexis de Lattre
b1bb108585 Port base_company_extension to new API 2019-01-29 11:20:40 +01:00
Alexis de Lattre
7c7ea430cb Add widget=monetary 2019-01-29 11:20:40 +01:00
Alexis de Lattre
e79dd8323e Add module base_company_extension 2019-01-29 11:20:40 +01:00
Raphaël Valyi
3337b344ce Merge pull request #80 from akretion/12.0-mig-product_usability
12.0 mig product usability
2019-01-11 11:26:47 -03:00
Raphaël Valyi
4ad2ede42b barcode: copy=False, _company_default_get proper call 2019-01-11 12:25:21 -02:00
David Beal
686dca00d8 Merge pull request #79 from akretion/12.0-mig-partner_tree_default
12.0 mig partner tree default
2019-01-02 19:00:16 +01:00
David Beal
c9cd2f2726 Merge pull request #78 from akretion/12.0-mig-base_usability
12.0 mig base usability
2019-01-02 18:59:12 +01:00
Raphaël Valyi
e2b86ff11c [MIG] product_usability: Migration to 12.0 2018-12-27 01:54:51 -02:00
Alexis de Lattre
d3c5d59bf0 FIX my previous commit: related_sudo -> compute_sudo 2018-12-27 01:10:14 -02:00
Alexis de Lattre
8a34472576 Add related_sudo where it may be needed
PEP8 fix
2018-12-27 01:10:14 -02:00
Alexis de Lattre
f2f3a11e1e Add search on supplier on product search view
Move margin fields to sale order line form view (instead of tree view)
2018-12-27 01:10:14 -02:00
Alexis de Lattre
aa7ce9cd59 Port stock_inventory_valuation_ods to v10 and py3o 2018-12-27 01:10:14 -02:00
Alexis de Lattre
4c678fd3a6 product_usability: use monetary widget also in tree view (not only in form view) 2018-12-27 01:10:14 -02:00
Alexis de Lattre
2ee7de451d Add currency_id on supplierinfo tree view 2018-12-27 01:10:14 -02:00
Alexis de Lattre
d59c38e42f Add pricelist_id in product.pricelist.item form view 2018-12-27 01:10:14 -02:00
Alexis de Lattre
4611a8b215 Add copy=False on default_code, to make duplicate work again 2018-12-27 01:10:14 -02:00
Alexis de Lattre
cd0c760086 Show "description" field in product form view 2018-12-27 01:10:14 -02:00
Alexis de Lattre
ae9a73488e mrp_average_cost: Fix decimal precision
product_usability: add link to show history of standard price
2018-12-27 01:10:14 -02:00
Alexis de Lattre
fc29b2b480 Add default value on company_id field of pricelist 2018-12-27 01:10:14 -02:00
Alexis de Lattre
41bfd4fc6c Improve product.supplierinfo view 2018-12-27 01:10:14 -02:00
Alexis de Lattre
8b8dc00512 Minor changes 2018-12-27 01:10:14 -02:00
Alexis de Lattre
a2690bb146 Add menu entry on product.pricelist.item 2018-12-27 01:10:14 -02:00
Alexis de Lattre
5919d9b3c3 Add track_visibility on important product fields 2018-12-27 01:10:14 -02:00
Alexis de Lattre
2c53f60000 Add 2 group by (type and category) on product template search view 2018-12-27 01:10:14 -02:00
Alexis de Lattre
8598673530 Add module pos_config_single_user
Several usability enhancements in sale, purchase, product and account
2018-12-27 01:10:14 -02:00
Alexis de Lattre
1bd86ce02a Add unicity of default_code, because I think it's important to have that by default. 2018-12-27 01:10:14 -02:00
Alexis de Lattre
8cc2fe66f4 Partial port of product_usability 2018-12-27 01:10:14 -02:00
Alexis de Lattre
4be79484b0 Mass rename from __openerp__.py to __manifest__.py 2018-12-27 01:10:14 -02:00
Alexis de Lattre
ac90fe57ae Set all modules as uninstallable 2018-12-27 01:10:14 -02:00
David Beal
e1c35e0455 [IMP] hide description field on product 2018-12-27 01:10:14 -02:00
Alexis de Lattre
0869d2d1d9 Add company_id in product.pricelist tree view 2018-12-27 01:10:14 -02:00
Alexis de Lattre
929cce16bf Add search on EAN13 in product_usability 2018-12-27 01:10:14 -02:00
Alexis de Lattre
d7ddbf7cd7 don't make name field of product too wide, for screens with small resolutions 2018-12-27 01:10:14 -02:00
Alexis de Lattre
333afdff00 Wider name field for product 2018-12-27 01:10:14 -02:00
Alexis de Lattre
405c8508e9 Add module product_usability 2018-12-27 01:10:14 -02:00
Raphaël Valyi
0119e40a76 @class -> hasclass to avoid warning, see https://stackoverflow.com/questions/47092148/warning-error-prone-use-of-class 2018-12-26 13:18:04 -02:00
Raphaël Valyi
7ef94252a7 updated user create patch 2018-12-26 13:17:07 -02:00
Raphaël Valyi
d85a0cfc10 [MIG] partner_tree_default: Migration to 12.0 2018-12-25 17:28:14 -02:00
Alexis de Lattre
683e698db7 Add module partner_tree_default 2018-12-25 17:08:44 -02:00
Raphaël Valyi
0ea0110fea moved formatLang monkey patch in misc.py like in Odoo codebase 2018-12-25 15:41:05 -02:00
Raphaël Valyi
11d113449a adopted OCA file layout 2018-12-25 15:35:05 -02:00
Raphaël Valyi
b78e1f50dc [MIG] base_usability: Migration to 12.0 2018-12-25 15:29:56 -02:00
Alexis de Lattre
04b91380a4 Revert my previous commit: use partner_bank_active instead
The module partner_bank_active is avail in OCA/partner-contact
2018-12-24 20:24:08 -02:00
Alexis de Lattre
851193eb5a Add active field on res.partner.bank 2018-12-24 20:24:08 -02:00
Alexis de Lattre
da7c38701c Add widget=handle on sequence of res.partner.bank 2018-12-24 20:24:08 -02:00
Alexis de Lattre
7532676cf9 carrier_id not readonly on done picking (add tracking on it)
fix for formatLang inherit in base_usability
2018-12-24 20:24:08 -02:00
Alexis de Lattre
e34323ec99 Show title not only on Contacts 2018-12-24 20:24:08 -02:00
Alexis de Lattre
7d51bdbcd3 Add widget="email" on email of contacts 2018-12-24 20:24:08 -02:00
Alexis de Lattre
6b16063692 Add script to fix partners related to users in multi-company setup where partners are NOT shared between companies 2018-12-24 20:24:08 -02:00
Alexis de Lattre
78915ccf95 Add string on bank_name of res.partner.bank 2018-12-24 20:24:08 -02:00
Alexis de Lattre
dc287c243b Partners auto-created when you create a user should have customer=False and supplier=True 2018-12-24 20:24:08 -02:00
Alexis de Lattre
bd9979a87d base_usability: add tracking on company_id on res.partner 2018-12-24 20:24:08 -02:00
Alexis de Lattre
5e907bf979 copy=False on ref field of res.partner 2018-12-24 20:24:08 -02:00
David Beal
9bbb908761 UPD Branding 2018-12-24 20:24:08 -02:00
Alexis de Lattre
3479535356 translate=False on 'name' field of crm.lead.tag and res.partner.category 2018-12-24 20:24:08 -02:00
David Beal
f91738176a IMP make module filter to installable 2018-12-24 20:24:08 -02:00
Stéphane Bidoul (ACSONE)
d0b02c6ae2 [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
2018-12-24 20:24:08 -02:00
Alexis de Lattre
c1d1260542 Better log message for outgoing emails 2018-12-24 20:24:08 -02:00
Alexis de Lattre
b50c167b40 Display more fields on stock.quant form view
Better search view on partners
2018-12-24 20:24:08 -02:00
Alexis de Lattre
b5d7f5e5f7 Legal name in report header 2018-12-24 20:24:08 -02:00
Alexis de Lattre
d1813a0f42 Update company/name in report 2018-12-24 20:24:08 -02:00
Alexis de Lattre
2db13433c3 Add 'website' on partner display 2018-12-24 20:24:08 -02:00
Alexis de Lattre
f62f7121db Add city and country in partner tree view 2018-12-24 20:24:08 -02:00
Alexis de Lattre
b8d98a80ad Add track_visibility='onchange' on important fields of picking
Code cleanup
2018-12-24 20:24:08 -02:00
Alexis de Lattre
187a531fce New prototype for method _display_full_address() (Py3o reports will need to be updated) 2018-12-24 20:24:08 -02:00
Alexis de Lattre
58b83c2844 Add comment about py3o and icons 2018-12-24 20:24:08 -02:00
Alexis de Lattre
0bd84171e2 Add methods for reports 2018-12-24 20:24:08 -02:00
Alexis de Lattre
88fd24faa9 Monkey-patching of formatLang to have clean display of float that are integers 2018-12-24 20:24:08 -02:00
Alexis de Lattre
f36904552d Add method for reports 2018-12-24 20:24:08 -02:00
Alexis de Lattre
19d2dba6cb Handle lang in name_title field 2018-12-24 20:24:08 -02:00
Alexis de Lattre
54059a3918 Add string in partner search view 2018-12-24 20:24:08 -02:00
David Beal
250b749b23 IMP add icons 2018-12-24 20:24:08 -02:00
Alexis de Lattre
6d887f79cf Port base_usability, sale_usability, sale_stock_usability to v10 2018-12-24 20:24:08 -02:00
Alexis de Lattre
3bde97db3f Mass rename from __openerp__.py to __manifest__.py 2018-12-24 20:24:08 -02:00
Alexis de Lattre
d0204a6a30 Set all modules as uninstallable 2018-12-24 20:24:08 -02:00
David Beal
b559f2258e Update __openerp__.py 2018-12-24 20:24:08 -02:00
David Beal
7206f30c57 [IMP] hide description field on product 2018-12-24 20:24:08 -02:00
David Beal
b1f978408e [IMP] usability module 2018-12-24 20:24:08 -02:00
Alexis de Lattre
3401f972ad Forgot a file 2018-12-24 20:24:08 -02:00
Alexis de Lattre
aeb987eca7 Add module account_hide_analytic_line 2018-12-24 20:24:08 -02:00
Alexis de Lattre
c74f82d232 Allow to force a date in the computation of the prefix of a sequence 2018-12-24 20:24:08 -02:00
Alexis de Lattre
8bf7cf0218 Modify default values for lang wizards 2018-12-24 20:24:08 -02:00
Alexis de Lattre
cb2dc352af Better search and form views for countries and states 2018-12-24 20:24:08 -02:00
Alexis de Lattre
5416fc1219 Add state in translation tree view 2018-12-24 20:24:08 -02:00
Alexis de Lattre
9a42d93013 Module in tree view by default, filtered on Installed modules (not Apps) 2018-12-24 20:24:08 -02:00
Alexis de Lattre
43a1f7e027 Add log message when sending en email to the outside world ! 2018-12-24 20:24:08 -02:00
Alexis de Lattre
70f393822d Add name_title field 2018-12-24 20:24:08 -02:00
Alexis de Lattre
121261630d Add tracking on active on res.partner 2018-12-24 20:24:08 -02:00
Alexis de Lattre
a5420e85c4 Wider 'name' field on partner form 2018-12-24 20:24:08 -02:00
Alexis de Lattre
8d3097de2a is_company is now readonly when the partner is a contact 2018-12-24 20:24:08 -02:00
Alexis de Lattre
0c6e8ac3d8 Update description 2018-12-24 20:24:08 -02:00
Alexis de Lattre
fa5c5fc511 Add tracking on important fields of partner 2018-12-24 20:24:08 -02:00
Alexis de Lattre
f8ae3c9bf0 New module base_usability, that replaces base_title_on_partner and adds new stuff 2018-12-24 20:24:08 -02:00
David Beal
c3919e438a FIX company_code: records with company_id is False 2018-12-13 17:58:41 +01:00
David Beal
1607dd6597 Update USAGE.rst 2018-12-13 15:59:18 +01:00
David Beal
fe06c37cd5 ADD 12.0 module company_code (#77)
* ADD module company_code

* FIX doc

* FIX doc

* Update company_code/readme/USAGE.rst

Co-Authored-By: bealdav <david.beal@akretion.com>
2018-12-12 19:57:22 +01:00
David Beal
79d8f6edc5 INIT v12 2018-10-12 10:33:26 +02:00
1180 changed files with 15071 additions and 20807 deletions

View File

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

View File

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

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

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

@@ -1,35 +0,0 @@
.. 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

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

View File

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

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

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

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

View File

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

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

View File

@@ -1,29 +0,0 @@
# -*- 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,35 +0,0 @@
# -*- coding: utf-8 -*-
# © 2015-2016 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, api
class AccountBankStatementImport(models.TransientModel):
_inherit = 'account.bank.statement.import'
def _check_journal_bank_account(self, journal, account_number):
if account_number in journal.bank_account_id.sanitized_acc_number:
return True
return False
class AccountBankStatement(models.Model):
_inherit = 'account.bank.statement'
# When we use the import of bank statement via files,
# the start/end_balance is usually computed from the lines itself
# because we don't have the 'real' information in the file
# But, in the module account_bank_statement_import, in the method
# _create_bank_statement(), the bank statement lines already present in
# Odoo are filtered out, but the start/end balance is not adjusted,
# so the user has to manually modifiy it the close the bank statement
# I think the solution is just to remove the start/end balance system
# on the bank statement when we use the file import
# This code is present in the 'account' module, but I override it here
# and not in account_usability because the users who don't have
# account_bank_statement_import may want to keep start/end balance
@api.multi
def _balance_check(self):
return True

View File

@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2016 Akretion (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<!--
Let's try again to work with balance_start and balance_end_real
in v10 to see if we can work with it in v10 or not...
If we really can't, I'll re-activate this view inheritance again
<record id="view_bank_statement_form" model="ir.ui.view">
<field name="name">bank_statement_import_usability.account.bank.statement.form</field>
<field name="model">account.bank.statement</field>
<field name="inherit_id" ref="account.view_bank_statement_form"/>
<field name="arch" type="xml">
<field name="balance_start" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="balance_end_real" position="attributes">
<attribute name="invisible">1</attribute>
</field>
</field>
</record>
-->
<record id="view_bank_statement_tree" model="ir.ui.view">
<field name="name">bank_statement_import_usability.account.bank.statement.tree</field>
<field name="model">account.bank.statement</field>
<field name="inherit_id" ref="account.view_bank_statement_tree"/>
<field name="arch" type="xml">
<field name="balance_start" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="balance_end_real" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<tree position="attributes">
<attribute name="colors">blue:state=='draft';black:state=='confirm'</attribute>
</tree>
</field>
</record>
</odoo>

View File

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

View File

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

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

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

View File

@@ -1,46 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Account Credit Control Usability module for Odoo
# Copyright (C) 2016 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Account Credit Control Usability',
'version': '0.1',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Small usability enhancements in account_credit_control module',
'description': """
Account Credit Control Usability
================================
The usability enhancements include:
* add phone call in the list of channels
* hide some fields
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['account_credit_control', 'partner_aged_open_invoices'],
'data': ['account_credit_control_view.xml'],
'installable': False,
}

View File

@@ -1,82 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Account Credit Control Usability module for Odoo
# Copyright (C) 2016 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp import models, fields, api
class CreditControlPolicyLevel(models.Model):
_inherit = "credit.control.policy.level"
_rec_name = 'internal_name'
channel = fields.Selection(selection_add=[('phone', 'Phone Call')])
name = fields.Char(
string='Subject',
help="Will be displayed in the subject of the emails and in "
"the letters")
internal_name = fields.Char(string='Internal Name', required=True)
class CreditControlLine(models.Model):
_inherit = "credit.control.line"
channel = fields.Selection(selection_add=[('phone', 'Phone Call')])
note = fields.Text(string='Notes')
@api.multi
def open_aged_open_invoices_report(self):
self.ensure_one()
return self.partner_id.open_aged_open_invoices_report()
@api.multi
def go_to_partner_form(self):
self.ensure_one()
action = self.env['ir.actions.act_window'].for_xml_id(
'base', 'action_partner_customer_form')
action.update({
'view_mode': 'form,kanban,tree',
'views': False,
'res_id': self.partner_id.id,
'context': {},
})
return action
class CreditControlRun(models.Model):
_inherit = "credit.control.run"
date = fields.Date(default=fields.Date.context_today)
class ResPartner(models.Model):
_inherit = 'res.partner'
@api.one
@api.depends('credit_control_line_ids')
def _credit_control_line_count(self):
try:
self.credit_control_line_count = len(self.credit_control_line_ids)
except:
self.credit_control_line_count = 0
credit_control_line_count = fields.Integer(
compute='_credit_control_line_count',
string="# of Credit Control Lines", readonly=True)

View File

@@ -1,127 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="credit_control_line_tree" model="ir.ui.view">
<field name="name">credit_control_usability.credit_control_line_tree</field>
<field name="model">credit.control.line</field>
<field name="inherit_id" ref="account_credit_control.credit_control_line_tree"/>
<field name="arch" type="xml">
<field name="account_id" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="move_line_id" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="mail_message_id" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="partner_id" position="after">
<button name="go_to_partner_form" type="object"
string="Go to Partner" icon="terp-gtk-jump-to-ltr"/>
<button name="open_aged_open_invoices_report" type="object"
string="Open Aged Open Invoices Report" icon="STOCK_ZOOM_IN"/>
</field>
</field>
</record>
<record id="credit_control_line_form" model="ir.ui.view">
<field name="name">credit_control_usability.credit_control_line_form</field>
<field name="model">credit.control.line</field>
<field name="inherit_id" ref="account_credit_control.credit_control_line_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='currency_id']/.." position="after">
<group name="note">
<field name="note"/>
</group>
</xpath>
</field>
</record>
<record id="credit_control_policy_form" model="ir.ui.view">
<field name="name">credit_control_usability.credit.control.policy.form</field>
<field name="model">credit.control.policy</field>
<field name="inherit_id" ref="account_credit_control.credit_control_policy_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='level_ids']/tree/field[@name='name']" position="before">
<field name="internal_name"/>
</xpath>
<xpath expr="//field[@name='level_ids']/form//field[@name='name']" position="replace">
<group name="level-main">
<field name="internal_name"/>
<field name="name"/>
</group>
</xpath>
</field>
</record>
<record id="credit_mangement_policy_level_form" model="ir.ui.view">
<field name="name">credit_control_usability.credit.control.policy.level.form</field>
<field name="model">credit.control.policy.level</field>
<field name="inherit_id" ref="account_credit_control.credit_mangement_policy_level_form"/>
<field name="arch" type="xml">
<field name="name" position="before">
<field name="internal_name"/>
</field>
</field>
</record>
<record id="credit_control_policy_level_tree" model="ir.ui.view">
<field name="name">credit_control_usability.credit.control.policy.level.tree</field>
<field name="model">credit.control.policy.level</field>
<field name="inherit_id" ref="account_credit_control.credit_control_policy_level_tree"/>
<field name="arch" type="xml">
<field name="name" position="before">
<field name="internal_name"/>
</field>
</field>
</record>
<record id="credit_control_line_search" model="ir.ui.view">
<field name="name">credit_control_usability.credit_control_line_search</field>
<field name="model">credit.control.line</field>
<field name="inherit_id" ref="account_credit_control.credit_control_line_search"/>
<field name="arch" type="xml">
<filter name="filter_manual" position="after">
<filter name="phone" string="Phone Call" domain="[('channel', '=', 'phone')]"/>
<filter name="letter" string="Letter" domain="[('channel', '=', 'letter')]"/>
<filter name="email" string="Email" domain="[('channel', '=', 'email')]"/>
</filter>
</field>
</record>
<record id="partner_credit_control_line_action" model="ir.actions.act_window">
<field name="name">Credit Control Lines</field>
<field name="res_model">credit.control.line</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_partner_id': active_id}</field>
</record>
<record id="view_partner_form" model="ir.ui.view">
<field name="name">account_credit_control_usability.button.res.partner.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml">
<xpath expr="//div[@name='buttons']" position="inside">
<button class="oe_inline oe_stat_button" type="action"
name="%(partner_credit_control_line_action)d"
attrs="{'invisible': [('customer', '=', False)]}"
icon="fa-gavel">
<field string="Credit Control"
name="credit_control_line_count" widget="statinfo"/>
</button>
</xpath>
</field>
</record>
<!-- rapport -->
<template id="report_credit_control_summary_document" inherit_id="account_credit_control.report_credit_control_summary_document">
<xpath expr="//span[@t-field='l.amount_due']" position="attributes">
<attribute name="t-field-options">{"widget": "monetary", "display_currency": "l.currency_id or l.company_id.currency_id"}</attribute>
</xpath>
</template>
</data>
</openerp>

View File

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

View File

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

View File

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

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

View File

@@ -1,43 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Account Cutoff Prepaid ODS module for Odoo
# Copyright (C) 2016 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Account Cutoff Prepaid ODS',
'version': '8.0.0.1.0',
'category': 'Tools',
'license': 'AGPL-3',
'summary': 'Adds an Aeroo ODS report on cutoff prepaid',
'description': """
Account Cutoff Prepaid ODS
===========================
This module will add an Aeroo ODS report on Prepaid Revenue and Prepaid Expense.
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
""",
'author': "Akretion",
'website': 'http://www.akretion.com',
'depends': ['account_cutoff_prepaid', 'report_aeroo'],
'data': ['report.xml'],
'installable': False,
}

View File

@@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="account_cutoff_prepaid_ods" model="ir.actions.report.xml">
<field name="name">Cutoff Prepaid ODS</field>
<field name="model">account.cutoff</field>
<field name="report_name">account.cutoff.prepaid.ods</field>
<field name="report_type">aeroo</field>
<field name="in_format">oo-ods</field>
<field name="report_rml">account_cutoff_prepaid_ods/cutoff_prepaid.ods</field>
<field name="parser_state">default</field>
<field name="tml_source">file</field>
<field name="out_format" ref="report_aeroo.report_mimetypes_ods_ods"/>
</record>
<record id="account_cutoff_prepaid_ods_button" model="ir.values">
<field name="name">Cutoff Prepaid ODS</field>
<field name="model">account.cutoff</field>
<field name="key2">client_print_multi</field>
<field name="value" eval="'ir.actions.report.xml,%d'%account_cutoff_prepaid_ods"/>
</record>
</data>
</openerp>

View File

@@ -1,24 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Account Direct Debit Autogenerate module for Odoo
# Copyright (C) 2015 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from . import account_invoice

View File

@@ -1,47 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Account Direct Debit Autogenerate module for Odoo
# Copyright (C) 2015 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Account Direct Debit Autogenerate',
'version': '0.1',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Auto-generate direct debit order on invoice validation',
'description': """
Account Direct Debit Autogenerate
=================================
With this module, when you validate a customer invoice whose payment mode is SEPA Direct Debit :
* if a draft Direct Debit order for SEPA Direct Debit already exists, a new payment line is added to it for the invoice,
* otherwise, a new SEPA Direct Debit order is created for this invoice.
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['account_banking_sepa_direct_debit', 'account_payment_partner'],
'data': [],
'installable': False,
}

View File

@@ -1,107 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Account Direct Debit Autogenerate module for Odoo
# Copyright (C) 2015 Akretion (www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp import models, api, _
from openerp.exceptions import Warning
import logging
logger = logging.getLogger(__name__)
class AccountInvoice(models.Model):
_inherit = 'account.invoice'
@api.model
def _prepare_payment_order(self, invoice):
vals = {
'mode': invoice.payment_mode_id.id,
'payment_order_type': 'debit',
}
return vals
@api.model
def _prepare_payment_line(self, move_line, payment_order):
assert move_line.invoice, 'The move line must be linked to an invoice'
if not move_line.invoice.mandate_id:
raise Warning(
_('Missing Mandate on Invoice %s') % move_line.invoice.number)
vals = {
'order_id': payment_order.id,
'move_line_id': move_line.id,
'partner_id': move_line.partner_id.id,
'amount_currency': move_line.debit,
'communication': move_line.invoice.number.replace('/', ''),
'state': 'structured',
'date': move_line.date_maturity,
'currency': move_line.invoice.currency_id.id,
'mandate_id': move_line.invoice.mandate_id.id,
'bank_id': move_line.invoice.mandate_id.partner_bank_id.id,
}
return vals
@api.multi
def invoice_validate(self):
'''Create Direct debit payment order on invoice validation or update
an existing draft Direct Debit pay order'''
res = super(AccountInvoice, self).invoice_validate()
poo = self.env['payment.order']
plo = self.env['payment.line']
for invoice in self:
if (
invoice.type == 'out_invoice'
and invoice.payment_mode_id
and invoice.payment_mode_id.type
and invoice.payment_mode_id.type.code
and invoice.payment_mode_id.type.code.
startswith('pain.008.001.')):
payorders = poo.search([
('state', '=', 'draft'),
('payment_order_type', '=', 'debit'),
('mode', '=', invoice.payment_mode_id.id),
# mode is attached to company
])
if payorders:
payorder = payorders[0]
payorder_type = _('existing')
else:
payorder_vals = self._prepare_payment_order(invoice)
payorder = poo.create(payorder_vals)
payorder_type = _('new')
logger.info(
'New Direct Debit Order created %s'
% payorder.reference)
move_lines = [
line for line in invoice.move_id.line_id
if line.account_id == invoice.account_id]
for move_line in move_lines:
if not invoice.mandate_id:
raise Warning(
_("Missing Mandate on invoice %s")
% invoice.number)
# add payment line
pl_vals = self._prepare_payment_line(move_line, payorder)
pl = plo.create(pl_vals)
invoice.message_post(
_("A new payment line %s has been automatically "
"created on the %s direct debit order %s")
% (pl.name, payorder_type, payorder.reference))
return res

View File

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

View File

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

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

View File

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

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

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

View File

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

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

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

View File

@@ -1,14 +1,13 @@
# -*- 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': """
"name": "Account Fiscal Position Payable Receivable",
"version": "12.0.1.0.0",
"category": "Accounting & Finance",
"license": "AGPL-3",
"summary": "Configure payable/receivable accounts on fiscal positions",
"description": """
Account Fiscal Position Payable Receivable
==========================================
@@ -16,11 +15,9 @@ This module allows to configure a special *Partner Receivable Account* and a spe
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
""",
'author': "Akretion",
'website': 'http://www.akretion.com',
'depends': ['account'],
'data': [
'account_fiscal_position_view.xml',
],
'installable': True,
"author": "Akretion",
"website": "http://www.akretion.com",
"depends": ["account"],
"data": ["views/account_fiscal_position_view.xml"],
"installable": False,
}

View File

@@ -1,35 +0,0 @@
# -*- 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,2 @@
from . import account_fiscal_position
from . import res_partner

View File

@@ -0,0 +1,21 @@
# © 2016-2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields
class AccountFiscalPosition(models.Model):
_inherit = "account.fiscal.position"
receivable_account_id = fields.Many2one(
"account.account",
string="Partner Receivable Account",
company_dependent=True,
domain=[("internal_type", "=", "receivable")],
)
payable_account_id = fields.Many2one(
"account.account",
string="Partner Payable Account",
company_dependent=True,
domain=[("internal_type", "=", "payable")],
)

View File

@@ -0,0 +1,25 @@
# © 2016-2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, api
class ResPartner(models.Model):
_inherit = "res.partner"
@api.onchange("property_account_position_id")
def fiscal_position_receivable_payable_change(self):
fp = self.property_account_position_id
ipo = self.env["ir.property"]
if fp.receivable_account_id:
self.property_account_receivable_id = fp.receivable_account_id
else:
self.property_account_receivable_id = ipo.get(
"property_account_receivable_id", "res.partner"
)
if fp.payable_account_id:
self.property_account_payable_id = fp.payable_account_id
else:
self.property_account_payable_id = ipo.get(
"property_account_payable_id", "res.partner"
)

View File

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

View File

@@ -1,11 +1,11 @@
# -*- coding: utf-8 -*-
# © 2015-2017 Akretion (http://www.akretion.com)
# Copyright 2015-2019 Akretion France (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Account Invoice Margin',
'version': '10.0.1.0.0',
'category': 'Accounting & Finance',
'version': '12.0.1.0.0',
'category': 'Invoicing Management',
'license': 'AGPL-3',
'summary': 'Copy standard price on invoice line and compute margins',
'description': """
@@ -20,5 +20,5 @@ This module has been written by Alexis de Lattre from Akretion
'data': [
'account_invoice_view.xml',
],
'installable': True,
'installable': False,
}

View File

@@ -1,9 +1,8 @@
# -*- coding: utf-8 -*-
# © 2015-2017 Akretion (http://www.akretion.com)
# Copyright 2015-2019 Akretion France (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields, api
from odoo import api, fields, models
import odoo.addons.decimal_precision as dp
@@ -48,16 +47,18 @@ class AccountInvoiceLine(models.Model):
# it works in _get_current_rate
# even if we set date = False in context
# standard_price_inv_cur is in the UoM of the invoice line
date = inv._get_currency_rate_date() or\
fields.Date.context_today(self)
company = inv.company_id
company_currency = company.currency_id
standard_price_inv_cur =\
inv.company_id.currency_id.with_context(
date=inv.date_invoice).compute(
il.standard_price_company_currency,
inv.currency_id)
company_currency._convert(
il.standard_price_company_currency,
inv.currency_id, company, date)
margin_inv_cur =\
il.price_subtotal - il.quantity * standard_price_inv_cur
margin_comp_cur = inv.currency_id.with_context(
date=inv.date_invoice).compute(
margin_inv_cur, inv.company_id.currency_id)
margin_comp_cur = inv.currency_id._convert(
margin_inv_cur, company_currency, company, date)
if il.price_subtotal:
margin_rate = 100 * margin_inv_cur / il.price_subtotal
# for a refund, margin should be negative
@@ -83,13 +84,12 @@ class AccountInvoiceLine(models.Model):
std_price = pp.standard_price
inv_uom_id = vals.get('uom_id')
if inv_uom_id and inv_uom_id != pp.uom_id.id:
inv_uom = self.env['product.uom'].browse(inv_uom_id)
inv_uom = self.env['uom.uom'].browse(inv_uom_id)
std_price = pp.uom_id._compute_price(
std_price, inv_uom)
vals['standard_price_company_currency'] = std_price
return super(AccountInvoiceLine, self).create(vals)
@api.multi
def write(self, vals):
if not vals:
vals = {}
@@ -106,7 +106,7 @@ class AccountInvoiceLine(models.Model):
# uom_id is NOT a required field
if 'uom_id' in vals:
if vals.get('uom_id'):
inv_uom = self.env['product.uom'].browse(
inv_uom = self.env['uom.uom'].browse(
vals['uom_id'])
else:
inv_uom = False
@@ -127,11 +127,11 @@ class AccountInvoice(models.Model):
margin_invoice_currency = fields.Monetary(
string='Margin in Invoice Currency',
readonly=True, compute='_compute_margin', store=True,
compute='_compute_margin', store=True, readonly=True,
currency_field='currency_id')
margin_company_currency = fields.Monetary(
string='Margin in Company Currency',
readonly=True, compute='_compute_margin', store=True,
compute='_compute_margin', store=True, readonly=True,
currency_field='company_currency_id')
@api.depends(
@@ -139,12 +139,14 @@ class AccountInvoice(models.Model):
'invoice_line_ids.margin_invoice_currency',
'invoice_line_ids.margin_company_currency')
def _compute_margin(self):
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
res = self.env['account.invoice.line'].read_group(
[('invoice_id', 'in', self.ids)],
['invoice_id', 'margin_invoice_currency',
'margin_company_currency'],
['invoice_id'])
for re in res:
if re['invoice_id']:
inv = self.browse(re['invoice_id'][0])
if inv.type in ('out_invoice', 'out_refund'):
inv.margin_invoice_currency = re['margin_invoice_currency']
inv.margin_company_currency = re['margin_company_currency']

View File

@@ -1,9 +1,8 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Akretion (http://www.akretion.com)
# Copyright 2018-2019 Akretion France (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields, api
from odoo import api, fields, models
class AccountInvoiceReport(models.Model):
@@ -19,8 +18,8 @@ class AccountInvoiceReport(models.Model):
'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',
'journal_id', 'number', 'partner_bank_id', 'partner_id',
'payment_term_id', 'residual', 'state', 'type', 'user_id',
],
'account.invoice.line': [
'account_id', 'invoice_id', 'price_subtotal', 'product_id',
@@ -29,26 +28,25 @@ class AccountInvoiceReport(models.Model):
],
'product.product': ['product_tmpl_id'],
'product.template': ['categ_id'],
'product.uom': ['category_id', 'factor', 'name', 'uom_type'],
'uom.uom': ['category_id', 'factor', 'name', 'uom_type'],
'res.currency.rate': ['currency_id', 'name'],
'res.partner': ['country_id'],
}
@api.depends('currency_id', 'date', 'margin')
def _compute_user_currency_margin(self):
context = dict(self._context or {})
user_currency_id = self.env.user.company_id.currency_id
currency_rate_id = self.env['res.currency.rate'].search([
user_currency = self.env.user.company_id.currency_id
currency_rate = self.env['res.currency.rate'].search([
('rate', '=', 1),
'|',
('company_id', '=', self.env.user.company_id.id),
('company_id', '=', False)], limit=1)
base_currency_id = currency_rate_id.currency_id
ctx = context.copy()
base_currency = currency_rate.currency_id
for record in self:
ctx['date'] = record.date
record.user_currency_margin = base_currency_id.with_context(
ctx).compute(record.margin, user_currency_id)
date = record.date or fields.Date.today()
company = record.company_id
record.user_currency_margin = base_currency._convert(
record.margin, user_currency, company, date)
# TODO check for refunds
def _sub_select(self):

View File

@@ -12,22 +12,24 @@
<field name="model">account.invoice.line</field>
<field name="inherit_id" ref="account.view_invoice_line_form"/>
<field name="arch" type="xml">
<field name="company_id" position="after">
<xpath expr="//field[@name='analytic_tag_ids']/.." position="inside">
<field name="standard_price_company_currency"
string="Cost Price in Comp. Cur."
groups="base.group_no_one"/>
<field name="standard_price_invoice_currency"
widget="monetary"
options="{'currency_field': 'currency_id'}"
string="Cost Price in Inv. Cur."
groups="base.group_no_one"/>
<field name="margin_invoice_currency"
string="Margin in Inv. Cur."
groups="base.group_no_one"/>
<field name="margin_company_currency"
string="Margin in Comp. Cur."
groups="base.group_no_one"/>
<label for="margin_rate" groups="base.group_no_one"/>
<div name="margin_rate" groups="base.group_no_one">
<field name="margin_rate" class="oe_inline"/> %
</div>
</field>
</xpath>
</field>
</record>
@@ -38,9 +40,9 @@
<field name="arch" type="xml">
<field name="move_id" position="after">
<field name="margin_invoice_currency"
string="Margin" groups="base.group_no_one"/>
string="Margin in Inv. Cur." groups="base.group_no_one"/>
<field name="margin_company_currency"
groups="base.group_no_one"/>
string="Margin in Comp. Cur." groups="base.group_no_one"/>
</field>
</field>
</record>

View File

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

View File

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

@@ -1,23 +0,0 @@
<?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,39 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
Account Invoice Update Wizard
=============================
This module adds a button *Update Invoice* on Customer and Supplier invoices in
Open or Paid state. This button starts a wizard which allows the user to update
non-legal fields of the invoice:
* Source Document
* Reference/Description
* Payment terms (update allowed only to a payment term with same number of terms
of the same amount and on invoices without any payment)
* Bank Account
* Salesman
* Notes
* Description of invoice lines
* Analytic account
* Analytic tags
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<https://github.com/akretion/odoo-usability/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.
Contributors
------------
* Alexis de Lattre <alexis.delattre@akretion.com>
* Florian da Costa <florian.dacosta@akretion.com>
* Matthieu Dietrich <matthieu.dietrich@camptocamp.com>
* Yannick Vaucher <yannick.vaucher@camptocamp.com>
* Mykhailo Panarin <m.panarin@mobilunity.com>
* Artem Kostyuk <a.kostyuk@mobilunity.com>

View File

@@ -1 +1,2 @@
from . import models
from . import wizard

View File

@@ -1,37 +1,21 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# Copyright 2018 Camptocamp
# Copyright 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# Copyright 2018-2019 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Account Invoice Update Wizard',
'version': '8.0.1.0.0',
'version': '12.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'],
'website': 'https://github.com/akretion/odoo-usability',
'depends': [
'account',
],
'data': [
'wizard/account_invoice_update_view.xml',
'views/account_invoice.xml',
],
'installable': True,
'installable': False,
}

View File

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

View File

@@ -0,0 +1,22 @@
# Copyright 2019 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields, api, _
from odoo.exceptions import UserError
import odoo.addons.decimal_precision as dp
class AccountInvoice(models.Model):
_inherit = 'account.invoice'
def prepare_update_wizard(self):
self.ensure_one()
wizard = self.env['account.invoice.update']
res = wizard._prepare_default_get(self)
action = self.env.ref(
'account_invoice_update_wizard.account_invoice_update_action'
).read()[0]
action['name'] = "Update Wizard"
action['res_id'] = wizard.create(res).id
return action

View File

@@ -1,53 +1,51 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Camptocamp
# Copyright 2018-2019 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
from odoo.tests.common import SavepointCase
from odoo.exceptions import UserError
class TestAccountInvoiceUpdateWizard(TransactionCase):
class TestAccountInvoiceUpdateWizard(SavepointCase):
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')
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.customer12 = cls.env.ref('base.res_partner_12')
cls.product16 = cls.env.ref('product.product_product_16')
cls.product24 = cls.env.ref('product.product_product_24')
uom_unit = cls.env.ref('uom.product_uom_categ_unit')
self.invoice1 = self.env['account.invoice'].create({
cls.invoice1 = cls.env['account.invoice'].create({
'name': 'Test invoice',
'partner_id': self.customer12.id,
'partner_id': cls.customer12.id,
})
self.inv_line1 = self.env['account.invoice.line'].create({
'invoice_id': self.invoice1.id,
cls.inv_line1 = cls.env['account.invoice.line'].create({
'invoice_id': cls.invoice1.id,
'name': "Line1",
'product_id': self.product16.id,
'product_id': cls.product16.id,
'product_uom_id': uom_unit.id,
'account_id': self.invoice1.account_id.id,
'account_id': cls.invoice1.account_id.id,
'price_unit': 42.0,
})
self.inv_line2 = self.env['account.invoice.line'].create({
'invoice_id': self.invoice1.id,
cls.inv_line2 = cls.env['account.invoice.line'].create({
'invoice_id': cls.invoice1.id,
'name': "Line2",
'product_id': self.product24.id,
'product_id': cls.product24.id,
'product_uom_id': uom_unit.id,
'account_id': self.invoice1.account_id.id,
'account_id': cls.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'',
cls.aa1 = cls.env.ref('analytic.analytic_partners_camp_to_camp')
cls.aa2 = cls.env.ref('analytic.analytic_nebula')
cls.atag1 = cls.env.ref('analytic.tag_contract')
cls.atag2 = cls.env['account.analytic.tag'].create({
'name': '',
})
def create_wizard(self):
UpdateWizard = self.env['account.invoice.update'].with_context(
active_model='account.invoice',
active_id=self.invoice1.id)
self.wiz = UpdateWizard.create({})
def create_wizard(self, invoice):
res = self.invoice1.prepare_update_wizard()
self.wiz = self.env['account.invoice.update'].browse(res['res_id'])
def test_add_analytic_account_line1(self):
""" Add analytic account on an invoice line
@@ -58,7 +56,7 @@ class TestAccountInvoiceUpdateWizard(TransactionCase):
- create a new analytic line.
"""
self.invoice1.action_invoice_open()
self.create_wizard()
self.create_wizard(self.invoice1)
wiz_line = self.wiz.line_ids.filtered(
lambda rec: rec.invoice_line_id == self.inv_line1)
@@ -80,7 +78,7 @@ class TestAccountInvoiceUpdateWizard(TransactionCase):
self.inv_line1.account_analytic_id = self.aa2
self.invoice1.action_invoice_open()
self.create_wizard()
self.create_wizard(self.invoice1)
wiz_line = self.wiz.line_ids.filtered(
lambda rec: rec.invoice_line_id == self.inv_line1)
@@ -105,7 +103,7 @@ class TestAccountInvoiceUpdateWizard(TransactionCase):
self.inv_line2.unit_price = 42.0
self.invoice1.action_invoice_open()
self.create_wizard()
self.create_wizard(self.invoice1)
line1 = self.wiz.line_ids[0]
line1.account_analytic_id = self.aa1
@@ -119,7 +117,7 @@ class TestAccountInvoiceUpdateWizard(TransactionCase):
This will update move line.
"""
self.invoice1.action_invoice_open()
self.create_wizard()
self.create_wizard(self.invoice1)
wiz_line = self.wiz.line_ids.filtered(
lambda rec: rec.invoice_line_id == self.inv_line1)
@@ -141,7 +139,7 @@ class TestAccountInvoiceUpdateWizard(TransactionCase):
self.inv_line1.analytic_tag_ids = self.atag1
self.invoice1.action_invoice_open()
self.create_wizard()
self.create_wizard(self.invoice1)
wiz_line = self.wiz.line_ids.filtered(
lambda rec: rec.invoice_line_id == self.inv_line1)
@@ -162,7 +160,7 @@ class TestAccountInvoiceUpdateWizard(TransactionCase):
- create an analytic line
"""
self.invoice1.action_invoice_open()
self.create_wizard()
self.create_wizard(self.invoice1)
wiz_line = self.wiz.line_ids.filtered(
lambda rec: rec.invoice_line_id == self.inv_line1)
@@ -186,7 +184,7 @@ class TestAccountInvoiceUpdateWizard(TransactionCase):
self.inv_line1.account_analytic_id = self.aa2
self.invoice1.action_invoice_open()
self.create_wizard()
self.create_wizard(self.invoice1)
wiz_line = self.wiz.line_ids.filtered(
lambda rec: rec.invoice_line_id == self.inv_line1)

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
Copyright 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
@@ -10,8 +10,8 @@
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<button name="action_invoice_cancel" position="before">
<button name="%(account_invoice_update_action)d" type="action" string="Update Invoice" states="open,paid" groups="account.group_account_invoice"/>
<button name="action_invoice_draft" position="before">
<button name="prepare_update_wizard" type="object" string="Update Invoice" states="open,paid" groups="account.group_account_invoice"/>
</button>
</field>
</record>
@@ -20,8 +20,8 @@
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<button name="action_invoice_cancel" position="before">
<button name="%(account_invoice_update_action)d" type="action" string="Update Invoice" states="open,paid" groups="account.group_account_invoice"/>
<button name="action_invoice_draft" position="before">
<button name="prepare_update_wizard" type="object" string="Update Invoice" states="open,paid" groups="account.group_account_invoice"/>
</button>
</field>
</record>

View File

@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# Copyright 2018 Camptocamp
# Copyright 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# Copyright 2018-2019 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields, api, _
@@ -58,16 +57,8 @@ class AccountInvoiceUpdate(models.TransientModel):
'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)
'display_type': line.display_type,
}])
return res
@api.onchange('type')
@@ -141,7 +132,7 @@ class AccountInvoiceUpdate(models.TransientModel):
# be grouped unless journal.group_invoice_line is True
inv_line = self.invoice_id.invoice_line_ids.filtered(
lambda rec: rec.product_id == move_line.product_id)
if len(inv_line) <> 1:
if len(inv_line) != 1:
raise UserError(
"Cannot match a single invoice line to move line %s" %
move_line.name)
@@ -221,7 +212,7 @@ class AccountInvoiceUpdate(models.TransientModel):
mlines[amount].append(line)
else:
mlines[amount] = [line]
for iamount, lines in mlines.iteritems():
for iamount, lines in mlines.items():
if len(lines) != len(new_pterm.get(iamount, [])):
raise UserError(_(
"The original payment term '%s' doesn't have the "
@@ -282,7 +273,7 @@ class AccountInvoiceUpdate(models.TransientModel):
updated = True
line.invoice_line_id.write(ilvals)
if updated:
inv.message_post(_(
inv.message_post(body=_(
'Non-legal fields of invoice updated via the Invoice Update '
'wizard.'))
return True
@@ -297,6 +288,9 @@ class AccountInvoiceLineUpdate(models.TransientModel):
invoice_line_id = fields.Many2one(
'account.invoice.line', string='Invoice Line', readonly=True)
name = fields.Text(string='Description', required=True)
display_type = fields.Selection([
('line_section', "Section"),
('line_note', "Note")], default=False, help="Technical field for UX purpose.")
quantity = fields.Float(
string='Quantity', digits=dp.get_precision('Product Unit of Measure'),
readonly=True)

View File

@@ -6,48 +6,49 @@
<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_form" model="ir.ui.view">
<field name="model">account.invoice.update</field>
<field name="arch" type="xml">
<form string="Update Invoice Wizard">
<group name="main">
<field name="invoice_id" invisible="1"/>
<field name="type" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="reference" attrs="{'invisible': [('type', 'not in', ('in_invoice', 'in_refund'))]}"/>
<field name="origin"/>
<field name="name"/>
<field name="payment_term_id" widget="selection"/>
<field name="partner_bank_id"/>
<field name="user_id"/>
<field name="comment"/>
</group>
<group name="lines">
<field name="line_ids" nolabel="1">
<tree editable="bottom" create="false" delete="false" edit="true">
<field name="invoice_line_id" invisible="1"/>
<field name="display_type" invisible="1"/>
<field name="name"/>
<field name="quantity" attrs="{'invisible': [('display_type', '!=', False)]}"/>
<field name="price_subtotal" attrs="{'invisible': [('display_type', '!=', False)]}"/>
<field name="account_analytic_id" attrs="{'invisible': [('display_type', '!=', False)]}" groups="analytic.group_analytic_accounting"/>
<field name="analytic_tag_ids" attrs="{'invisible': [('display_type', '!=', False)]}" groups="analytic.group_analytic_accounting" widget="many2many_tags"/>
</tree>
</field>
</group>
<footer>
<button name="run" type="object" class="oe_highlight" string="Update"/>
<button special="cancel" string="Cancel" class="oe_link"/>
</footer>
</form>
</field>
</record>
<record id="account_invoice_update_action" model="ir.actions.act_window">
<field name="name">Invoice Update Wizard</field>
<field name="res_model">account.invoice.update</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="account_invoice_update_action" model="ir.actions.act_window">
<field name="name">Invoice Update Wizard</field>
<field name="res_model">account.invoice.update</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</odoo>

View File

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

View File

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

View File

@@ -1,100 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2016-2018 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields, api, _
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=[('deprecated', '=', False)], required=True)
account_reconcile = fields.Boolean(
related='account_id.reconcile', readonly=True)
reconcile = fields.Selection([
('unreconciled', 'Unreconciled or Partially Reconciled'),
('reconciled', 'Fully 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.id
else:
self.account_id =\
self.partner_id.property_account_payable_id.id
def go(self):
self.ensure_one()
action = self.env['ir.actions.act_window'].for_xml_id(
'account', 'action_account_moves_all_a')
action['context'] = {'search_default_account_id': [self.account_id.id]}
if self.partner_id:
action['context']['search_default_partner_id'] =\
[self.partner_id.id]
if self.reconcile:
action['context']['search_default_%s' % self.reconcile] = True
return action
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,47 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
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).
-->
<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="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="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">Show Account</field>
<field name="res_model">account.move.line.filter.wizard</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<menuitem id="account_move_line_filter_wizard_menu"
action="account_move_line_filter_wizard_action"
parent="account.menu_finance_entries"
sequence="-1"/>
</odoo>

View File

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

View File

@@ -1,44 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Account Move Line Start End Dates XLS module for Odoo
# Copyright (C) 2014-2016 Akretion (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Account Move Line Start End Dates XLS',
'version': '0.1',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Adds start and end dates in the XLS export of the move lines',
'description': """
Account Move Line Start End Dates XLS
=====================================
This module adds *Start Date* and *End Date* in the XLS export of the account move lines.
This module has been written by Alexis de Lattre from Akretion
<alexis.delattre@akretion.com>.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com/',
'depends': ['account_cutoff_prepaid', 'account_move_line_report_xls'],
'data': [],
'installable': False,
}

View File

@@ -1,66 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Account Move Line Start End Dates XLS module for Odoo
# Copyright (C) 2014-2016 Akretion (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import xlwt
from openerp import models, api
from openerp.addons.report_xls.utils import _render
from openerp.addons.report_xls.report_xls import report_xls
class AccountMoveLine(models.Model):
_inherit = 'account.move.line'
@api.model
def _report_xls_fields(self):
res = super(AccountMoveLine, self)._report_xls_fields()
return res + ['start_date', 'end_date']
@api.model
def _report_xls_template(self):
res = super(AccountMoveLine, self)._report_xls_template()
bc = '22'
aml_cell_style_date = xlwt.easyxf(
'borders: left thin, right thin, top thin, bottom thin, '
'left_colour %s, right_colour %s, top_colour %s, '
'bottom_colour %s; align: horz left;'
% (bc, bc, bc, bc), num_format_str=report_xls.date_format)
res.update({
'start_date': {
'header': [1, 13, 'text', _render("_('Start Date')")],
'lines': [1, 0, _render(
"line.start_date and line.start_date != 'False' and "
"'date' or 'text'"), _render(
"line.start_date and line.start_date != 'False' and "
"datetime.strptime(line.start_date, '%Y-%m-%d') or None"),
None, aml_cell_style_date],
'totals': [1, 0, 'text', None]},
'end_date': {
'header': [1, 13, 'text', _render("_('End Date')")],
'lines': [1, 0, _render(
"line.end_date and line.end_date != 'False' and "
"'date' or 'text'"), _render(
"line.end_date and line.end_date != 'False' and "
"datetime.strptime(line.end_date, '%Y-%m-%d') or None"),
None, aml_cell_style_date],
'totals': [1, 0, 'text', None]},
})
return res

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

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

View File

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

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

@@ -0,0 +1,96 @@
=================
Account Usability
=================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github
:target: https://github.com/akretion/odoo-usability/tree/12.0/account_usability
:alt: akretion/odoo-usability
|badge1| |badge2| |badge3|
This modules adds the following functions:
* Add an *Overdue* filter on invoice search view (this feature was previously
located in te module *account_invoice_overdue_filter*)
* Increase the default limit of 80 lines in account move and account move line view.
* disable reconciliation "guessing"
* fast search on *Reconcile Ref* for account move line.
* add sale dates to invoice report to be compliant with
https://www.service-public.fr/professionnels-entreprises/vosdroits/F31808
* Sale date on qweb invoices
* A wizard to mark several invoices as sent at once (forward from v8)
* Default date for Account Move Reversal is now D+1 instead of today
* Track more fields on invoice (see details in account.py)
* Add boolean fields `has_discount` and `has_attachment` on invoice
* Add button "Delete line qty = 0" on supplier invoice
* Cut name_get() of invoice if too long
* A script for if Odoo screws up invoice attachment filename
* help functions for py3o reports
* Show code on name_get of journal
* add direct search of journal using code
* add copy=False on some fields
* Add unicity constraint on analytic codes per company
* Better default values on account move
* Add link from account move line to invoice
* Add start_date and end_date on bank statements
* Add transfer_account_id to invoicing config page
* Improve domain reconciliation widget
* account.reconcile.model don't copy name to label via onchange
* Add method to get fiscal position without partner_id
* Restore drill-through on sale and invoice reports
* don't attach PDF upon invoice report generation on supplier invoices/refunds
* Add filter on debit and credit amount for Move Lines
* Add supplier invoice number in invoice tree view
Together with this module, I recommend the use of the following modules:
* account_invoice_supplier_ref_unique (OCA project account-invoicing)
* account_move_line_no_default_search (OCA project account-financial-tools)
* invoice_fiscal_position_update (OCA project account-invoicing)
**Table of contents**
.. contents::
:local:
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/akretion/odoo-usability/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/akretion/odoo-usability/issues/new?body=module:%20account_usability%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Authors
~~~~~~~
* Akretion
Contributors
~~~~~~~~~~~~
* Alexis de Lattre <alexis.delattre@akretion.com>
* David Beal <david.beal@akretion.com>
Maintainers
~~~~~~~~~~~
This module is part of the `akretion/odoo-usability <https://github.com/akretion/odoo-usability/tree/12.0/account_usability>`_ project on GitHub.
You are welcome to contribute.

View File

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

View File

@@ -1,32 +1,13 @@
# -*- coding: utf-8 -*-
# © 2015-2016 Akretion (http://www.akretion.com)
# Copyright 2015-2020 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Account Usability',
'version': '10.0.1.0.0',
'version': '14.0.1.0.0',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Small usability enhancements in account module',
'description': """
Account Usability
=================
The usability enhancements include:
* show the supplier invoice number in the tree view of supplier invoices
* add an *Overdue* filter on invoice search view (this feature was previously located in te module *account_invoice_overdue_filter*)
* Increase the default limit of 80 lines in account move and account move line view.
* Fast search on *Reconcile Ref* for account move line.
* disable reconciliation "guessing"
Together with this module, I recommend the use of the following modules:
* account_invoice_supplier_ref_unique (OCA project account-invoicing)
* account_move_line_no_default_search (OCA project account-financial-tools)
* invoice_fiscal_position_update (OCA project account-invoicing)
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': [
@@ -36,13 +17,22 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
# in v12, I may create a module only for group_nobody
],
'data': [
'account_view.xml',
'account_report.xml',
'account_invoice_report_view.xml',
'partner_view.xml',
'product_view.xml',
'views/account_account_type.xml',
'views/account_account.xml',
'views/account_bank_statement.xml',
'views/account_invoice_report.xml',
'views/account_journal.xml',
'views/account_move.xml',
'views/account_menu.xml',
'views/account_tax.xml',
'views/product.xml',
'views/res_config_settings.xml',
'views/res_partner.xml',
'views/account_report.xml',
'wizard/account_invoice_mark_sent_view.xml',
'wizard/account_move_backtodraft_view.xml',
'wizard/account_group_generate_view.xml',
'wizard/account_payment_register_views.xml',
'security/ir.model.access.csv',
],
'installable': True,
}

View File

@@ -1,686 +0,0 @@
# -*- coding: utf-8 -*-
# © 2015-2016 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields, api, _
from odoo.tools import float_compare, float_is_zero, float_round
from odoo.tools.misc import formatLang
from odoo.exceptions import UserError, ValidationError
from odoo import SUPERUSER_ID
import logging
logger = logging.getLogger(__name__)
class AccountInvoice(models.Model):
_inherit = 'account.invoice'
origin = fields.Char(track_visibility='onchange')
reference = fields.Char(track_visibility='onchange')
sent = fields.Boolean(track_visibility='onchange')
date_invoice = fields.Date(track_visibility='onchange')
date_due = fields.Date(track_visibility='onchange')
payment_term_id = fields.Many2one(track_visibility='onchange')
account_id = fields.Many2one(track_visibility='onchange')
journal_id = fields.Many2one(track_visibility='onchange')
partner_bank_id = fields.Many2one(track_visibility='onchange')
fiscal_position_id = fields.Many2one(track_visibility='onchange')
amount_total = fields.Monetary(track_visibility='onchange')
# for those fields, the 'account' module sets track_visibility='always':
partner_id = fields.Many2one(track_visibility='onchange')
currency_id = fields.Many2one(track_visibility='onchange')
type = fields.Selection(track_visibility='onchange')
amount_untaxed = fields.Monetary(track_visibility='onchange')
# I want to see the number of cancelled invoice in chatter
move_id = fields.Many2one(track_visibility='onchange')
# for invoice report
has_discount = fields.Boolean(
compute='_compute_has_discount', readonly=True)
# has_attachment is useful for those who use attachment to archive
# supplier invoices. It allows them to find supplier invoices
# that don't have any attachment
has_attachment = fields.Boolean(
compute='_compute_has_attachment',
search='_search_has_attachment', readonly=True)
def _compute_has_discount(self):
prec = self.env['decimal.precision'].precision_get('Discount')
for inv in self:
has_discount = False
for line in inv.invoice_line_ids:
if not float_is_zero(line.discount, precision_digits=prec):
has_discount = True
break
inv.has_discount = has_discount
def _compute_has_attachment(self):
iao = self.env['ir.attachment']
for inv in self:
if iao.search_count([
('res_model', '=', 'account.invoice'),
('res_id', '=', inv.id),
('type', '=', 'binary'),
('company_id', '=', inv.company_id.id)]):
inv.has_attachment = True
else:
inv.has_attachment = False
def _search_has_attachment(self, operator, value):
att_inv_ids = {}
if operator == '=':
search_res = self.env['ir.attachment'].search_read([
('res_model', '=', 'account.invoice'),
('type', '=', 'binary'),
('res_id', '!=', False)], ['res_id'])
for att in search_res:
att_inv_ids[att['res_id']] = True
res = [('id', value and 'in' or 'not in', att_inv_ids.keys())]
return res
# when you have an invoice created from a lot of sale orders, the 'name'
# field is very large, which makes the name_get() of that invoice very big
# which screws-up the form view of that invoice because of the link at the
# top of the screen
# That's why we have to cut the name_get() when it's too long
def name_get(self):
old_res = super(AccountInvoice, self).name_get()
res = []
for old_re in old_res:
name = old_re[1]
if name and len(name) > 100:
# nice cut
name = u'%s ...' % ', '.join(name.split(', ')[:3])
# if not enough, hard cut
if len(name) > 120:
name = u'%s ...' % old_re[1][:120]
res.append((old_re[0], name))
return res
# I really hate to see a "/" in the 'name' field of the account.move.line
# generated from customer invoices linked to the partners' account because
# the label of an account move line is an important field, we can't
# write a rubbish '/' in it !
# On a related topic, you should also consider to use this PR:
# https://github.com/OCA/account-invoicing/pull/882
@api.multi
def action_move_create(self):
res = super(AccountInvoice, self).action_move_create()
for inv in self:
self._cr.execute(
"UPDATE account_move_line SET name=%s "
"WHERE move_id=%s AND name='/'", (inv.number, inv.move_id.id))
self.invalidate_cache()
return res
def delete_lines_qty_zero(self):
lines = self.env['account.invoice.line'].search([
('invoice_id', 'in', self.ids), ('quantity', '=', 0)])
lines.unlink()
return True
@api.model
def _fix_invoice_attachment_filename(self):
# This script is designed to fix attachment of invoices
# badly generated by Odoo v8. I found this problem in Nov 2018 at
# Encres Dubuit when investigating a bug where Odoo would create a
# new attachment when printing an old invoice that already had the
# PDF of the invoice as attachment
logger.info('START fix customer invoice attachment filename')
# Run this script as admin to fix problem in all companies
self = self.sudo()
attachs = self.env['ir.attachment'].search([
('res_model', '=', 'account.invoice'),
('res_id', '!=', False),
('type', '=', 'binary'),
('name', '=like', 'INV%.pdf'),
('datas_fname', '=like', 'INV%.pdf.pdf')])
for attach in attachs:
inv = self.browse(attach.res_id)
if inv.type in ('out_invoice', 'out_refund'):
attach.datas_fname = attach.name
logger.info(
'Fixed field datas_fname of attachment ID %s name %s',
attach.id, attach.name)
logger.info('END fix customer invoice attachment filename')
@api.multi
def invoice_print(self):
# Inherit a native method without calling super()
# Don't mark invoice as 'sent' when you just click on 'Print Invoice'
self.ensure_one()
return self.env['report'].get_action(self, 'account.report_invoice')
class AccountInvoiceLine(models.Model):
_inherit = 'account.invoice.line'
# In the 'account' module, we have related stored field for:
# company_id, partner_id, currency_id
invoice_type = fields.Selection(
related='invoice_id.type', store=True, readonly=True)
date_invoice = fields.Date(
related='invoice_id.date_invoice', store=True, readonly=True)
commercial_partner_id = fields.Many2one(
related='invoice_id.partner_id.commercial_partner_id',
store=True, readonly=True, compute_sudo=True)
state = fields.Selection(
related='invoice_id.state', store=True, readonly=True,
string='Invoice State')
invoice_number = fields.Char(
related='invoice_id.move_id.name', store=True, readonly=True,
string='Invoice Number')
class AccountJournal(models.Model):
_inherit = 'account.journal'
hide_bank_statement_balance = fields.Boolean(
string='Hide Bank Statement Balance',
help="You may want to enable this option when your bank "
"journal is generated from a bank statement file that "
"doesn't handle start/end balance (QIF for instance) and "
"you don't want to enter the start/end balance manually: it "
"will prevent the display of wrong information in the accounting "
"dashboard and on bank statements.")
@api.multi
@api.depends(
'name', 'currency_id', 'company_id', 'company_id.currency_id', 'code')
def name_get(self):
res = []
if self._context.get('journal_show_code_only'):
for journal in self:
res.append((journal.id, journal.code))
return res
else:
for journal in self:
currency = journal.currency_id or\
journal.company_id.currency_id
name = "[%s] %s (%s)" % (
journal.code, journal.name, currency.name)
res.append((journal.id, name))
return res
@api.constrains('default_credit_account_id', 'default_debit_account_id')
def _check_account_type_on_bank_journal(self):
bank_acc_type = self.env.ref('account.data_account_type_liquidity')
for jrl in self:
if jrl.type in ('bank', 'cash'):
if (
jrl.default_debit_account_id and
jrl.default_debit_account_id.user_type_id !=
bank_acc_type):
raise ValidationError(_(
"On journal '%s', the default debit account '%s' "
"should be configured with Type = 'Bank and Cash'.")
% (jrl.display_name,
jrl.default_debit_account_id.display_name))
if (
jrl.default_credit_account_id and
jrl.default_credit_account_id.user_type_id !=
bank_acc_type):
raise ValidationError(_(
"On journal '%s', the default credit account '%s' "
"should be configured with Type = 'Bank and Cash'.")
% (jrl.display_name,
jrl.default_credit_account_id.display_name))
class AccountAccount(models.Model):
_inherit = 'account.account'
@api.multi
def name_get(self):
if self._context.get('account_account_show_code_only'):
res = []
for record in self:
res.append((record.id, record.code))
return res
else:
return super(AccountAccount, self).name_get()
# https://github.com/odoo/odoo/issues/23040
@api.model
def _fix_bank_account_types(self):
companies = self.env['res.company'].search([])
if len(companies) > 1 and self.env.user.id != SUPERUSER_ID:
logger.info(
"Multi-company setup detected, running script with sudo ")
self = self.sudo()
logger.info("START the script 'fix bank and cash account types'")
bank_type = self.env.ref('account.data_account_type_liquidity')
asset_type = self.env.ref('account.data_account_type_current_assets')
journals = self.env['account.journal'].search(
[('type', 'in', ('bank', 'cash'))], order='company_id')
journal_accounts_bank_type = self
for journal in journals:
for account in [
journal.default_credit_account_id,
journal.default_debit_account_id]:
if account:
if account.user_type_id != bank_type:
account.user_type_id = bank_type.id
logger.info(
'Company %s: Account %s updated to Bank '
'and Cash type',
account.company_id.display_name, account.code)
if account not in journal_accounts_bank_type:
journal_accounts_bank_type += account
accounts = self.search([
('user_type_id', '=', bank_type.id)], order='company_id, code')
for account in accounts:
if account not in journal_accounts_bank_type:
account.user_type_id = asset_type.id
logger.info(
'Company %s: Account %s updated to Current Asset type',
account.company_id.display_name, account.code)
logger.info("END of the script 'fix bank and cash account types'")
return True
@api.model
def _create_account_groups(self, level=2, name_prefix=u'Comptes '):
'''Should be launched by a script. Make sure the account_group module is installed
(the account_usability module doesn't depend on it currently'''
assert level >= 1
assert isinstance(level, int)
companies = self.env['res.company'].search([])
if len(companies) > 1:
logger.info(
'Multi-company detected: running script create_account_groups '
'as admin')
self = self.sudo()
ago = self.env['account.group']
groups = ago.search([])
if groups:
raise UserError(_("Some account groups already exists"))
accounts = self.search([])
struct = {'childs': {}}
for account in accounts:
if len(account.code) <= level:
logger.warning(
"Account '%s' in company '%s' is smaller than "
"level (%d).",
account.display_name, account.company_id.display_name,
level)
continue
n = 1
parent = struct
gparent = False
while n <= level:
group_code = account.code[:n]
if group_code not in parent['childs']:
new_group = ago.create({
'name': u'%s%s' % (name_prefix or '', group_code),
'code_prefix': group_code,
'parent_id': gparent and gparent.id or False,
})
parent['childs'][group_code] = {'obj': new_group, 'childs': {}}
parent = parent['childs'][group_code]
gparent = parent['obj']
n += 1
account.group_id = gparent.id
class AccountAnalyticAccount(models.Model):
_inherit = 'account.analytic.account'
@api.multi
def name_get(self):
if self._context.get('analytic_account_show_code_only'):
res = []
for record in self:
res.append((record.id, record.code or record.name))
return res
else:
return super(AccountAnalyticAccount, self).name_get()
_sql_constraints = [(
'code_company_unique',
'unique(code, company_id)',
'An analytic account with the same code already '
'exists in the same company!')]
class AccountMove(models.Model):
_inherit = 'account.move'
default_move_line_name = fields.Char(
string='Default Label', states={'posted': [('readonly', True)]})
# By default, we can still modify "ref" when account move is posted
# which seems a bit lazy for me...
ref = fields.Char(states={'posted': [('readonly', True)]})
date = fields.Date(copy=False)
default_account_id = fields.Many2one(
related='journal_id.default_debit_account_id', readonly=True)
default_credit = fields.Float(
compute='_compute_default_credit_debit', readonly=True)
default_debit = fields.Float(
compute='_compute_default_credit_debit', readonly=True)
@api.depends('line_ids.credit', 'line_ids.debit')
def _compute_default_credit_debit(self):
for move in self:
total_debit = total_credit = default_debit = default_credit = 0.0
for l in move.line_ids:
total_debit += l.debit
total_credit += l.credit
# I could use float_compare, but I don't think it's really needed
# in this context
if total_debit > total_credit:
default_credit = total_debit - total_credit
else:
default_debit = total_credit - total_debit
move.default_credit = default_credit
move.default_debit = default_debit
@api.model
def _fix_debit_credit_round_bug(self):
logger.info('START script _fix_debit_credit_round_bug')
moves = self.sudo().search([]) # sudo to search in all companies
bug_move_ids = []
for move in moves:
buggy = False
for l in move.line_ids:
if not float_is_zero(l.debit, precision_digits=2):
debit_rounded = float_round(l.debit, precision_digits=2)
if float_compare(l.debit, debit_rounded, precision_digits=6):
logger.info('Bad move to fix ID %d company_id %d name %s ref %s date %s journal %s (line ID %d debit=%s)', move.id, move.company_id.id, move.name, move.ref, move.date, move.journal_id.code, l.id, l.debit)
buggy = True
break
else:
credit_rounded = float_round(l.credit, precision_digits=2)
if float_compare(l.credit, credit_rounded, precision_digits=6):
logger.info('Bad move to fix ID %d company_id %d name %s ref %s date %s journal %s (line ID %d credit=%s)', move.id, move.company_id.id, move.name, move.ref, move.date, move.journal_id.code, l.id, l.credit)
buggy = True
break
if buggy:
bug_move_ids.append(move.id)
bal = 0.0
max_credit = (False, 0)
for l in move.line_ids:
if not float_is_zero(l.debit, precision_digits=2):
new_debit = float_round(l.debit, precision_digits=2)
self._cr.execute(
'UPDATE account_move_line set debit=%s, balance=%s where id=%s',
(new_debit, new_debit, l.id))
bal -= new_debit
elif not float_is_zero(l.credit, precision_digits=2):
new_credit = float_round(l.credit, precision_digits=2)
self._cr.execute(
'UPDATE account_move_line set credit=%s, balance=%s where id=%s',
(new_credit, new_credit * -1, l.id))
bal += new_credit
if new_credit > max_credit[1]:
max_credit = (l, new_credit)
if not float_is_zero(bal, precision_digits=2):
assert abs(bal) < 0.05
l = max_credit[0]
new_credit = max_credit[1]
new_new_credit = float_round(new_credit - bal, precision_digits=2)
assert new_new_credit > 0
self._cr.execute(
'UPDATE account_move_line set credit=%s, balance=%s where id=%s',
(new_new_credit, new_new_credit * -1, l.id))
logger.info('Move ID %d fixed', move.id)
logger.info('%d buggy moves fixed (IDs: %s)', len(bug_move_ids), bug_move_ids)
logger.info('END detect_equilibre_bug')
class AccountMoveLine(models.Model):
_inherit = 'account.move.line'
# Native order:
# _order = "date desc, id desc"
# Problem: when you manually create a journal entry, the
# order of the lines is inverted when you save ! It is quite annoying for
# the user...
_order = "date desc, id asc"
# Update field only to add a string (there is no string in account module)
invoice_id = fields.Many2one(string='Invoice')
date_maturity = fields.Date(copy=False)
account_reconcile = fields.Boolean(
related='account_id.reconcile', readonly=True)
full_reconcile_id = fields.Many2one(string='Full Reconcile')
matched_debit_ids = fields.One2many(string='Partial Reconcile Debit')
matched_credit_ids = fields.One2many(string='Partial Reconcile Credit')
reconcile_string = fields.Char(
compute='_compute_reconcile_string', string='Reconcile', store=True)
@api.onchange('credit')
def _credit_onchange(self):
prec = self.env['decimal.precision'].precision_get('Account')
if (
not float_is_zero(self.credit, precision_digits=prec) and
not float_is_zero(self.debit, precision_digits=prec)):
self.debit = 0
@api.onchange('debit')
def _debit_onchange(self):
prec = self.env['decimal.precision'].precision_get('Account')
if (
not float_is_zero(self.debit, precision_digits=prec) and
not float_is_zero(self.credit, precision_digits=prec)):
self.credit = 0
@api.onchange('currency_id', 'amount_currency')
def _amount_currency_change(self):
prec = self.env['decimal.precision'].precision_get('Account')
if (
self.currency_id and
not float_is_zero(self.amount_currency, precision_digits=prec)):
date = self.date or None
amount_company_currency = self.currency_id.with_context(
date=date).compute(
self.amount_currency, self.env.user.company_id.currency_id)
precision = self.env['decimal.precision'].precision_get('Account')
if float_compare(
amount_company_currency, 0,
precision_digits=precision) == -1:
self.credit = amount_company_currency * -1
else:
self.debit = amount_company_currency
def show_account_move_form(self):
self.ensure_one()
action = self.env['ir.actions.act_window'].for_xml_id(
'account', 'action_move_line_form')
action.update({
'res_id': self.move_id.id,
'view_id': False,
'views': False,
'view_mode': 'form,tree',
})
return action
@api.depends(
'full_reconcile_id', 'matched_debit_ids', 'matched_credit_ids')
def _compute_reconcile_string(self):
for line in self:
rec_str = False
if line.full_reconcile_id:
rec_str = line.full_reconcile_id.name
else:
rec_str = ', '.join([
'a%d' % pr.id for pr in line.matched_debit_ids + line.matched_credit_ids])
line.reconcile_string = rec_str
class AccountPartialReconcile(models.Model):
_inherit = "account.partial.reconcile"
_rec_name = "id"
def name_get(self):
res = []
for rec in self:
# There is no seq for partial rec, so I simulate one with the ID
# Prefix for full rec: 'A' (upper case)
# Prefix for partial rec: 'a' (lower case)
amount_fmt = formatLang(self.env, rec.amount, currency_obj=rec.company_currency_id)
name = 'a%d (%s)' % (rec.id, amount_fmt)
res.append((rec.id, name))
return res
class AccountBankStatement(models.Model):
_inherit = 'account.bank.statement'
start_date = fields.Date(
compute='_compute_dates', string='Start Date', readonly=True,
store=True)
end_date = fields.Date(
compute='_compute_dates', string='End Date', readonly=True,
store=True)
hide_bank_statement_balance = fields.Boolean(
related='journal_id.hide_bank_statement_balance', readonly=True)
@api.multi
@api.depends('line_ids.date')
def _compute_dates(self):
for st in self:
dates = [line.date for line in st.line_ids]
st.start_date = dates and min(dates) or False
st.end_date = dates and max(dates) or False
@api.multi
@api.depends('name', 'start_date', 'end_date')
def name_get(self):
res = []
for statement in self:
name = "%s (%s => %s)" % (
statement.name, statement.start_date, statement.end_date)
res.append((statement.id, name))
return res
class AccountBankStatementLine(models.Model):
_inherit = 'account.bank.statement.line'
# Native order is:
# _order = 'statement_id desc, sequence, id desc'
_order = 'statement_id desc, date desc, sequence, id desc'
# Disable guessing for reconciliation
# because my experience with several customers shows that it is a problem
# in the following scenario : move line 'x' has been "guessed" by OpenERP
# to be reconciled with a statement line 'Y' at the end of the bank
# statement, but it is a mistake because it should be reconciled with
# statement line 'B' at the beginning of the bank statement
# When the user is on statement line 'B', he tries to select
# move line 'x', but it can't find it... because it is already "reserved"
# by the guess of OpenERP for statement line 'Y' ! To solve this problem,
# the user must go to statement line 'Y' and unselect move line 'x'
# and then come back on statement line 'B' and select move line 'A'...
# but non super-expert users can't do that because it is impossible to
# figure out that the fact that the user can't find move line 'x'
# is caused by this.
# Set search_reconciliation_proposition to False by default
# TODO: re-write in v10
# def get_data_for_reconciliations(
# self, cr, uid, ids, excluded_ids=None,
# search_reconciliation_proposition=False, context=None):
# # Make variable name shorted for PEP8 !
# search_rec_prop = search_reconciliation_proposition
# return super(AccountBankStatementLine, self).\
# get_data_for_reconciliations(
# cr, uid, ids, excluded_ids=excluded_ids,
# search_reconciliation_proposition=search_rec_prop,
# context=context)
def _prepare_reconciliation_move(self, move_ref):
vals = super(AccountBankStatementLine, self).\
_prepare_reconciliation_move(move_ref)
# By default, ref contains the name of the statement + name of the
# statement line. It causes 2 problems:
# 1) The 'ref' field is too big
# 2) The name of the statement line is already written in the name of
# the move line -> not useful to have the info 2 times
# In the end, I think it's better to just put nothing (we could write
# the name of the statement which has the account number, but it
# doesn't bring any useful info to the accountant)
# The only "good" thing to do would be to have a sequence per
# statement line and write it in this 'ref' field
# But that would required an additionnal field on statement lines
vals['ref'] = False
return vals
def get_statement_line_for_reconciliation_widget(self):
# In the work interface of the bank statement, when a partner_id
# is selected, Odoo displays its 'name' => we prefer that it
# displays its 'display_name'.
data = super(AccountBankStatementLine, self).get_statement_line_for_reconciliation_widget()
if self.partner_id:
data['partner_name'] = self.partner_id.display_name
return data
@api.multi
def show_account_move(self):
self.ensure_one()
action = self.env['ir.actions.act_window'].for_xml_id(
'account', 'action_move_journal_line')
if self.journal_entry_ids:
action.update({
'views': False,
'view_id': False,
'view_mode': 'form,tree',
'res_id': self.journal_entry_ids[0].id,
})
return action
else:
raise UserError(_(
'No journal entry linked to this bank statement line.'))
class AccountFiscalPosition(models.Model):
_inherit = 'account.fiscal.position'
note = fields.Text(translate=True)
@api.model
def get_fiscal_position_no_partner(
self, company_id=None, vat_subjected=False, country_id=None):
'''This method is inspired by the method get_fiscal_position()
in odoo/addons/account/partner.py : it uses the same algo
but without a real partner.
Returns a recordset of fiscal position, or False'''
domains = [[
('auto_apply', '=', True),
('vat_required', '=', vat_subjected),
('company_id', '=', company_id)]]
if vat_subjected:
domains += [[
('auto_apply', '=', True),
('vat_required', '=', False),
('company_id', '=', company_id)]]
for domain in domains:
if country_id:
fps = self.search(
domain + [('country_id', '=', country_id)], limit=1)
if fps:
return fps[0]
fps = self.search(
domain +
[('country_group_id.country_ids', '=', country_id)],
limit=1)
if fps:
return fps[0]
fps = self.search(
domain +
[('country_id', '=', None), ('country_group_id', '=', None)],
limit=1)
if fps:
return fps[0]
return False
class AccountReconcileModel(models.Model):
_inherit = 'account.reconcile.model'
@api.onchange('name')
def onchange_name(self):
# Do NOT copy by default name on label
# Because it's much better to have the bank statement line label as
# label of the counter-part move line, then the label of the button
assert True # Stupid line of code just to have something...

View File

@@ -1,27 +0,0 @@
# -*- 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
class AccountInvoiceReport(models.Model):
_inherit = 'account.invoice.report'
number = fields.Char(string="Number", readonly=True)
def _sub_select(self):
select_str = super(AccountInvoiceReport, self)._sub_select()
select_str += ", ai.number"
return select_str
def _select(self):
select_str = super(AccountInvoiceReport, self)._select()
select_str += ", sub.number"
return select_str
def _group_by(self):
group_by_str = super(AccountInvoiceReport, self)._group_by()
group_by_str += ", ai.number"
return group_by_str

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Akretion (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="account.account_invoices" model="ir.actions.report.xml">
<!-- Don't attach on supplier invoices/refunds ! -->
<field name="attachment">(object.type in ('out_invoice', 'out_refund')) and (object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')</field>
</record>
</odoo>

View File

@@ -1,53 +0,0 @@
diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py
index dc3247154be..077e004b53c 100644
--- a/addons/account/models/account_bank_statement.py
+++ b/addons/account/models/account_bank_statement.py
@@ -566,7 +566,13 @@ class AccountBankStatementLine(models.Model):
"""
# Blue lines = payment on bank account not assigned to a statement yet
reconciliation_aml_accounts = [self.journal_id.default_credit_account_id.id, self.journal_id.default_debit_account_id.id]
- domain_reconciliation = ['&', '&', ('statement_id', '=', False), ('account_id', 'in', reconciliation_aml_accounts), ('payment_id','<>', False)]
+ # AKRETION HACK 11/7/2017
+ # Remove ('payment_id','<>', False) in order to allow to select move lines
+ # generated from payment orders or check deposit
+ # but I add ('journal_id', '=', self.journal_id.id) to exclude the
+ # opening entry of the first fiscal year
+ #domain_reconciliation = ['&', '&', ('statement_id', '=', False), ('account_id', 'in', reconciliation_aml_accounts), ('payment_id','<>', False)]
+ domain_reconciliation = ['&', '&', ('statement_id', '=', False), ('account_id', 'in', reconciliation_aml_accounts), ('journal_id', '=', self.journal_id.id)]
# Black lines = unreconciled & (not linked to a payment or open balance created by statement
domain_matching = [('reconciled', '=', False)]
diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py
index 6a0fed7d143..ecc2ed67936 100644
--- a/addons/account/models/account_move.py
+++ b/addons/account/models/account_move.py
@@ -633,6 +633,7 @@ class AccountMoveLine(models.Model):
domain = expression.AND([domain, [('id', 'not in', excluded_ids)]])
if str:
str_domain = [
+ '|', ('account_id.code', '=ilike', str + '%'),
'|', ('move_id.name', 'ilike', str),
'|', ('move_id.ref', 'ilike', str),
'|', ('date_maturity', 'like', str),
diff --git a/addons/account/static/src/js/account_reconciliation_widgets.js b/addons/account/static/src/js/account_reconciliation_widgets.js
index 5d00984157c..836fe37fc2f 100644
--- a/addons/account/static/src/js/account_reconciliation_widgets.js
+++ b/addons/account/static/src/js/account_reconciliation_widgets.js
@@ -76,7 +76,7 @@ var abstractReconciliation = Widget.extend(ControlPanelMixin, {
this.model_res_users = new Model("res.users");
this.model_tax = new Model("account.tax");
this.model_presets = new Model("account.reconcile.model");
- this.max_move_lines_displayed = 5;
+ this.max_move_lines_displayed = 15;
// Number of reconciliations loaded initially and by clicking 'show more'
this.num_reconciliations_fetched_in_batch = 10;
this.animation_speed = 100; // "Blocking" animations
@@ -1757,7 +1757,7 @@ var bankStatementReconciliationLine = abstractReconciliationLine.extend({
relation: "res.partner",
string: _t("Partner"),
type: "many2one",
- domain: [['parent_id','=',false], '|', ['customer','=',true], ['supplier','=',true]],
+ domain: [['parent_id','=',false]], // AKRETION HACK 26/6/2017 allow all parent partners
help: "",
readonly: false,
required: true,

View File

@@ -1,14 +0,0 @@
diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py
index 4374528..aea1361 100644
--- a/addons/account/models/account_bank_statement.py
+++ b/addons/account/models/account_bank_statement.py
@@ -1008,7 +1008,7 @@ class AccountBankStatementLine(models.Model):
#record the move name on the statement line to be able to retrieve it in case of unreconciliation
self.write({'move_name': move.name})
payment.write({'payment_reference': move.name})
- elif self.move_name:
- raise UserError(_('Operation not allowed. Since your statement line already received a number, you cannot reconcile it entirely with existing journal entries otherwise it would make a gap in the numbering. You should book an entry and make a regular revert of it in case you want to cancel it.'))
+ #elif self.move_name:
+ # raise UserError(_('Operation not allowed. Since your statement line already received a number, you cannot reconcile it entirely with existing journal entries otherwise it would make a gap in the numbering. You should book an entry and make a regular revert of it in case you want to cancel it.'))
counterpart_moves.assert_balanced()
return counterpart_moves

View File

@@ -1,636 +0,0 @@
<?xml version="1.0" encoding="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).
-->
<odoo>
<!-- INVOICE -->
<record id="invoice_supplier_form" model="ir.ui.view">
<field name="name">account_usability.supplier.invoice.form</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<field name="fiscal_position_id" position="attributes">
<attribute name="widget">selection</attribute>
</field>
<field name="invoice_line_ids" position="before">
<button name="delete_lines_qty_zero" states="draft" string="⇒ Delete lines qty=0" type="object" class="oe_link oe_right" groups="account.group_account_invoice"/>
</field>
<xpath expr="//field[@name='tax_line_ids']/tree/field[@name='amount']" position="before">
<field name="base" readonly="1"/>
</xpath>
</field>
</record>
<record id="invoice_form" model="ir.ui.view">
<field name="name">account_usability.invoice.form</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<field name="fiscal_position_id" position="attributes">
<attribute name="widget">selection</attribute>
</field>
<!-- move sent field and make it visible -->
<field name="sent" position="replace"/>
<field name="move_id" position="before">
<field name="sent"/>
</field>
<xpath expr="//field[@name='tax_line_ids']/tree/field[@name='amount']" position="before">
<field name="base" readonly="1"/>
</xpath>
<!-- Don't allow to force tax amount on CUSTOMER invoices -->
<xpath expr="//field[@name='tax_line_ids']/tree/field[@name='amount']" position="attributes">
<attribute name="readonly">1</attribute>
</xpath>
<!-- Warning: there are 2 invoice_print buttons in the native view... probably a bug -->
<xpath expr="//button[@name='invoice_print']" position="attributes">
<attribute name="attrs">{'invisible': [('state', 'not in', ('open', 'paid'))]}</attribute>
</xpath>
<xpath expr="//button[@name='invoice_print'][2]" position="attributes">
<attribute name="attrs">{'invisible': True}</attribute>
</xpath>
</field>
</record>
<record id="invoice_tree" model="ir.ui.view">
<field name="name">account_usability.invoice_tree</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_tree"/>
<field name="arch" type="xml">
<field name="reference" position="attributes">
<attribute name="invisible">not context.get('type') in ('in_invoice', 'in_refund')</attribute>
</field>
</field>
</record>
<record id="view_account_invoice_filter" model="ir.ui.view">
<field name="name">account_usability.invoice.search</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.view_account_invoice_filter"/>
<field name="arch" type="xml">
<filter name="late" position="after">
<separator/>
<filter name="to_send" string="To Send" domain="[('sent', '=', False), ('state', 'in', ('open', 'paid'))]"/>
<filter name="sent" string="Sent" domain="[('sent', '=', True)]"/>
<separator/>
<filter name="no_attachment" string="Missing Attachment" domain="[('has_attachment', '=', False)]"/>
</filter>
</field>
</record>
<!-- Having a menu entry on invoice lines is often very usefull for odoo user:
they can search in their lines, etc...
So I enhance the generic views and add actions, but I don't add menu entries here ;
the creation of the corresponding menu entry should be done in the customer-specifc
module -->
<record id="view_invoice_line_tree" model="ir.ui.view">
<field name="name">account_usability.invoice_line_tree</field>
<field name="model">account.invoice.line</field>
<field name="inherit_id" ref="account.view_invoice_line_tree"/>
<field name="arch" type="xml">
<field name="name" position="before">
<field name="partner_id" invisible="not context.get('show_invoice_fields')"/>
<field name="date_invoice" invisible="not context.get('show_invoice_fields')"/>
<field name="invoice_number" invisible="not context.get('show_invoice_fields')"/>
</field>
<field name="currency_id" position="after">
<field name="state" invisible="not context.get('show_invoice_fields')"/>
<field name="invoice_type" invisible="1"/>
</field>
<field name="quantity" position="attributes">
<attribute name="sum">1</attribute>
</field>
<xpath expr="/tree" position="attributes">
<attribute name="decoration-info">state == 'draft'</attribute>
<attribute name="decoration-muted">state == 'cancel'</attribute>
<attribute name="edit">0</attribute>
<attribute name="create">0</attribute>
</xpath>
</field>
</record>
<record id="account_invoice_line_search" model="ir.ui.view">
<field name="name">account_usability.invoice_line_search</field>
<field name="model">account.invoice.line</field>
<field name="arch" type="xml">
<search string="Search Invoice Lines">
<field name="partner_id"/>
<field name="product_id"/>
<field name="account_id"/>
<field name="invoice_number"/>
<field name="name"/>
<filter name="out_invoice" string="Customer Invoices"
domain="[('invoice_type', '=', 'out_invoice')]"/>
<filter name="out_refund" string="Customer Refunds"
domain="[('invoice_type', '=', 'out_refund')]"/>
<filter name="in_invoice" string="Supplier Invoices"
domain="[('invoice_type', '=', 'in_invoice')]"/>
<filter name="in_refund" string="Supplier Refunds"
domain="[('invoice_type', '=', 'in_refund')]"/>
<separator/>
<filter name="draft" string="Draft" domain="[('state', '=', 'draft')]"/>
<filter name="unpaid" string="Not Paid" domain="[('state', '=', 'open')]"/>
<filter name="paid" string="Paid" domain="[('state', '=', 'paid')]"/>
<group string="Group By" name="groupby">
<filter name="partner_groupby" string="Partner"
context="{'group_by': 'partner_id'}"/>
<filter name="date_groupby" string="Invoice Date"
context="{'group_by': 'date_invoice'}"/>
<filter name="product_groupby" string="Product"
context="{'group_by': 'product_id'}"/>
<filter name="account_groupby" string="Account"
context="{'group_by': 'account_id'}"/>
</group>
</search>
</field>
</record>
<record id="out_invoice_line_action" model="ir.actions.act_window">
<field name="name">Customer Invoice Lines</field>
<field name="res_model">account.invoice.line</field>
<field name="view_mode">tree</field> <!-- no access to form view until we have a proper readonly system for non draft invoices -->
<field name="domain">[('invoice_type', '=', 'out_invoice')]</field>
<field name="context">{'show_invoice_fields': True}</field>
</record>
<record id="out_refund_line_action" model="ir.actions.act_window">
<field name="name">Customer Refund Lines</field>
<field name="res_model">account.invoice.line</field>
<field name="view_mode">tree</field> <!-- no access to form view until we have a proper readonly system for non draft invoices -->
<field name="domain">[('invoice_type', '=', 'out_refund')]</field>
<field name="context">{'show_invoice_fields': True}</field>
</record>
<record id="out_invoice_refund_line_action" model="ir.actions.act_window">
<field name="name">Customer Invoice Lines</field>
<field name="res_model">account.invoice.line</field>
<field name="view_mode">tree</field> <!-- no access to form view until we have a proper readonly system for non draft invoices -->
<field name="domain">[('invoice_type', 'in', ('out_invoice', 'out_refund'))]</field>
<field name="context">{'show_invoice_fields': True}</field>
</record>
<record id="in_invoice_line_action" model="ir.actions.act_window">
<field name="name">Supplier Invoice Lines</field>
<field name="res_model">account.invoice.line</field>
<field name="view_mode">tree</field> <!-- no access to form view until we have a proper readonly system for non draft invoices -->
<field name="domain">[('invoice_type', '=', 'in_invoice')]</field>
<field name="context">{'show_invoice_fields': True}</field>
</record>
<record id="in_refund_line_action" model="ir.actions.act_window">
<field name="name">Supplier Refund Lines</field>
<field name="res_model">account.invoice.line</field>
<field name="view_mode">tree</field> <!-- no access to form view until we have a proper readonly system for non draft invoices -->
<field name="domain">[('invoice_type', '=', 'in_refund')]</field>
<field name="context">{'show_invoice_fields': True}</field>
</record>
<record id="in_invoice_refund_line_action" model="ir.actions.act_window">
<field name="name">Supplier Invoice Lines</field>
<field name="res_model">account.invoice.line</field>
<field name="view_mode">tree</field> <!-- no access to form view until we have a proper readonly system for non draft invoices -->
<field name="domain">[('invoice_type', 'in', ('in_invoice', 'in_refund'))]</field>
<field name="context">{'show_invoice_fields': True}</field>
</record>
<record id="view_account_invoice_report_search" model="ir.ui.view">
<field name="name">usability.account.invoice.report.search</field>
<field name="model">account.invoice.report</field>
<field name="inherit_id" ref="account.view_account_invoice_report_search"/>
<field name="arch" type="xml">
<field name="categ_id" position="after">
<field name="product_id"/>
</field>
<filter name="thisyear" position="after">
<filter name="this_year_and_previous" string="This year and previous" domain="['|', ('date', '=', False), '&amp;',('date','&lt;=', (context_today() + relativedelta(day=31, month=12)).strftime('%Y-%m-%d')), ('date', '&gt;=', (context_today() + relativedelta(day=1, month=1, years=-1)).strftime('%Y-%m-%d'))]"/>
</filter>
</field>
</record>
<record id="account_invoice_report_tree" model="ir.ui.view">
<field name="name">usability.account.invoice.report.tree</field>
<field name="model">account.invoice.report</field>
<field name="arch" type="xml">
<tree string="Invoices Analysis">
<field name="date"/>
<field name="commercial_partner_id"/>
<field name="type"/>
<field name="product_id"/>
<field name="product_qty" sum="1"/>
<field name="price_total" sum="1"/>
<field name="state"/>
<field name="currency_id" invisible="1"/>
<field name="company_id" groups="base.group_multi_company"/>
</tree>
</field>
</record>
<record id="account.action_account_invoice_report_all_supp" model="ir.actions.act_window">
<field name="view_mode">pivot,graph,tree</field>
<field name="context">{'search_default_current':1, 'search_default_supplier':1, 'search_default_year': 1}</field>
</record>
<record id="account.action_account_invoice_report_all" model="ir.actions.act_window">
<field name="view_mode">pivot,graph,tree</field>
<field name="context">{'search_default_current':1, 'search_default_customer':1, 'search_default_year': 1}</field>
</record>
<record id="view_account_invoice_report_pivot" model="ir.ui.view">
<field name="name">usability.account.invoice.report.pivot</field>
<field name="model">account.invoice.report</field>
<field name="inherit_id" ref="account.view_account_invoice_report_pivot"/>
<field name="arch" type="xml">
<xpath expr="/pivot" position="attributes">
<attribute name="disable_linking"></attribute>
</xpath>
</field>
</record>
<record id="view_invoice_tax_form" model="ir.ui.view">
<field name="name">usability.account.invoice.tax.form</field>
<field name="model">account.invoice.tax</field>
<field name="inherit_id" ref="account.view_invoice_tax_form"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="tax_id"/>
</field>
</field>
</record>
<record id="view_account_payment_form" model="ir.ui.view">
<field name="name">usability.account.payment.form</field>
<field name="model">account.payment</field>
<field name="inherit_id" ref="account.view_account_payment_form"/>
<field name="arch" type="xml">
<field name="communication" position="after">
<field name="payment_reference"/>
</field>
</field>
</record>
<!-- model account.move.line / Journal Items -->
<record id="account.action_account_moves_all_a" model="ir.actions.act_window">
<field name="limit">200</field>
<!-- Win space, because there are already many columns -->
<field name="context">{'journal_show_code_only': True}</field>
</record>
<!-- remove base.group_no_one on Journal Items-->
<record id="account.menu_action_account_moves_all" model="ir.ui.menu">
<field name="groups_id" eval="[(6, 0, [ref('account.group_account_user')])]"/>
</record>
<!-- accountant must be able to access the Adviser section ! -->
<record id="account.menu_finance_entries" model="ir.ui.menu">
<field name="groups_id" eval="[(4, ref('account.group_account_user'))]"/>
</record>
<!-- model account.move / Journal Entries -->
<record id="account.action_move_journal_line" model="ir.actions.act_window">
<field name="limit">200</field>
<field name="context">{}</field> <!-- Don't filter by default on misc journal -->
</record>
<record id="view_move_form" model="ir.ui.view">
<field name="name">account_usability.account_move_form</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<field name="ref" position="after">
<field name="default_move_line_name"/>
<field name="default_account_id" invisible="1"/>
<field name="default_credit" invisible="1"/>
<field name="default_debit" invisible="1"/>
</field>
<xpath expr="//field[@name='line_ids']" position="attributes">
<attribute name="context" operation="python_dict" key="default_name">default_move_line_name</attribute>
<attribute name="context" operation="python_dict" key="default_account_id">default_account_id</attribute>
<attribute name="context" operation="python_dict" key="default_credit">default_credit</attribute>
<attribute name="context" operation="python_dict" key="default_debit">default_debit</attribute>
</xpath>
<xpath expr="//field[@name='line_ids']/tree/field[@name='credit']" position="after">
<field name="reconcile_string"/>
</xpath>
</field>
</record>
<record id="view_account_move_line_filter" model="ir.ui.view">
<field name="name">account_usability.account_move_line_search</field>
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.view_account_move_line_filter"/>
<field name="arch" type="xml">
<filter domain="[('move_id.state','=','draft')]" position="before">
<filter name="current_year" string="Current Year" domain="[('date', '&gt;=', (context_today().strftime('%Y-01-01'))), ('date', '&lt;=', (context_today().strftime('%Y-12-31')))]"/>
<filter name="previous_year" string="Previous Year" domain="[('date', '&gt;=', (context_today() + relativedelta(day=1, month=1, years=-1)).strftime('%Y-%m-%d')), ('date', '&lt;=', (context_today() + relativedelta(day=31, month=12, years=-1)).strftime('%Y-%m-%d'))]"/>
<separator/>
</filter>
<field name="partner_id" position="after">
<field name="reconcile_string" />
<field name="debit" filter_domain="['|', ('debit', '=', self), ('credit', '=', self)]" string="Debit or Credit"/>
</field>
<filter name="unreconciled" position="before">
<filter name="reconciled" string="Fully Reconciled" domain="[('full_reconcile_id', '!=', False)]"/>
<!-- <filter name="partial_reconciled" string="Partially Reconciled" domain="[('reconcile_partial_id', '!=', False)]"/> -->
</filter>
<filter name="unreconciled" position="attributes">
<attribute name="string">Unreconciled or Partially Reconciled</attribute>
</filter>
<field name="name" position="attributes">
<attribute name="string">Name or Reference</attribute>
</field>
<field name="partner_id" position="attributes">
<attribute name="domain">['|', ('parent_id', '=', False), ('is_company', '=', True)]</attribute>
</field>
</field>
</record>
<record id="view_move_line_form" model="ir.ui.view">
<field name="name">account_usability.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">
<field name="quantity" position="after">
<field name="product_id" />
</field>
<field name="move_id" position="after">
<field name="invoice_id"/>
<field name="account_reconcile" invisible="1"/>
</field>
<xpath expr="//field[@name='full_reconcile_id']/.." position="replace">
<field name="full_reconcile_id" nolabel="1"/> <!-- label is already in view -->
<field name="matched_debit_ids" readonly="1" widget="many2many_tags" attrs="{'invisible': ['|', ('full_reconcile_id', '!=', False), ('matched_debit_ids', '=', [])]}"/>
<field name="matched_credit_ids" readonly="1" widget="many2many_tags" attrs="{'invisible': ['|', ('full_reconcile_id', '!=', False), ('matched_credit_ids', '=', [])]}"/>
<field name="reconciled" invisible="1"/>
<button name="open_reconcile_view" class="oe_link" type="object"
string="-> View partially reconciled entries" colspan="2"
attrs="{'invisible': ['|', ('full_reconcile_id', '!=', False), '&amp;', ('matched_debit_ids', '=', []),('matched_credit_ids', '=', [])]}"/>
<span colspan="2" attrs="{'invisible': ['|', '|', ('full_reconcile_id', '!=', False), ('matched_debit_ids', '!=', []), ('matched_credit_ids', '!=', [])]}" class="o_form_field">No Partial Reconcile</span>
</xpath>
<xpath expr="//label[@for='full_reconcile_id']/.." position="attributes">
<attribute name="attrs">{'invisible': [('account_reconcile', '=', False)]}</attribute>
</xpath>
</field>
</record>
<record id="view_move_line_tree" model="ir.ui.view">
<field name="name">account_usability.account_move_line_tree</field>
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.view_move_line_tree"/>
<field name="arch" type="xml">
<field name="full_reconcile_id" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="credit" position="after">
<field name="balance" sum="Total Balance"/>
<field name="reconcile_string"/>
</field>
<field name="date_maturity" position="after">
<button name="show_account_move_form" type="object" icon="fa-arrows-h" string="Show Journal Entry"/>
</field>
</field>
</record>
<!-- By default, the pivot view displays the journal as row
which is really not interesting from an accountant point of view
So I prefer to display account_id by default on row.
The only drawback is that it makes quite a big pivot table
by default -->
<record id="view_move_line_pivot" model="ir.ui.view">
<field name="name">usability.account.move.line.pivot</field>
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.view_move_line_pivot"/>
<field name="arch" type="xml">
<field name="journal_id" position="replace">
<field name="account_id" type="row"/>
</field>
</field>
</record>
<record id="view_account_move_filter" model="ir.ui.view">
<field name="name">account_usability.account_move_search</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_account_move_filter"/>
<field name="arch" type="xml">
<field name="partner_id" position="attributes">
<attribute name="domain">['|', ('parent_id', '=', False), ('is_company', '=', True)]</attribute>
</field>
</field>
</record>
<record id="view_account_search" model="ir.ui.view">
<field name="name">account.account.search</field>
<field name="model">account.account</field>
<field name="inherit_id" ref="account.view_account_search"/>
<field name="arch" type="xml">
<!-- The native "name" filter uses a domain ['|', ('name','ilike',self), ('code','=like',str(self)+'%')]
This is good because it uses '=like' on 'code', but sometimes there are digits in account names,
so you get additionnal unexpected accounts in the result of the search -->
<field name="name" position="after">
<field name="code" filter_domain="[('code', '=like', str(self)+'%')]" string="Code"/>
</field>
</field>
</record>
<record id="view_account_type_tree" model="ir.ui.view">
<field name="name">account_usability.account_type_tree</field>
<field name="model">account.account.type</field>
<field name="inherit_id" ref="account.view_account_type_tree" />
<field name="arch" type="xml">
<field name="type" position="after">
<field name="include_initial_balance" />
</field>
</field>
</record>
<record id="view_account_journal_form" model="ir.ui.view">
<field name="name">usability.account.journal.form</field>
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.view_account_journal_form"/>
<field name="arch" type="xml">
<field name="bank_statements_source" position="after">
<field name="hide_bank_statement_balance"/>
</field>
</field>
</record>
<record id="account_journal_dashboard_kanban_view" model="ir.ui.view">
<field name="name">usability.account.journal.dashboard</field>
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.account_journal_dashboard_kanban_view"/>
<field name="arch" type="xml">
<field name="show_on_dashboard" position="after">
<field name="hide_bank_statement_balance"/>
</field>
<xpath expr="//div[@name='latest_statement']/.." position="attributes">
<attribute name="t-if">dashboard.last_balance != dashboard.account_balance &amp;&amp; !record.hide_bank_statement_balance.raw_value</attribute>
</xpath>
</field>
</record>
<record id="view_account_journal_tree" model="ir.ui.view">
<field name="name">usability.account.journal.tree</field>
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.view_account_journal_tree"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="code"/>
</field>
</field>
</record>
<record id="view_account_journal_search" model="ir.ui.view">
<field name="name">usability.account.journal.search</field>
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.view_account_journal_search"/>
<field name="arch" type="xml">
<filter name="dashboard" position="after">
<group name="groupby" string="Group By">
<filter name="type_groupby" string="Type" context="{'group_by': 'type'}"/>
</group>
</filter>
</field>
</record>
<record id="view_bank_statement_form" model="ir.ui.view">
<field name="name">usability.account.bank.statement.form</field>
<field name="model">account.bank.statement</field>
<field name="inherit_id" ref="account.view_bank_statement_form"/>
<field name="arch" type="xml">
<button name="button_cancel" position="attributes">
<attribute name="invisible">1</attribute>
</button>
<xpath expr="//field[@name='line_ids']/tree/field[@name='bank_account_id']" position="after">
<!-- The cancel button is provided by the account_cancel module, but we don't want to depend on it -->
<button name="show_account_move" type="object"
string="View Account Move" icon="fa fa-arrow-right"
attrs="{'invisible': [('journal_entry_ids', '=', [])]}"/>
</xpath>
<field name="date" position="after">
<field name="start_date"/>
<field name="end_date"/>
<field name="hide_bank_statement_balance" invisible="1"/>
</field>
<field name="date" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<label for="balance_start" position="attributes">
<attribute name="attrs">{'invisible': [('hide_bank_statement_balance', '=', True)]}</attribute>
</label>
<label for="balance_end_real" position="attributes">
<attribute name="attrs">{'invisible': [('hide_bank_statement_balance', '=', True)]}</attribute>
</label>
<xpath expr="//field[@name='balance_start']/.." position="attributes">
<attribute name="attrs">{'invisible': [('hide_bank_statement_balance', '=', True)]}</attribute>
</xpath>
<xpath expr="//field[@name='balance_end_real']/.." position="attributes">
<attribute name="attrs">{'invisible': [('hide_bank_statement_balance', '=', True)]}</attribute>
</xpath>
<group name="sale_total" position="attributes">
<attribute name="attrs">{'invisible': [('hide_bank_statement_balance', '=', True)]}</attribute>
</group>
</field>
</record>
<record id="view_bank_statement_tree" model="ir.ui.view">
<field name="name">usability.account.bank.statement.tree</field>
<field name="model">account.bank.statement</field>
<field name="inherit_id" ref="account.view_bank_statement_tree"/>
<field name="arch" type="xml">
<field name="date" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="journal_id" position="after">
<field name="start_date"/>
<field name="end_date"/>
</field>
</field>
</record>
<record id="view_bank_statement_search" model="ir.ui.view">
<field name="name">usability.account.bank.statement.search</field>
<field name="model">account.bank.statement</field>
<field name="inherit_id" ref="account.view_bank_statement_search"/>
<field name="arch" type="xml">
<field name="date" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="date" position="after">
<field name="start_date"/>
<field name="end_date"/>
</field>
<filter context="{'group_by': 'date'}" position="attributes">
<attribute name="invisible">1</attribute>
</filter>
<filter context="{'group_by': 'date'}" position="after">
<filter name="start_date_groupby" string="Start Date"
context="{'group_by': 'start_date'}"/>
<filter name="end_date_groupby" string="End Date"
context="{'group_by': 'end_date'}"/>
</filter>
</field>
</record>
<!-- ACCOUNT TAX GROUP -->
<!-- in the account module, there is nothing for account.tax.group : no form/tree view, no menu... -->
<record id="account_tax_group_form" model="ir.ui.view">
<field name="name">usability.account.tax.group.form</field>
<field name="model">account.tax.group</field>
<field name="arch" type="xml">
<form string="Tax Group">
<group name="main">
<field name="name"/>
<field name="sequence" invisible="1"/>
</group>
</form>
</field>
</record>
<record id="account_tax_group_tree" model="ir.ui.view">
<field name="name">usability.account.tax.group.tree</field>
<field name="model">account.tax.group</field>
<field name="arch" type="xml">
<tree string="Tax Groups">
<field name="sequence" widget="handle"/>
<field name="name"/>
</tree>
</field>
</record>
<record id="account_tax_group_action" model="ir.actions.act_window">
<field name="name">Tax Groups</field>
<field name="res_model">account.tax.group</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem id="account_tax_group_menu" action="account_tax_group_action" parent="account.account_account_menu" sequence="2"/>
<!-- Remove menu entry "Accounting > Configuration > Accounting > Bank Accounts"
(account.journal filtered on type = 'bank' with special tree and form view)
because it is useless and confusing -->
<record id="account.menu_action_account_bank_journal_form" model="ir.ui.menu">
<field name="groups_id" eval="[(6, 0, [ref('base_usability.group_nobody')])]"/>
</record>
<!-- Remove menu entry "Accounting > Reports > PDF Reports" as there are broken -->
<record id="account.menu_finance_legal_statement" model="ir.ui.menu">
<field name="groups_id" eval="[(6, 0, [ref('base_usability.group_nobody')])]"/>
</record>
<!-- Also hide the corresponding configuration menu "Accounting > Configuration > Financial Reports" -->
<record id="account.menu_account_reports" model="ir.ui.menu">
<field name="groups_id" eval="[(6, 0, [ref('base_usability.group_nobody')])]"/>
</record>
<!-- Duplicate the menu "Sales > Configuration > Contacts > Bank Accounts"
under "Accounting > Configuration", because most users will try to find it there -->
<menuitem id="bank_account_account_config_menu" name="Bank Accounts" parent="account.menu_finance_configuration" sequence="9"/>
<menuitem id="res_bank_account_config_menu" action="base.action_res_bank_form" parent="bank_account_account_config_menu" sequence="10"/>
<menuitem id="res_partner_bank_account_config_menu" action="base.action_res_partner_bank_account_form" parent="bank_account_account_config_menu" sequence="20"/>
</odoo>

View File

@@ -1,561 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_usability
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-23 16:16+0000\n"
"PO-Revision-Date: 2020-10-23 16:16+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_usability
#: model:ir.model.fields,help:account_usability.field_account_invoice_line_state
msgid " * The 'Draft' status is used when a user is encoding a new and unconfirmed Invoice.\n"
" * The 'Pro-forma' status is used when the invoice does not have an invoice number.\n"
" * The 'Open' status is used when user creates invoice, an invoice number is generated. It stays in the open status till the user pays the invoice.\n"
" * The 'Paid' status is set automatically when the invoice is paid. Its related journal entries may or may not be reconciled.\n"
" * The 'Cancelled' status is used when user cancel invoice."
msgstr "* L'état \"Brouillon\" est utilisé lorsqu'un utilisateur est en train de saisir ou de modifier une nouvelle facture non confirmée.\n"
"* L'état \"Pro-forma\" est utilisé lorsque la facture n'a pas de numéro de facture.\n"
"* L'état 'Ouvert' est utilisé lorsque l'utilisateur crée une facture, celle-ci a alors un numéro de facture. La facture reste dans l'état \"Ouvert\" tant qu'elle n'est pas payée.\n"
"* L'état 'Payé' est affecté automatiquement lorsque la facture est payée. Les écritures correspondantes dans les journaux peuvent ou non être lettrées.\n"
"* L'état \"Annulé\" est utilisé lorsque l'utilisateur annule la facture."
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.view_move_line_form
msgid "-> View partially reconciled entries"
msgstr "-> Voir les écritures partiellement lettrées"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.view_move_line_form
msgid "<span colspan=\"2\" attrs=\"{'invisible': ['|', '|', ('full_reconcile_id', '!=', False), ('matched_debit_ids', '!=', []), ('matched_credit_ids', '!=', [])]}\" class=\"o_form_field\">No Partial Reconcile</span>"
msgstr "<span colspan=\"2\" attrs=\"{'invisible': ['|', '|', ('full_reconcile_id', '!=', False), ('matched_debit_ids', '!=', []), ('matched_credit_ids', '!=', [])]}\" class=\"o_form_field\">No Partial Reconcile</span>"
#. module: account_usability
#: model:ir.model,name:account_usability.model_account_account
#: model:ir.ui.view,arch_db:account_usability.account_invoice_line_search
msgid "Account"
msgstr "Compte"
#. module: account_usability
#: model:ir.model,name:account_usability.model_account_move
msgid "Account Entry"
msgstr "Pièce comptable"
#. module: account_usability
#: model:ir.model,name:account_usability.model_account_move_backtodraft
msgid "Account Move Unpost"
msgstr "Account Move Unpost"
#. module: account_usability
#: model:ir.model,name:account_usability.model_account_move_reversal
msgid "Account move reversal"
msgstr "Extourne de la pièce comptable"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.account_move_backtodraft_form
msgid "All selected journal entries will be unposted (if allowed by the journal configuration)."
msgstr "All selected journal entries will be unposted (if allowed by the journal configuration)."
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_move_line_account_reconcile
msgid "Allow Reconciliation"
msgstr "Autoriser le lettrage"
#. module: account_usability
#: sql_constraint:account.analytic.account:0
msgid "An analytic account with the same code already exists in the same company!"
msgstr "Un compte analytique avec le même code existe déjà pour la même société !"
#. module: account_usability
#: model:ir.model,name:account_usability.model_account_analytic_account
msgid "Analytic Account"
msgstr "Compte analytique"
#. module: account_usability
#: model:ir.ui.menu,name:account_usability.bank_account_account_config_menu
#: model:ir.ui.menu,name:account_usability.res_partner_bank_account_config_menu
msgid "Bank Accounts"
msgstr "Comptes bancaires"
#. module: account_usability
#: model:ir.model,name:account_usability.model_account_bank_statement
msgid "Bank Statement"
msgstr "Relevé bancaire"
#. module: account_usability
#: model:ir.model,name:account_usability.model_account_bank_statement_line
msgid "Bank Statement Line"
msgstr "Ligne de relevé bancaire"
#. module: account_usability
#: model:ir.ui.menu,name:account_usability.res_bank_account_config_menu
msgid "Banks"
msgstr "Banques"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.account_invoice_mark_sent_form
#: model:ir.ui.view,arch_db:account_usability.account_move_backtodraft_form
msgid "Cancel"
msgstr "Annuler"
#. module: account_usability
#: model:ir.model.fields,help:account_usability.field_account_move_line_account_reconcile
msgid "Check this box if this account allows invoices & payments matching of journal items."
msgstr "Cochez cette case si ce compte permet de faire du rapprochement entre factures et paiements."
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.view_account_search
msgid "Code"
msgstr "Code"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_line_commercial_partner_id
msgid "Commercial Entity"
msgstr "Entité commerciale"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_mark_sent_create_uid
#: model:ir.model.fields,field_description:account_usability.field_account_move_backtodraft_create_uid
msgid "Created by"
msgstr "Créé par"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_mark_sent_create_date
#: model:ir.model.fields,field_description:account_usability.field_account_move_backtodraft_create_date
msgid "Created on"
msgstr "Créé le"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.view_account_move_line_filter
msgid "Current Year"
msgstr "Année en cours"
#. module: account_usability
#: model:ir.actions.act_window,name:account_usability.out_invoice_line_action
#: model:ir.actions.act_window,name:account_usability.out_invoice_refund_line_action
msgid "Customer Invoice Lines"
msgstr "Lignes de facture client"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.account_invoice_line_search
msgid "Customer Invoices"
msgstr "Factures clients"
#. module: account_usability
#: model:ir.actions.act_window,name:account_usability.out_refund_line_action
msgid "Customer Refund Lines"
msgstr "Lignes d'avoir client"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.account_invoice_line_search
msgid "Customer Refunds"
msgstr "Avoirs client"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.view_account_move_line_filter
msgid "Debit or Credit"
msgstr "Débit ou crédit"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_move_default_account_id
msgid "Default Debit Account"
msgstr "Compte de débit par défaut"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_move_default_move_line_name
msgid "Default Label"
msgstr "Libellé par défaut"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_move_default_credit
msgid "Default credit"
msgstr "Default credit"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_move_default_debit
msgid "Default debit"
msgstr "Default debit"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_mark_sent_display_name
#: model:ir.model.fields,field_description:account_usability.field_account_move_backtodraft_display_name
msgid "Display Name"
msgstr "Nom affiché"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.account_invoice_line_search
msgid "Draft"
msgstr "Brouillon"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_bank_statement_end_date
#: model:ir.ui.view,arch_db:account_usability.view_bank_statement_search
msgid "End Date"
msgstr "Date de fin"
#. module: account_usability
#: model:ir.model,name:account_usability.model_account_fiscal_position
msgid "Fiscal Position"
msgstr "Position fiscale"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.view_account_move_line_filter
msgid "Fully Reconciled"
msgstr "Lettré totalement"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.account_invoice_line_search
#: model:ir.ui.view,arch_db:account_usability.view_account_journal_search
msgid "Group By"
msgstr "Regrouper par"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_has_attachment
msgid "Has attachment"
msgstr "Pièce(s) jointe(s) présente(s)"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_has_discount
msgid "Has discount"
msgstr "A une remise"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_bank_statement_hide_bank_statement_balance
#: model:ir.model.fields,field_description:account_usability.field_account_journal_hide_bank_statement_balance
msgid "Hide Bank Statement Balance"
msgstr "Masquer le solde du relevé"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_mark_sent_id
#: model:ir.model.fields,field_description:account_usability.field_account_move_backtodraft_id
msgid "ID"
msgstr "ID"
#. module: account_usability
#: model:ir.model,name:account_usability.model_product_supplierinfo
msgid "Information about a product vendor"
msgstr "Information sur le vendeur de l'article"
#. module: account_usability
#: model:ir.model,name:account_usability.model_account_invoice
msgid "Invoice"
msgstr "Facture"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_line_date_invoice
#: model:ir.ui.view,arch_db:account_usability.account_invoice_line_search
msgid "Invoice Date"
msgstr "Date de facturation"
#. module: account_usability
#: model:ir.model,name:account_usability.model_account_invoice_line
msgid "Invoice Line"
msgstr "Ligne de facture"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_line_invoice_number
msgid "Invoice Number"
msgstr "Numéro de facture"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_line_state
msgid "Invoice State"
msgstr "État de la facture"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.account_invoice_report_tree
msgid "Invoices Analysis"
msgstr "Analyse des factures"
#. module: account_usability
#: model:ir.model,name:account_usability.model_account_invoice_report
msgid "Invoices Statistics"
msgstr "Statistiques des factures"
#. module: account_usability
#: model:ir.model.fields,help:account_usability.field_account_move_default_account_id
msgid "It acts as a default account for debit amount"
msgstr "Ça sert de compte par défaut pour les montants en débit"
#. module: account_usability
#: model:ir.model,name:account_usability.model_account_journal
msgid "Journal"
msgstr "Journal"
#. module: account_usability
#: model:ir.model,name:account_usability.model_account_move_line
msgid "Journal Item"
msgstr "Écriture comptable"
#. module: account_usability
#: model:ir.model.fields,help:account_usability.field_account_invoice_line_date_invoice
msgid "Keep empty to use the current date"
msgstr "Laissez vide pour utiliser la date courante"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_mark_sent___last_update
#: model:ir.model.fields,field_description:account_usability.field_account_move_backtodraft___last_update
msgid "Last Modified on"
msgstr "Dernière modification le"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_mark_sent_write_uid
#: model:ir.model.fields,field_description:account_usability.field_account_move_backtodraft_write_uid
msgid "Last Updated by"
msgstr "Mis à jour par"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_mark_sent_write_date
#: model:ir.model.fields,field_description:account_usability.field_account_move_backtodraft_write_date
msgid "Last Updated on"
msgstr "Mis à jour le"
#. module: account_usability
#: model:ir.actions.act_window,name:account_usability.account_invoice_mark_sent_action
#: model:ir.ui.view,arch_db:account_usability.account_invoice_mark_sent_form
msgid "Mark as Sent"
msgstr "Marquer comme envoyé"
#. module: account_usability
#: model:ir.model,name:account_usability.model_account_invoice_mark_sent
#: model:ir.ui.view,arch_db:account_usability.account_invoice_mark_sent_form
msgid "Mark invoices as sent"
msgstr "Marquer les factures comme envoyées"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.view_account_invoice_filter
msgid "Missing Attachment"
msgstr "Missing Attachment"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.view_account_move_line_filter
msgid "Name or Reference"
msgstr "Name or Reference"
#. module: account_usability
#: code:addons/account_usability/account.py:615
#, python-format
msgid "No journal entry linked to this bank statement line."
msgstr "No journal entry linked to this bank statement line."
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.account_invoice_line_search
msgid "Not Paid"
msgstr "Non payées"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_report_number
msgid "Number"
msgstr "Numéro"
#. module: account_usability
#: code:addons/account_usability/account.py:218
#, python-format
msgid "On journal '%s', the default credit account '%s' should be configured with Type = 'Bank and Cash'."
msgstr "On journal '%s', the default credit account '%s' should be configured with Type = 'Bank and Cash'."
#. module: account_usability
#: code:addons/account_usability/account.py:209
#, python-format
msgid "On journal '%s', the default debit account '%s' should be configured with Type = 'Bank and Cash'."
msgstr "On journal '%s', the default debit account '%s' should be configured with Type = 'Bank and Cash'."
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.account_invoice_line_search
msgid "Paid"
msgstr "Payé"
#. module: account_usability
#: model:ir.model,name:account_usability.model_account_partial_reconcile
msgid "Partial Reconcile"
msgstr "Lettrage partiel"
#. module: account_usability
#: model:ir.model,name:account_usability.model_res_partner
#: model:ir.ui.view,arch_db:account_usability.account_invoice_line_search
msgid "Partner"
msgstr "Partenaire"
#. module: account_usability
#: model:ir.model,name:account_usability.model_account_reconcile_model
msgid "Preset to create journal entries during a invoices and payments matching"
msgstr "Préconfigurer pour créer une écriture pendant la correspondance entre des factures et des paiements"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.view_account_move_line_filter
msgid "Previous Year"
msgstr "Année précédente"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.account_invoice_line_search
msgid "Product"
msgstr "Article"
#. module: account_usability
#: model:ir.model,name:account_usability.model_product_template
msgid "Product Template"
msgstr "Modèle d'article"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_product_product_purchase_price_type
#: model:ir.model.fields,field_description:account_usability.field_product_supplierinfo_purchase_price_type
#: model:ir.model.fields,field_description:account_usability.field_product_template_purchase_price_type
msgid "Purchase Price Type"
msgstr "Type de prix d'achat"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_move_line_reconcile_string
msgid "Reconcile"
msgstr "Reconcile"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_product_product_sale_price_type
#: model:ir.model.fields,field_description:account_usability.field_product_template_sale_price_type
msgid "Sale Price Type"
msgstr "Type de prix de vente"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.account_invoice_line_search
msgid "Search Invoice Lines"
msgstr "Search Invoice Lines"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.view_account_invoice_filter
msgid "Sent"
msgstr "Envoyé"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.view_move_line_tree
msgid "Show Journal Entry"
msgstr "Show Journal Entry"
#. module: account_usability
#: code:addons/account_usability/account.py:291
#, python-format
msgid "Some account groups already exists"
msgstr "Some account groups already exists"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_bank_statement_start_date
#: model:ir.ui.view,arch_db:account_usability.view_bank_statement_search
msgid "Start Date"
msgstr "Date de début"
#. module: account_usability
#: model:ir.actions.act_window,name:account_usability.in_invoice_line_action
#: model:ir.actions.act_window,name:account_usability.in_invoice_refund_line_action
msgid "Supplier Invoice Lines"
msgstr "Supplier Invoice Lines"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.account_invoice_line_search
msgid "Supplier Invoices"
msgstr "Supplier Invoices"
#. module: account_usability
#: model:ir.actions.act_window,name:account_usability.in_refund_line_action
msgid "Supplier Refund Lines"
msgstr "Supplier Refund Lines"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.account_invoice_line_search
msgid "Supplier Refunds"
msgstr "Supplier Refunds"
#. module: account_usability
#: model:ir.model,name:account_usability.model_account_tax
#: model:ir.ui.view,arch_db:account_usability.product_supplierinfo_tree_view
msgid "Tax"
msgstr "Taxe"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.account_tax_group_form
msgid "Tax Group"
msgstr "Tax Group"
#. module: account_usability
#: model:ir.actions.act_window,name:account_usability.account_tax_group_action
#: model:ir.ui.menu,name:account_usability.account_tax_group_menu
#: model:ir.ui.view,arch_db:account_usability.account_tax_group_tree
msgid "Tax Groups"
msgstr "Tax Groups"
#. module: account_usability
#: code:addons/account_usability/product.py:22
#, python-format
msgid "Tax excl."
msgstr "HT"
#. module: account_usability
#: code:addons/account_usability/product.py:22
#, python-format
msgid "Tax incl."
msgstr "TTC"
#. module: account_usability
#: code:addons/account_usability/wizard/account_move_backtodraft.py:20
#, python-format
msgid "There is no journal items in posted state to unpost."
msgstr "There is no journal items in posted state to unpost."
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.account_invoice_mark_sent_form
msgid "This wizard will mark as <i>sent</i> all the selected invoices in open or paid state."
msgstr "This wizard will mark as <i>sent</i> all the selected invoices in open or paid state."
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.view_account_invoice_report_search
msgid "This year and previous"
msgstr "Cette année et la précédente"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.view_account_invoice_filter
msgid "To Send"
msgstr "A envoyer"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.view_move_line_tree
msgid "Total Balance"
msgstr "Total Balance"
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_invoice_line_invoice_type
#: model:ir.ui.view,arch_db:account_usability.view_account_journal_search
msgid "Type"
msgstr "Type"
#. module: account_usability
#: model:ir.actions.act_window,name:account_usability.account_move_backtodraft_action
#: model:ir.ui.view,arch_db:account_usability.account_move_backtodraft_form
msgid "Unpost Journal Entries"
msgstr "Unpost Journal Entries"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.view_account_move_line_filter
msgid "Unreconciled or Partially Reconciled"
msgstr "Non lettré ou partiellement lettré"
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.view_bank_statement_form
msgid "View Account Move"
msgstr "View Account Move"
#. module: account_usability
#: model:ir.model.fields,help:account_usability.field_account_bank_statement_hide_bank_statement_balance
#: model:ir.model.fields,help:account_usability.field_account_journal_hide_bank_statement_balance
msgid "You may want to enable this option when your bank journal is generated from a bank statement file that doesn't handle start/end balance (QIF for instance) and you don't want to enter the start/end balance manually: it will prevent the display of wrong information in the accounting dashboard and on bank statements."
msgstr "You may want to enable this option when your bank journal is generated from a bank statement file that doesn't handle start/end balance (QIF for instance) and you don't want to enter the start/end balance manually: it will prevent the display of wrong information in the accounting dashboard and on bank statements."
#. module: account_usability
#: model:ir.ui.view,arch_db:account_usability.invoice_supplier_form
msgid "⇒ Delete lines qty=0"
msgstr "⇒ Supprimer les lignes qté=0"

View File

@@ -1,33 +1,55 @@
diff --git a/addons/account/models/account_payment.py b/addons/account/models/account_payment.py
index b1d8012329d..b8a8e2a673d 100644
index 2dd1f9cef83..62275fca65e 100644
--- a/addons/account/models/account_payment.py
+++ b/addons/account/models/account_payment.py
@@ -210,6 +210,7 @@ class account_payment(models.Model):
payment_difference = fields.Monetary(compute='_compute_payment_difference', readonly=True)
payment_difference_handling = fields.Selection([('open', 'Keep open'), ('reconcile', 'Mark invoice as fully paid')], default='open', string="Payment Difference", copy=False)
writeoff_account_id = fields.Many2one('account.account', string="Difference Account", domain=[('deprecated', '=', False)], copy=False)
+ writeoff_analytic_account_id = fields.Many2one('account.analytic.account', string="Difference Analytic Account", copy=False)
@@ -262,6 +262,7 @@ class AccountPayment(models.Model):
'credit': write_off_balance > 0.0 and write_off_balance or 0.0,
'partner_id': self.partner_id.id,
'account_id': write_off_line_vals.get('account_id'),
+ 'analytic_account_id': write_off_line_vals.get('analytic_account_id'),
})
return line_vals_list
# FIXME: ondelete='restrict' not working (eg. cancel a bank statement reconciliation with a payment)
move_line_ids = fields.One2many('account.move.line', 'payment_id', readonly=True, copy=False, ondelete='restrict')
@@ -431,6 +432,7 @@ class account_payment(models.Model):
amount_currency_wo = -abs(amount_currency_wo)
writeoff_line['name'] = _('Counterpart')
writeoff_line['account_id'] = self.writeoff_account_id.id
+ writeoff_line['analytic_account_id'] = self.writeoff_analytic_account_id.id or False
writeoff_line['debit'] = debit_wo
writeoff_line['credit'] = credit_wo
writeoff_line['amount_currency'] = amount_currency_wo
diff --git a/addons/account/views/account_payment_view.xml b/addons/account/views/account_payment_view.xml
index 2460458fbaa..4065d8f9952 100644
--- a/addons/account/views/account_payment_view.xml
+++ b/addons/account/views/account_payment_view.xml
@@ -206,6 +206,8 @@
@@ -699,6 +700,7 @@ class AccountPayment(models.Model):
'name': writeoff_lines[0].name,
'amount': writeoff_amount * sign,
'account_id': writeoff_lines[0].account_id.id,
+ 'analytic_account_id': writeoff_lines[0].analytic_account_id.id,
}
else:
write_off_line_vals = {}
diff --git a/addons/account/wizard/account_payment_register.py b/addons/account/wizard/account_payment_register.py
index 3fc91f716ad..35636774c7e 100644
--- a/addons/account/wizard/account_payment_register.py
+++ b/addons/account/wizard/account_payment_register.py
@@ -93,6 +93,7 @@ class AccountPaymentRegister(models.TransientModel):
], default='open', string="Payment Difference Handling")
writeoff_account_id = fields.Many2one('account.account', string="Difference Account", copy=False,
domain="[('deprecated', '=', False), ('company_id', '=', company_id)]")
+ writeoff_analytic_account_id = fields.Many2one('account.analytic.account', string="Difference Analytic Account", copy=False, domain="[('company_id', '=', company_id)]")
writeoff_label = fields.Char(string='Journal Item Label', default='Write-Off',
help='Change label of the counterpart that will hold the payment difference')
@@ -422,6 +423,7 @@ class AccountPaymentRegister(models.TransientModel):
'name': self.writeoff_label,
'amount': self.payment_difference,
'account_id': self.writeoff_account_id.id,
+ 'analytic_account_id': self.writeoff_analytic_account_id.id or False,
}
return payment_vals
diff --git a/addons/account/wizard/account_payment_register_views.xml b/addons/account/wizard/account_payment_register_views.xml
index 16eec30e265..b9386567baa 100644
--- a/addons/account/wizard/account_payment_register_views.xml
+++ b/addons/account/wizard/account_payment_register_views.xml
@@ -65,6 +65,10 @@
string="Post Difference In"
options="{'no_create': True}"
attrs="{'required': [('payment_difference_handling', '=', 'reconcile')]}"/>
+ <label for="writeoff_analytic_account_id" class="oe_edit_only" string="Analytic Account" groups="analytic.group_analytic_accounting"/>
+ <field name="writeoff_analytic_account_id"
+ groups="analytic.group_analytic_accounting"
+ options="{'no_create': True}" />
<label for="writeoff_label" class="oe_edit_only" string="Label"/>
<field name="writeoff_label" attrs="{'required': [('payment_difference_handling', '=', 'reconcile')]}"/>
</div>
<field name="writeoff_account_id" string="Post Difference In"
attrs="{'invisible': [('payment_difference_handling','=','open')], 'required': [('payment_difference_handling', '=', 'reconcile')]}"/>
+ <field name="writeoff_analytic_account_id" string="Post Difference In Analytic Account"
+ attrs="{'invisible': [('payment_difference_handling','=','open')]}"/>
</group>
</group>
</sheet>

View File

@@ -0,0 +1,9 @@
from . import account_account
from . import account_analytic_account
from . import account_bank_statement
from . import account_incoterms
from . import account_journal
from . import account_move
from . import account_partial_reconcile
from . import res_partner
from . import product

View File

@@ -0,0 +1,59 @@
# Copyright 2015-2020 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
import logging
logger = logging.getLogger(__name__)
class AccountAccount(models.Model):
_inherit = 'account.account'
@api.depends('name', 'code')
def name_get(self):
if self._context.get('account_account_show_code_only'):
res = []
for record in self:
res.append((record.id, record.code))
return res
else:
return super().name_get()
# https://github.com/odoo/odoo/issues/23040
# TODO mig to v14 ?
def fix_bank_account_types(self):
aao = self.env['account.account']
companies = self.env['res.company'].search([])
if len(companies) > 1:
self = self.sudo()
logger.info("START the script 'fix bank and cash account types'")
bank_type = self.env.ref('account.data_account_type_liquidity')
asset_type = self.env.ref('account.data_account_type_current_assets')
journals = self.env['account.journal'].search(
[('type', 'in', ('bank', 'cash'))], order='company_id')
journal_accounts_bank_type = aao
for journal in journals:
for account in [
journal.default_credit_account_id,
journal.default_debit_account_id]:
if account:
if account.user_type_id != bank_type:
account.user_type_id = bank_type.id
logger.info(
'Company %s: Account %s updated to Bank '
'and Cash type',
account.company_id.display_name, account.code)
if account not in journal_accounts_bank_type:
journal_accounts_bank_type += account
accounts = aao.search([
('user_type_id', '=', bank_type.id)], order='company_id, code')
for account in accounts:
if account not in journal_accounts_bank_type:
account.user_type_id = asset_type.id
logger.info(
'Company %s: Account %s updated to Current Asset type',
account.company_id.display_name, account.code)
logger.info("END of the script 'fix bank and cash account types'")
return True

View File

@@ -0,0 +1,24 @@
# Copyright 2015-2020 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 AccountAnalyticAccount(models.Model):
_inherit = 'account.analytic.account'
def name_get(self):
if self._context.get('analytic_account_show_code_only'):
res = []
for record in self:
res.append((record.id, record.code or record.name))
return res
else:
return super().name_get()
_sql_constraints = [(
'code_company_unique',
'unique(code, company_id)',
'An analytic account with the same code already '
'exists in the same company!')]

View File

@@ -0,0 +1,91 @@
# Copyright 2015-2020 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
from odoo.tools.misc import format_date
class AccountBankStatement(models.Model):
_inherit = 'account.bank.statement'
start_date = fields.Date(
compute='_compute_dates', string='Start Date', readonly=True,
store=True)
end_date = fields.Date(
compute='_compute_dates', string='End Date', readonly=True,
store=True)
hide_bank_statement_balance = fields.Boolean(
related='journal_id.hide_bank_statement_balance', readonly=True)
@api.depends('line_ids.date')
def _compute_dates(self):
for st in self:
dates = [line.date for line in st.line_ids]
st.start_date = dates and min(dates) or False
st.end_date = dates and max(dates) or False
def _check_balance_end_real_same_as_computed(self):
for stmt in self:
if stmt.hide_bank_statement_balance:
continue
else:
super(AccountBankStatement, stmt)._check_balance_end_real_same_as_computed()
return True
@api.depends('name', 'start_date', 'end_date')
def name_get(self):
res = []
for statement in self:
name = "%s (%s => %s)" % (
statement.name,
statement.start_date and format_date(self.env, statement.start_date) or '',
statement.end_date and format_date(self.env, statement.end_date) or '')
res.append((statement.id, name))
return res
class AccountBankStatementLine(models.Model):
_inherit = 'account.bank.statement.line'
# Native order is:
# _order = 'statement_id desc, sequence, id desc'
_order = 'statement_id desc, date desc, sequence, id desc'
# Disable guessing for reconciliation
# because my experience with several customers shows that it is a problem
# in the following scenario : move line 'x' has been "guessed" by OpenERP
# to be reconciled with a statement line 'Y' at the end of the bank
# statement, but it is a mistake because it should be reconciled with
# statement line 'B' at the beginning of the bank statement
# When the user is on statement line 'B', he tries to select
# move line 'x', but it can't find it... because it is already "reserved"
# by the guess of OpenERP for statement line 'Y' ! To solve this problem,
# the user must go to statement line 'Y' and unselect move line 'x'
# and then come back on statement line 'B' and select move line 'A'...
# but non super-expert users can't do that because it is impossible to
# figure out that the fact that the user can't find move line 'x'
# is caused by this.
# Set search_reconciliation_proposition to False by default
# TODO: re-write in v10
# def get_data_for_reconciliations(
# self, cr, uid, ids, excluded_ids=None,
# search_reconciliation_proposition=False, context=None):
# # Make variable name shorted for PEP8 !
# search_rec_prop = search_reconciliation_proposition
# return super().\
# get_data_for_reconciliations(
# cr, uid, ids, excluded_ids=excluded_ids,
# search_reconciliation_proposition=search_rec_prop,
# context=context)
def show_account_move(self):
self.ensure_one()
action = self.env.ref('account.action_move_line_form').read()[0]
# Note: this action is on account.move, not account.move.line !
action.update({
'views': False,
'view_id': False,
'view_mode': 'form,tree',
'res_id': self.move_id.id,
})
return action

View File

@@ -0,0 +1,16 @@
# Copyright 2015-2020 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class AccountIncoterms(models.Model):
_inherit = 'account.incoterms'
@api.depends('code', 'name')
def name_get(self):
res = []
for rec in self:
res.append((rec.id, '[%s] %s' % (rec.code, rec.name)))
return res

View File

@@ -0,0 +1,60 @@
# Copyright 2015-2020 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AccountJournal(models.Model):
_inherit = 'account.journal'
hide_bank_statement_balance = fields.Boolean(
string='Hide Bank Statement Balance',
help="You may want to enable this option when your bank "
"journal is generated from a bank statement file that "
"doesn't handle start/end balance (QIF for instance) and "
"you don't want to enter the start/end balance manually: it "
"will prevent the display of wrong information in the accounting "
"dashboard and on bank statements.")
@api.depends(
'name', 'currency_id', 'company_id', 'company_id.currency_id', 'code')
def name_get(self):
res = []
if self._context.get('journal_show_code_only'):
for journal in self:
res.append((journal.id, journal.code))
return res
else:
for journal in self:
name = "[%s] %s" % (journal.code, journal.name)
if (
journal.currency_id and
journal.currency_id != journal.company_id.currency_id):
name = "%s (%s)" % (name, journal.currency_id.name)
res.append((journal.id, name))
return res
# @api.constrains('default_credit_account_id', 'default_debit_account_id')
# def _check_account_type_on_bank_journal(self):
# bank_acc_type = self.env.ref('account.data_account_type_liquidity')
# for jrl in self:
# if jrl.type in ('bank', 'cash'):
# if (
# jrl.default_debit_account_id and
# jrl.default_debit_account_id.user_type_id !=
# bank_acc_type):
# raise ValidationError(_(
# "On journal '%s', the default debit account '%s' "
# "should be configured with Type = 'Bank and Cash'.")
# % (jrl.display_name,
# jrl.default_debit_account_id.display_name))
# if (
# jrl.default_credit_account_id and
# jrl.default_credit_account_id.user_type_id !=
# bank_acc_type):
# raise ValidationError(_(
# "On journal '%s', the default credit account '%s' "
# "should be configured with Type = 'Bank and Cash'.")
# % (jrl.display_name,
# jrl.default_credit_account_id.display_name))

View File

@@ -0,0 +1,253 @@
# Copyright 2015-2020 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
from odoo.tools import float_is_zero
from odoo.tools.misc import format_date
from odoo.osv import expression
class AccountMove(models.Model):
_inherit = 'account.move'
# By default, we can still modify "ref" when account move is posted
# which seems a bit lazy for me...
ref = fields.Char(states={'posted': [('readonly', True)]})
date = fields.Date(tracking=True)
invoice_date_due = fields.Date(tracking=True)
invoice_payment_term_id = fields.Many2one(tracking=True)
journal_id = fields.Many2one(tracking=True)
partner_bank_id = fields.Many2one(tracking=True)
fiscal_position_id = fields.Many2one(tracking=True)
amount_total = fields.Monetary(tracking=True)
# for invoice report
has_discount = fields.Boolean(
compute='_compute_has_discount', readonly=True)
# has_attachment is useful for those who use attachment to archive
# supplier invoices. It allows them to find supplier invoices
# that don't have any attachment
has_attachment = fields.Boolean(
compute='_compute_has_attachment',
search='_search_has_attachment', readonly=True)
sale_dates = fields.Char(
compute="_compute_sales_dates", readonly=True,
help="This information appears on invoice qweb report "
"(you may use it for your own report)")
def _compute_has_discount(self):
prec = self.env['decimal.precision'].precision_get('Discount')
for inv in self:
has_discount = False
for line in inv.invoice_line_ids:
if not line.display_type and not float_is_zero(line.discount, precision_digits=prec):
has_discount = True
break
inv.has_discount = has_discount
def _compute_has_attachment(self):
iao = self.env['ir.attachment']
for move in self:
if iao.search_count([
('res_model', '=', 'account.move'),
('res_id', '=', move.id),
('type', '=', 'binary'),
('company_id', '=', move.company_id.id)]):
move.has_attachment = True
else:
move.has_attachment = False
def _search_has_attachment(self, operator, value):
att_inv_ids = {}
if operator == '=':
search_res = self.env['ir.attachment'].search_read([
('res_model', '=', 'account.move'),
('type', '=', 'binary'),
('res_id', '!=', False)], ['res_id'])
for att in search_res:
att_inv_ids[att['res_id']] = True
res = [('id', value and 'in' or 'not in', list(att_inv_ids))]
return res
# when you have an invoice created from a lot of sale orders, the 'name'
# field is very large, which makes the name_get() of that invoice very big
# which screws-up the form view of that invoice because of the link at the
# top of the screen
# That's why we have to cut the name_get() when it's too long
def name_get(self):
old_res = super().name_get()
res = []
for old_re in old_res:
name = old_re[1]
if name and len(name) > 100:
# nice cut
name = '%s ...' % ', '.join(name.split(', ')[:3])
# if not enough, hard cut
if len(name) > 120:
name = '%s ...' % old_re[1][:120]
res.append((old_re[0], name))
return res
# I really hate to see a "/" in the 'name' field of the account.move.line
# generated from customer invoices linked to the partners' account because:
# 1) the label of an account move line is an important field, we can't
# write a rubbish '/' in it !
# 2) the 'name' field of the account.move.line is used in the overdue
# letter, and '/' is not meaningful for our customer !
# TODO mig to v12
# def action_move_create(self):
# res = super().action_move_create()
# for inv in self:
# self._cr.execute(
# "UPDATE account_move_line SET name= "
# "CASE WHEN name='/' THEN %s "
# "ELSE %s||' - '||name END "
# "WHERE move_id=%s", (inv.number, inv.number, inv.move_id.id))
# self.invalidate_cache()
# return res
def delete_lines_qty_zero(self):
lines = self.env['account.move.line'].search([
('display_type', '=', False),
('move_id', 'in', self.ids),
('quantity', '=', 0)])
lines.unlink()
return True
# for report
def py3o_lines_layout(self):
self.ensure_one()
res = []
has_sections = False
subtotal = 0.0
sign = self.move_type == 'out_refund' and -1 or 1
# Warning: the order of invoice line is forced in the view
# <tree editable="bottom" default_order="sequence, date desc, move_name desc, id"
# it's not the same as the _order in the class AccountMoveLine
lines = self.env['account.move.line'].search([('exclude_from_invoice_tab', '=', False), ('move_id', '=', self.id)], order="sequence, date desc, move_name desc, id")
for line in lines:
if line.display_type == 'line_section':
# insert line
if has_sections:
res.append({'subtotal': subtotal})
subtotal = 0.0 # reset counter
has_sections = True
else:
if not line.display_type:
subtotal += line.price_subtotal * sign
res.append({'line': line})
if has_sections: # insert last subtotal line
res.append({'subtotal': subtotal})
# res:
# [
# {'line': account_invoice_line(1) with display_type=='line_section'},
# {'line': account_invoice_line(2) without display_type},
# {'line': account_invoice_line(3) without display_type},
# {'line': account_invoice_line(4) with display_type=='line_note'},
# {'subtotal': 8932.23},
# ]
return res
def _compute_sales_dates(self):
""" French law requires to set sale order dates into invoice
returned string: "sale1 (date1), sale2 (date2) ..."
"""
for inv in self:
sales = inv.invoice_line_ids.mapped(
'sale_line_ids').mapped('order_id')
dates = ["%s (%s)" % (
x.name, format_date(inv.env, self.date_order))
for x in sales]
inv.sale_dates = ", ".join(dates)
# allow to manually create moves not only in general journals,
# but also in cash journal and check journals (= bank journals not linked to a bank account)
@api.depends('company_id', 'invoice_filter_type_domain')
def _compute_suitable_journal_ids(self):
for move in self:
if move.invoice_filter_type_domain:
super(AccountMove, move)._compute_suitable_journal_ids()
else:
company_id = move.company_id.id or self.env.company.id
domain = expression.AND([
[('company_id', '=', company_id)],
expression.OR([
[('type', 'in', ('general', 'cash'))],
[('type', '=', 'bank'), ('bank_account_id', '=', False)]
])
])
move.suitable_journal_ids = self.env['account.journal'].search(domain)
def button_draft(self):
super().button_draft()
# Delete attached pdf invoice
try:
report_invoice = self.env['ir.actions.report']._get_report_from_name('account.report_invoice')
except IndexError:
report_invoice = False
if report_invoice and report_invoice.attachment:
for move in self.filtered(lambda x: x.move_type in ('out_invoice', 'out_refund')):
# The pb is that the filename is dynamic and related to move.state
# in v12, the feature was native and they used that kind of code:
# with invoice.env.do_in_draft():
# invoice.number, invoice.state = invoice.move_name, 'open'
# attachment = self.env.ref('account.account_invoices').retrieve_attachment(invoice)
# But do_in_draft() doesn't exists in v14
# If you know how we could do that, please update the code below
attachment = self.env['ir.attachment'].search([
('name', '=', self._get_invoice_attachment_name()),
('res_id', '=', move.id),
('res_model', '=', self._name),
('type', '=', 'binary'),
], limit=1)
if attachment:
attachment.unlink()
def _get_invoice_attachment_name(self):
self.ensure_one()
return '%s.pdf' % (self.name and self.name.replace('/', '_') or 'INV')
class AccountMoveLine(models.Model):
_inherit = 'account.move.line'
# Native order:
# _order = "date desc, move_name desc, id"
# Problem: when you manually create a journal entry, the
# order of the lines is inverted when you save ! It is quite annoying for
# the user...
_order = "date desc, id asc"
# In the 'account' module, we have related stored field for:
# name (move_name), date, ref, state (parent_state),
# journal_id, company_id, payment_id, statement_line_id,
account_reconcile = fields.Boolean(related='account_id.reconcile')
full_reconcile_id = fields.Many2one(string='Full Reconcile')
matched_debit_ids = fields.One2many(string='Partial Reconcile Debit')
matched_credit_ids = fields.One2many(string='Partial Reconcile Credit')
reconcile_string = fields.Char(
compute='_compute_reconcile_string', string='Reconcile', store=True)
# for optional display in tree view
product_barcode = fields.Char(related='product_id.barcode', string="Product Barcode")
def show_account_move_form(self):
self.ensure_one()
action = self.env.ref('account.action_move_line_form').read()[0]
action.update({
'res_id': self.move_id.id,
'view_id': False,
'views': False,
'view_mode': 'form,tree',
})
return action
@api.depends(
'full_reconcile_id', 'matched_debit_ids', 'matched_credit_ids')
def _compute_reconcile_string(self):
for line in self:
rec_str = False
if line.full_reconcile_id:
rec_str = line.full_reconcile_id.name
else:
rec_str = ', '.join([
'a%d' % pr.id for pr in line.matched_debit_ids + line.matched_credit_ids])
line.reconcile_string = rec_str

View File

@@ -0,0 +1,23 @@
# Copyright 2015-2020 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
from odoo.tools.misc import formatLang
class AccountPartialReconcile(models.Model):
_inherit = "account.partial.reconcile"
_rec_name = "id"
def name_get(self):
res = []
for rec in self:
# There is no seq for partial rec, so I simulate one with the ID
# Prefix for full rec: 'A' (upper case)
# Prefix for partial rec: 'a' (lower case)
amount_fmt = formatLang(
self.env, rec.amount, currency_obj=rec.company_currency_id)
name = 'a%d (%s)' % (rec.id, amount_fmt)
res.append((rec.id, name))
return res

View File

@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
# © 2015-2016 Akretion (http://www.akretion.com)
# Copyright 2015-2021 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).

View File

@@ -0,0 +1,12 @@
# Copyright 2017-2020 Akretion France (https://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 ResPartner(models.Model):
_inherit = 'res.partner'
invoice_warn = fields.Selection(tracking=True)
property_account_position_id = fields.Many2one(tracking=True)

View File

@@ -1,13 +0,0 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields
class ResPartner(models.Model):
_inherit = 'res.partner'
invoice_warn = fields.Selection(track_visibility='onchange')
property_account_position_id = fields.Many2one(
track_visibility='onchange')

View File

@@ -0,0 +1,2 @@
* Alexis de Lattre <alexis.delattre@akretion.com>
* David Beal <david.beal@akretion.com>

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