Commit Graph

125 Commits

Author SHA1 Message Date
Harald Welte 34f009a5ce HACK: disable super expensive query to get invoice total per supplier 2021-02-18 01:10:10 +01:00
Denis Ledoux 386f76eb46 [FIX] account: get_fiscal_position is expected to return an id
Not a browse record.
This is a regression introduced by the revision 5fcf0f5a6f

opw-643188
fixes #7231
2015-06-23 16:29:55 +02:00
Martin Trigaux fa3ace7f99 [IMP] account: performances on total_invoiced field
The computation of total_invoiced field was very slow when the size of
account.invoice.report grows. This is due to usage of the field
user_currency_price_total that requires to build the full view (generates query
(id in []) for function field).

Using temporary SQL view (inspired by caf333e), directly filter the needed
items and avoid building the full table.

Fixes #6654
2015-06-23 16:18:24 +02:00
Goffin Simon 5fcf0f5a6f [FIX] account: change delivery address
The default fiscal position on sale order, is set according to[by priority]:
[1] the delivery
[2] the partner

opw:641883
2015-06-22 09:11:21 +02:00
Denis Ledoux 972d966554 [FIX] account: ACLs contracts button in partner form
contracts_count function field
&
journal_item_count function field

used for the "contracts" and "journal items" buttons
in the partner view are computed by the same
method.

But, this is possible that you have access to
one without having access to the other.
e.g., Project users not being salesman nor accountant
must have access to the contract counts,
but not to the journal items.

Besides, these buttons are added to the partner form
by two separated views, applied to analytic accounting group
& accountant group, respectively.

We therefore avoid to compute the journal items count when
not needed, when not loaded in the partner view.
We therefore prevent the access right issue, and provide
a performance improvment at the same time. Yay.

opw-632454
2015-04-09 17:23:42 +02:00
Goffin Simon 3eda25119f [FIX] account: Invoiced doesn't take into account cancelled invoices
"Invoiced" stat button on the res.partner form view must not include cancelled and draft invoices.
The button triggered an action which shows a tree view with invoices where:
type in ['out_invoice'] and all states.
Now the button triggers a tree view with invoices where: type in ['out_invoice' , 'out_refund']
and state not in ['draft', 'cancel'].

opw:472318
2015-03-26 16:27:27 +01:00
Goffin Simon 940a0e45d4 [FIX] account: choosing the right fiscal position
for a partner who has vat number, fiscal positions with vat_required
are prefered.

opw:630849
2015-03-24 13:00:39 +01:00
Goffin Simon d5a50fd346 [FIX] sale: fiscal position wrongly taken based on country group.
An automatic fiscal position with a country group can only match with a sale order from a customer who has a country defined.
opw:627087
2015-02-05 11:15:28 +01:00
Olivier Dony 6ebdcbd2cd [FIX] account: misleading labels/tooltips on new fiscal position fields 2015-01-26 11:27:01 +01:00
Olivier Dony 92c7874eb8 [FIX] account: indendation error in 82588fa
The original tax should not be included if
it was found in the tax mapping, even
if it has no replacement.

Fixes #2261 (hopefully, this time)
2014-10-29 19:42:13 +01:00
Olivier Dony 82588faa71 [FIX] account: tax mapping logic was broken by 7508b7c
The original tax should not be applied
if at least one destination tax was
applied. It should only be applied if
explicitly included in target taxes.

(Re-)Fixes #2261
2014-10-29 16:44:55 +01:00
Alexis de Lattre 7508b7cd9c [FIX] account: fiscal position may map single tax to multiple taxes
(This is a regression in Odoo 8)

It should now work when a fiscal position replaces 1 tax with
several taxes (for example : Fiscal position "Intra-EU B2B" in l10n_fr)

Fixes #2261, manual merge of PR #3316
2014-10-27 17:08:09 +01:00
Christophe Matthieu c4ae1ef66d [FIX] account.fiscal.position: Fix get_fiscal_position for auto apply:
First match a fiscal position for the given country, then for a country
group containing the country. If none found, search a fiscal position
without country nor country group
2014-10-27 10:24:13 +01:00
Denis Ledoux e833066b63 [FIX] account: invoiced button values must be calculated as the user
Otherwise, if done with the superuser:
 - The multi-company rules won't work, the user will have the amount of all invoices, cross-companies
 - The amount currency will always be the currency of the superuser
