Compare commits

..

204 Commits

Author SHA1 Message Date
Alexis de Lattre
993fb49ab5 [IMP] base_usability: hide industry_id on form view of partners for contacts 2025-11-03 12:17:25 +01:00
Alexis de Lattre
1ba485392a [IMP] commission_simple: allow removal of commission lines 2025-10-31 09:14:24 +00:00
Alexis de Lattre
faca51f126 [IMP] commission_simple: allow to restart commission computation on the same period without deleting all commission results 2025-10-24 14:49:42 +00:00
Alexis de Lattre
3a9a97c742 [IMP] commission_simple: add validation in list view 2025-10-18 07:50:13 +02:00
Alexis de Lattre
647106f508 [IMP] base_usability: restore monkey-patch for formatLang() 2025-10-17 21:34:37 +00:00
Alexis de Lattre
b289980665 Update fr translation for commission_simple and commission_simple_agent 2025-10-17 22:51:54 +02:00
Alexis de Lattre
93e62455ad [IMP] commission_simple: add index=True on the M2O of account.move.line
This speeds-up the opening of commission results
2025-10-17 16:25:55 +00:00
Alexis de Lattre
9fff149835 [IMP] commission_simple: add commission_amount to account.invoice.report 2025-10-17 17:55:50 +02:00
Alexis de Lattre
59148b0522 [IMP] base_usability: add insdustry_id in partner tree and search view
Always show insdustry_id on form view, even when is_company=False
2025-10-17 17:46:11 +02:00
Alexis de Lattre
bfb499d4ca [IMP] commission_simple: fine-tune access rights 2025-10-15 15:11:13 +00:00
Alexis de Lattre
e8f8069a87 [IMP] commission_simple: periodicity moved from company to profile
Update commission_simple_agent_purchase to adapt config page form view
accordingly
2025-10-15 17:04:31 +02:00
Alexis de Lattre
f12218c4a0 [FIX] commission_simple_*: backport from 16 to 14 2025-10-15 09:31:57 +02:00
Alexis de Lattre
204df0e1e8 [IMP] commission_simple: add total base amount in view and XLSX report 2025-10-15 09:22:24 +02:00
Alexis de Lattre
cfb1d2ce1e [IMP] commission_simple: update fr translation 2025-10-15 09:22:24 +02:00
Alexis de Lattre
00ca8789de [IMP] commission_simple: allow use of lambda in inherit of commission result lines 2025-10-15 09:22:24 +02:00
Alexis de Lattre
dfdd09260d [IMP] commission_simple: XSLX report sorted by date (inheritable) 2025-10-15 09:22:24 +02:00
Alexis de Lattre
79032cb217 [IMP] commission_simple*: add XLSX report + improve PO generation
Add message un chatter of PO
2025-10-15 09:22:24 +02:00
Akretion Git Bot
d83bc929aa [ADD] setup.py 2025-10-15 07:21:18 +00:00
Akretion Git Bot
58ff5677dd [ADD] icon.png 2025-10-15 07:21:17 +00:00
Alexis de Lattre
adf62785d9 [ADD] commission_simple_agent_purchase 2025-10-15 09:20:58 +02:00
Alexis de Lattre
eaa9a6fa2d [IMP] commission_simple: improve views and add description for rule list views 2025-10-15 09:06:09 +02:00
Akretion Git Bot
3a4d79b1b2 [ADD] setup.py 2025-05-11 22:19:07 +00:00
Akretion Git Bot
2f0f66280c [ADD] icon.png 2025-05-11 22:19:07 +00:00
Alexis de Lattre
7dee4a7d5b [ADD] purchase_stock_partner_default_picking_type 2025-05-12 00:18:49 +02:00
Akretion Git Bot
a8d93ed2a9 [UPD] README.rst 2025-05-08 12:19:43 +00:00
Alexis de Lattre
a98490706f [IMP] Remove full access on uom.uom and uom.category to sale manager, stock manager, purchase manager, POS manager, MRP manager
We only keep full access to uom.uom and uom.category to the group Administration/Configuration
2025-05-08 12:18:30 +00:00
Akretion Git Bot
47afd81567 [ADD] setup.py 2025-04-01 07:40:56 +00:00
Akretion Git Bot
1247e99f3c [ADD] icon.png 2025-04-01 07:40:55 +00:00
Alexis de Lattre
e5632abb97 Add module stock_valuation_xlsx_viewer 2025-04-01 09:40:34 +02:00
Alexis de Lattre
041aae3e17 stock_valuation_xlsx: update group in ACL 2025-04-01 09:39:53 +02:00
Alexis de Lattre
75a3f69508 [FIX] commission_simple: fix filtering on invoice lines 2025-03-28 15:46:24 +01:00
Akretion Git Bot
ce7a3a382a [ADD] setup.py 2025-03-15 06:28:32 +00:00
Akretion Git Bot
16e7233adb [ADD] icon.png 2025-03-15 06:28:31 +00:00
Alexis de Lattre
6e54d026a6 [ADD] commission_simple, commission_simple_agent, sale_agent
3 modules backported from v16
2025-03-15 07:28:20 +01:00
Alexis de Lattre
ed1a6641ce [IMP] stock_usability: add index on picking_type_id on stock.picking 2025-03-14 16:40:57 +00:00
Alexis de Lattre
51aa9bb58f [IMP] pos_usability: remove order_id from default measures in report pivot view 2025-03-14 13:44:24 +00:00
Alexis de Lattre
47b7b4a133 [IMP] pos_usability: add filters Today and Yesterday on report.pos.order 2025-03-14 13:37:10 +00:00
Alexis de Lattre
99c1f45951 [IMP] sale_usability: qty by default from Sales Stats from product list view 2025-03-14 12:55:50 +00:00
Alexis de Lattre
e33453c1a5 [IMP] sale_usability: add Sale Statistics in product list view 2025-03-12 23:28:15 +01:00
Akretion Git Bot
4804917f37 [UPD] README.rst 2025-02-25 17:52:15 +00:00
Alexis de Lattre
4b658203cc [IMP] mrp_usability: add lot on mrp production report 2025-02-25 18:51:27 +01:00
Alexis de Lattre
e6d801a43a [FIX] product_usability: fix crash when searching on main supplier 2025-02-17 19:39:43 +01:00
Akretion Bot
8510656382 [ADD] setup.py 2025-01-30 02:36:08 +00:00
Akretion Bot
c35c200ead [ADD] icon.png 2025-01-30 02:36:08 +00:00
Akretion Bot
1b99fedd38 [UPD] README.rst 2025-01-30 02:36:08 +00:00
Benoît
e155a7b821 small fixes on sale_show_transaction views 2025-01-23 15:31:33 +01:00
Alexis de Lattre
cec64f83d8 [IMP] account_usability: add internal_group to account type form/tree views 2025-01-23 09:34:49 +01:00
Alexis de Lattre
3e7298f465 stock_usability: add confirm pop-up on inventory validation 2025-01-07 17:35:59 +01:00
Kévin Roche
82b910491a Merge pull request #228 from akretion/14.0-add-account_default_report_without_paiement
[14.0][ADD] account_default_report_without_paiement
2024-12-21 14:29:33 +01:00
Kev-Roche
7a3f5cd05b [14.0][ADD] account_default_report_without_paiement 2024-12-21 14:26:27 +01:00
Alexis de Lattre
1d96cc4c83 stock_usability: add tracking on important fields of stock.production.lot
Code cleanup
2024-12-19 17:30:14 +01:00
beau sebastien
2ff3ea6dcd Merge pull request #214 from akretion/14.0-fix-product_usability
product_usability: seller_id can not be store as muti-company will be broken
2024-12-12 01:39:21 +01:00
Sébastien BEAU
a1f8ab32dd product_usability: make the field seller_id searcheable 2024-12-12 01:38:25 +01:00
Alexis de Lattre
f3a6cfade6 [IMP] account_bank_reconciliation_summary_xlsx: add block to have difference et justification (entered by user) 2024-10-23 12:20:26 +02:00
Alexis de Lattre
b8203ae42a [IMP] account_bank_reconciliation_summary_xlsx fine-tune config check 2024-10-22 15:11:01 +02:00
Alexis de Lattre
02d9dee32e [IMP] account_bank_reconciliation_summary_xlsx: use native method to compute account balance 2024-10-22 15:05:32 +02:00
Alexis de Lattre
04b363f8a6 [MIG] mass_mailing_usability to v14 2024-10-22 14:39:45 +02:00
Alexis de Lattre
f3b5f85fc9 [IMP] account_bank_reconciliation_summary_xlsx: support bank journals in currency different than company currency
Update fr translation
2024-10-22 14:34:45 +02:00
Alexis de Lattre
d7f6a2b9f8 [IMP] account_payment_line_manual_account: add support for analytic 2024-10-16 17:13:23 +02:00
Florian
2a0b1342e7 Merge pull request #222 from akretion/14-fix-invoice-update-pdf-unlink
[FIX] account_invoice_update_wizard : avoid stacktrace when no pdf is…
2024-10-10 09:18:57 +02:00
Florian da Costa
db33820a57 [FIX] account_invoice_update_wizard : avoid stacktrace when no pdf is found 2024-10-10 09:12:48 +02:00
Alexis de Lattre
4c067fef09 stock_usability: mig method auto unpack on internal locations from v10 2024-10-01 11:02:26 +02:00
Alexis de Lattre
88452b7930 [IMP] account_usability_akretion: simplify code for invoice attach del upon invoice back to draft 2024-09-30 10:56:47 +02:00
Alexis de Lattre
a6305eb581 [FIX] account_usability: fix deletion of PDF invoice attachment when invoice is back to draft 2024-09-30 09:03:30 +02:00
beau sebastien
d2a8b77c22 Merge pull request #221 from akretion/14.0-purge-pdf
account_invoice_update_wizard: purge existing pdf in attachment after update
2024-09-27 17:25:24 +02:00
Sébastien BEAU
467ce47306 account_invoice_update_wizard: purge existing pdf in attachment after update 2024-09-27 17:11:39 +02:00
Alexis de Lattre
ff0bdc1b8d sale_stock_usability: add method to display delivery order on out invoice report 2024-09-23 21:45:30 +00:00
Alexis de Lattre
254a97edd3 base_usability: Add rcs_siren in company header 2024-09-23 20:56:02 +00:00
Alexis de Lattre
162f0b7874 mrp_usability: add tracking on some fields 2024-09-19 16:04:03 +02:00
Alexis de Lattre
ee8bf2ea17 stock_usability: add script to fix reserved_quantity on quants
Filter-out cancelled move lines shown by "reserved" button on quants
2024-09-19 16:03:08 +02:00
Alexis de Lattre
97c20fed73 mrp_subcontracting_usability: add link to subcontrating production order from stock.move form view 2024-09-19 11:22:59 +02:00
Alexis de Lattre
856bca4ccf account_usability: add search on account in account.move search view 2024-09-17 17:53:28 +02:00
Alexis de Lattre
0d5346d856 Add module account_payment_line_manual_account 2024-09-14 00:13:14 +02:00
Alexis de Lattre
940fe43614 [MIG] partner_products_shortcut from v10 to v14 2024-09-12 22:09:25 +02:00
Alexis de Lattre
4e68c48110 stock_usability: Add product_barcode on orderpoint tree view (optional hide) 2024-09-12 21:28:51 +02:00
Alexis de Lattre
7b8c35a384 Add patch in pos_usability 2024-09-10 23:37:46 +02:00
Alexis de Lattre
0bbda6f265 product_detailed_type: improve compatibility with demo/test data
It's still not perfect yet, in particular when you install the "stock"
module and "product_detailed_type_stock" is not installed yet.
2024-09-05 18:21:59 +02:00
Alexis de Lattre
c7c5d9172b pos_usability: add patch pos-always_open_cashbox.diff 2024-07-15 21:57:09 +02:00
Alexis de Lattre
4655e6b739 base_usability: add 2 patches 2024-07-11 13:04:59 +02:00
Alexis de Lattre
8bd83b0975 mrp_average_cost: avoid crash on bad data 2024-06-25 01:10:51 +02:00
Alexis de Lattre
9367f7006e [FIX] mrp_average_cost: fix bad dependency 2024-06-24 18:31:35 +02:00
Alexis de Lattre
29b8ebb779 account_usability: add invoice currency signed fields
Show these fields as optional in tree view without sum=1
2024-06-24 11:24:22 +02:00
Alexis de Lattre
c33835957d sale_usability: add button to send order acknowledgement
This is a forward port of a v12 commit.
2024-06-24 10:03:13 +02:00
Alexis de Lattre
73e700d2d2 delivery_usability: Move code from stock_packaging_usability_pp to delivery_usability
I don't use stock_packaging_usability_pp from OCA/stock-logistics-tracking because the feature is native since v11 (I didn't figure it out when I ported stock_packaging_usability_ul from v10 to v14 under the new name stock_packaging_usability_ul
I also improved the code to clean it up and use the native field for measured weight
2024-06-04 15:54:22 +02:00
Sébastien BEAU
0fa2024dab product_usability: seller_id can not be store as muti-company will be broken
do not store the field as shared product can have different supplier
depending on the company logged
Use compute as related will always pick the first one whatever the
company logged
2024-06-02 22:25:10 +02:00
Benoit
5144b039a5 fix report name when deleting attachment invoice with button draft 2024-05-28 11:51:11 +02:00
Florian
0e237d26cb Merge pull request #208 from akretion/14-account-usability-fix-statement-back-to-draft
Revert "account_usability: reset to draft the bank statement do not unreconcile items
2024-05-28 11:26:45 +02:00
Alexis de Lattre
b252bdff34 Add module stock_picking_batch_usability 2024-04-26 17:48:51 +02:00
Alexis de Lattre
550704288d base_usability: add siren and siret in display address method 2024-04-26 10:32:53 +02:00
Alexis de Lattre
320cfff25f stock_usability: always show picking_type_id in picking form view 2024-04-25 15:15:55 +02:00
Alexis de Lattre
26a7a42e8c pos_usability: add pos_type_id on warehouse form view 2024-04-24 13:42:10 +02:00
Alexis de Lattre
3ca4553eb5 product_detailed_type_stock: default product type is 'product' instead of 'consu'
Same behavior as in stock_usability that switch default type to 'product' instead of 'consu'
2024-04-23 21:40:39 +02:00
Alexis de Lattre
309d466374 base_usability + account_usability: give access to acc_holder_name on res.partner.bank (hidden by default) 2024-04-23 21:07:27 +02:00
Florian
61f43e5d02 Merge pull request #209 from akretion/14-adapt-update-entry
[IMP] account_invoice_update_wizard : Adapt wizard view and button to make it usable on accountring entries + small improvements
2024-04-17 11:55:52 +02:00
Alexis de Lattre
6d847dcbe9 mrp_usability: improve mrp reporting
Add product category in reporting
Pivot view by default instead of graph view
Default measure total qty instead of count
2024-04-08 10:34:37 +02:00
Alexis de Lattre
85b4cc25eb sale_down_payment: add ACL 2024-04-05 09:42:54 +02:00
Alexis de Lattre
901a0e5816 mrp_usability: Allow to change the destination location until 'Mark as done'
Native behavior: it is only possible to change the destination stock
location of a production order in draft state.
2024-04-04 16:50:52 +02:00
Alexis de Lattre
569b3fea1a sale_usability: improve tree view of sale.order 2024-04-04 13:51:32 +02:00
Alexis de Lattre
60589b1743 sale_purchase_no_product_template_menu: update entries in account 2024-04-03 17:21:00 +02:00
Alexis de Lattre
5ce7ed3fe7 [IMP] base_usability: improve report header methods on res.company 2024-03-27 11:18:11 +01:00
Alexis de Lattre
ab3562a737 [MIG] mrp_average_cost to v14 2024-03-24 16:08:01 +01:00
Alexis de Lattre
28c6aca721 [MIG] account_invoice_margin from v12 to v14 2024-03-21 18:25:30 +01:00
Alexis de Lattre
b353bb14a5 [MIG] sale_down_payment to v14 2024-03-15 15:23:43 +01:00
Alexis de Lattre
282e7142db sale_usability: track changes in delivered_qty in the chatter
This feature is native in the purchase module in v14. I consider that it
replaces the 3 modules service_line_qty_update_base/service_line_qty_update_purchase/service_line_qty_update_sale
2024-03-14 18:07:52 +01:00
Alexis de Lattre
763928c286 [MIG] rp_no_product_template_menu to v14
Add comment in stock_no_product_template_menu
2024-03-14 17:29:39 +01:00
Alexis de Lattre
4774b879fa [MIG] stock_no_product_template_menu to v14 2024-03-14 17:21:36 +01:00
Alexis de Lattre
18a5c22160 sale_margin_no_onchange: fix digits in field declaration 2024-03-14 17:19:20 +01:00
Alexis de Lattre
8f87df3f3d sale_margin_no_onchange: improve perf by using read_group
Cleanup code
2024-03-14 17:09:53 +01:00
matthieu.saison
6af447974c migration to 14.0 2024-03-14 17:09:53 +01:00
Florian da Costa
46f2e0e01d [IMP] Add bill date (for supplier invoice) and rename bill ref to supplier bill ref to be consistent with name in invoice 2024-03-11 12:29:35 +01:00
Alexis de Lattre
ad8edd00d2 sale_order_route: add route_id in sale.report 2024-02-27 12:51:22 +01:00
Alexis de Lattre
97d57e40eb [FIX] stock_usability: stop adding a field in stock_usability which is defined in mrp ! 2024-02-13 17:00:08 +01:00
Alexis de Lattre
fcf67f4fd9 [MIG] patch for reserved_qty and free_qty from v12 to v14 2024-02-13 16:17:56 +01:00
Florian da Costa
89f81053cd [IMP] account_invoice_update_wizard : rename button for accounting entries + hide invoice specific fields in case of accountring entries 2024-02-12 11:51:15 +01:00
Florian da Costa
b867dd6d01 Revert "account_usability: reset to draft the bank statement do not unreconcile"
This reverts commit 85f8fe5b30.
2024-02-08 11:27:45 +01:00
Alexis de Lattre
f2172a5f06 base_usability: Add web-advanced_search_startswith.diff 2024-01-22 23:44:20 +01:00
Alexis de Lattre
e81e8e5a93 stock_usability: improve stock.move.line form view 2024-01-08 18:40:17 +01:00
beau sebastien
a7b0210a90 Merge pull request #202 from akretion/14.0-fix_pricelist_and_add_attr_value_tree
14.0 fix pricelist and add attr value tree
2023-12-21 06:22:21 +01:00
Sébastien BEAU
cd30298f88 product_usability: always show pricelist_id, just hide it when edit from pricelist 2023-12-20 16:07:26 +01:00
Alexis de Lattre
5039e56417 sale_order_route: propagate route_id to sale order lines.
This is important when you add lines AFTER sale order confirmation.
2023-12-01 10:25:31 +01:00
Alexis de Lattre
3c338c9c78 project_usability: add comment 2023-11-23 18:57:11 +01:00
Alexis de Lattre
2c87670281 sale_crm_usability: add comment 2023-11-23 18:51:53 +01:00
Alexis de Lattre
59e34d0166 product_priority_star: update module description 2023-11-23 12:29:52 +01:00
Kev-Roche
0e87b385d4 add pricelist by default from smart button 2023-11-20 13:26:01 +01:00
Kev-Roche
4a434d69f9 [ADD] values tree view on product attribute 2023-11-20 13:21:54 +01:00
Kévin Roche
bade674c41 Merge pull request #195 from akretion/14.0-remove-duplicated-button
14.0 remove duplicated button
2023-11-02 17:27:51 +01:00
Alexis de Lattre
def89c0a5d base_usability: now depend on 'web' and not only 'base' 2023-10-27 11:29:50 +02:00
Alexis de Lattre
88b12d86a2 base_partner_one2many_phone: reformat wizard now works 2023-10-25 23:02:43 +02:00
Alexis de Lattre
e3c55047b3 account_usability: pivot view of account.move.line
Pivot table of account.move.line: by default, date is split by month... but if you've been using Odoo for several years, the pivot table becomes very big by default: so we split by year
2023-10-25 21:51:43 +02:00
Alexis de Lattre
b701586edc base_usability: form view of partner: zip/city/state (instead of state/city/zip) 2023-10-25 21:38:06 +02:00
Alexis de Lattre
aae3ac2898 Add patch for pos_usability 2023-10-19 21:19:53 +02:00
Alexis de Lattre
8a2e23cff5 stock_usability: clean-up zero-qty quants when opening quants from stock.location
When accessing stock.move.line from the show reservation on quants, in
the form view of stock.move.line, have a link to the picking
2023-10-19 16:29:45 +02:00
Alexis de Lattre
0781cb7ba7 pos_usability: order pos.payment.method by sequence 2023-10-19 11:12:09 +02:00
Alexis de Lattre
a7022e899f translate product_category_tax 2023-10-16 22:36:16 +02:00
Alexis de Lattre
068509066d [FIX] stock_quant_package_move_wizard: missing picking_id on stock.move.line 2023-10-05 21:56:08 +02:00
Alexis de Lattre
e594d15417 base_partner_one2many_phone: improve search view of res.partner 2023-09-12 19:54:34 +02:00
Alexis de Lattre
4121d8466d pos_usability: add sequence on pos.config 2023-09-12 16:22:32 +02:00
Alexis de Lattre
6df9756479 base_partner_one2many_phone: code improvements 2023-09-06 23:14:06 +02:00
Alexis de Lattre
0331cc8eda [MIG] intrastat_product_type from v12 to v14 2023-08-31 11:00:02 +02:00
Alexis de Lattre
54bc3d8af8 Add module mrp_subcontracting_usability 2023-08-30 15:00:47 +02:00
Alexis de Lattre
15edfe5603 account_usability: add warning banner when blocked=True on invoice
Add "Dispute" filter in search view of invoices
2023-08-29 16:24:35 +02:00
Alexis de Lattre
8bf2116630 purchase_stock_usability: add picking_type_id in tree view (hide) 2023-08-28 14:47:45 +02:00
Alexis de Lattre
6b5282994a stock_usability: Add computed field is_dropship (needed to customize some reports) 2023-08-28 11:07:02 +02:00
Alexis de Lattre
993aab7d18 Fix string 2023-07-15 15:40:32 +02:00
Alexis de Lattre
73137ee1fb product_print_zpl_barcode: print multi labels at once
Print from product tree view and form view (product.product and product.template)
Print from done stock picking using must_print_barcode
2023-07-15 15:29:02 +02:00
Alexis de Lattre
c4ec388380 stock_usability: Add supplier in orderpoint list view
Hide unneeded "Automate orders" in orderpoint list view
product_usability: add seller_id in tree/search view of product.product and product.template
2023-07-14 15:41:02 +02:00
Alexis de Lattre
8afcd49bc3 purchase_stock_usability: add supplier in tree view
stock_usability: allow to hide preferred route
2023-07-14 14:41:06 +02:00
Alexis de Lattre
1e8f00d4e1 pos_usability: add product_id in pos.order.line form view 2023-07-13 11:55:19 +02:00
Hpar
061efb2197 Merge pull request #198 from akretion/14.0-fix-stock-valuation-layer-multi-company
stock_valuation_xlsx: fix multicompany issues
2023-06-15 10:15:51 +02:00
hparfr
e698746dd1 stock_valuation_xlsx: fix multicompany issues
fix: ref('stock.warehouse0') may belong to a different
company
add: allow to select stock parent location like physical
in order to export all the wh at once
2023-06-15 09:31:33 +02:00
Alexis de Lattre
d2bc7be9fe purchase_usability: don't write ref on account.move, because ref is for the supplier invoice number 2023-06-12 23:24:25 +02:00
Alexis de Lattre
5f6b731e50 account_usability: add blocked on account.move 2023-06-12 23:11:24 +02:00
Alexis de Lattre
6c81ade7d0 account_usability: implement alternative to account_invoice_supplier_ref_unique that keeps the original Odoo datamodel 2023-06-12 14:20:16 +02:00
Alexis de Lattre
209de4f6db Add module project_usability 2023-06-12 12:32:48 +02:00
Alexis de Lattre
fd31627fa6 account_usability: add link from/to reverse journal entry in chatter 2023-05-16 19:43:40 +02:00
Alexis de Lattre
2863de99f4 Add module stock_move_line_auto_fill_all
Same as the OCA module stock_move_line_auto_fill but applies on all
moves lines (including lines with lot)
2023-04-28 12:49:37 +02:00
Alexis de Lattre
16ed41187f purchase_usability: improve purchase.report tree view 2023-04-25 19:21:56 +02:00
Hpar
7129dd1cce Merge pull request #193 from akretion/14.0-add-setup
[CI] add setup/account_usability
2023-04-12 12:18:43 +02:00
Sébastien BEAU
2d3a792ce8 sale_usability: remove duplicated button 2023-04-04 12:34:06 +02:00
David Beal
d2cf9b73d8 FIX dev_menu: black 2023-03-23 13:55:37 +01:00
David Beal
d6cf5f82e7 Update menu_view.xml 2023-03-23 13:46:55 +01:00
Alexis de Lattre
e9350bac57 account_usability: reversal wizard: don't set D+1 default date when we try to generate a refund 2023-03-21 14:29:32 +01:00
Raphaël Valyi
2e267d717f [CI] add some setup/ modules 2023-03-10 01:43:39 -03:00
Alexis de Lattre
e8b43b67c1 account_bank_reconciliation_summary_xlsx: fix logic error in reconcile filter 2023-03-09 23:30:13 +01:00
Alexis de Lattre
f2b5b0b4dd account_usability: remove acc_type from res.partner.bank tree view
I now recommand the use of partner_bank_acc_type_constraint from https://github.com/OCA/partner-contact/pull/1474
2023-03-09 23:16:16 +01:00
Alexis de Lattre
a64c60a540 product_print_zpl_barcode: fix warning and improve code 2023-03-01 23:25:45 +01:00
Alexis de Lattre
b48db5492d Add module stock_quant_package_move_wizard 2023-02-21 15:10:38 +01:00
Alexis de Lattre
9026660416 product_category_tax: add field in constraint 2023-02-13 22:24:05 +01:00
Alexis de Lattre
d2a9f953b9 account_usability: Add confirm pop-up on 'reset to new' button 2023-01-23 17:23:46 +01:00
Alexis de Lattre
acff0a421d product_print_zpl_barcode: 2 fields: png and svg 2023-01-23 09:14:44 +01:00
Alexis de Lattre
64f54a9389 product_print_zpl_barcode: Add field barcode_image for EAN13 and EAN8 on product.product 2023-01-22 22:39:08 +01:00
Alexis de Lattre
08db759977 mail_usability: improve mail_activity views 2023-01-20 19:31:11 +01:00
Alexis de Lattre
e07df6b45a mail_usability: Improve view of mail.activity 2023-01-20 12:02:43 +01:00
Alexis de Lattre
fc58a9adf5 Add module product_detailed_type and product_detailed_type_stock 2023-01-20 12:02:24 +01:00
Alexis de Lattre
1d463a744d Add module product_priority_star 2023-01-20 12:01:57 +01:00
Alexis de Lattre
dbad21c13a Add module sale_crm_usability 2023-01-19 17:15:56 +01:00
Alexis de Lattre
aa16b70bdd Add module account_bank_reconciliation_summary_xlsx 2023-01-13 11:33:48 +01:00
Alexis de Lattre
eff63f2be2 crm_usability: CRM>Sales>My activity should not be limited to Sales Manager 2023-01-03 10:36:13 +01:00
Alexis de Lattre
937595ca2c product_usability: use ondelete='restrict' instead of 'cascade' on supplierinfo/partner_id 2022-12-12 21:45:12 +01:00
Raphaël Valyi
9397bb9fce Merge pull request #189 from akretion/14.0-style-fix
[14.0][account_usability] style fix
2022-12-06 11:42:11 -03:00
Raphaël Valyi
390ce75827 [FIX] 4 chars indent + reordered imports 2022-12-05 20:04:50 -03:00
Raphaël Valyi
819d145763 Merge pull request #188 from akretion/14.0-fix-account_invoice_update_wizard_payment_mode
[14.0][FIX] account_invoice_update_wizard_payment_mode view dependency
2022-11-29 17:15:26 -03:00
clementmbr
45bbcc0cb3 [FIX] account_invoice_update_wizard_payment_mode view dependency 2022-11-29 16:58:25 -03:00
Hpar
6ddc1b86d5 Merge pull request #187 from akretion/eradicate-quick-create-fix-hook
eradicate_quickreate: fix hook
2022-11-07 14:54:29 +01:00
Alexis de Lattre
d0b315f648 [MIG] sale_quotation_title to v14 2022-11-07 12:41:08 +01:00
Hpar
f1eeaa2e8a eradicate_quickreate: fix hook
if the record already exists and is False, we shouldn't create a new record
2022-10-31 15:44:37 +01:00
beau sebastien
553f05c58f Merge pull request #186 from akretion/14.0-add-sale-show-transaction
add sale_show_transaction, that make transaction really visible on sale order
2022-10-28 09:20:27 +02:00
Alexis de Lattre
50ae5dc9cb purchase_usability: remove code now that upstream fix is merged 2022-10-27 23:17:34 +02:00
beau sebastien
9c7775dabb Merge pull request #179 from akretion/14.0-imp-account_invoice_update_wizard
account_invoice_update_wizard: improve UI
2022-10-27 23:13:17 +02:00
Sébastien BEAU
70f1f13edd account_invoice_update_wizard: inactive update of broken payment term
We should add test and fix it
2022-10-27 23:12:02 +02:00
Sébastien BEAU
989960c7c8 account_invoice_update_wizard: fix UI add translation
Add section support and keep order based on the line sequence
Add Fr translation
2022-10-27 23:12:02 +02:00
Sébastien BEAU
9b186028c3 account_usability: aml search on move_id first, then on name/ref 2022-10-27 23:00:22 +02:00
Sébastien BEAU
c2c4957686 account_usability: improve partial reconcile matching_number 2022-10-27 23:00:22 +02:00
beau sebastien
deb37a1688 Merge pull request #184 from akretion/14.0-fix-sale_stock_usability_del_picking_status
[FIX][14.0] Module: sale_stock_usability del picking_status
2022-10-25 12:43:49 +02:00
beau sebastien
6d3e4d83c7 Merge pull request #180 from akretion/14.0-stock_inventory_usability
ADD module stock_inventory_usability
2022-10-25 12:42:53 +02:00
Sébastien BEAU
d382aea22f sale_show_transaction: better naming 2022-10-21 22:48:28 +02:00
Sébastien BEAU
688a07fc5e add sale_show_transaction, that make transaction really visible on sale order 2022-10-21 16:30:39 +02:00
Alexis de Lattre
58afed17e5 purchase_usability: up-port button "Delete lines qty=0" from v10 2022-10-20 11:34:17 +02:00
Alexis de Lattre
b1b4620cdc sale_usability: add client_order_ref in tree view with optional arg 2022-10-18 15:00:16 +02:00
Alexis de Lattre
164397fbac account_usability: remove use of field 'reconciled' in account.move.line filters 2022-10-17 17:03:35 +02:00
Alexis de Lattre
3ae427c5de account_invoice_update_wizard: improve migration to v14
account_invoice_update_wizard: remove 'name' field. Improve field
labels.
Add module account_invoice_update_wizard_payment_mode
2022-10-07 15:54:04 +02:00
Alexis de Lattre
db2cd72d04 account_usability: "Invoicing" -> "Accounting" 2022-10-06 23:02:54 +02:00
Kev-Roche
da8849e745 [FIX][14.0] Module: sale_stock_usability del picking_status 2022-09-26 21:48:33 +02:00
Benoit
c51a847f80 ADD module stock_inventory_usability 2022-07-25 16:21:15 +02:00
627 changed files with 12093 additions and 2055 deletions