2014-09-04 11:15:13 +02:00
Martin Trigaux dbca34511e [FIX] account: method should return browse records, not set 2014-08-05 09:30:14 +02:00
Christophe Simonis e29a7b7b4c [FIX] account: correct v8 version of map_tax() method of account.fiscal.postion 2014-08-04 19:41:43 +02:00
Olivier Dony d706adba11 [MERGE] Forward-port saas-5 up to 37ba23d 2014-08-04 01:44:30 +02:00
Christophe Simonis b4cbef4333 [FIX] account: res.partner: limit access to "total_invoiced" field to group "group_account_invoice". Use SUPERUSER_ID to access data 2014-08-01 17:29:20 +02:00
jkei 47dd44be43 [FIX] account: typo in get_fiscal_position()
Fixes #971:

File "/Users/keje/src/odoo/addons/account/partner.py", line 107, in get_fiscal_position
    return part.property_account_position.id
NameError: global name 'part' is not defined
2014-07-07 14:48:20 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Antony Lesuisse 22f4c315a3 [IMP] automatic fiscal positions for simple cases
Add group of countries res.country.group
Add get_fiscal_position method a method to compute a fiscal position based on company_id, partner_id, delivery_id
The meaning of res.partner.fiscal_position is now a forced a fiscal position.
The default implementation should handle simple cases, like VAT in UE and sales
tax in the US, but the method can be overriden to handle more complex ficals
rules.
2014-06-30 02:12:41 +02:00
Jaydeep Barot 026e38b48f [REM] Unnecessary `size` parameters on char fields 2014-06-25 17:13:43 +02:00
Olivier Dony f15cbd6520 [MERGE] Forward-port saas-4 bugfixes up to ad4c6ca 2014-06-12 18:54:36 +02:00
Olivier Dony 9f0ecb3572 [MERGE] Forward-port of 7.0 bugfixes up to 4d3a5df 2014-06-12 13:49:32 +02:00
Martin Trigaux b38a129d71 [FIX] account: move translatable tag
The field note on account.fiscal.position and account.fiscal.position.template should not be translatable in classic modules.
The l10n_multilang module is intendend to make chart of accounts multilang and is the place to set translate=True
2014-06-11 14:53:59 +02:00
Gery Debongnie aeebac88d9 [FIX] code cleanup (addon account)
improve the logic of _journal_item_count (removes try/except/pass, use search_count) and remove useless one2many field in res_partner (journal_item_ids)