View File

@@ -0,0 +1,27 @@
===============================
Bank Reconciliation Report XLSX
===============================
In Odoo v13+, a bank reconciliation report is not really needed because all the payments executed that are not debited/credited on the bank account are in separate waiting accounts. But accountants want a bank reconciliation report, so this module adds one, even if it is quite different from a classic bank reconciliation report.
Configuration
=============
This module doesn't require any configuration.
Usage
=====
You can launch the Bank Reconciliation Report wizard from:
* the menu *Accounting > Reports > Bank > Bank Reconciliation*,
* the invoicing dashboard: on a bank journal, click on the options, then select *Bank Reconciliation*.
* the form view of a bank statement: click on the button *Bank Reconciliation Report*.
Credits
=======
Contributors
------------
* Alexis de Lattre <alexis.delattre@akretion.com>

View File

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

View File

@@ -0,0 +1,21 @@
# Copyright 2017-2024 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": "Bank Reconciliation Report",
"version": "14.0.2.0.0",
"license": "AGPL-3",
"author": "Akretion",
"website": "https://github.com/akretion/odoo-usability",
"summary": "Bank reconciliation XLSX report",
"depends": ["account", "report_xlsx"],
"data": [
"report/report.xml",
"wizard/bank_reconciliation_report_wizard_view.xml",
"views/account_bank_statement.xml",
"views/account_journal.xml",
"security/ir.model.access.csv",
],
"installable": True,
}

View File

@@ -0,0 +1,268 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_bank_reconciliation_summary_xlsx
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-10-23 10:04+0000\n"
"PO-Revision-Date: 2024-10-23 10:04+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_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#, python-format
msgid "Amount"
msgstr "Montant"
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#, python-format
msgid "Balance %s:"
msgstr "Solde %s :"
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#, python-format
msgid "Bank Balance:"
msgstr "Solde bancaire :"
#. module: account_bank_reconciliation_summary_xlsx
#: model:ir.model.fields,field_description:account_bank_reconciliation_summary_xlsx.field_bank_reconciliation_report_wizard__journal_ids
msgid "Bank Journals"
msgstr "Journaux de banque"
#. module: account_bank_reconciliation_summary_xlsx
#: model:ir.actions.act_window,name:account_bank_reconciliation_summary_xlsx.bank_reconciliation_report_wizard_action
#: model:ir.ui.menu,name:account_bank_reconciliation_summary_xlsx.bank_reconciliation_report_wizard_menu
#: model_terms:ir.ui.view,arch_db:account_bank_reconciliation_summary_xlsx.account_journal_dashboard_kanban_view
msgid "Bank Reconciliation"
msgstr "Rapprochement bancaire"
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#: model_terms:ir.ui.view,arch_db:account_bank_reconciliation_summary_xlsx.view_bank_statement_form
#, python-format
msgid "Bank Reconciliation Report"
msgstr "Rapport de rapprochement bancaire"
#. module: account_bank_reconciliation_summary_xlsx
#: model:ir.model,name:account_bank_reconciliation_summary_xlsx.model_bank_reconciliation_report_wizard
msgid "Bank Reconciliation Report Wizard"
msgstr "Assistant de rapport de rapprochement bancaire"
#. module: account_bank_reconciliation_summary_xlsx
#: model:ir.actions.report,name:account_bank_reconciliation_summary_xlsx.bank_reconciliation_xlsx
msgid "Bank Reconciliation XLSX"
msgstr "Rapprochement bancaire XLSX"
#. module: account_bank_reconciliation_summary_xlsx
#: model:ir.model,name:account_bank_reconciliation_summary_xlsx.model_report_bank_reconciliation_xlsx
msgid "Bank Reconciliation XLSX Report"
msgstr "Rapport de rapprochement bancaire XLSX"
#. module: account_bank_reconciliation_summary_xlsx
#: model:ir.ui.menu,name:account_bank_reconciliation_summary_xlsx.menu_report_bank_root
msgid "Bank Reports"
msgstr "Rapports bancaires"
#. module: account_bank_reconciliation_summary_xlsx
#: model_terms:ir.ui.view,arch_db:account_bank_reconciliation_summary_xlsx.bank_reconciliation_report_wizard_form
msgid "Cancel"
msgstr "Annuler"
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#: model:ir.model.fields,field_description:account_bank_reconciliation_summary_xlsx.field_bank_reconciliation_report_wizard__company_id
#, python-format
msgid "Company"
msgstr "Société"
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#, python-format
msgid "Counter-part"
msgstr "Contre partie"
#. module: account_bank_reconciliation_summary_xlsx
#: model:ir.model.fields,field_description:account_bank_reconciliation_summary_xlsx.field_bank_reconciliation_report_wizard__create_uid
msgid "Created by"
msgstr "Créé par"
#. module: account_bank_reconciliation_summary_xlsx
#: model:ir.model.fields,field_description:account_bank_reconciliation_summary_xlsx.field_bank_reconciliation_report_wizard__create_date
msgid "Created on"
msgstr "Créé le"
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#, python-format
msgid "Currency"
msgstr "Devise"
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#: model:ir.model.fields,field_description:account_bank_reconciliation_summary_xlsx.field_bank_reconciliation_report_wizard__date
#, python-format
msgid "Date"
msgstr "Date"
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#, python-format
msgid "Description"
msgstr "Description"
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#, python-format
msgid "Difference:"
msgstr "Écart :"
#. module: account_bank_reconciliation_summary_xlsx
#: model:ir.model.fields,field_description:account_bank_reconciliation_summary_xlsx.field_bank_reconciliation_report_wizard__display_name
#: model:ir.model.fields,field_description:account_bank_reconciliation_summary_xlsx.field_report_bank_reconciliation_xlsx__display_name
msgid "Display Name"
msgstr "Nom affiché"
#. module: account_bank_reconciliation_summary_xlsx
#: model:ir.model.fields.selection,name:account_bank_reconciliation_summary_xlsx.selection__bank_reconciliation_report_wizard__move_state__draft_posted
msgid "Draft and Posted Entries"
msgstr "Écritures brouillon et comptabilisées"
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#: model:ir.model.fields,field_description:account_bank_reconciliation_summary_xlsx.field_bank_reconciliation_report_wizard__move_state
#, python-format
msgid "Entries"
msgstr "Écritures"
#. module: account_bank_reconciliation_summary_xlsx
#: model_terms:ir.ui.view,arch_db:account_bank_reconciliation_summary_xlsx.bank_reconciliation_report_wizard_form
msgid "Export XLSX"
msgstr "Exporter en XLSX"
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#, python-format
msgid "Generated from Odoo on %s by %s"
msgstr "Généré par Odoo le %s par %s"
#. module: account_bank_reconciliation_summary_xlsx
#: model:ir.model.fields,field_description:account_bank_reconciliation_summary_xlsx.field_bank_reconciliation_report_wizard__id
#: model:ir.model.fields,field_description:account_bank_reconciliation_summary_xlsx.field_report_bank_reconciliation_xlsx__id
msgid "ID"
msgstr ""
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#, python-format
msgid "Journal"
msgstr ""
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#, python-format
msgid "Journal Entry"
msgstr "Pièce"
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#, python-format
msgid "Justification:"
msgstr "Justification :"
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#, python-format
msgid "Label"
msgstr "Libellé"
#. module: account_bank_reconciliation_summary_xlsx
#: model:ir.model.fields,field_description:account_bank_reconciliation_summary_xlsx.field_bank_reconciliation_report_wizard____last_update
#: model:ir.model.fields,field_description:account_bank_reconciliation_summary_xlsx.field_report_bank_reconciliation_xlsx____last_update
msgid "Last Modified on"
msgstr "Dernière modification le"
#. module: account_bank_reconciliation_summary_xlsx
#: model:ir.model.fields,field_description:account_bank_reconciliation_summary_xlsx.field_bank_reconciliation_report_wizard__write_uid
msgid "Last Updated by"
msgstr "Dernière mise à jour par"
#. module: account_bank_reconciliation_summary_xlsx
#: model:ir.model.fields,field_description:account_bank_reconciliation_summary_xlsx.field_bank_reconciliation_report_wizard__write_date
msgid "Last Updated on"
msgstr "Dernière mise à jour le"
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#, python-format
msgid "No bank journal selected."
msgstr "Aucun journal de banque sélectionné."
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#, python-format
msgid "None"
msgstr "Aucun"
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#, python-format
msgid ""
"On bank journal %(journal)s which is configured with currency "
"%(journal_currency)s, the account %(account)s must be configured with the "
"same currency (current account currency: %(account_currency)s)."
msgstr ""
"Sur le journal de banque %(journal)s qui est configuré avec la devise "
"%(journal_currency)s, le compte %(account)s doit être configuré avec la même"
" devise (devise actuelle du compte : %(account_currency)s)."
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#, python-format
msgid "Partner"
msgstr "Partenaire"
#. module: account_bank_reconciliation_summary_xlsx
#: model:ir.model.fields.selection,name:account_bank_reconciliation_summary_xlsx.selection__bank_reconciliation_report_wizard__move_state__posted
msgid "Posted Entries"
msgstr "Écritures comptabilisées"
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#, python-format
msgid "Ref."
msgstr "Réf."
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#, python-format
msgid "Sub-total:"
msgstr "Sous-total :"
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#, python-format
msgid "TOTAL:"
msgstr "TOTAL :"
#. module: account_bank_reconciliation_summary_xlsx
#: code:addons/account_bank_reconciliation_summary_xlsx/report/bank_reconciliation_xlsx.py:0
#, python-format
msgid ""
"The are %(count)s journal items in account %(account)s that have a currency "
"other than %(currency)s or where currency is not set."
msgstr ""
"Il y a %(count)s écritures comptables dans le compte %(account)s qui ont une"
" devise autre que %(currency)s ou dont la devise n'est pas définie."

View File

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

View File

@@ -0,0 +1,375 @@
# Copyright 2017-2024 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
from odoo.exceptions import UserError
from datetime import datetime
from odoo.tools.misc import format_datetime
import pytz
class BankReconciliationXlsx(models.AbstractModel):
_name = "report.bank.reconciliation.xlsx"
_description = "Bank Reconciliation XLSX Report"
_inherit = "report.report_xlsx.abstract"
def _prepare_payment_move_lines(self, jdi, account, unreconciled_only=True):
domain = [
("company_id", "=", jdi['company'].id),
("account_id", "=", account.id),
("journal_id", "=", jdi['journal'].id),
("date", "<=", jdi['wizard'].date),
]
if jdi['wizard'].move_state == 'posted':
domain.append(('parent_state', '=', 'posted'))
elif jdi['wizard'].move_state == 'draft_posted':
domain.append(('parent_state', 'in', ('draft', 'posted')))
if unreconciled_only:
limit_datetime_naive = datetime.combine(jdi['wizard'].date, datetime.max.time())
tz = pytz.timezone(self.env.user.tz)
limit_datetime_aware = tz.localize(limit_datetime_naive)
limit_datetime_utc = limit_datetime_aware.astimezone(pytz.utc)
limit_datetime = limit_datetime_utc.replace(tzinfo=None)
domain += [
'|', ('full_reconcile_id', '=', False),
('full_reconcile_id.create_date', '>', limit_datetime)]
mlines = self.env["account.move.line"].search(domain)
res = []
for mline in mlines:
move = mline.move_id
cpart = []
for line in move.line_ids:
if (
line.account_id != account
and line.account_id.code not in cpart
):
cpart.append(line.account_id.code)
counterpart = " ,".join(cpart)
if jdi['currency'] == mline.currency_id:
amount = mline.amount_currency
else:
amount = mline.currency_id._convert(
mline.amount_currency, jdi['currency'], jdi['company'], mline.date)
res.append(
{
"date": mline.date,
"ref": move.ref or "",
"label": mline.name,
"partner": mline.partner_id.display_name or "",
"amount": amount,
"move_name": move.name,
"counterpart": counterpart,
}
)
return res
def _write_move_lines_block(self, jdi, row, account, add2total=True):
# Returns row
# For suspense lines, it may not add any cells if there are no suspense lines
# => in this case, it doesn't increment row
# If it adds cells, it returns row + 2 to add 2 empty rows at the end
sheet = jdi['sheet']
style = jdi['style']
style_suffix = not add2total and '_warn' or ''
subtotal = 0.0
mlines = self._prepare_payment_move_lines(jdi, account)
if mlines or add2total:
sheet.write(row, 0, '%s %s' % (account.name, account.code), style[f"title{style_suffix}"])
sheet.write(row, 1, "", style[f"title{style_suffix}"])
if not mlines:
if add2total:
sheet.write(row, 2, _("None"), style['none'])
else:
return row
else:
row += 1
col_labels = [
_("Date"),
_("Partner"),
_("Amount"),
_("Journal Entry"),
_("Counter-part"),
_("Ref."),
_("Label"),
]
col = 0
for col_label in col_labels:
sheet.write(row, col, col_label, style['col_header'])
col += 1
row += 1
start_line = row + 1
for mline in mlines:
sheet.write(row, 0, mline["date"], style['regular_date'])
sheet.write(row, 1, mline["partner"], style['regular'])
sheet.write(row, 2, mline["amount"], style[jdi['currency']])
sheet.write(row, 3, mline["move_name"], style['regular'])
sheet.write(row, 4, mline["counterpart"], style['regular'])
sheet.write(row, 5, mline["ref"], style['regular'])
sheet.write(row, 6, mline["label"], style['regular'])
subtotal += mline["amount"]
row += 1
end_line = row
for col in range(1):
sheet.write(row, col, "", style[f"title{style_suffix}"])
sheet.write(row, 1, _("Sub-total:") + ' ', style[f"title_right{style_suffix}"])
formula = f"=SUM({jdi['total_col']}{start_line}:{jdi['total_col']}{end_line})"
sheet.write_formula(row, 2, formula, style[f"{jdi['currency']}_bg{style_suffix}"], subtotal)
if add2total:
jdi['total'] += subtotal
jdi['total_formula'] += f"+{jdi['total_col']}{row + 1}"
return row + 2
def generate_xlsx_report(self, workbook, data, wizard):
lang = self.env.user.lang
self = self.with_context(lang=lang)
wizard = wizard.with_context(lang=lang)
if not wizard.journal_ids:
raise UserError(_("No bank journal selected."))
date_dt = wizard.date
company = wizard.company_id
style = self._get_style(workbook, company)
move_state_label = dict(
wizard.fields_get('move_state', 'selection')['move_state']['selection'])
generated_on_label = _('Generated from Odoo on %s by %s') % (
format_datetime(self.env, datetime.utcnow()),
self.env.user.name)
for journal in wizard.journal_ids:
row = 0
sheet = workbook.add_worksheet(journal.code or journal.name)
bank_account = journal.default_account_id
jdi = {
'wizard': wizard,
'company': company,
'journal': journal,
'currency': journal.currency_id or company.currency_id,
'bank_account': bank_account,
'style': style,
'workbook': workbook,
'sheet': sheet,
'total': 0.0,
'total_formula': '=',
'total_col': 'C',
}
sheet.write(
row,
0,
_("Bank Reconciliation Report"),
style['doc_title'],
)
row += 1
sheet.write(row, 0, generated_on_label, style['small'])
sheet.set_row(0, 26)
sheet.set_column(0, 0, 10)
sheet.set_column(1, 1, 35)
sheet.set_column(2, 2, 15)
sheet.set_column(3, 3, 15)
sheet.set_column(4, 4, 25)
sheet.set_column(5, 5, 30)
sheet.set_column(6, 6, 60)
row += 3
sheet.write(row, 0, _("Company"), style['wizard_field'])
sheet.write(row, 1, company.display_name, style['wizard_value'])
row += 1
sheet.write(row, 0, _("Date"), style['wizard_field'])
sheet.write(row, 1, date_dt, style['wizard_value_date'])
row += 1
sheet.write(row, 0, _("Journal"), style['wizard_field'])
sheet.write(row, 1, journal.display_name, style['wizard_value'])
row += 1
sheet.write(row, 0, _("Currency"), style['wizard_field'])
sheet.write(row, 1, jdi['currency'].name, style['wizard_value'])
row += 1
sheet.write(row, 0, _("Entries"), style['wizard_field'])
sheet.write(row, 1, move_state_label[wizard.move_state], style['wizard_value'])
# Setup check
if journal.currency_id and journal.currency_id != company.currency_id:
if journal.currency_id != bank_account.currency_id:
raise UserError(_(
"On bank journal %(journal)s which is configured with currency "
"%(journal_currency)s, the account %(account)s must be configured "
"with the same currency (current account currency: %(account_currency)s).",
journal=journal.display_name,
journal_currency=journal.currency_id.name,
account=bank_account.display_name,
account_currency=bank_account.currency_id.name or _('None')))
bad_line_count = self.env['account.move.line'].search_count([
('company_id', '=', company.id),
('journal_id', '=', journal.id),
('account_id', '=', bank_account.id),
('currency_id', '!=', jdi['currency'].id),
])
if bad_line_count:
raise UserError(_(
"The are %(count)s journal items in account %(account)s "
"that have a currency other than %(currency)s or where "
"currency is not set.",
count=bad_line_count,
account=bank_account.display_name,
currency=jdi['currency'].name))
# 1) Show balance of bank account
row += 3
for col in range(1):
sheet.write(row, col, "", style['title'])
sheet.write(row, 1, _("Balance %s:") % bank_account.code + ' ', style['title_right'])
if wizard.move_state == 'posted':
domain = [('parent_state', '=', 'posted')]
else:
# by default, the native method _get_journal_bank_account_balance()
# has ('parent_state', '!=', 'cancel')
domain = None
account_bal, nb_lines = journal._get_journal_bank_account_balance(domain=domain)
sheet.write(row, 2, account_bal, style[f"{jdi['currency']}_bg"])
jdi['total'] += account_bal
jdi['total_formula'] += f"{jdi['total_col']}{row + 1}"
row += 2
# 2) Show payment lines IN (debit)
debit_account = journal.payment_debit_account_id
row = self._write_move_lines_block(jdi, row, debit_account)
# 3) Show payment lines OUT (credit)
credit_account = journal.payment_credit_account_id
row = self._write_move_lines_block(jdi, row, credit_account)
for col in range(1):
sheet.write(row, col, "", style['title'])
sheet.write(row, 1, _("TOTAL:") + ' ', style['title_right'])
sheet.write_formula(
row, 2, jdi['total_formula'], style[f"{jdi['currency']}_bg"], jdi['total'])
total_row = row
row += 2
# 4) Show suspense account lines
row = self._write_move_lines_block(
jdi, row, journal.suspense_account_id, add2total=False)
# Static cells
for col in range(1):
sheet.write(row, col, "", style['title'])
sheet.write(row, 1, _("Bank Balance:") + ' ', style['title_right'])
sheet.write(row, 2, 0, style[f"{jdi['currency']}_bg_manual"])
bank_bal_row = row
row += 2
for col in range(1):
sheet.write(row, col, "", style['title'])
sheet.write(row, 1, _("Difference:") + ' ', style['title_right'])
sheet.write_formula(
row, 2, f"={jdi['total_col']}{total_row + 1}-{jdi['total_col']}{bank_bal_row + 1}",
style[f"{jdi['currency']}_bg"], jdi['total'])
row += 2
for col in range(1):
sheet.write(row, col, "", style['title'])
sheet.write(row, 1, _("Justification:") + ' ', style['title_right'])
justif_lines = 6
sheet.write_formula(
row, 2, f"=SUM({jdi['total_col']}{row+3}:{jdi['total_col']}{row+3+justif_lines-1})",
style[f"{jdi['currency']}_bg"], 0)
row += 1
col_labels = [
_("Date"),
_("Description"),
_("Amount"),
]
col = 0
for col_label in col_labels:
sheet.write(row, col, col_label, style['col_header'])
col += 1
for x in range(justif_lines):
row += 1
sheet.write(row, 0, "", style['regular_date'])
sheet.write(row, 1, "", style['regular'])
sheet.write(row, 2, "", style[jdi['currency']])
def _get_style(self, workbook, company):
style = {}
font_size = 10
light_grey = "#eeeeee"
light_blue = "#e0edff"
subtotal_orange = "#ffcc00"
subtotal_warn = "#ffff99"
amount_manual = "#ffeeab"
title_warn = "#ff9999"
lang_code = self.env.user.lang
lang = False
if lang_code:
lang = self.env["res.lang"].search([("code", "=", lang_code)])
if not lang:
lang = self.env["res.lang"].search([], limit=1)
xls_date_format = (
lang.date_format.replace("%Y", "yyyy")
.replace("%m", "mm")
.replace("%d", "dd")
.replace("%y", "yy")
)
style['doc_title'] = workbook.add_format(
{"bold": True, "font_size": font_size + 4})
style['small'] = workbook.add_format({"font_size": font_size - 3})
style['col_header'] = workbook.add_format(
{
"bold": True,
"bg_color": light_grey,
"text_wrap": True,
"font_size": font_size,
"align": "center",
}
)
title_style = {
"bold": True,
"bg_color": light_blue,
"font_size": font_size,
"align": "left",
}
style['title_right'] = workbook.add_format(dict(title_style, align="right"))
style['title'] = workbook.add_format(dict(title_style))
style['wizard_field'] = workbook.add_format(dict(title_style, bg_color=light_grey))
wizard_value_style = {
"bg_color": light_blue,
"bold": True,
"font_size": font_size,
"align": "left",
}
style['wizard_value'] = workbook.add_format(wizard_value_style)
style['wizard_value_date'] = workbook.add_format(
dict(wizard_value_style, num_format=xls_date_format))
style['none'] = workbook.add_format(
{"bold": True, "font_size": font_size, "align": "right", "bg_color": subtotal_orange}
)
# WARN for suspense account
style['title_warn'] = workbook.add_format(
dict(title_style, align="left", bg_color=title_warn))
style['title_right_warn'] = workbook.add_format(
dict(title_style, align="right", bg_color=title_warn))
style['regular'] = workbook.add_format({"font_size": font_size, "border": 1})
if "%" in xls_date_format:
# fallback
xls_date_format = "yyyy-mm-dd"
style['regular_date'] = workbook.add_format(
{"num_format": xls_date_format, "font_size": font_size, "align": "left", "border": 1}
)
for currency in self.env['res.currency'].search([]):
symbol = currency.symbol or currency.name
decimals = '0' * currency.decimal_places
if currency.position == 'before':
cur_format = f"{symbol} #,##0.{decimals}"
else:
cur_format = f"#,##0.{decimals} {symbol}"
# It seems that Excel replaces automatically the decimal
# and thousand separator by those of the language under which
# Excel runs
currency_style = {"num_format": cur_format, "font_size": font_size}
style[currency] = workbook.add_format(dict(currency_style, border=1))
style[f'{currency}_bg'] = workbook.add_format(
dict(currency_style, bg_color=subtotal_orange))
style[f'{currency}_bg_warn'] = workbook.add_format(
dict(currency_style, bg_color=subtotal_warn))
style[f'{currency}_bg_manual'] = workbook.add_format(
dict(currency_style, bg_color=amount_manual))
return style

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2017-2024 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).
-->
<odoo>
<record id="bank_reconciliation_xlsx" model="ir.actions.report">
<field name="name">Bank Reconciliation XLSX</field>
<field name="model">bank.reconciliation.report.wizard</field>
<field name="report_type">xlsx</field>
<field name="report_name">bank.reconciliation.xlsx</field>
<field name="report_file">bank.reconciliation.xlsx</field>
<field name="print_report_name">'bank_reconciliation-%s' % (object.date)</field>
</record>
</odoo>

View File

@@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_bank_reconciliation_report_wizard_user,Full access on bank.reconciliation.report.wizard,model_bank_reconciliation_report_wizard,account.group_account_user,1,1,1,1
access_bank_reconciliation_report_wizard_readonly,Full access on bank.reconciliation.report.wizard,model_bank_reconciliation_report_wizard,account.group_account_readonly,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_bank_reconciliation_report_wizard_user Full access on bank.reconciliation.report.wizard model_bank_reconciliation_report_wizard account.group_account_user 1 1 1 1
3 access_bank_reconciliation_report_wizard_readonly Full access on bank.reconciliation.report.wizard model_bank_reconciliation_report_wizard account.group_account_readonly 1 1 1 1

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2017-2024 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).
-->
<odoo>
<record id="view_bank_statement_form" model="ir.ui.view">
<field name="name">bank_rec_summary.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_reprocess" position="after">
<button
name="%(bank_reconciliation_report_wizard_action)d"
type="action"
string="Bank Reconciliation Report"
context="{'default_journal_ids': [journal_id]}"
/>
</button>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2018-2024 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).
-->
<odoo>
<!-- Accounting Dashboard -->
<record id="account_journal_dashboard_kanban_view" model="ir.ui.view">
<field
name="name"
>bank_reconciliation_summary.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">
<xpath expr="//a[@name='open_collect_money']/.." position="before">
<div name="bank_reconciliation_report">
<a
role="menuitem"
type="action"
name="%(bank_reconciliation_report_wizard_action)d"
context="{'default_journal_ids': [active_id]}"
>Bank Reconciliation</a>
</div>
</xpath>
</field>
</record>
</odoo>

View File

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

View File

@@ -0,0 +1,42 @@
# Copyright 2017-2024 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class BankReconciliationReportWizard(models.TransientModel):
_name = "bank.reconciliation.report.wizard"
_description = "Bank Reconciliation Report Wizard"
_check_company_auto = True
company_id = fields.Many2one(
'res.company', string='Company',
ondelete='cascade', required=True,
default=lambda self: self.env.company)
date = fields.Date(required=True, default=fields.Date.context_today)
move_state = fields.Selection(
[("posted", "Posted Entries"), ("draft_posted", "Draft and Posted Entries")],
string="Entries",
required=True,
default="posted",
)
journal_ids = fields.Many2many(
"account.journal",
string="Bank Journals",
domain="[('type', '=', 'bank'), ('company_id', '=', company_id)]",
required=True,
check_company=True,
default=lambda self: self._default_journal_ids(),
)
@api.model
def _default_journal_ids(self):
journals = self.env["account.journal"].search(
[
("type", "=", "bank"),
("bank_account_id", "!=", False),
("company_id", "=", self.env.company.id),
]
)
return journals

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2017-2024 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).
-->
<odoo>
<record id="bank_reconciliation_report_wizard_form" model="ir.ui.view">
<field name="name">bank.reconciliation.report.wizard.form</field>
<field name="model">bank.reconciliation.report.wizard</field>
<field name="arch" type="xml">
<form>
<group name="main">
<field name="company_id" invisible="1" />
<field name="date" />
<field name="journal_ids" widget="many2many_tags" options="{'no_open': True, 'no_create': True}"/>
<field name="move_state" widget="radio"/>
</group>
<footer>
<button
name="%(account_bank_reconciliation_summary_xlsx.bank_reconciliation_xlsx)d"
string="Export XLSX"
type="action"
class="btn-primary"
/>
<button special="cancel" string="Cancel" />
</footer>
</form>
</field>
</record>
<record id="bank_reconciliation_report_wizard_action" model="ir.actions.act_window">
<field name="name">Bank Reconciliation</field>
<field name="res_model">bank.reconciliation.report.wizard</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<menuitem
id="menu_report_bank_root"
parent="account.menu_finance_reports"
name="Bank Reports"
sequence="12"
/>
<menuitem
id="bank_reconciliation_report_wizard_menu"
action="bank_reconciliation_report_wizard_action"
parent="menu_report_bank_root"
sequence="10"
/>
</odoo>

View File

@@ -0,0 +1,68 @@
=======================================
Account Default Report Without Paiement
=======================================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:2035514c3af2d372479b91ca5314fe2f5ff90523f11fb8cc874b4fac8b375f50
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/14.0/account_default_report_without_paiement
:alt: akretion/odoo-usability
|badge1| |badge2| |badge3|
This module switch the default account report to the one without paiement
**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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/akretion/odoo-usability/issues/new?body=module:%20account_default_report_without_paiement%0Aversion:%2014.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
~~~~~~~~~~~~
* Kévin Roche <kevin.roche@akretion.com>
Maintainers
~~~~~~~~~~~
.. |maintainer-Kev-Roche| image:: https://github.com/Kev-Roche.png?size=40px
:target: https://github.com/Kev-Roche
:alt: Kev-Roche
Current maintainer:
|maintainer-Kev-Roche|
This module is part of the `akretion/odoo-usability <https://github.com/akretion/odoo-usability/tree/14.0/account_default_report_without_paiement>`_ project on GitHub.
You are welcome to contribute.

View File