bzr revid: ged@openerp.com-20140507121310-ya6m71fvs40rf90d
2014-05-07 14:13:10 +02:00
Gery Debongnie a81ba2b1ea [IMP] compute the total invoiced and display it on the stat button for invoices in res_partner form view (addon account)
bzr revid: ged@openerp.com-20140418093756-nxy2rkbyousbsjaf
2014-04-18 11:37:56 +02:00
Gery Debongnie ea23d24e87 [FIX] correct some typos in addon account variable name
bzr revid: ged@openerp.com-20140414093221-qbpxrv2kihsvtafg
2014-04-14 11:32:21 +02:00
Randhir Mayatra rma-openerp b51066b500 [IMP] convert button into stat button for customer
bzr revid: rma@tinyerp.com-20140320134414-mk1ie8okynrtudsq
2014-03-20 19:14:14 +05:30
Gery Debongnie 871c346f5f [FIX] fix a typo (journal_items_ids -> journal_item_ids) in addon accont
bzr revid: ged@openerp.com-20140318123459-uszascvxdbfwyw3g
2014-03-18 13:34:59 +01:00
Gery Debongnie d9ef089939 [FIX] fix a typo and uses the correct type in the invoice_count functional field of res_partner (addon account)
bzr revid: ged@openerp.com-20140318101034-0w72fjd2sxgy963q
2014-03-18 11:10:34 +01:00
Gery Debongnie 649198db8a [IMP] compute the 'invoice_count' and 'journal_item_count' field in one pass instead of two separate calls (addon account)
bzr revid: ged@openerp.com-20140317155926-2l5542cqcaw997hl
2014-03-17 16:59:26 +01:00
Gery Debongnie aac67e8bc5 [IMP] removes the testing field testpercent in res.partner and improves the way the buttons are displayed in form view (addon account)
bzr revid: ged@openerp.com-20140317152828-v2den23s32kzaqxh
2014-03-17 16:28:28 +01:00
Gery Debongnie 6fee78b475 [IMP] improves the way the res_partner fields are displayed in the buttons in form view. Specifically, uses the widget 'statinfo' and some related cleanup (addons account, crm)
bzr revid: ged@openerp.com-20140314140114-9t2piu3cpqkldnbo
2014-03-14 15:01:14 +01:00
Gery Debongnie 3c835279e8 [IMP] removes the field journal_items_stat_button field from the res.partner model (the x2many widget replaces its functionality) and improves the view. Also, adds a new field 'testpercent' to res.partner, only for testing purposes (addon account)
bzr revid: ged@openerp.com-20140313125244-k4zgsil19gk5sjcz
2014-03-13 13:52:44 +01:00
Gery Debongnie b7bc8b3aa4 [IMP] change the partner form view to display new stat button information in addon account/crm
bzr revid: ged@openerp.com-20140312132347-dyu1i3szlh9r7jq9
2014-03-12 14:23:47 +01:00
Denis Ledoux 108eea6524 [MERGE] Forward-port of latest saas-1 bugfixes, up to rev. 8797 rev-id: dle@openerp.com-20131028202715-uinjafcgpnw1nucx
bzr revid: mat@openerp.com-20131028163349-hr0ul2uf18fcvg4b
bzr revid: dle@openerp.com-20131028202944-eddqtgtikjq93nil
2013-10-28 21:29:44 +01:00
Martin Trigaux d5211929b8 [MERGE] forward port of 7.0 until revision 9546 (launchpad_translations_on_behalf_of_openerp-20131028054233-15znliqv2eh2jq0i)
bzr revid: mat@openerp.com-20131028161227-rpv6d0unjmg12jgk
2013-10-28 17:12:27 +01:00
Denis Ledoux a7e05f1af4 [MERGE] Forward-port of latest saas-1 bugfixes, up to rev. 8793 rev-id: dle@openerp.com-20131018124037-v3501acvv4fh1077
bzr revid: dle@openerp.com-20131018125818-1k168nlo2ferj25w
2013-10-18 14:58:18 +02:00
Denis Ledoux 1a555475cc [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9529 rev-id: mat@openerp.com-20131018120428-2vdmdm2th8rz57zr
bzr revid: dle@openerp.com-20131018121236-zp221von16vekthp
2013-10-18 14:12:36 +02:00
Martin Trigaux d36a90b39e [FIX] account: correctly compute debit/credit for partner including previous moves reported to new fiscal year
lp bug: https://launchpad.net/bugs/1219381 fixed

bzr revid: mat@openerp.com-20131015121015-jdwkzv9tjicg2m1u
2013-10-15 14:10:15 +02:00
Nhomar Hernandez 9382f31c7d [FIX] pass correct parameter to compute the balance on partner form with all entries not complete reconciled
lp bug: https://launchpad.net/bugs/1219381 fixed

bzr revid: nhomar@gmail.com-20130901064406-ehfuhwpjq0ti6oed
2013-09-01 02:14:06 -04:30
Quentin (OpenERP) d856e8361b [REF] *: change linked to server revision 4907. Removed deprecated 'view_load' attribute + removed duplicated first argument of property fields which is replaced with 'relation' argument in case where it is really needed (relational fields): indeed this first argument was totally useless for property of float type (for example).
bzr revid: qdp-launchpad@openerp.com-20130624090515-12aeo4k5sz87veqb
2013-06-24 11:05:15 +02:00
Quentin (OpenERP) 33f27b362b [MERGE] forward port of addons v7 up to revision 9045
bzr revid: qdp-launchpad@openerp.com-20130422153449-c62emljfa4a49758
2013-04-22 17:34:49 +02:00
Vo Minh Thu e69326ee3b [REF] removed explicit model instanciations.
bzr revid: vmt@openerp.com-20130415102349-vgcrfok2k5y10cwz
2013-04-15 12:23:49 +02:00
Olivier Dony 438e1c1daf [FIX] res.partner: Hide commercial-related fields on contacts form + autosync them from parent company
Fixes handling of accounting/invoicing-related fields on partners
that are not "commercial entities" (either marked as "is_company"
or parentless).
The corresponding fields are also hidden from form views on these
partners and replaced by a short sentence and a link to edit the
"master fields" on the commercial entity.
This corresponds to part B of the solution described on bug 1160365.

lp bug: https://launchpad.net/bugs/1160365 fixed

bzr revid: odo@openerp.com-20130407235013-j3tv4uxy46eej43i
2013-04-08 01:50:13 +02:00
Quentin (OpenERP) 87b899445d [FIX] account: improved tooltips and labels for manual reconciliation of accounting entries to be more explicit
bzr revid: qdp-launchpad@openerp.com-20130320135052-uqyuteitr68qiofn
2013-03-20 14:50:52 +01:00
Vo Minh Thu 6072fd11af [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20121210111654-0pm3pupnqqeip52n
2012-12-10 12:16:54 +01:00
Vo Minh Thu e7f4891d46 [IMP] use the openerp namespace.
bzr revid: vmt@openerp.com-20121206145632-0h1coh5aaem65wsy
2012-12-06 15:56:32 +01:00
Josse Colpaert f67c93855a [IMP] Merge from trunk
bzr revid: jco@openerp.com-20121206110528-mpbuo0q3g4ntvdbz
2012-12-06 12:05:28 +01:00