@@ -0,0 +1,22 @@
# Copyright 2024 Akretion (https://www.akretion.com).
# @author Kévin Roche <kevin.roche@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Account Default Report Without Paiement",
"summary": "Account Default Report Without Paiement",
"version": "14.0.1.0.0",
"category": "reports",
"website": "https://github.com/OCA/account",
"author": "Akretion, Odoo Community Association (OCA)",
"license": "AGPL-3",
"maintainers":["Kev-Roche"],
"application": False,
"installable": True,
"depends": [
"account",
],
"data": [
"data/data.xml",
],
}

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright (C) 2024 Akretion (<http://www.akretion.com>).
@author Kévin Roche <kevin.roche@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="account.account_invoices" model="ir.actions.report">
<field name="report_name">account.report_invoice</field>
<field name="report_file">account.report_invoice</field>
</record>
<record id="account.account_invoices_without_payment" model="ir.actions.report">
<field name="name">Factures avec paiement</field>
<field name="report_name">account.report_invoice_with_payments</field>
<field name="report_file">account.report_invoice_with_payments</field>
</record>
</odoo>

View File

@@ -0,0 +1 @@
* Kévin Roche <kevin.roche@akretion.com>

View File

@@ -0,0 +1 @@
This module switch the default account report to the one without paiement

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -0,0 +1,418 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Account Default Report Without Paiement</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic, pre.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="account-default-report-without-paiement">
<h1 class="title">Account Default Report Without Paiement</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:2035514c3af2d372479b91ca5314fe2f5ff90523f11fb8cc874b4fac8b375f50
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/akretion/odoo-usability/tree/14.0/account_default_report_without_paiement"><img alt="akretion/odoo-usability" src="https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github" /></a></p>
<p>This module switch the default account report to the one without paiement</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-4">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-5">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/akretion/odoo-usability/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/akretion/odoo-usability/issues/new?body=module:%20account_default_report_without_paiement%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
<ul class="simple">
<li>Akretion</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<ul class="simple">
<li>Kévin Roche &lt;<a class="reference external" href="mailto:kevin.roche&#64;akretion.com">kevin.roche&#64;akretion.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<p>Current maintainer:</p>
<p><a class="reference external image-reference" href="https://github.com/Kev-Roche"><img alt="Kev-Roche" src="https://github.com/Kev-Roche.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/14.0/account_default_report_without_paiement">akretion/odoo-usability</a> project on GitHub.</p>
<p>You are welcome to contribute.</p>
</div>
</div>
</div>
</body>
</html>

View File

@@ -1,2 +1 @@
from . import account_invoice
from . import account_invoice_report
from . import models

View File

@@ -4,7 +4,7 @@
{
'name': 'Account Invoice Margin',
'version': '12.0.1.0.0',
'version': '14.0.1.0.0',
'category': 'Invoicing Management',
'license': 'AGPL-3',
'summary': 'Copy standard price on invoice line and compute margins',
@@ -15,10 +15,10 @@ This module has been written by Alexis de Lattre from Akretion
<alexis.delattre@akretion.com>.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'website': 'https://github.com/akretion/odoo-usability',
'depends': ['account'],
'data': [
'account_invoice_view.xml',
'views/account_move.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -1,152 +0,0 @@
# Copyright 2015-2019 Akretion France (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
import odoo.addons.decimal_precision as dp
class AccountInvoiceLine(models.Model):
_inherit = 'account.invoice.line'
standard_price_company_currency = fields.Float(
string='Cost Price in Company Currency', readonly=True,
digits=dp.get_precision('Product Price'),
help="Cost price in company currency in the unit of measure "
"of the invoice line (which may be different from the unit "
"of measure of the product).")
standard_price_invoice_currency = fields.Float(
string='Cost Price in Invoice Currency', readonly=True,
compute='_compute_margin', store=True,
digits=dp.get_precision('Product Price'),
help="Cost price in invoice currency in the unit of measure "
"of the invoice line")
margin_invoice_currency = fields.Monetary(
string='Margin in Invoice Currency', readonly=True, store=True,
compute='_compute_margin', currency_field='currency_id')
margin_company_currency = fields.Monetary(
string='Margin in Company Currency', readonly=True, store=True,
compute='_compute_margin', currency_field='company_currency_id')
margin_rate = fields.Float(
string="Margin Rate", readonly=True, store=True,
compute='_compute_margin',
digits=(16, 2), help="Margin rate in percentage of the sale price")
@api.depends(
'standard_price_company_currency', 'invoice_id.currency_id',
'invoice_id.type', 'invoice_id.company_id',
'invoice_id.date_invoice', 'quantity', 'price_subtotal')
def _compute_margin(self):
for il in self:
standard_price_inv_cur = 0.0
margin_inv_cur = 0.0
margin_comp_cur = 0.0
margin_rate = 0.0
inv = il.invoice_id
if inv and inv.type in ('out_invoice', 'out_refund'):
# it works in _get_current_rate
# even if we set date = False in context
# standard_price_inv_cur is in the UoM of the invoice line
date = inv._get_currency_rate_date() or\
fields.Date.context_today(self)
company = inv.company_id
company_currency = company.currency_id
standard_price_inv_cur =\
company_currency._convert(
il.standard_price_company_currency,
inv.currency_id, company, date)
margin_inv_cur =\
il.price_subtotal - il.quantity * standard_price_inv_cur
margin_comp_cur = inv.currency_id._convert(
margin_inv_cur, company_currency, company, date)
if il.price_subtotal:
margin_rate = 100 * margin_inv_cur / il.price_subtotal
# for a refund, margin should be negative
# but margin rate should stay positive
if inv.type == 'out_refund':
margin_inv_cur *= -1
margin_comp_cur *= -1
il.standard_price_invoice_currency = standard_price_inv_cur
il.margin_invoice_currency = margin_inv_cur
il.margin_company_currency = margin_comp_cur
il.margin_rate = margin_rate
# We want to copy standard_price on invoice line for customer
# invoice/refunds. We can't do that via on_change of product_id,
# because it is not always played when invoice is created from code
# => we inherit write/create
# We write standard_price_company_currency even on supplier invoice/refunds
# because we don't have access to the 'type' of the invoice
@api.model
def create(self, vals):
if vals.get('product_id'):
pp = self.env['product.product'].browse(vals['product_id'])
std_price = pp.standard_price
inv_uom_id = vals.get('uom_id')
if inv_uom_id and inv_uom_id != pp.uom_id.id:
inv_uom = self.env['uom.uom'].browse(inv_uom_id)
std_price = pp.uom_id._compute_price(
std_price, inv_uom)
vals['standard_price_company_currency'] = std_price
return super(AccountInvoiceLine, self).create(vals)
def write(self, vals):
if not vals:
vals = {}
if 'product_id' in vals or 'uom_id' in vals:
for il in self:
if 'product_id' in vals:
if vals.get('product_id'):
pp = self.env['product.product'].browse(
vals['product_id'])
else:
pp = False
else:
pp = il.product_id or False
# uom_id is NOT a required field
if 'uom_id' in vals:
if vals.get('uom_id'):
inv_uom = self.env['uom.uom'].browse(
vals['uom_id'])
else:
inv_uom = False
else:
inv_uom = il.uom_id or False
std_price = 0.0
if pp:
std_price = pp.standard_price
if inv_uom and inv_uom != pp.uom_id:
std_price = pp.uom_id._compute_price(
std_price, inv_uom)
il.write({'standard_price_company_currency': std_price})
return super(AccountInvoiceLine, self).write(vals)
class AccountInvoice(models.Model):
_inherit = 'account.invoice'
margin_invoice_currency = fields.Monetary(
string='Margin in Invoice Currency',
compute='_compute_margin', store=True, readonly=True,
currency_field='currency_id')
margin_company_currency = fields.Monetary(
string='Margin in Company Currency',
compute='_compute_margin', store=True, readonly=True,
currency_field='company_currency_id')
@api.depends(
'type',
'invoice_line_ids.margin_invoice_currency',
'invoice_line_ids.margin_company_currency')
def _compute_margin(self):
res = self.env['account.invoice.line'].read_group(
[('invoice_id', 'in', self.ids)],
['invoice_id', 'margin_invoice_currency',
'margin_company_currency'],
['invoice_id'])
for re in res:
if re['invoice_id']:
inv = self.browse(re['invoice_id'][0])
if inv.type in ('out_invoice', 'out_refund'):
inv.margin_invoice_currency = re['margin_invoice_currency']
inv.margin_company_currency = re['margin_company_currency']

View File

@@ -1,60 +0,0 @@
# Copyright 2018-2019 Akretion France (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AccountInvoiceReport(models.Model):
_inherit = 'account.invoice.report'
margin = fields.Float(string='Margin', readonly=True)
# why digits=0 ??? Why is it like that in the native "account" module
user_currency_margin = fields.Float(
string="Margin", compute='_compute_user_currency_margin', digits=0)
_depends = {
'account.invoice': [
'account_id', 'amount_total_company_signed',
'commercial_partner_id', 'company_id',
'currency_id', 'date_due', 'date_invoice', 'fiscal_position_id',
'journal_id', 'number', 'partner_bank_id', 'partner_id',
'payment_term_id', 'residual', 'state', 'type', 'user_id',
],
'account.invoice.line': [
'account_id', 'invoice_id', 'price_subtotal', 'product_id',
'quantity', 'uom_id', 'account_analytic_id',
'margin_company_currency',
],
'product.product': ['product_tmpl_id'],
'product.template': ['categ_id'],
'uom.uom': ['category_id', 'factor', 'name', 'uom_type'],
'res.currency.rate': ['currency_id', 'name'],
'res.partner': ['country_id'],
}
@api.depends('currency_id', 'date', 'margin')
def _compute_user_currency_margin(self):
user_currency = self.env.user.company_id.currency_id
currency_rate = self.env['res.currency.rate'].search([
('rate', '=', 1),
'|',
('company_id', '=', self.env.user.company_id.id),
('company_id', '=', False)], limit=1)
base_currency = currency_rate.currency_id
for record in self:
date = record.date or fields.Date.today()
company = record.company_id
record.user_currency_margin = base_currency._convert(
record.margin, user_currency, company, date)
# TODO check for refunds
def _sub_select(self):
select_str = super(AccountInvoiceReport, self)._sub_select()
select_str += ", SUM(ail.margin_company_currency) AS margin"
return select_str
def _select(self):
select_str = super(AccountInvoiceReport, self)._select()
select_str += ", sub.margin AS margin"
return select_str

View File

@@ -1,51 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2015-2017 Akretion (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="view_invoice_line_form" model="ir.ui.view">
<field name="name">margin.account.invoice.line.form</field>
<field name="model">account.invoice.line</field>
<field name="inherit_id" ref="account.view_invoice_line_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='analytic_tag_ids']/.." position="inside">
<field name="standard_price_company_currency"
string="Cost Price in Comp. Cur."
groups="base.group_no_one"/>
<field name="standard_price_invoice_currency"
string="Cost Price in Inv. Cur."
groups="base.group_no_one"/>
<field name="margin_invoice_currency"
string="Margin in Inv. Cur."
groups="base.group_no_one"/>
<field name="margin_company_currency"
string="Margin in Comp. Cur."
groups="base.group_no_one"/>
<label for="margin_rate" groups="base.group_no_one"/>
<div name="margin_rate" groups="base.group_no_one">
<field name="margin_rate" class="oe_inline"/> %
</div>
</xpath>
</field>
</record>
<record id="invoice_form" model="ir.ui.view">
<field name="name">margin.account.invoice.form</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<field name="move_id" position="after">
<field name="margin_invoice_currency"
string="Margin in Inv. Cur." groups="base.group_no_one"/>
<field name="margin_company_currency"
string="Margin in Comp. Cur." groups="base.group_no_one"/>
</field>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,2 @@
from . import account_move
from . import account_invoice_report

View File

@@ -0,0 +1,36 @@
# Copyright 2018-2019 Akretion France (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AccountInvoiceReport(models.Model):
_inherit = 'account.invoice.report'
margin = fields.Float(string='Margin', readonly=True)
# added margin_company_currency on account.move.line
_depends = {
'account.move': [
'name', 'state', 'move_type', 'partner_id', 'invoice_user_id', 'fiscal_position_id',
'invoice_date', 'invoice_date_due', 'invoice_payment_term_id', 'partner_bank_id',
],
'account.move.line': [
'quantity', 'price_subtotal', 'amount_residual', 'balance', 'amount_currency',
'move_id', 'product_id', 'product_uom_id', 'account_id', 'analytic_account_id',
'journal_id', 'company_id', 'currency_id', 'partner_id',
'margin_company_currency',
],
'product.product': ['product_tmpl_id'],
'product.template': ['categ_id'],
'uom.uom': ['category_id', 'factor', 'name', 'uom_type'],
'res.currency.rate': ['currency_id', 'name'],
'res.partner': ['country_id'],
}
@api.model
def _select(self):
select_str = super()._select()
select_str += ", line.margin_company_currency * currency_table.rate AS margin"
return select_str

View File

@@ -0,0 +1,155 @@
# Copyright 2015-2021 Akretion France (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AccountMoveLine(models.Model):
_inherit = 'account.move.line'
standard_price_company_currency = fields.Float(
string='Unit Cost Price in Company Currency', readonly=True,
digits='Product Price',
help="Unit Cost price in company currency in the unit of measure "
"of the invoice line (which may be different from the unit "
"of measure of the product).")
standard_price_invoice_currency = fields.Float(
string='Unit Cost Price in Invoice Currency',
compute='_compute_margin', store=True, digits='Product Price',
help="Unit Cost price in invoice currency in the unit of measure "
"of the invoice line.")
margin_invoice_currency = fields.Monetary(
string='Margin in Invoice Currency', store=True,
compute='_compute_margin', currency_field='currency_id')
margin_company_currency = fields.Monetary(
string='Margin in Company Currency', store=True,
compute='_compute_margin', currency_field='company_currency_id')
margin_rate = fields.Float(
string="Margin Rate", readonly=True, store=True,
compute='_compute_margin',
digits=(16, 2), help="Margin rate in percentage of the sale price")
@api.depends(
'standard_price_company_currency', 'move_id.currency_id',
'move_id.move_type', 'move_id.company_id',
'move_id.invoice_date', 'quantity', 'price_subtotal')
def _compute_margin(self):
for ml in self:
standard_price_inv_cur = 0.0
margin_inv_cur = 0.0
margin_comp_cur = 0.0
margin_rate = 0.0
move = ml.move_id
if move.move_type and move.move_type in ('out_invoice', 'out_refund'):
# it works in _get_current_rate
# even if we set date = False in context
# standard_price_inv_cur is in the UoM of the invoice line
date = move.date or fields.Date.context_today(self)
company = move.company_id
company_currency = company.currency_id
standard_price_inv_cur =\
company_currency._convert(
ml.standard_price_company_currency,
ml.currency_id, company, date)
margin_inv_cur =\
ml.price_subtotal - ml.quantity * standard_price_inv_cur
margin_comp_cur = move.currency_id._convert(
margin_inv_cur, company_currency, company, date)
if ml.price_subtotal:
margin_rate = 100 * margin_inv_cur / ml.price_subtotal
# for a refund, margin should be negative
# but margin rate should stay positive
if move.move_type == 'out_refund':
margin_inv_cur *= -1
margin_comp_cur *= -1
ml.standard_price_invoice_currency = standard_price_inv_cur
ml.margin_invoice_currency = margin_inv_cur
ml.margin_company_currency = margin_comp_cur
ml.margin_rate = margin_rate
# We want to copy standard_price on invoice line for customer
# invoice/refunds. We can't do that via on_change of product_id,
# because it is not always played when invoice is created from code
# => we inherit write/create
# We write standard_price_company_currency even on supplier invoice/refunds
# because we don't have access to the 'type' of the invoice
@api.model_create_multi
def create(self, vals_list):
for vals in vals_list:
if vals.get('product_id') and not vals.get('display_type'):
pp = self.env['product.product'].browse(vals['product_id'])
std_price = pp.standard_price
inv_uom_id = vals.get('product_uom_id')
if inv_uom_id and inv_uom_id != pp.uom_id.id:
inv_uom = self.env['uom.uom'].browse(inv_uom_id)
std_price = pp.uom_id._compute_price(
std_price, inv_uom)
vals['standard_price_company_currency'] = std_price
return super().create(vals_list)
def write(self, vals):
if not vals:
vals = {}
if 'product_id' in vals or 'product_uom_id' in vals:
for il in self:
if 'product_id' in vals:
if vals.get('product_id'):
pp = self.env['product.product'].browse(
vals['product_id'])
else:
pp = False
else:
pp = il.product_id or False
# uom_id is NOT a required field
if 'product_uom_id' in vals:
if vals.get('product_uom_id'):
inv_uom = self.env['uom.uom'].browse(
vals['product_uom_id'])
else:
inv_uom = False
else:
inv_uom = il.uom_id or False
std_price = 0.0
if pp:
std_price = pp.standard_price
if inv_uom and inv_uom != pp.uom_id:
std_price = pp.uom_id._compute_price(
std_price, inv_uom)
il.write({'standard_price_company_currency': std_price})
return super().write(vals)
class AccountMove(models.Model):
_inherit = 'account.move'
margin_invoice_currency = fields.Monetary(
string='Margin in Invoice Currency',
compute='_compute_margin', store=True,
currency_field='currency_id')
margin_company_currency = fields.Monetary(
string='Margin in Company Currency',
compute='_compute_margin', store=True,
currency_field='company_currency_id')
@api.depends(
'move_type',
'invoice_line_ids.margin_invoice_currency',
'invoice_line_ids.margin_company_currency')
def _compute_margin(self):
rg_res = self.env['account.move.line'].read_group(
[
('move_id', 'in', self.ids),
('display_type', '=', False),
('exclude_from_invoice_tab', '=', False),
('move_id.move_type', 'in', ('out_invoice', 'out_refund')),
],
['move_id', 'margin_invoice_currency:sum', 'margin_company_currency:sum'],
['move_id'])
mapped_data = dict([(x['move_id'][0], {
'margin_invoice_currency': x['margin_invoice_currency'],
'margin_company_currency': x['margin_company_currency'],
}) for x in rg_res])
for move in self:
move.margin_invoice_currency = mapped_data.get(move.id, {}).get('margin_invoice_currency')
move.margin_company_currency = mapped_data.get(move.id, {}).get('margin_company_currency')

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2015-2024 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_move_form" model="ir.ui.view">
<field name="name">margin.account.move.form</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<group name="sale_info_group" position="inside">
<field name="margin_invoice_currency"
groups="base.group_no_one"
attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund'))]}"/>
<field name="margin_company_currency"
groups="base.group_no_one"
attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund'))]}"/>
</group>
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='price_total']" position="after">
<field name="standard_price_invoice_currency" optional="hide" attrs="{'column_invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund'))]}"/>
<field name="margin_invoice_currency" optional="hide" attrs="{'column_invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund'))]}"/>
<field name="margin_rate" optional="hide" string="Margin Rate (%)" attrs="{'column_invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund'))]}"/>
</xpath>
<xpath expr="//field[@name='invoice_line_ids']/form//field[@name='price_total']/.." position="inside">
<field name="standard_price_company_currency"
groups="base.group_no_one" attrs="{'invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund'))]}"/>
<field name="standard_price_invoice_currency"
groups="base.group_no_one" attrs="{'invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund'))]}"/>
<field name="margin_invoice_currency"
groups="base.group_no_one" attrs="{'invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund'))]}"/>
<field name="margin_company_currency"
groups="base.group_no_one" attrs="{'invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund'))]}"/>
<label for="margin_rate" groups="base.group_no_one" attrs="{'invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund'))]}"/>
<div name="margin_rate" groups="base.group_no_one" attrs="{'invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund'))]}">
<field name="margin_rate" class="oe_inline"/> %
</div>
</xpath>
</field>
</record>
<record id="view_invoice_tree" model="ir.ui.view">
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_invoice_tree"/>
<field name="arch" type="xml">
<field name="amount_residual_signed" position="after">
<field name="margin_company_currency" optional="hide" sum="1" invisible="context.get('default_move_type') not in ('out_invoice', 'out_refund')" string="Margin"/>
</field>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,243 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_update_wizard
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__price_subtotal
msgid "Amount"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__analytic_account_id
msgid "Analytic Account"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__analytic_tag_ids
msgid "Analytic Tags"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__partner_bank_id
msgid "Bank Account"
msgstr ""
#. module: account_invoice_update_wizard
#: model_terms:ir.ui.view,arch_db:account_invoice_update_wizard.account_invoice_update_form
msgid "Bill Reference"
msgstr ""
#. module: account_invoice_update_wizard
#: model_terms:ir.ui.view,arch_db:account_invoice_update_wizard.account_invoice_update_form
msgid "Cancel"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__company_id
msgid "Company"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__create_uid
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__create_uid
msgid "Created by"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__create_date
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__create_date
msgid "Created on"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__currency_id
msgid "Currency"
msgstr ""
#. module: account_invoice_update_wizard
#: model_terms:ir.ui.view,arch_db:account_invoice_update_wizard.account_invoice_update_form
msgid "Customer Reference"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__name
msgid "Description"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move__display_name
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__display_name
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__display_name
msgid "Display Name"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__display_type
msgid "Display Type"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move__id
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__id
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__id
msgid "ID"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__invoice_id
msgid "Invoice"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__invoice_line_id
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__line_ids
msgid "Invoice Lines"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.actions.act_window,name:account_invoice_update_wizard.account_invoice_update_action
msgid "Invoice Update Wizard"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model,name:account_invoice_update_wizard.model_account_move
msgid "Journal Entry"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move____last_update
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update____last_update
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update____last_update
msgid "Last Modified on"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__write_uid
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__write_uid
msgid "Last Updated by"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__write_date
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__write_date
msgid "Last Updated on"
msgstr ""
#. module: account_invoice_update_wizard
#: code:addons/account_invoice_update_wizard/wizard/account_move_update.py:0
#, python-format
msgid "Non-legal fields of invoice updated via the Invoice Update wizard."
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields.selection,name:account_invoice_update_wizard.selection__account_move_line_update__display_type__line_note
msgid "Note"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__partner_id
msgid "Partner"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__invoice_payment_term_id
msgid "Payment Term"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__quantity
msgid "Quantity"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__ref
msgid "Reference"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__user_id
msgid "Salesperson"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields.selection,name:account_invoice_update_wizard.selection__account_move_line_update__display_type__line_section
msgid "Section"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__sequence
msgid "Sequence"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__invoice_origin
msgid "Source Document"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,help:account_invoice_update_wizard.field_account_move_line_update__display_type
msgid "Technical field for UX purpose."
msgstr ""
#. module: account_invoice_update_wizard
#: code:addons/account_invoice_update_wizard/wizard/account_move_update.py:0
#, python-format
msgid ""
"The original payment term '%s' doesn't have the same terms (number of terms "
"and/or amount) as the new payment term '%s'. You can only switch to a "
"payment term that has the same number of terms with the same amount."
msgstr ""
#. module: account_invoice_update_wizard
#: code:addons/account_invoice_update_wizard/wizard/account_move_update.py:0
#, python-format
msgid ""
"This wizard doesn't support the update of payment terms on an invoice which "
"is partially or fully paid."
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__move_type
msgid "Type"
msgstr ""
#. module: account_invoice_update_wizard
#: model_terms:ir.ui.view,arch_db:account_invoice_update_wizard.account_invoice_update_form
msgid "Update"
msgstr ""
#. module: account_invoice_update_wizard
#: model_terms:ir.ui.view,arch_db:account_invoice_update_wizard.view_move_form_inherit
msgid "Update Invoice"
msgstr ""
#. module: account_invoice_update_wizard
#: model_terms:ir.ui.view,arch_db:account_invoice_update_wizard.account_invoice_update_form
msgid "Update Invoice Wizard"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model,name:account_invoice_update_wizard.model_account_move_line_update
msgid "Update non-legal fields of invoice lines"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__parent_id
msgid "Wizard"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model,name:account_invoice_update_wizard.model_account_move_update
msgid "Wizard to update non-legal fields of invoice"
msgstr ""

View File

@@ -0,0 +1,250 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_update_wizard
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__price_subtotal
msgid "Amount"
msgstr "Montant"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__analytic_account_id
msgid "Analytic Account"
msgstr "Compte Analytique"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__analytic_tag_ids
msgid "Analytic Tags"
msgstr "Tag Analytique"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__partner_bank_id
msgid "Bank Account"
msgstr "Compte Bancaire"
#. module: account_invoice_update_wizard
#: model_terms:ir.ui.view,arch_db:account_invoice_update_wizard.account_invoice_update_form
#, fuzzy
msgid "Bill Reference"
msgstr "Reference Client"
#. module: account_invoice_update_wizard
#: model_terms:ir.ui.view,arch_db:account_invoice_update_wizard.account_invoice_update_form
msgid "Cancel"
msgstr "Annuler"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__company_id
msgid "Company"
msgstr "Société"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__create_uid
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__create_uid
msgid "Created by"
msgstr "Créé par"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__create_date
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__create_date
msgid "Created on"
msgstr "Créé le"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__currency_id
msgid "Currency"
msgstr "Devise"
#. module: account_invoice_update_wizard
#: model_terms:ir.ui.view,arch_db:account_invoice_update_wizard.account_invoice_update_form
#, fuzzy
msgid "Customer Reference"
msgstr "Reference Client"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__name
msgid "Description"
msgstr "Description"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move__display_name
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__display_name
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__display_name
msgid "Display Name"
msgstr "Nom"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__display_type
msgid "Display Type"
msgstr "Type Affichage"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move__id
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__id
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__id
msgid "ID"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__invoice_id
msgid "Invoice"
msgstr "Facture"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__invoice_line_id
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__line_ids
msgid "Invoice Lines"
msgstr "Ligne de factures"
#. module: account_invoice_update_wizard
#: model:ir.actions.act_window,name:account_invoice_update_wizard.account_invoice_update_action
msgid "Invoice Update Wizard"
msgstr "Assistance de mise à jour de la facture"
#. module: account_invoice_update_wizard
#: model:ir.model,name:account_invoice_update_wizard.model_account_move
msgid "Journal Entry"
msgstr "Entrée comptable"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move____last_update
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update____last_update
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update____last_update
msgid "Last Modified on"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__write_uid
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__write_uid
msgid "Last Updated by"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__write_date
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__write_date
msgid "Last Updated on"
msgstr ""
#. module: account_invoice_update_wizard
#: code:addons/account_invoice_update_wizard/wizard/account_move_update.py:0
#, python-format
msgid "Non-legal fields of invoice updated via the Invoice Update wizard."
msgstr "Champs non légaux mis à jour via l'assistant"
#. module: account_invoice_update_wizard
#: model:ir.model.fields.selection,name:account_invoice_update_wizard.selection__account_move_line_update__display_type__line_note
msgid "Note"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__partner_id
msgid "Partner"
msgstr "Client"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__invoice_payment_term_id
msgid "Payment Term"
msgstr "Condition de paiement"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__quantity
msgid "Quantity"
msgstr "Quantité"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__ref
#, fuzzy
msgid "Reference"
msgstr "Reference Client"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__user_id
msgid "Salesperson"
msgstr "Vendeur"
#. module: account_invoice_update_wizard
#: model:ir.model.fields.selection,name:account_invoice_update_wizard.selection__account_move_line_update__display_type__line_section
msgid "Section"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__sequence
msgid "Sequence"
msgstr "Sequence"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__invoice_origin
msgid "Source Document"
msgstr "Origine du document"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,help:account_invoice_update_wizard.field_account_move_line_update__display_type
msgid "Technical field for UX purpose."
msgstr ""
#. module: account_invoice_update_wizard
#: code:addons/account_invoice_update_wizard/wizard/account_move_update.py:0
#, python-format
msgid ""
"The original payment term '%s' doesn't have the same terms (number of terms "
"and/or amount) as the new payment term '%s'. You can only switch to a "
"payment term that has the same number of terms with the same amount."
msgstr ""
#. module: account_invoice_update_wizard
#: code:addons/account_invoice_update_wizard/wizard/account_move_update.py:0
#, python-format
msgid ""
"This wizard doesn't support the update of payment terms on an invoice which "
"is partially or fully paid."
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_update__move_type
msgid "Type"
msgstr ""
#. module: account_invoice_update_wizard
#: model_terms:ir.ui.view,arch_db:account_invoice_update_wizard.account_invoice_update_form
msgid "Update"
msgstr "Mettre à jour"
#. module: account_invoice_update_wizard
#: model_terms:ir.ui.view,arch_db:account_invoice_update_wizard.view_move_form_inherit
msgid "Update Invoice"
msgstr "Mettre à jour"
#. module: account_invoice_update_wizard
#: model_terms:ir.ui.view,arch_db:account_invoice_update_wizard.account_invoice_update_form
msgid "Update Invoice Wizard"
msgstr "Assistant de mise à jour"
#. module: account_invoice_update_wizard
#: model:ir.model,name:account_invoice_update_wizard.model_account_move_line_update
msgid "Update non-legal fields of invoice lines"
msgstr "Mettre à jour les champs non légaux des lignes de facture"
#. module: account_invoice_update_wizard
#: model:ir.model.fields,field_description:account_invoice_update_wizard.field_account_move_line_update__parent_id
msgid "Wizard"
msgstr ""
#. module: account_invoice_update_wizard
#: model:ir.model,name:account_invoice_update_wizard.model_account_move_update
msgid "Wizard to update non-legal fields of invoice"
msgstr "Assistant pour mettre à jours les champs non légaux"
#~ msgid "Account"
#~ msgstr "Compte"

View File

@@ -11,9 +11,8 @@ class AccountMove(models.Model):
self.ensure_one()
wizard = self.env['account.move.update']
res = wizard._prepare_default_get(self)
action = self.env.ref(
'account_invoice_update_wizard.account_invoice_update_action'
).read()[0]
action = self.env["ir.actions.actions"]._for_xml_id(
'account_invoice_update_wizard.account_invoice_update_action')
action['name'] = "Update Wizard"
action['res_id'] = wizard.create(res).id
return action

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -11,7 +11,8 @@
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<button name="button_draft" position="before">
<button name="prepare_update_wizard" type="object" string="Update Invoice" states="posted" groups="account.group_account_invoice"/>
<button name="prepare_update_wizard" type="object" string="Update Invoice" groups="account.group_account_invoice" attrs="{'invisible': ['|', ('state', '!=', 'posted'), ('move_type', '=', 'entry')]}"/>
<button name="prepare_update_wizard" type="object" string="Update Entry" groups="account.group_account_invoice" attrs="{'invisible': ['|', ('state', '!=', 'posted'), ('move_type', '!=', 'entry')]}"/>
</button>
</field>
</record>

View File

@@ -14,16 +14,14 @@ class AccountMoveUpdate(models.TransientModel):
invoice_id = fields.Many2one(
'account.move', string='Invoice', required=True,
readonly=True)
type = fields.Selection(related='invoice_id.move_type', readonly=True)
company_id = fields.Many2one(
related='invoice_id.company_id', readonly=True)
partner_id = fields.Many2one(
related='invoice_id.partner_id', readonly=True)
move_type = fields.Selection(related='invoice_id.move_type')
company_id = fields.Many2one(related='invoice_id.company_id')
partner_id = fields.Many2one(related='invoice_id.partner_id')
user_id = fields.Many2one('res.users', string='Salesperson')
invoice_payment_term_id = fields.Many2one(
'account.payment.term', string='Payment Term')
ref = fields.Char(string='Invoice Reference')
name = fields.Char(string='Reference/Description')
ref = fields.Char(string='Reference') # field label is customized in the view
invoice_date = fields.Date()
invoice_origin = fields.Char(string='Source Document')
partner_bank_id = fields.Many2one(
'res.partner.bank', string='Bank Account')
@@ -33,7 +31,7 @@ class AccountMoveUpdate(models.TransientModel):
@api.model
def _simple_fields2update(self):
'''List boolean, date, datetime, char, text fields'''
return ['ref', 'name', 'invoice_origin']
return ['ref', 'invoice_origin', 'invoice_date']
@api.model
def _m2o_fields2update(self):
@@ -51,19 +49,21 @@ class AccountMoveUpdate(models.TransientModel):
aa_tags = [(6, 0, aa_tags.ids)] if aa_tags else False
res['line_ids'].append([0, 0, {
'invoice_line_id': line.id,
'sequence': line.sequence,
'name': line.name,
'quantity': line.quantity,
'price_subtotal': line.price_subtotal,
'analytic_account_id': line.analytic_account_id.id,
'currency_id': line.currency_id.id,
'analytic_tag_ids': aa_tags,
'display_type': line.display_type,
}])
return res
@api.onchange('type')
def type_on_change(self):
@api.onchange('move_type')
def move_type_on_change(self):
res = {'domain': {}}
if self.type in ('out_invoice', 'out_refund'):
if self.move_type in ('out_invoice', 'out_refund'):
res['domain']['partner_bank_id'] =\
"[('partner_id.ref_company_ids', 'in', [company_id])]"
else:
@@ -227,13 +227,21 @@ class AccountMoveUpdate(models.TransientModel):
inv.message_post(body=_(
'Non-legal fields of invoice updated via the Invoice Update '
'wizard.'))
# Purge existing PDF
report = self.env.ref("account.account_invoices")
attachment = report.retrieve_attachment(inv)
# attachment may be None
if attachment:
attachment.unlink()
return True
class AccountMoveLineUpdate(models.TransientModel):
_name = 'account.move.line.update'
_description = 'Update non-legal fields of invoice lines'
_order = "sequence, name"
sequence = fields.Integer()
parent_id = fields.Many2one(
'account.move.update', string='Wizard', ondelete='cascade')
invoice_line_id = fields.Many2one(
@@ -243,11 +251,11 @@ class AccountMoveLineUpdate(models.TransientModel):
('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)
price_subtotal = fields.Float(
string='Amount', readonly=True, digits=dp.get_precision('Account'))
string='Quantity', digits='Product Unit of Measure', readonly=True)
price_subtotal = fields.Monetary(
string='Amount', readonly=True)
analytic_account_id = fields.Many2one(
'account.analytic.account', string='Analytic Account')
analytic_tag_ids = fields.Many2many(
'account.analytic.tag', string='Analytic Tags')
currency_id = fields.Many2one('res.currency', readonly=True)

View File

@@ -12,26 +12,30 @@
<form string="Update Invoice Wizard">
<group name="main">
<field name="invoice_id" invisible="1"/>
<field name="type" invisible="1"/>
<field name="move_type" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="ref" attrs="{'invisible': [('type', 'not in', ('in_invoice', 'in_refund'))]}"/>
<field name="invoice_origin"/>
<field name="name"/>
<field name="invoice_payment_term_id" widget="selection"/>
<field name="partner_bank_id"/>
<field name="user_id"/>
<field string="Bill Date" attrs="{'invisible': [('move_type', 'not in', ('in_invoice', 'in_refund'))]}" name="invoice_date"/>
<field string="Supplier Bill Reference" attrs="{'invisible': [('move_type', 'not in', ('in_invoice', 'in_refund'))]}" name="ref"/>
<field string="Customer Reference" attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund'))]}" name="ref"/>
<field string="Ref" attrs="{'invisible': [('move_type', '!=', 'entry')]}" name="ref"/>
<field name="invoice_origin" attrs="{'invisible': [('move_type', '=', 'entry')]}"/>
<!-- update of payment term is broken -->
<!-- <field name="invoice_payment_term_id" widget="selection"/>-->
<field name="partner_bank_id" attrs="{'invisible': [('move_type', '=', 'entry')]}"/>
<field name="user_id" options="{'no_open': True, 'no_create': True, 'no_create_edit': True}" attrs="{'invisible': [('move_type', '=', 'entry')]}"/>
</group>
<group name="lines">
<field name="line_ids" nolabel="1">
<field name="line_ids" nolabel="1" widget="section_and_note_one2many">
<tree editable="bottom" create="false" delete="false" edit="true">
<field name="invoice_line_id" invisible="1"/>
<field name="display_type" invisible="1"/>
<field name="currency_id" invisible="1"/>
<field name="name"/>
<field name="quantity" attrs="{'invisible': [('display_type', '!=', False)]}"/>
<field name="price_subtotal" attrs="{'invisible': [('display_type', '!=', False)]}"/>
<field name="quantity" attrs="{'invisible': [('display_type', '!=', False)], 'column_invisible': [('parent.move_type', '=', 'entry')]}"/>
<field name="price_subtotal" attrs="{'invisible': [('display_type', '!=', False)], 'column_invisible': [('parent.move_type', '=', 'entry')]}"/>
<field name="analytic_account_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"/>
<field name="analytic_tag_ids" attrs="{'invisible': [('display_type', '!=', False)]}" groups="analytic.group_analytic_tags" widget="many2many_tags"/>
</tree>
</field>
</group>

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

@@ -0,0 +1,17 @@
# Copyright 2022 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
'name': 'Account Invoice Update Wizard Payment Mode',
'version': '14.0.1.0.0',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Add Payment Mode to Invoice Update Wizard',
'author': 'Akretion',
'website': 'https://github.com/akretion/odoo-usability',
'depends': ['account_invoice_update_wizard', 'account_payment_partner'],
'data': ['wizard/account_move_update_view.xml'],
'installable': True,
'auto_install': True,
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="view_move_form_inherit" model="ir.ui.view">
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<button name="button_draft" position="before">
<button name="prepare_update_wizard" type="object" string="Update Invoice" states="posted" groups="account.group_account_invoice"/>
</button>
</field>
</record>
</odoo>

View File

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

View File

@@ -0,0 +1,24 @@
# Copyright 2022 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models, fields, api, _
class AccountMoveUpdate(models.TransientModel):
_inherit = 'account.move.update'
payment_mode_filter_type_domain = fields.Char(
related='invoice_id.payment_mode_filter_type_domain')
partner_bank_filter_type_domain = fields.Many2one(
related='invoice_id.partner_bank_filter_type_domain')
bank_account_required = fields.Boolean(
related='invoice_id.bank_account_required')
payment_mode_id = fields.Many2one("account.payment.mode")
@api.model
def _m2o_fields2update(self):
m2o_list = super()._m2o_fields2update()
m2o_list.append('payment_mode_id')
return m2o_list

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2022 Akretion France (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-->
<odoo>
<record id="account_invoice_update_form" model="ir.ui.view">
<field name="model">account.move.update</field>
<field name="inherit_id" ref="account_invoice_update_wizard.account_invoice_update_form"/>
<field name="arch" type="xml">
<field name="partner_bank_id" position="before">
<field name="payment_mode_filter_type_domain" invisible="1"/>
<field name="partner_bank_filter_type_domain" invisible="1"/>
<field name="bank_account_required" invisible="1"/>
<field name="payment_mode_id" domain="[('payment_type', '=', payment_mode_filter_type_domain), ('company_id', '=', company_id)]"/>
</field>
<field name="partner_bank_id" position="attributes">
<attribute name="domain">
[('partner_id', '=', partner_bank_filter_type_domain),
'|',('company_id', '=', company_id),('company_id', '=', False)]
</attribute>
<attribute name="attrs">{'required': [('bank_account_required', '=', True),('move_type', 'in', ('in_invoice', 'in_refund'))]}</attribute>
</field>
</field>
</record>
</odoo>

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

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

View File

@@ -0,0 +1,25 @@
# Copyright 2024 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 Payment Line Manual Account',
'version': '14.0.1.0.0',
'category': 'Accounting',
'license': 'AGPL-3',
'summary': 'Ability to select the account on payment lines without journal item',
'description': """
With this module, when you manually create a payment line that is not linked to a journal item, you can select an account (by default, it is set to the payable/receivable account of the partner) : this account will be used as the counter part of the outbound/inbound payment account configured on the bank journal. It covers special needs of a few companies that use SEPA credit transfer for the same partner in different accounting scenarios.
This module has been written by Alexis de Lattre from Akretion
<alexis.delattre@akretion.com>.
""",
'author': 'Akretion',
'maintainers': ['alexis-via'],
'website': 'https://github.com/akretion/odoo-usability',
'depends': ['account_payment_order'],
'data': [
"views/account_payment_line.xml",
],
'installable': True,
}

View File

@@ -0,0 +1,2 @@
from . import account_payment_line
from . import account_payment_order

View File

@@ -0,0 +1,38 @@
# Copyright 2024 Akretion France (https://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AccountPaymentLine(models.Model):
_inherit = "account.payment.line"
account_id = fields.Many2one(
'account.account',
compute="_compute_account_id", store=True, readonly=False, check_company=True,
domain="[('company_id', '=', company_id), ('deprecated', '=', False)]")
analytic_account_id = fields.Many2one(
'account.analytic.account', string='Analytic Account',
domain="[('company_id', 'in', [False, company_id])]",
check_company=True)
@api.depends('move_line_id', 'partner_id')
def _compute_account_id(self):
for line in self:
account_id = False
if not line.move_line_id and line.partner_id:
partner = line.partner_id.with_company(line.order_id.company_id.id)
if line.order_id.payment_type == "inbound":
account_id = partner.property_account_receivable_id.id
else:
account_id = partner.property_account_payable_id.id
line.account_id = account_id
# take info account account_id for grouping
def payment_line_hashcode(self):
hashcode = super().payment_line_hashcode()
account_str = str(self.account_id.id or False)
analytic_account_str = str(self.analytic_account_id.id or False)
hashcode = '-'.join([hashcode, account_str, analytic_account_str])
return hashcode

View File

@@ -0,0 +1,18 @@
# Copyright 2024 Akretion France (https://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class AccountPaymentOrder(models.Model):
_inherit = "account.payment.order"
def _prepare_move_line_partner_account(self, bank_line):
vals = super()._prepare_move_line_partner_account(bank_line)
if not bank_line.payment_line_ids[0].move_line_id:
vals.update({
'account_id': bank_line.payment_line_ids[0].account_id.id,
'analytic_account_id': bank_line.payment_line_ids[0].analytic_account_id.id or False,
})
return vals

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2024 Akretion France (https://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_payment_line_form" model="ir.ui.view">
<field name="model">account.payment.line</field>
<field name="inherit_id" ref="account_payment_order.account_payment_line_form"/>
<field name="arch" type="xml">
<field name="company_id" position="after">
<field name="account_id" attrs="{'invisible': [('move_line_id', '!=', False)], 'required': [('move_line_id', '=', False)]}"/>
<field name="analytic_account_id" attrs="{'invisible': [('move_line_id', '!=', False)]}" groups="analytic.group_analytic_accounting"/>
</field>
</field>
</record>
<record id="account_payment_line_tree" model="ir.ui.view">
<field name="model">account.payment.line</field>
<field name="inherit_id" ref="account_payment_order.account_payment_line_tree"/>
<field name="arch" type="xml">
<field name="move_line_id" position="after">
<field name="account_id" optional="hide"/>
<field name="analytic_account_id" optional="hide" groups="analytic.group_analytic_accounting"/>
</field>
</field>
</record>
</odoo>

View File

@@ -2,10 +2,13 @@
Account Usability
=================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:0a1f18d3ec52ddde3b0ffdb507573d43a38ec1609a578fae0c43f5e5a65026be
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
@@ -14,10 +17,10 @@ Account Usability
: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
:target: https://github.com/akretion/odoo-usability/tree/14.0/account_usability
:alt: akretion/odoo-usability
|badge1| |badge2| |badge3|
|badge1| |badge2| |badge3|
This modules adds the following functions:
@@ -52,7 +55,6 @@ This modules adds the following functions:
* 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
* Add date in outstanding payment widget on invoice form view (requires `odoo PR 84180 <https://github.com/odoo/odoo/pull/84180>`_)
Together with this module, I recommend the use of the following modules:
@@ -70,8 +72,8 @@ 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**>`_.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/akretion/odoo-usability/issues/new?body=module:%20account_usability%0Aversion:%2014.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.
@@ -92,6 +94,6 @@ Contributors
Maintainers
~~~~~~~~~~~
This module is part of the `akretion/odoo-usability <https://github.com/akretion/odoo-usability/tree/12.0/account_usability>`_ project on GitHub.
This module is part of the `akretion/odoo-usability <https://github.com/akretion/odoo-usability/tree/14.0/account_usability>`_ project on GitHub.
You are welcome to contribute.

View File

@@ -1,2 +1,3 @@
from . import models
from . import wizard
from .hooks import post_init_hook

View File

@@ -4,7 +4,7 @@
{
'name': 'Account Usability',
'version': '14.0.1.0.0',
'version': '14.0.1.1.0',
'category': 'Accounting & Finance',
'license': 'AGPL-3',
'summary': 'Small usability enhancements in account module',
@@ -29,8 +29,8 @@
'views/account_tax.xml',
'views/product.xml',
'views/res_config_settings.xml',
'views/res_partner.xml',
'views/res_company.xml',
'views/res_partner.xml',
'views/account_report.xml',
'views/account_reconcile_model.xml',
'wizard/account_invoice_mark_sent_view.xml',
@@ -41,4 +41,5 @@
],
'qweb': ['static/src/xml/account_payment.xml'],
'installable': True,
"post_init_hook": "post_init_hook",
}

View File

@@ -0,0 +1,9 @@
# Copyright 2022 Akretion (https://www.akretion.com).
# @author Sébastien BEAU <sebastien.beau@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import SUPERUSER_ID, api
def post_init_hook(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
env["account.move.line"].update_matching_number()

View File

@@ -524,11 +524,6 @@ msgstr ""
msgid "Recipient Bank"
msgstr ""
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_move_line__reconcile_string
msgid "Reconcile"
msgstr ""
#. module: account_usability
#: model:ir.model.fields,field_description:account_usability.field_account_bank_statement_line__ref
#: model:ir.model.fields,field_description:account_usability.field_account_move__ref

View File

@@ -0,0 +1,9 @@
# Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import SUPERUSER_ID, api
def migrate(cr, version):
env = api.Environment(cr, SUPERUSER_ID, {})
env["account.move.line"].update_matching_number()

View File

@@ -43,13 +43,6 @@ class AccountBankStatement(models.Model):
res.append((statement.id, name))
return res
def button_reopen(self):
self = self.with_context(skip_undo_reconciliation=True)
return super().button_reopen()
def button_undo_reconciliation(self):
self.line_ids.button_undo_reconciliation()
class AccountBankStatementLine(models.Model):
_inherit = 'account.bank.statement.line'
@@ -96,9 +89,3 @@ class AccountBankStatementLine(models.Model):
'res_id': self.move_id.id,
})
return action
def button_undo_reconciliation(self):
if self._context.get("skip_undo_reconciliation"):
return
else:
return super().button_undo_reconciliation()

View File

@@ -2,12 +2,18 @@
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from datetime import timedelta
import logging
from odoo import api, fields, models, _
from odoo.exceptions import UserError, ValidationError
from odoo.osv import expression
from odoo.tools import float_is_zero
from odoo.tools.misc import format_date
from odoo.osv import expression
from datetime import timedelta
from odoo.exceptions import UserError
from odoo.tools.safe_eval import safe_eval, time
from collections import defaultdict
_logger = logging.getLogger(__name__)
class AccountMove(models.Model):
@@ -36,6 +42,67 @@ class AccountMove(models.Model):
compute="_compute_sales_dates", readonly=True,
help="This information appear on invoice qweb report "
"(you may use it for your own report)")
# There is a native "blocked" field (bool) on account.move.line
# We want to have that field on invoices to improve usability
# while keeping compatibility with the standard Odoo datamodel
blocked = fields.Boolean(
compute="_compute_blocked",
inverse="_inverse_blocked",
store=True,
string="Dispute",
tracking=True,
)
# Having amounts in invoice currency can be useful in tree view of invoices
# We add those fields with optional="hide"
amount_untaxed_invoice_currency_signed = fields.Monetary(
compute="_compute_amount_invoice_currency_signed", store=True,
string="Untaxed Amount Invoice Currency Signed")
amount_tax_invoice_currency_signed = fields.Monetary(
compute="_compute_amount_invoice_currency_signed", store=True,
string="Tax Invoice Currency Signed")
amount_total_invoice_currency_signed = fields.Monetary(
compute="_compute_amount_invoice_currency_signed", store=True,
string="Total Invoice Currency Signed")
amount_residual_invoice_currency_signed = fields.Monetary(
compute="_compute_amount_invoice_currency_signed", store=True,
string="Amount Due Invoice Currency Signed")
# Field search_account_id is just for search view
search_account_id = fields.Many2one(related='line_ids.account_id')
@api.depends('amount_untaxed', 'amount_tax', 'amount_total', 'amount_residual', 'move_type')
def _compute_amount_invoice_currency_signed(self):
for move in self:
amount_untaxed_invoice_currency_signed = move.amount_untaxed
amount_tax_invoice_currency_signed = move.amount_tax
amount_total_invoice_currency_signed = move.amount_total
amount_residual_invoice_currency_signed = move.amount_residual
if move.move_type in ('out_refund', 'in_refund'):
amount_untaxed_invoice_currency_signed *= -1
amount_tax_invoice_currency_signed *= -1
amount_total_invoice_currency_signed *= -1
amount_residual_invoice_currency_signed *= -1
move.amount_untaxed_invoice_currency_signed = amount_untaxed_invoice_currency_signed
move.amount_tax_invoice_currency_signed = amount_tax_invoice_currency_signed
move.amount_total_invoice_currency_signed = amount_total_invoice_currency_signed
move.amount_residual_invoice_currency_signed = amount_residual_invoice_currency_signed
@api.depends("line_ids", "line_ids.blocked")
def _compute_blocked(self):
for move in self:
move.blocked = any(
[
l.blocked
for l in move.line_ids
if l.account_id.internal_type in ("payable", "receivable")
]
)
def _inverse_blocked(self):
for move in self:
for line in move.line_ids.filtered(
lambda l: l.account_id.internal_type in ("payable", "receivable")
):
line.blocked = move.blocked
def _compute_has_discount(self):
prec = self.env['decimal.precision'].precision_get('Discount')
@@ -108,6 +175,16 @@ class AccountMove(models.Model):
# self.invalidate_cache()
# return res
def _reverse_moves(self, default_values_list=None, cancel=False):
reverse_moves = super()._reverse_moves(
default_values_list=default_values_list, cancel=cancel)
# In the simple scenario 1 invoice -> 1 refund, we add a message in the chatter
# of the invoice and in the chatter of the refund
if len(self) == 1 and len(reverse_moves) == 1:
self.message_post(body=_("A reverse journal entry <a href=# data-oe-model=account.move data-oe-id=%d>%s</a> has been generated.") % (reverse_moves.id, reverse_moves.display_name))
reverse_moves.message_post(body=_("This journal entry has been generated as the reverse of <a href=# data-oe-model=account.move data-oe-id=%d>%s</a>.") % (self.id, self.display_name))
return reverse_moves
def delete_lines_qty_zero(self):
lines = self.env['account.move.line'].search([
('display_type', '=', False),
@@ -181,33 +258,14 @@ class AccountMove(models.Model):
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')
for move in self.filtered(lambda x: x.move_type in ('out_invoice', 'out_refund')):
for report_xmlid in ('account.account_invoices', 'account.account_invoices_without_payment'):
report = self.env.ref(report_xmlid)
attach = report.retrieve_attachment(move)
if attach:
attach.unlink()
super().button_draft()
def _get_accounting_date(self, invoice_date, has_tax):
# On vendor bills/refunds, we want date = invoice_date unless
@@ -217,10 +275,44 @@ class AccountMove(models.Model):
if self.is_purchase_document(include_receipts=True):
tax_lock_date = self.company_id.tax_lock_date
if invoice_date and tax_lock_date and has_tax and invoice_date <= tax_lock_date:
invoice_date = tax_lock_date + timedelta(days=1)
invoice_date = tax_lock_date + timedelta(days=1)
date = invoice_date
return date
# I don't use account_invoice_supplier_ref_unique because it adds
# a field supplier_invoice_number on account.move instead of using the native field
# cf https://github.com/OCA/account-invoicing/issues/1484
# So I take inspiration from the code of account_invoice_supplier_ref_unique
# but I use the native "ref" field
@api.constrains("ref", "partner_id")
def _check_in_invoice_ref_unique_insensitive(self):
for move in self:
if move.ref and move.is_purchase_document(
include_receipts=True
):
in_invoice_same_ref = self.search(
[
("commercial_partner_id", "=", move.commercial_partner_id.id),
("move_type", "in", ("in_invoice", "in_refund")),
("company_id", "=", move.company_id.id),
("ref", "=ilike", move.ref),
("id", "!=", move.id),
],
limit=1,
)
if in_invoice_same_ref:
raise ValidationError(
_(
"An invoice already exists in Odoo with the same "
"bill reference '%s' for the same supplier '%s': %s."
)
% (
in_invoice_same_ref.ref,
in_invoice_same_ref.partner_id.display_name,
in_invoice_same_ref.display_name,
)
)
class AccountMoveLine(models.Model):
_inherit = 'account.move.line'
@@ -238,8 +330,6 @@ class AccountMoveLine(models.Model):
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")
@@ -255,17 +345,21 @@ class AccountMoveLine(models.Model):
})
return action
@api.depends(
'full_reconcile_id', 'matched_debit_ids', 'matched_credit_ids')
def _compute_reconcile_string(self):
for line in self:
rec_str = False
if line.full_reconcile_id:
rec_str = line.full_reconcile_id.name
else:
rec_str = ', '.join([
'a%d' % pr.id for pr in line.matched_debit_ids + line.matched_credit_ids])
line.reconcile_string = rec_str
def update_matching_number(self):
records = self.search([("matching_number", "=", "P")])
_logger.info(f"Update partial reconcile number for {len(records)} lines")
records._compute_matching_number()
def _compute_matching_number(self):
# TODO maybe it will be better to have the same maching_number for
# all partial so it will be easier to group by
super()._compute_matching_number()
for record in self:
if record.matching_number == "P":
record.matching_number = ", ".join([
"a%d" % pr.id
for pr in record.matched_debit_ids + record.matched_credit_ids
])
def _get_computed_name(self):
# This is useful when you want to have the product code in a dedicated

View File

@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Account Usability</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
@@ -275,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -301,7 +301,7 @@ span.option {
span.pre {
white-space: pre }
span.problematic {
span.problematic, pre.problematic {
color: red }
span.section-subtitle {
@@ -366,8 +366,10 @@ ul.auto-toc {
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:0a1f18d3ec52ddde3b0ffdb507573d43a38ec1609a578fae0c43f5e5a65026be
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/12.0/account_usability"><img alt="akretion/odoo-usability" src="https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/akretion/odoo-usability/tree/14.0/account_usability"><img alt="akretion/odoo-usability" src="https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github" /></a></p>
<p>This modules adds the following functions:</p>
<ul class="simple">
<li>Add an <em>Overdue</em> filter on invoice search view (this feature was previously
@@ -411,41 +413,41 @@ located in te module <em>account_invoice_overdue_filter</em>)</li>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#bug-tracker" id="id1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id3">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id4">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id5">Maintainers</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-4">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-5">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id1">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/akretion/odoo-usability/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/akretion/odoo-usability/issues/new?body=module:%20account_usability%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/akretion/odoo-usability/issues/new?body=module:%20account_usability%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#id2">Credits</a></h1>
<h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id3">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
<ul class="simple">
<li>Akretion</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id4">Contributors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<ul class="simple">
<li>Alexis de Lattre &lt;<a class="reference external" href="mailto:alexis.delattre&#64;akretion.com">alexis.delattre&#64;akretion.com</a>&gt;</li>
<li>David Beal &lt;<a class="reference external" href="mailto:david.beal&#64;akretion.com">david.beal&#64;akretion.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id5">Maintainers</a></h2>
<p>This module is part of the <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/12.0/account_usability">akretion/odoo-usability</a> project on GitHub.</p>
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<p>This module is part of the <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/14.0/account_usability">akretion/odoo-usability</a> project on GitHub.</p>
<p>You are welcome to contribute.</p>
</div>
</div>

View File

@@ -7,12 +7,24 @@
<odoo>
<record id="view_account_type_form" model="ir.ui.view">
<field name="name">account_usability.account_account_type.form</field>
<field name="model">account.account.type</field>
<field name="inherit_id" ref="account.view_account_type_form" />
<field name="arch" type="xml">
<field name="type" position="after">
<field name="internal_group"/>
</field>
</field>
</record>
<record id="view_account_type_tree" model="ir.ui.view">
<field name="name">account_usability.account_type_tree</field>
<field name="name">account_usability.account_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="internal_group" optional="show"/>
<field name="include_initial_balance" optional="show"/>
</field>
</field>

View File

@@ -13,13 +13,8 @@
<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_reopen" position="after">
<button
name="button_undo_reconciliation"
type="object"
confirm="Are you sure to unreconcile all the entries of the bank statement?"
states="open"
string="Unreconcile All"/>
<button name="button_reopen" position="attributes">
<attribute name="confirm">Are you sure ? Don't do 'Reset to New' if you just want to modify the bank journal entry of an existing statement line.</attribute>
</button>
<xpath expr="//field[@name='line_ids']/tree/button[@name='button_undo_reconciliation']" position="after">
<field name="move_id" invisible="1"/>

View File

@@ -13,4 +13,9 @@ under "Accounting > Configuration", because most users will try to find it there
<menuitem id="res_partner_bank_account_config_menu" action="base.action_res_partner_bank_account_form" parent="account.account_banks_menu" sequence="20"/>
<record id="account.menu_finance" model="ir.ui.menu">
<!-- Replace "Invoicing" by "Accounting" -->
<field name="name">Accounting</field>
</record>
</odoo>

View File

@@ -42,12 +42,21 @@
<attribute name="optional">show</attribute>
</xpath>
<xpath expr="//field[@name='line_ids']/tree/field[@name='tax_tag_ids']" position="after">
<field name="matching_number" optional="hide"/>
<field name="reconcile_string" optional="show"/>
<field name="matching_number" optional="show"/>
</xpath>
<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='product_id']" position="after">
<field name="product_barcode" optional="hide"/>
</xpath>
<field name="auto_post" position="before">
<field name="blocked"/>
</field>
<div role="alert" position="after">
<div id="warn_blocked" groups="account.group_account_invoice,account.group_account_readonly"
class="alert alert-warning" role="alert" style="margin-bottom:0px;"
attrs="{'invisible': ['|', ('move_type', 'not in', ('in_invoice', 'in_refund', 'out_invoice', 'out_refund')), ('blocked', '=', False)]}">
This <field name="move_type"/> is marked as <b>disputed</b>.
</div>
</div>
</field>
</record>
@@ -58,6 +67,14 @@
<field name="amount_residual_signed" position="attributes">
<attribute name="optional">show</attribute>
</field>
<field name="amount_untaxed_signed" position="before">
<!-- No sum="1" on the invoice currency fields, because it doesn't make sense
to add amounts in different currencies -->
<field name="amount_untaxed_invoice_currency_signed" string="Tax Excluded Inv. Cur." optional="hide"/>
<field name="amount_tax_invoice_currency_signed" string="Tax Inv. Cur." optional="hide"/>
<field name="amount_total_invoice_currency_signed" string="Total Inv. Cur." optional="hide"/>
<field name="amount_residual_invoice_currency_signed" string="Amount Due Inv. Cur." optional="hide"/>
</field>
</field>
</record>
@@ -72,6 +89,8 @@
<filter name="sent" string="Sent" domain="[('is_move_sent', '=', True), ('move_type', 'in', ('out_invoice', 'out_refund'))]"/>
<separator/>
<filter name="no_attachment" string="Missing Attachment" domain="[('has_attachment', '=', False)]"/>
<separator/>
<filter name="dispute" string="Dispute" domain="[('blocked', '=', True)]"/>
</filter>
<filter name="salesperson" position="before">
<filter name="commercial_partner_groupby" string="Commercial Partner" context="{'group_by': 'commercial_partner_id'}"/>
@@ -82,6 +101,33 @@
</field>
</record>
<record id="view_account_move_filter" model="ir.ui.view">
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_account_move_filter"/>
<field name="arch" type="xml">
<field name="journal_id" position="after">
<field name="search_account_id"/>
</field>
</field>
</record>
<record id="view_move_line_form" model="ir.ui.view">
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.view_move_line_form"/>
<field name="arch" type="xml">
<!-- The field 'blocked' is alone in it's block
We don't want to display an empty block, so we put the attrs on the group
The drawback of this is that, if someone added a field in that group,
he won't see the field when internal_type is not payable/receivable -->
<xpath expr="//field[@name='blocked']/.." position="attributes">
<attribute name="attrs">{'invisible': [('account_internal_type', 'not in', ('payable', 'receivable'))]}</attribute>
</xpath>
<field name="company_id" position="after">
<field name="account_internal_type" invisible="1"/>
</field>
</field>
</record>
<record id="view_move_line_tree" model="ir.ui.view">
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.view_move_line_tree"/>
@@ -106,26 +152,39 @@
<separator/>
</filter>
<field name="partner_id" position="after">
<field name="reconcile_string" />
<field name="matching_number" />
<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="[('reconciled', '=', True)]"/>
<filter name="reconciled" string="Fully Reconciled" domain="[('account_id.reconcile', '=', True), ('full_reconcile_id', '!=', False)]"/>
</filter>
<filter name="unreconciled" position="attributes">
<attribute name="string">Unreconciled or Partially Reconciled</attribute>
<attribute name="domain">[('reconciled', '=', False), ('balance', '!=', 0), ('account_id.reconcile', '=', True)]</attribute>
</filter>
<!--
<field name="name" position="attributes">
<attribute name="string">Name or Reference</attribute>
</field> -->
<attribute name="string">Label, Reference, Account or Partner</attribute>
</field>
<field name="name" position="before">
<field name="move_id" position="move"/>
</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_pivot" model="ir.ui.view">
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.view_move_line_pivot"/>
<field name="arch" type="xml">
<!-- By default, date is split by month... but if you've been using Odoo for several years,
the pivot table becomes very big by default: so we split by year -->
<field name="date" position="attributes">
<attribute name="interval">year</attribute>
</field>
</field>
</record>
<record id="account.action_move_journal_line" model="ir.actions.act_window">
<field name="context">{'default_move_type': 'entry', 'view_no_maturity': True}</field>
<!-- Remove 'search_default_misc_filter': 1 -->

View File

@@ -1,23 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017-2020 Akretion (http://www.akretion.com/)
Copyright 2024 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).
-->
<odoo>
<record id="view_partner_property_form" model="ir.ui.view">
<field name="name">account_usability.res.partner.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="account.view_partner_property_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='bank_ids']/tree/field[@name='acc_number']" position="after">
<field name="acc_type"/>
<xpath expr="//field[@name='bank_ids']/tree/field[@name='acc_holder_name']" position="attributes">
<attribute name="invisible">0</attribute>
<attribute name="optional">hide</attribute>
</xpath>
</field>
</record>
</odoo>

View File

@@ -12,13 +12,14 @@ class AccountMoveReversal(models.TransientModel):
# Set default reversal date to original move + 1 day
# and raise error if original move has already been reversed
# WARNING: this wizard is also used to generate refunds
@api.model
def default_get(self, fields_list):
res = super().default_get(fields_list)
assert self._context.get('active_model') == 'account.move'
amo = self.env['account.move']
moves = amo.browse(self._context['active_ids'])
if len(moves) == 1:
if len(moves) == 1 and moves.move_type not in ('out_invoice', 'in_invoice'):
res['date'] = moves.date + relativedelta(days=1)
reversed_move = amo.search([('reversed_entry_id', 'in', moves.ids)], limit=1)
if reversed_move:

View File

@@ -2,10 +2,13 @@
Base Company Extension
======================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f1f2fb39af0682210c6ac91e106869ab7bfffe1c397becc289eaaf68b707e933
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
@@ -14,24 +17,28 @@ Base Company Extension
: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/base_company_extension
:target: https://github.com/akretion/odoo-usability/tree/14.0/base_company_extension
:alt: akretion/odoo-usability
|badge1| |badge2| |badge3|
This module adds the following fields on the company:
|badge1| |badge2| |badge3|
This module adds the following fields to the ResCompany model:
* Capital Amount
* Legal Type
This is useful to display the legal name of the company in reports.
This is useful to display the legal name of the company in reports
**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
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/akretion/odoo-usability/issues/new?body=module:%20base_company_extension%0Aversion:%2014.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.
@@ -52,6 +59,6 @@ Contributors
Maintainers
~~~~~~~~~~~
This module is part of the `akretion/odoo-usability <https://github.com/akretion/odoo-usability/tree/12.0/base_company_extension>`_ project on GitHub.
This module is part of the `akretion/odoo-usability <https://github.com/akretion/odoo-usability/tree/14.0/base_company_extension>`_ project on GitHub.
You are welcome to contribute.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Base Company Extension</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
@@ -275,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -301,7 +301,7 @@ span.option {
span.pre {
white-space: pre }
span.problematic {
span.problematic, pre.problematic {
color: red }
span.section-subtitle {
@@ -366,8 +366,10 @@ ul.auto-toc {
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f1f2fb39af0682210c6ac91e106869ab7bfffe1c397becc289eaaf68b707e933
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/12.0/base_company_extension"><img alt="akretion/odoo-usability" src="https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/akretion/odoo-usability/tree/14.0/base_company_extension"><img alt="akretion/odoo-usability" src="https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github" /></a></p>
<p>This module adds the following fields to the ResCompany model:
* Capital Amount
* Legal Type</p>
@@ -375,40 +377,40 @@ ul.auto-toc {
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#bug-tracker" id="id1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id3">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id4">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id5">Maintainers</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-4">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-5">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id1">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/akretion/odoo-usability/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/akretion/odoo-usability/issues/new?body=module:%20base_company_extension%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/akretion/odoo-usability/issues/new?body=module:%20base_company_extension%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#id2">Credits</a></h1>
<h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id3">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
<ul class="simple">
<li>Akretion</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id4">Contributors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<ul class="simple">
<li>Alexis de Lattre &lt;<a class="reference external" href="mailto:alexis.delattre&#64;akretion.com">alexis.delattre&#64;akretion.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id5">Maintainers</a></h2>
<p>This module is part of the <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/12.0/base_company_extension">akretion/odoo-usability</a> project on GitHub.</p>
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<p>This module is part of the <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/14.0/base_company_extension">akretion/odoo-usability</a> project on GitHub.</p>
<p>You are welcome to contribute.</p>
</div>
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -15,6 +15,7 @@ class ResPartnerPhone(models.Model):
_name = 'res.partner.phone'
_order = 'partner_id, type'
_phone_name_sequence = 8
_phone_name_fields = ["phone"]
_inherit = ['phone.validation.mixin']
_description = 'Multiple emails and phones for partners'
@@ -73,7 +74,7 @@ class ResPartnerPhone(models.Model):
if self._context.get('callerid'):
name = pphone.partner_id.display_name
else:
name = u'%s (%s)' % (pphone.phone, pphone.partner_id.name)
name = '%s (%s)' % (pphone.phone, pphone.partner_id.name)
else:
name = pphone.phone
res.append((pphone.id, name))
@@ -104,6 +105,7 @@ class ResPartnerPhone(models.Model):
class ResPartner(models.Model):
_inherit = 'res.partner'
_phone_name_fields = []
# in v10, we are supposed to have in DB E.164 format
# with the current implementation, we have:
@@ -147,6 +149,8 @@ class ResPartner(models.Model):
if vals.get(partner_field):
vals['phone_ids'].append(
(0, 0, {'type': type, partner_phone_field: vals[partner_field]}))
if partner_field in vals:
vals.pop(partner_field)
@api.model
def create(self, vals):
@@ -155,7 +159,6 @@ class ResPartner(models.Model):
self._update_create_vals(vals, '1_email_primary', 'email', 'email')
self._update_create_vals(vals, '3_phone_primary', 'phone', 'phone')
self._update_create_vals(vals, '5_mobile_primary', 'mobile', 'phone')
# self._update_create_vals(vals, '7_fax_primary', 'fax', 'phone')
return super().create(vals)
def _update_write_vals(
@@ -178,16 +181,16 @@ class ResPartner(models.Model):
else:
if pphone:
vals['phone_ids'].append((2, pphone.id))
vals.pop(partner_field)
def write(self, vals):
if 'phone_ids' not in vals:
for rec in self:
vals['phone_ids'] = []
rec._update_write_vals(vals, '1_email_primary', 'email', 'email')
rec._update_write_vals(vals, '3_phone_primary', 'phone', 'phone')
rec._update_write_vals(vals, '5_mobile_primary', 'mobile', 'phone')
rec._update_write_vals(vals, '7_fax_primary', 'fax', 'phone')
super(ResPartner, rec).write(vals)
cvals = dict(vals, phone_ids=[])
rec._update_write_vals(cvals, '1_email_primary', 'email', 'email')
rec._update_write_vals(cvals, '3_phone_primary', 'phone', 'phone')
rec._update_write_vals(cvals, '5_mobile_primary', 'mobile', 'phone')
super(ResPartner, rec).write(cvals)
return True
else:
return super().write(vals)

View File

@@ -161,6 +161,12 @@
<field name="name" position="attributes">
<attribute name="filter_domain">['|', '|', ('display_name', 'ilike', self), ('ref', '=ilike', self + '%'), ('phone_ids.email', 'ilike', self)]</attribute>
</field>
<field name="email" position="attributes">
<attribute name="filter_domain">[('phone_ids.email', 'ilike', self)]</attribute>
</field>
<field name="phone" position="attributes">
<attribute name="filter_domain">[('phone_ids.phone', 'ilike', self)]</attribute>
</field>
</field>
</record>

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -2,10 +2,13 @@
Base Usability
==============
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:34b38099c08b1967a5082dd802765b1b34015403159badf256ee845648d9e6da
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
@@ -14,10 +17,10 @@ Base Usability
: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/base_usability
:target: https://github.com/akretion/odoo-usability/tree/14.0/base_usability
:alt: akretion/odoo-usability
|badge1| |badge2| |badge3|
|badge1| |badge2| |badge3|
This module adds the following functions:
@@ -55,8 +58,8 @@ 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:%20base_usability%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/akretion/odoo-usability/issues/new?body=module:%20base_usability%0Aversion:%2014.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.
@@ -72,11 +75,12 @@ Contributors
~~~~~~~~~~~~
* Alexis de Lattre <alexis.delattre@akretion.com>
* Raphaël Valyi <rvalyi@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/base_usability>`_ project on GitHub.
This module is part of the `akretion/odoo-usability <https://github.com/akretion/odoo-usability/tree/14.0/base_usability>`_ project on GitHub.
You are welcome to contribute.

View File

@@ -10,7 +10,7 @@
'summary': 'Better usability in base module',
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['base'],
'depends': ['web'],
'data': [
'security/group.xml',
'security/ir.model.access.csv',
@@ -21,6 +21,7 @@
'views/ir_module.xml',
'views/ir_sequence.xml',
'views/ir_property.xml',
'views/assets.xml',
],
'installable': True,
}

View File

@@ -0,0 +1,13 @@
diff --git a/odoo/tools/mimetypes.py b/odoo/tools/mimetypes.py
index d104198a4ae..6eeabcc63a3 100644
--- a/odoo/tools/mimetypes.py
+++ b/odoo/tools/mimetypes.py
@@ -123,7 +123,7 @@ _mime_mappings = (
_Entry('image/png', [b'\x89PNG\r\n\x1A\n'], []),
_Entry('image/gif', [b'GIF87a', b'GIF89a'], []),
_Entry('image/bmp', [b'BM'], []),
- _Entry('image/svg+xml', [b'<'], [
+ _Entry('application/xml', [b'<'], [
_check_svg,
]),
_Entry('image/x-icon', [b'\x00\x00\x01\x00'], []),

View File

@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-07-01 10:02+0000\n"
"PO-Revision-Date: 2021-07-01 10:02+0000\n"
"POT-Creation-Date: 2024-03-26 21:27+0000\n"
"PO-Revision-Date: 2024-03-26 21:27+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -15,6 +15,18 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: base_usability
#: code:addons/base_usability/models/res_company.py:0
#, python-format
msgid "%s with a capital of"
msgstr ""
#. module: base_usability
#: code:addons/base_usability/models/res_company.py:0
#, python-format
msgid "APE:"
msgstr ""
#. module: base_usability
#: model:ir.model,name:base_usability.model_res_partner_bank
msgid "Bank Accounts"
@@ -25,11 +37,22 @@ msgstr ""
msgid "Bank Name"
msgstr ""
#. module: base_usability
#: code:addons/base_usability/models/res_company.py:0
#, python-format
msgid "Capital:"
msgstr ""
#. module: base_usability
#: model:ir.model,name:base_usability.model_res_company
msgid "Companies"
msgstr ""
#. module: base_usability
#: model_terms:ir.ui.view,arch_db:base_usability.ir_property_view_search
msgid "Company"
msgstr ""
#. module: base_usability
#: model:ir.model,name:base_usability.model_res_partner
msgid "Contact"
@@ -48,6 +71,7 @@ msgid "Customer Number:"
msgstr ""
#. module: base_usability
#: model:ir.model.fields,field_description:base_usability.field_ir_actions_report__display_name
#: model:ir.model.fields,field_description:base_usability.field_ir_mail_server__display_name
#: model:ir.model.fields,field_description:base_usability.field_ir_model__display_name
#: model:ir.model.fields,field_description:base_usability.field_res_company__display_name
@@ -65,12 +89,24 @@ msgstr ""
msgid "E-mail:"
msgstr ""
#. module: base_usability
#: code:addons/base_usability/models/res_company.py:0
#, python-format
msgid "EORI:"
msgstr ""
#. module: base_usability
#: model_terms:ir.ui.view,arch_db:base_usability.ir_property_view_search
msgid "Field"
msgstr ""
#. module: base_usability
#: model_terms:ir.ui.view,arch_db:base_usability.res_country_search
msgid "Group By"
msgstr ""
#. module: base_usability
#: model:ir.model.fields,field_description:base_usability.field_ir_actions_report__id
#: model:ir.model.fields,field_description:base_usability.field_ir_mail_server__id
#: model:ir.model.fields,field_description:base_usability.field_ir_model__id
#: model:ir.model.fields,field_description:base_usability.field_res_company__id
@@ -87,6 +123,7 @@ msgid "Installable"
msgstr ""
#. module: base_usability
#: model:ir.model.fields,field_description:base_usability.field_ir_actions_report____last_update
#: model:ir.model.fields,field_description:base_usability.field_ir_mail_server____last_update
#: model:ir.model.fields,field_description:base_usability.field_ir_model____last_update
#: model:ir.model.fields,field_description:base_usability.field_res_company____last_update
@@ -139,6 +176,11 @@ msgstr ""
msgid "Partner Tags"
msgstr ""
#. module: base_usability
#: model:ir.model.fields,field_description:base_usability.field_ir_actions_report__print_report_name
msgid "Printed Report Name"
msgstr ""
#. module: base_usability
#: model:ir.model.fields,field_description:base_usability.field_res_partner__ref
#: model:ir.model.fields,field_description:base_usability.field_res_users__ref
@@ -146,8 +188,14 @@ msgid "Reference"
msgstr ""
#. module: base_usability
#: model_terms:ir.ui.view,arch_db:base_usability.res_country_search
msgid "Search Countries"
#: model:ir.model,name:base_usability.model_ir_actions_report
msgid "Report Action"
msgstr ""
#. module: base_usability
#: code:addons/base_usability/models/res_company.py:0
#, python-format
msgid "SIRET:"
msgstr ""
#. module: base_usability
@@ -169,6 +217,14 @@ msgstr ""
msgid "Tel:"
msgstr ""
#. module: base_usability
#: model:ir.model.fields,help:base_usability.field_ir_actions_report__print_report_name
msgid ""
"This is the filename of the report going to download. Keep empty to not "
"change the report filename. You can use a python expression with the "
"'object' and 'time' variables."
msgstr ""
#. module: base_usability
#: model:ir.model,name:base_usability.model_res_users
msgid "Users"

View File

@@ -6,15 +6,27 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-07-01 10:02+0000\n"
"PO-Revision-Date: 2021-07-01 12:15+0200\n"
"Last-Translator: Alexis de Lattre <alexis@via.ecp.fr>\n"
"POT-Creation-Date: 2024-03-26 21:27+0000\n"
"PO-Revision-Date: 2024-03-26 21:27+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: base_usability
#: code:addons/base_usability/models/res_company.py:0
#, python-format
msgid "%s with a capital of"
msgstr "%s au capital de"
#. module: base_usability
#: code:addons/base_usability/models/res_company.py:0
#, python-format
msgid "APE:"
msgstr "APE :"
#. module: base_usability
#: model:ir.model,name:base_usability.model_res_partner_bank
msgid "Bank Accounts"
@@ -25,11 +37,22 @@ msgstr "Comptes bancaires"
msgid "Bank Name"
msgstr "Nom de la banque"
#. module: base_usability
#: code:addons/base_usability/models/res_company.py:0
#, python-format
msgid "Capital:"
msgstr "Capital : "
#. module: base_usability
#: model:ir.model,name:base_usability.model_res_company
msgid "Companies"
msgstr "Sociétés"
#. module: base_usability
#: model_terms:ir.ui.view,arch_db:base_usability.ir_property_view_search
msgid "Company"
msgstr "Société"
#. module: base_usability
#: model:ir.model,name:base_usability.model_res_partner
msgid "Contact"
@@ -42,11 +65,13 @@ msgstr "Devise"
#. module: base_usability
#: code:addons/base_usability/models/res_partner.py:0
#: code:addons/base_usability/models/res_partner.py:0
#, python-format
msgid "Customer Number:"
msgstr "N° client :"
#. module: base_usability
#: model:ir.model.fields,field_description:base_usability.field_ir_actions_report__display_name
#: model:ir.model.fields,field_description:base_usability.field_ir_mail_server__display_name
#: model:ir.model.fields,field_description:base_usability.field_ir_model__display_name
#: model:ir.model.fields,field_description:base_usability.field_res_company__display_name
@@ -64,12 +89,24 @@ msgstr "Nom affiché"
msgid "E-mail:"
msgstr "E-mail :"
#. module: base_usability
#: code:addons/base_usability/models/res_company.py:0
#, python-format
msgid "EORI:"
msgstr "EORI :"
#. module: base_usability
#: model_terms:ir.ui.view,arch_db:base_usability.ir_property_view_search
msgid "Field"
msgstr "Champ"
#. module: base_usability
#: model_terms:ir.ui.view,arch_db:base_usability.res_country_search
msgid "Group By"
msgstr "Grouper par"
#. module: base_usability
#: model:ir.model.fields,field_description:base_usability.field_ir_actions_report__id
#: model:ir.model.fields,field_description:base_usability.field_ir_mail_server__id
#: model:ir.model.fields,field_description:base_usability.field_ir_model__id
#: model:ir.model.fields,field_description:base_usability.field_res_company__id
@@ -78,7 +115,7 @@ msgstr "Grouper par"
#: model:ir.model.fields,field_description:base_usability.field_res_partner_category__id
#: model:ir.model.fields,field_description:base_usability.field_res_users__id
msgid "ID"
msgstr "ID"
msgstr ""
#. module: base_usability
#: model_terms:ir.ui.view,arch_db:base_usability.view_module_filter
@@ -86,6 +123,7 @@ msgid "Installable"
msgstr "Installable"
#. module: base_usability
#: model:ir.model.fields,field_description:base_usability.field_ir_actions_report____last_update
#: model:ir.model.fields,field_description:base_usability.field_ir_mail_server____last_update
#: model:ir.model.fields,field_description:base_usability.field_ir_model____last_update
#: model:ir.model.fields,field_description:base_usability.field_res_company____last_update
@@ -136,7 +174,12 @@ msgstr "Personne (utilisé pour cacher des entrées de menu natifs)"
#. module: base_usability
#: model:ir.model,name:base_usability.model_res_partner_category
msgid "Partner Tags"
msgstr "Étiquettes du partenaire"
msgstr "Étiquettes contact"
#. module: base_usability
#: model:ir.model.fields,field_description:base_usability.field_ir_actions_report__print_report_name
msgid "Printed Report Name"
msgstr "Nom du rapport imprimé"
#. module: base_usability
#: model:ir.model.fields,field_description:base_usability.field_res_partner__ref
@@ -145,11 +188,18 @@ msgid "Reference"
msgstr "Référence"
#. module: base_usability
#: model_terms:ir.ui.view,arch_db:base_usability.res_country_search
msgid "Search Countries"
#: model:ir.model,name:base_usability.model_ir_actions_report
msgid "Report Action"
msgstr ""
#. module: base_usability
#: code:addons/base_usability/models/res_company.py:0
#, python-format
msgid "SIRET:"
msgstr "SIRET :"
#. module: base_usability
#: code:addons/base_usability/models/res_partner.py:0
#: code:addons/base_usability/models/res_partner.py:0
#, python-format
msgid "Supplier Number:"
@@ -158,7 +208,7 @@ msgstr "N° fournisseur :"
#. module: base_usability
#: model:ir.model.fields,field_description:base_usability.field_res_partner_category__name
msgid "Tag Name"
msgstr "Nom de l'étiquette"
msgstr "Libellé de l'étiquette"
#. module: base_usability
#: code:addons/base_usability/models/res_company.py:0
@@ -167,6 +217,14 @@ msgstr "Nom de l'étiquette"
msgid "Tel:"
msgstr "Tél :"
#. module: base_usability
#: model:ir.model.fields,help:base_usability.field_ir_actions_report__print_report_name
msgid ""
"This is the filename of the report going to download. Keep empty to not "
"change the report filename. You can use a python expression with the "
"'object' and 'time' variables."
msgstr ""
#. module: base_usability
#: model:ir.model,name:base_usability.model_res_users
msgid "Users"

View File

@@ -6,3 +6,4 @@ from . import res_company
from . import ir_mail_server
from . import ir_actions_report
from . import ir_model
from . import misc

View File

@@ -0,0 +1,36 @@
# Copyright 2016-2025 Akretion France (https://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 import misc, float_compare
class BaseUsabilityInstalled(models.AbstractModel):
_name = "base.usability.installed"
_description = "Base Usability Installed"
formatLang_original = misc.formatLang
def formatLang(
env, value, digits=None, grouping=True,
monetary=False, dp=False, currency_obj=False, int_no_digits=True):
if (
'base.usability.installed' in env and
int_no_digits and
not monetary and
isinstance(value, float) and
dp):
prec = env['decimal.precision'].precision_get(dp)
if not float_compare(value, int(value), precision_digits=prec):
digits = 0
dp = False
res = formatLang_original(
env, value, digits=digits, grouping=grouping,
monetary=monetary, dp=dp, currency_obj=currency_obj)
return res
misc.formatLang = formatLang

View File

@@ -3,6 +3,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models, _
from odoo.tools.misc import format_amount
class ResCompany(models.Model):
@@ -39,32 +40,82 @@ class ResCompany(models.Model):
'value': self.phone,
# http://www.fileformat.info/info/unicode/char/1f4de/index.htm
'icon': '\U0001F4DE',
'label': _('Tel:')},
'label': _('Tel:'),
},
'email': {
'value': self.email,
# http://www.fileformat.info/info/unicode/char/2709/index.htm
'icon': '\u2709',
'label': _('E-mail:')},
'label': _('E-mail:'),
},
'website': {
'value': self.website,
'icon': '\U0001f310',
'label': _('Website:')},
'label': _('Website:'),
},
'vat': {
'value': self.vat,
'label': _('VAT:')},
'label': _('VAT:'),
},
'ape': {
'value': hasattr(self, 'ape') and self.ape or False,
'label': _('APE:'),
},
'siret': {
'value': hasattr(self, 'siret') and self.siret or False,
'label': _('SIRET:'),
},
'siren': {
'value': hasattr(self, 'siren') and self.siren or False,
'label': _('SIREN:'),
},
'rcs_siren': {
'value': hasattr(self, 'siren') and self.siren and self.company_registry and f"{self.company_registry} {self.siren}",
'label': 'RCS',
},
'eori': {
'value': self._get_eori(),
'label': _('EORI:'),
},
'capital': {
# 'capital_amount' added by base_company_extension
'value': hasattr(self, 'capital_amount') and self.capital_amount and format_amount(self.env, self.capital_amount, self.currency_id) or False,
'label': _('Capital:'),
}
}
# 'legal_type' added by base_company_extension
if hasattr(self, 'legal_type') and self.legal_type:
options['capital']['label'] = _('%s with a capital of') % self.legal_type
return options
def _get_eori(self):
eori = False
if self.partner_id.country_id.code == 'FR' and hasattr(self, 'siret') and self.siret:
# Currently migrating from EORI-SIRET to EORI-SIREN :
# https://www.pwcavocats.com/fr/ealertes/ealertes-france/2023/avril/reforme-numero-eori-siren-siret.html
# But, for the moment, we continue to use EORI-SIRET
eori = f'FR{self.siret}'
return eori
def _report_company_legal_name(self):
'''Method inherited in the module base_company_extension'''
self.ensure_one()
return self.name
def _report_header_line_details(self):
"""This method is designed to be inherited"""
# I decided not to put email in the default header because only a few very small
# companies have a generic company email address
line_details = [['phone', 'website', 'rcs_siren', 'capital'], ['vat', 'siret', 'eori', 'ape']]
return line_details
# for reports
def _display_report_header(
self, line_details=[['phone', 'website'], ['vat']],
icon=True, line_separator=' - '):
self, line_details=None, icon=True, line_separator=' - '):
self.ensure_one()
if line_details is None:
line_details = self._report_header_line_details()
res = ''
address = self.partner_id._display_address(without_company=True)
address = address.replace('\n', ' - ')

View File

@@ -125,6 +125,20 @@ class ResPartner(models.Model):
'label': _('Supplier Number:'),
},
}
if hasattr(self, 'siren'):
options['siren'] = {
'value': self.siren,
'label': _("SIREN:"),
}
if hasattr(self, 'siret'):
if hasattr(self, 'siren'): # l10n_fr_siret is installed
siret = self.siren and self.nic and self.siret or False
else:
siret = self.siret
options['siret'] = {
'value': siret,
'label': _("SIRET:"),
}
res = []
for detail in details:
if options.get(detail) and options[detail]['value']:

View File

@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Base Usability</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
@@ -275,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -301,7 +301,7 @@ span.option {
span.pre {
white-space: pre }
span.problematic {
span.problematic, pre.problematic {
color: red }
span.section-subtitle {
@@ -366,8 +366,10 @@ ul.auto-toc {
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:34b38099c08b1967a5082dd802765b1b34015403159badf256ee845648d9e6da
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/12.0/base_usability"><img alt="akretion/odoo-usability" src="https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/akretion/odoo-usability/tree/14.0/base_usability"><img alt="akretion/odoo-usability" src="https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github" /></a></p>
<p>This module adds the following functions:</p>
<ul class="simple">
<li>Adds <em>track_visibility=onchange</em> on all the important fields of the Partner object</li>
@@ -397,41 +399,42 @@ ul.auto-toc {
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#bug-tracker" id="id1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id3">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id4">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id5">Maintainers</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-4">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-5">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id1">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/akretion/odoo-usability/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/akretion/odoo-usability/issues/new?body=module:%20base_usability%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/akretion/odoo-usability/issues/new?body=module:%20base_usability%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#id2">Credits</a></h1>
<h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id3">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
<ul class="simple">
<li>Akretion</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id4">Contributors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<ul class="simple">
<li>Alexis de Lattre &lt;<a class="reference external" href="mailto:alexis.delattre&#64;akretion.com">alexis.delattre&#64;akretion.com</a>&gt;</li>
<li>Raphaël Valyi &lt;<a class="reference external" href="mailto:rvalyi&#64;akretion.com">rvalyi&#64;akretion.com</a>&gt;</li>
<li>David Beal &lt;<a class="reference external" href="mailto:david.beal&#64;akretion.com">david.beal&#64;akretion.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id5">Maintainers</a></h2>
<p>This module is part of the <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/12.0/base_usability">akretion/odoo-usability</a> project on GitHub.</p>
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<p>This module is part of the <a class="reference external" href="https://github.com/akretion/odoo-usability/tree/14.0/base_usability">akretion/odoo-usability</a> project on GitHub.</p>
<p>You are welcome to contribute.</p>
</div>
</div>

View File

@@ -0,0 +1,10 @@
.o_form_view {
.o_address_format {
.o_address_state {
margin-right: 0;
}
.o_address_zip {
margin-right: 2%;
}
}
}

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template
id="assets_backend"
name="web_sheet_full_width"
inherit_id="web.assets_backend"
>
<xpath expr="." position="inside">
<link
rel="stylesheet"
href="/base_usability/static/src/scss/form_view.scss"
/>
</xpath>
</template>
</odoo>

View File

@@ -20,6 +20,24 @@
<div attrs="{'invisible': [('same_vat_partner_id', '=', False)]}" position="attributes">
<attribute name="class">alert alert-warning</attribute>
</div>
<!-- Native order: city / state_id / zip. New order: zip / city / state_id -->
<xpath expr="//div[hasclass('o_address_format')]/field[@name='city']" position="before">
<field name="zip" position="move"/>
</xpath>
<field name="industry_id" position="attributes">
<attribute name="attrs">{'invisible': [('parent_id', '!=', False)]}</attribute>
</field>
</field>
</record>
<record id="res_partner_view_form_private" model="ir.ui.view">
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.res_partner_view_form_private"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='bank_ids']/tree/field[@name='acc_holder_name']" position="attributes">
<attribute name="invisible">0</attribute>
<attribute name="optional">hide</attribute>
</xpath>
</field>
</record>
@@ -45,6 +63,9 @@
<field name="phone" position="after">
<field name="mobile" optional="show" widget="phone" class="o_force_ltr"/>
</field>
<field name="category_id" position="after">
<field name="industry_id" optional="hide"/>
</field>
</field>
</record>
@@ -58,6 +79,9 @@
<!-- for 'ref', change '=' to 'start with' -->
<attribute name="filter_domain">['|','|',('display_name','ilike',self),('ref','=ilike',self + '%'),('email','ilike',self)]</attribute>
</field>
<filter name="group_country" position="after">
<filter name="industry_groupby" string="Industry" context="{'group_by': 'industry_id'}"/>
</filter>
</field>
</record>

View File

@@ -16,6 +16,10 @@
<field name="bank_name" position="after">
<field name="bank_id"/>
</field>
<field name="acc_holder_name" position="attributes">
<attribute name="invisible">0</attribute>
<attribute name="optional">hide</attribute>
</field>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,28 @@
diff --git a/addons/web/static/src/js/control_panel/custom_filter_item.js b/addons/web/static/src/js/control_panel/custom_filter_item.js
index 6682b660b78..b2ff23344d9 100644
--- a/addons/web/static/src/js/control_panel/custom_filter_item.js
+++ b/addons/web/static/src/js/control_panel/custom_filter_item.js
@@ -180,6 +180,10 @@ odoo.define('web.CustomFilterItem', function (require) {
[field.name, '>=', domainValue[0]],
[field.name, '<=', domainValue[1]]
);
+ } else if (operator.symbol === 'startswith') {
+ domainArray.push([field.name, '=ilike', domainValue[0] + '%']);
+ } else if (operator.symbol === 'endswith') {
+ domainArray.push([field.name, '=ilike', '%' + domainValue[0]]);
} else {
domainArray.push([field.name, operator.symbol, domainValue[0]]);
}
diff --git a/addons/web/static/src/js/control_panel/search_utils.js b/addons/web/static/src/js/control_panel/search_utils.js
index 8fce5b23ef6..d240d2e1fb2 100644
--- a/addons/web/static/src/js/control_panel/search_utils.js
+++ b/addons/web/static/src/js/control_panel/search_utils.js
@@ -18,6 +18,8 @@ odoo.define('web.searchUtils', function (require) {
char: [
{ symbol: "ilike", description: _lt("contains") },
{ symbol: "not ilike", description: _lt("doesn't contain") },
+ { symbol: "startswith", description: _lt("starts with") },
+ { symbol: "endswith", description: _lt("ends with") },
{ symbol: "=", description: _lt("is equal to") },
{ symbol: "!=", description: _lt("is not equal to") },
{ symbol: "!=", description: _lt("is set"), value: false },

View File

@@ -0,0 +1,16 @@
diff --git a/addons/web/static/src/js/views/form/form_renderer.js b/addons/web/static/src/js/views/form/form_renderer.js
index e4c1b187169..ccd8110478f 100644
--- a/addons/web/static/src/js/views/form/form_renderer.js
+++ b/addons/web/static/src/js/views/form/form_renderer.js
@@ -516,7 +516,10 @@ var FormRenderer = BasicRenderer.extend({
* @returns {integer}
*/
_renderButtonBoxNbButtons: function () {
- return [2, 2, 2, 4][config.device.size_class] || 7;
+ /* AKRETION HACK 24/04/2024
+ * show 14 buttons before adding 'More' dropdown list (instead of 7 by default
+ */
+ return [2, 2, 2, 4][config.device.size_class] || 14;
},
/**
* Do not render a field widget if it is always invisible.

View File

@@ -0,0 +1,3 @@
from . import models
from . import wizards
from . import reports

View File

@@ -0,0 +1,47 @@
# Copyright 2019-2025 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': 'Commission Simple',
'version': '14.0.1.0.0',
'category': 'Sales',
'license': 'AGPL-3',
'summary': 'Compute commissions for salesman',
'description': """
Commission Simple
=================
This module is a **simple** module to compute commission for salesman. From my experience, companies often use very specific methods to compute commissions and it's impossible to develop a module that can support all of them. So the goal of this module is just to have a simple base to build the company-specific commissionning system by inheriting this simple module.
Here is a short description of this module:
* create commission profiles using rules (per product category, per product, per product and customer, etc.),
* the commission rules can have a start and end date (optional),
* commissionning can happen on invoicing or on payment,
* each invoice line can only be commissionned to one salesman,
* commission reports are stored in Odoo.
This module has been written by Alexis de Lattre from Akretion
<alexis.delattre@akretion.com>.
""",
'author': 'Akretion',
'website': 'https://github.com/akretion/odoo-usability',
'depends': [
'account',
'date_range',
'report_xlsx',
],
'data': [
'security/ir.model.access.csv',
'security/rule.xml',
'reports/report.xml',
'data/decimal_precision.xml',
'views/commission_profile.xml',
'views/commission_rule.xml',
'views/commission_result.xml',
'views/account_move_line.xml',
'wizards/commission_compute_view.xml',
],
'installable': True,
}

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">
<record forcecreate="True" id="commission_rate" model="decimal.precision">
<field name="name">Commission Rate</field>
<field name="digits">2</field>
</record>
</odoo>

View File

@@ -0,0 +1,819 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * commission_simple
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-17 20:36+0000\n"
"PO-Revision-Date: 2025-10-17 20:36+0000\n"
"Last-Translator: Alexis de Lattre <alexis.delattre@akretion.com>\n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: commission_simple
#: code:addons/commission_simple/wizards/commission_compute.py:0
#, python-format
msgid ""
"%(count)s commissions already exist(s) with start date %(date_start)s in "
"company %(company)s."
msgstr ""
"%(count)s il existe déjà des commissions avec la date de début "
"%(date_start)s dans la société %(company)s."
#. module: commission_simple
#: model:ir.model.constraint,message:commission_simple.constraint_commission_result_salesman_period_company_unique
msgid ""
"A commission result already exists for this salesman/agent for the same "
"period."
msgstr ""
"Un état des commissions existe déjà pour ce vendeur/agent pour la même "
"période."
#. module: commission_simple
#: code:addons/commission_simple/models/commission_profile.py:0
#, python-format
msgid "A salesman must be selected when the assignment type is 'Salesman'."
msgstr ""
"Un vendeur doit être sélectionné lorsque le type d'affectation est "
"\"Vendeur\"."
#. module: commission_simple
#: code:addons/commission_simple/models/commission_rule.py:0
#, python-format
msgid "AND"
msgstr "ET"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__message_needaction
msgid "Action Needed"
msgstr "Action requise"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile__active
#: model:ir.model.fields,field_description:commission_simple.field_commission_rule__active
msgid "Active"
msgstr "Actif"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__activity_ids
msgid "Activities"
msgstr "Activités"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__activity_exception_decoration
msgid "Activity Exception Decoration"
msgstr "Style d'affichage de l'activité-alerte"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__activity_state
msgid "Activity State"
msgstr "État de l'activité"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__activity_type_icon
msgid "Activity Type Icon"
msgstr "Îcone du type d'activité"
#. module: commission_simple
#: code:addons/commission_simple/reports/commission_result_xlsx.py:0
#, python-format
msgid "Amount Total"
msgstr "Montant Total"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_rule__applied_on
msgid "Apply On"
msgstr "Conditions"
#. module: commission_simple
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_profile_form
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_profile_search
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_rule_search
msgid "Archived"
msgstr "Archivé"
#. module: commission_simple
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_result_form
msgid "Are you sure you want to go back to draft?"
msgstr "Êtes-vous sûr de vouloir revenir à l'état brouillon ?"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__assign_type
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_result_search
msgid "Assign Type"
msgstr "Type d'affectation"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile__assign_ids
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_profile_form
msgid "Assignments"
msgstr "Assignations"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__message_attachment_count
msgid "Attachment Count"
msgstr "Nombre de pièces jointes"
#. module: commission_simple
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_result_form
msgid "Back to Draft"
msgstr "Remettre en brouillon"
#. module: commission_simple
#: code:addons/commission_simple/reports/commission_result_xlsx.py:0
#, python-format
msgid "Base Total"
msgstr "Total Base"
#. module: commission_simple
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_compute_form
msgid "Cancel"
msgstr "Annuler"
#. module: commission_simple
#: model_terms:ir.ui.view,arch_db:commission_simple.view_move_line_form
msgid "Commission"
msgstr "Commission"
#. module: commission_simple
#: code:addons/commission_simple/reports/commission_result_xlsx.py:0
#: model:ir.model.fields,field_description:commission_simple.field_account_invoice_report__commission_amount
#: model:ir.model.fields,field_description:commission_simple.field_account_move_line__commission_amount
#, python-format
msgid "Commission Amount"
msgstr "Montant de la commission"
#. module: commission_simple
#: code:addons/commission_simple/reports/commission_result_xlsx.py:0
#: model:ir.model.fields,field_description:commission_simple.field_account_move_line__commission_base
#: model:ir.model.fields,field_description:commission_simple.field_commission_rule__base
#, python-format
msgid "Commission Base"
msgstr "Base de la commission"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__base_total
msgid "Commission Base Total"
msgstr "Total base des commissions"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__line_ids
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_result_form
msgid "Commission Lines"
msgstr "Lignes de commission"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile__date_range_type_id
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_profile_search
msgid "Commission Periodicity"
msgstr "Périodicité des commissions"
#. module: commission_simple
#: model:ir.model,name:commission_simple.model_commission_profile
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__profile_id
msgid "Commission Profile"
msgstr "Profil de commission"
#. module: commission_simple
#: model:ir.model,name:commission_simple.model_commission_profile_assignment
msgid "Commission Profile Assignment"
msgstr "Affectation des profils de commission"
#. module: commission_simple
#: model:ir.actions.act_window,name:commission_simple.commission_profile_action
#: model:ir.ui.menu,name:commission_simple.commission_profile_menu
msgid "Commission Profiles"
msgstr "Profils de commission"
#. module: commission_simple
#: code:addons/commission_simple/reports/commission_result_xlsx.py:0
#: model:ir.model.fields,field_description:commission_simple.field_account_move_line__commission_rate
#: model:ir.model.fields,field_description:commission_simple.field_commission_rule__rate
#, python-format
msgid "Commission Rate"
msgstr "Taux de commission"
#. module: commission_simple
#: model:ir.model,name:commission_simple.model_commission_result
#: model:ir.model.fields,field_description:commission_simple.field_account_move_line__commission_result_id
msgid "Commission Result"
msgstr "État des commissions"
#. module: commission_simple
#: model:ir.model,name:commission_simple.model_report_commission_simple_report_xlsx
msgid "Commission Result XLSX"
msgstr "État des commission XLSX"
#. module: commission_simple
#: model:ir.model,name:commission_simple.model_commission_rule
msgid "Commission Rule"
msgstr "Règle de commission"
#. module: commission_simple
#: model:ir.actions.act_window,name:commission_simple.commission_rule_action
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile__rule_ids
#: model:ir.ui.menu,name:commission_simple.commission_rule_menu
msgid "Commission Rules"
msgstr "Règles de commission"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__amount_total
msgid "Commission Total"
msgstr "Total des commissions"
#. module: commission_simple
#: model:ir.actions.act_window,name:commission_simple.commission_result_action
#: model:ir.ui.menu,name:commission_simple.commission_config_root
#: model:ir.ui.menu,name:commission_simple.commission_result_menu
#: model:ir.ui.menu,name:commission_simple.commission_root
msgid "Commissions"
msgstr "Commissions"
#. module: commission_simple
#: code:addons/commission_simple/reports/commission_result_xlsx.py:0
#, python-format
msgid "Commissions of %(partner)s for period %(period)s"
msgstr "Commissions de %(partner)s pour la période %(period)s"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_compute__company_id
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile__company_id
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile_assignment__company_id
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__company_id
#: model:ir.model.fields,field_description:commission_simple.field_commission_rule__company_id
msgid "Company"
msgstr "Société"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__company_currency_id
msgid "Company Currency"
msgstr "Devise de la société"
#. module: commission_simple
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_compute_form
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_rule_form
msgid "Compute"
msgstr "Calculer"
#. module: commission_simple
#: model:ir.actions.act_window,name:commission_simple.commission_compute_action
#: model:ir.model,name:commission_simple.model_commission_compute
#: model:ir.ui.menu,name:commission_simple.commission_compute_menu
msgid "Compute Commissions"
msgstr "Calculer les commissions"
#. module: commission_simple
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_result_form
msgid "Confirm"
msgstr "Confirmer"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_compute__create_uid
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile__create_uid
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile_assignment__create_uid
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__create_uid
#: model:ir.model.fields,field_description:commission_simple.field_commission_rule__create_uid
msgid "Created by"
msgstr "Créé par"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_compute__create_date
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile__create_date
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile_assignment__create_date
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__create_date
#: model:ir.model.fields,field_description:commission_simple.field_commission_rule__create_date
msgid "Created on"
msgstr "Créé le"
#. module: commission_simple
#: code:addons/commission_simple/reports/commission_result_xlsx.py:0
#, python-format
msgid "Currency"
msgstr "Devise"
#. module: commission_simple
#: code:addons/commission_simple/reports/commission_result_xlsx.py:0
#, python-format
msgid "Customer"
msgstr "Client"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_rule__partner_ids
msgid "Customers"
msgstr "Clients"
#. module: commission_simple
#: code:addons/commission_simple/models/commission_rule.py:0
#, python-format
msgid "Customers:"
msgstr "Clients :"
#. module: commission_simple
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_result_form
msgid "Disc.%"
msgstr "Rem.%"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_account_invoice_report__display_name
#: model:ir.model.fields,field_description:commission_simple.field_account_move_line__display_name
#: model:ir.model.fields,field_description:commission_simple.field_commission_compute__display_name
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile__display_name
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile_assignment__display_name
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__display_name
#: model:ir.model.fields,field_description:commission_simple.field_commission_rule__display_name
#: model:ir.model.fields,field_description:commission_simple.field_report_commission_simple_report_xlsx__display_name
msgid "Display Name"
msgstr "Nom affiché"
#. module: commission_simple
#: model:ir.model.fields.selection,name:commission_simple.selection__commission_result__state__done
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_result_search
msgid "Done"
msgstr "Terminé"
#. module: commission_simple
#: model:ir.model.fields.selection,name:commission_simple.selection__commission_result__state__draft
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_result_search
msgid "Draft"
msgstr "Brouillon"
#. module: commission_simple
#: model:ir.actions.report,name:commission_simple.commission_result_xlsx_report
msgid "Détails Excel"
msgstr "Détails Excel"
#. module: commission_simple
#: code:addons/commission_simple/reports/commission_result_xlsx.py:0
#: model:ir.model.fields,field_description:commission_simple.field_commission_rule__date_end
#, python-format
msgid "End Date"
msgstr "Date de fin"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__date_end
msgid "End date"
msgstr "Date de fin"
#. module: commission_simple
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_result_form
msgid "Excel Export"
msgstr "Export Excel"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__message_follower_ids
msgid "Followers"
msgstr "Abonnés"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__message_channel_ids
msgid "Followers (Channels)"
msgstr "Suiveurs (chaînes)"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__message_partner_ids
msgid "Followers (Partners)"
msgstr "Abonnés (partenaires)"
#. module: commission_simple
#: model:ir.model.fields,help:commission_simple.field_commission_result__activity_type_icon
msgid "Font awesome icon e.g. fa-tasks"
msgstr "Îcone font-awesome, par exemple fa-task"
#. module: commission_simple
#: code:addons/commission_simple/reports/commission_result_xlsx.py:0
#, python-format
msgid "Generated from Odoo on %s by %s"
msgstr "Généré à partir d'Odoo le %s par %s"
#. module: commission_simple
#: code:addons/commission_simple/models/commission_rule.py:0
#: model:ir.model.fields.selection,name:commission_simple.selection__commission_rule__applied_on__4_global
#, python-format
msgid "Global"
msgstr "Global"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_account_invoice_report__id
#: model:ir.model.fields,field_description:commission_simple.field_account_move_line__id
#: model:ir.model.fields,field_description:commission_simple.field_commission_compute__id
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile__id
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile_assignment__id
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__id
#: model:ir.model.fields,field_description:commission_simple.field_commission_rule__id
#: model:ir.model.fields,field_description:commission_simple.field_report_commission_simple_report_xlsx__id
msgid "ID"
msgstr "ID"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__activity_exception_icon
msgid "Icon"
msgstr "Îcone"
#. module: commission_simple
#: model:ir.model.fields,help:commission_simple.field_commission_result__activity_exception_icon
msgid "Icon to indicate an exception activity."
msgstr "Îcone pour indiquer une activité-alerte"
#. module: commission_simple
#: model:ir.model.fields,help:commission_simple.field_commission_result__message_needaction
#: model:ir.model.fields,help:commission_simple.field_commission_result__message_unread
msgid "If checked, new messages require your attention."
msgstr "Si activé, de nouveaux messages nécessitent votre attention."
#. module: commission_simple
#: model:ir.model.fields,help:commission_simple.field_commission_result__message_has_error
msgid "If checked, some messages have a delivery error."
msgstr "Si activé, des messages ont une erreur d'envoi."
#. module: commission_simple
#: model:ir.model.fields.selection,name:commission_simple.selection__commission_profile__trigger_type__in_payment
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_profile_search
msgid "In Payment and Paid"
msgstr "En paiement et payé"
#. module: commission_simple
#: code:addons/commission_simple/reports/commission_result_xlsx.py:0
#, python-format
msgid "Invoice"
msgstr "Facture"
#. module: commission_simple
#: code:addons/commission_simple/reports/commission_result_xlsx.py:0
#, python-format
msgid "Invoice Date"
msgstr "Date de facture"
#. module: commission_simple
#: model:ir.model.fields.selection,name:commission_simple.selection__commission_profile__trigger_type__invoice
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_profile_search
msgid "Invoiced"
msgstr "Facturé"
#. module: commission_simple
#: model:ir.model.fields.selection,name:commission_simple.selection__commission_rule__base__invoiced
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_result_form
msgid "Invoiced Amount"
msgstr "Montant facturé"
#. module: commission_simple
#: model:ir.model,name:commission_simple.model_account_invoice_report
msgid "Invoices Statistics"
msgstr "Statistiques des factures"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__message_is_follower
msgid "Is Follower"
msgstr "Est abonné"
#. module: commission_simple
#: model:ir.model,name:commission_simple.model_account_move_line
msgid "Journal Item"
msgstr "Écriture comptable"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_account_invoice_report____last_update
#: model:ir.model.fields,field_description:commission_simple.field_account_move_line____last_update
#: model:ir.model.fields,field_description:commission_simple.field_commission_compute____last_update
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile____last_update
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile_assignment____last_update
#: model:ir.model.fields,field_description:commission_simple.field_commission_result____last_update
#: model:ir.model.fields,field_description:commission_simple.field_commission_rule____last_update
#: model:ir.model.fields,field_description:commission_simple.field_report_commission_simple_report_xlsx____last_update
msgid "Last Modified on"
msgstr "Dernière modification le"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_compute__write_uid
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile__write_uid
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile_assignment__write_uid
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__write_uid
#: model:ir.model.fields,field_description:commission_simple.field_commission_rule__write_uid
msgid "Last Updated by"
msgstr "Dernière mise à jour par"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_compute__write_date
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile__write_date
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile_assignment__write_date
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__write_date
#: model:ir.model.fields,field_description:commission_simple.field_commission_rule__write_date
msgid "Last Updated on"
msgstr "Dernière mise à jour le"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__message_main_attachment_id
msgid "Main Attachment"
msgstr "Pièce jointe principale"
#. module: commission_simple
#: model:ir.model.fields.selection,name:commission_simple.selection__commission_rule__base__margin
msgid "Margin"
msgstr "Marge"
#. module: commission_simple
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_rule_form
msgid "Match"
msgstr "Correspondance"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_rule__apply_description
msgid "Match Criteria"
msgstr "Critères de correspondance"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_account_move_line__commission_rule_id
msgid "Matched Commission Rule"
msgstr "Règle de commission associée"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__message_has_error
msgid "Message Delivery error"
msgstr "Erreur d'envoi du message"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__message_ids
msgid "Messages"
msgstr "Messages"
#. module: commission_simple
#: code:addons/commission_simple/wizards/commission_compute.py:0
#, python-format
msgid "Missing Period Start Date."
msgstr "Date de début de la période manquante."
#. module: commission_simple
#: code:addons/commission_simple/wizards/commission_compute.py:0
#, python-format
msgid "Missing commission periodicity on commission profile '%s'."
msgstr ""
"Périodicité des commissions manquante sur le profil de commission '%s'."
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__my_activity_date_deadline
msgid "My Activity Deadline"
msgstr "Date butoir de l'activité"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile__name
msgid "Name of the Profile"
msgstr "Nom du profil"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__activity_date_deadline
msgid "Next Activity Deadline"
msgstr "Date butoir de l'activité suivante"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__activity_summary
msgid "Next Activity Summary"
msgstr "Résumé de l'activité suivante"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__activity_type_id
msgid "Next Activity Type"
msgstr "Type de l'activité suivante"
#. module: commission_simple
#: code:addons/commission_simple/wizards/commission_compute.py:0
#, python-format
msgid "No commissions generated."
msgstr "Aucune commission n'a été générée."
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__message_needaction_counter
msgid "Number of Actions"
msgstr "Nombre d'actions"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__message_has_error_counter
msgid "Number of errors"
msgstr "Nombre d'erreurs"
#. module: commission_simple
#: model:ir.model.fields,help:commission_simple.field_commission_result__message_needaction_counter
msgid "Number of messages which requires an action"
msgstr "Nombre de messages nécessitant une action"
#. module: commission_simple
#: model:ir.model.fields,help:commission_simple.field_commission_result__message_has_error_counter
msgid "Number of messages with delivery error"
msgstr "Nombre de messages en échec d'envoi"
#. module: commission_simple
#: model:ir.model.fields,help:commission_simple.field_commission_result__message_unread_counter
msgid "Number of unread messages"
msgstr "Nombre de messages non lus"
#. module: commission_simple
#: model:ir.model.fields.selection,name:commission_simple.selection__commission_profile__trigger_type__paid
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_profile_search
msgid "Paid"
msgstr "Payé"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__date_range_id
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_result_search
msgid "Period"
msgstr "Période"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_compute__date_start
msgid "Period Start Date"
msgstr "Date de début des périodes"
#. module: commission_simple
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_result_form
msgid "Price"
msgstr "Prix"
#. module: commission_simple
#: code:addons/commission_simple/reports/commission_result_xlsx.py:0
#, python-format
msgid "Product"
msgstr "Produit"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_rule__product_categ_ids
#: model:ir.model.fields.selection,name:commission_simple.selection__commission_rule__applied_on__3_product_category
msgid "Product Categories"
msgstr "Catégories de produits"
#. module: commission_simple
#: model:ir.model.fields.selection,name:commission_simple.selection__commission_rule__applied_on__1_customer_product_category
msgid "Product Categories and Customers"
msgstr "Catégories de produits et clients"
#. module: commission_simple
#: code:addons/commission_simple/models/commission_rule.py:0
#, python-format
msgid "Product Categories:"
msgstr "Catégories de produits :"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_account_move_line__product_categ_id
msgid "Product Category"
msgstr "Catégorie de produit"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_rule__product_ids
#: model:ir.model.fields.selection,name:commission_simple.selection__commission_rule__applied_on__2_product
msgid "Products"
msgstr "Produits"
#. module: commission_simple
#: model:ir.model.fields.selection,name:commission_simple.selection__commission_rule__applied_on__0_customer_product
msgid "Products and Customers"
msgstr "Produits et clients"
#. module: commission_simple
#: code:addons/commission_simple/models/commission_rule.py:0
#, python-format
msgid "Products:"
msgstr "Produits :"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile_assignment__profile_id
#: model:ir.model.fields,field_description:commission_simple.field_commission_rule__profile_id
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_rule_search
msgid "Profile"
msgstr "Profil"
#. module: commission_simple
#: code:addons/commission_simple/reports/commission_result_xlsx.py:0
#, python-format
msgid "Quantity"
msgstr "Quantité"
#. module: commission_simple
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_result_form
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_rule_tree
msgid "Rate (%)"
msgstr "Taux (%)"
#. module: commission_simple
#: model:ir.model.constraint,message:commission_simple.constraint_commission_rule_rate_positive
msgid "Rate must be positive !"
msgstr "Le taux doit être positif !"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__activity_user_id
msgid "Responsible User"
msgstr "Utilisateur responsable"
#. module: commission_simple
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_profile_form
msgid "Rules"
msgstr "Règles"
#. module: commission_simple
#: code:addons/commission_simple/models/commission_profile.py:0
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile_assignment__user_id
#: model_terms:ir.ui.view,arch_db:commission_simple.commission_result_search
#, python-format
msgid "Salesman"
msgstr "Vendeur"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__partner_id
msgid "Salesman/Agent"
msgstr "Vendeur/Agent"
#. module: commission_simple
#: model:ir.model.fields,help:commission_simple.field_account_move_line__product_categ_id
msgid "Select category for the current product"
msgstr "Sélectionnez la catégorie du produit"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile__sequence
msgid "Sequence"
msgstr "Séquence"
#. module: commission_simple
#: code:addons/commission_simple/reports/commission_result_xlsx.py:0
#: model:ir.model.fields,field_description:commission_simple.field_commission_rule__date_start
#, python-format
msgid "Start Date"
msgstr "Date de début"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__date_start
msgid "Start date"
msgstr "Date de début"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__state
msgid "State"
msgstr "État"
#. module: commission_simple
#: model:ir.model.fields,help:commission_simple.field_commission_result__activity_state
msgid ""
"Status based on activities\n"
"Overdue: Due date is already passed\n"
"Today: Activity date is today\n"
"Planned: Future activities."
msgstr ""
"Statut basé sur les activités\n"
"En retard : La date d'échéance est déjà dépassée\n"
"Aujourd'hui : La date de l'activité est aujourd'hui\n"
"Planifié : Activités futures."
#. module: commission_simple
#: model:ir.model.constraint,message:commission_simple.constraint_commission_profile_assignment_company_user_uniq
msgid "This salesman already has an assignment in this company."
msgstr "Ce vendeur a déjà une assignation dans cette société."
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile__trigger_type
msgid "Trigger"
msgstr "Déclencheur"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_profile_assignment__assign_type
msgid "Type"
msgstr "Type"
#. module: commission_simple
#: model:ir.model.fields,help:commission_simple.field_commission_result__activity_exception_decoration
msgid "Type of the exception activity on record."
msgstr "Type de l'activité-alerte sur l'enregistrement."
#. module: commission_simple
#: code:addons/commission_simple/reports/commission_result_xlsx.py:0
#, python-format
msgid "Unit"
msgstr "Unité"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__message_unread
msgid "Unread Messages"
msgstr "Messages non lus"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__message_unread_counter
msgid "Unread Messages Counter"
msgstr "Compteur de messages non lus"
#. module: commission_simple
#: model:ir.model.fields,field_description:commission_simple.field_commission_result__website_message_ids
msgid "Website Messages"
msgstr "Messages du site Web"
#. module: commission_simple
#: model:ir.model.fields,help:commission_simple.field_commission_result__website_message_ids
msgid "Website communication history"
msgstr "Historique des échanges sur le site Web"
#. module: commission_simple
#: code:addons/commission_simple/models/commission_result.py:0
#, python-format
msgid "You cannot delete commission result %s because it is in done state."
msgstr ""
"Vous ne pouvez pas supprimer l'état de commission %s parce qu'il est à "
"l'état \"terminé\"."

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