Merge lp:~openerp-dev/openobject-addons/trunk-asset-amortization into lp:openobject-addons

Proposed by Chirag Dodiya(OpenERP) on 2013-11-12
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-asset-amortization
Merge into: lp:openobject-addons
Diff against target: 1798 lines (+878/-200)
16 files modified
account/res_config.py (+5/-3)
account_asset/__openerp__.py (+11/-5)
account_asset/account_asset.py (+176/-62)
account_asset/account_asset_demo.xml (+58/-17)
account_asset/account_asset_invoice.py (+4/-3)
account_asset/account_asset_invoice_view.xml (+15/-2)
account_asset/account_asset_view.xml (+385/-84)
account_asset/report/account_asset_report.py (+12/-8)
account_asset/report/account_asset_report_view.xml (+88/-5)
account_asset/static/src/js/account_asset.js (+22/-0)
account_asset/test/account_asset_demo.yml (+1/-1)
account_asset/test/account_revenue_recognition.yml (+54/-0)
account_asset/test/account_revenue_recognition_demo.yml (+9/-0)
account_asset/wizard/account_asset_change_duration.py (+6/-3)
account_asset/wizard/wizard_asset_compute.py (+5/-2)
account_asset/wizard/wizard_asset_compute_view.xml (+27/-5)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-asset-amortization
Reviewer Review Type Date Requested Status
Turkesh Patel (openERP) 2013-11-12 Pending
Review via email: mp+194827@code.launchpad.net

Description of the change

Hello,

      I have improved view of Asset,Asset Categories and Revenue Recognition and added demo data for sales type and added yml test for revenue and recognition.

Thanks,
Chirag Dodiya(cod).

To post a comment you must log in.
8971. By van der Essen Frédéric (OpenERP) on 2013-11-12

[IMP] point_of_sale: fixes and performances optimisations

8972. By Launchpad Translations on behalf of openerp on 2013-11-13

Launchpad automatic translations update.

8973. By Launchpad Translations on behalf of openerp on 2013-11-14

Launchpad automatic translations update.

8974. By Quentin (OpenERP) <email address hidden> on 2013-11-13

[FIX] account_payment: amount_residual doesn't have a fct_search so it should be replaced by something else

8975. By Launchpad Translations on behalf of openerp on 2013-11-15

Launchpad automatic translations update.

8976. By Olivier Dony (Odoo) on 2013-11-15

[REM] base_crypt translation deactivated - module renamed to auth_crypt

8977. By Xavier (Open ERP) on 2013-11-15

[REM] undead web_shortcuts

8978. By Launchpad Translations on behalf of openerp on 2013-11-16

Launchpad automatic translations update.

8979. By Launchpad Translations on behalf of openerp on 2013-11-17

Launchpad automatic translations update.

8980. By Launchpad Translations on behalf of openerp on 2013-11-18

Launchpad automatic translations update.

8981. By van der Essen Frédéric (OpenERP) on 2013-11-18

[IMP] point_of_sale: allow up to 8 simultaneous payment methods to be displayed at once

8982. By Launchpad Translations on behalf of openerp on 2013-11-19

Launchpad automatic translations update.

8983. By Launchpad Translations on behalf of openerp on 2013-11-20

Launchpad automatic translations update.

8984. By Martin Trigaux (OpenERP) on 2013-11-21

[REF] project_issue: remove unused method convert issue to task (button was removed from view at rev 6898)

8985. By Martin Trigaux (OpenERP) on 2013-11-21

[ADD] procurement: add skip_exception parameter on scheduler allowing to have more frequent scheduler only testing confirmed picking

8986. By Martin Trigaux (OpenERP) on 2013-11-21

[REF] procurement: remove legacy code in scheduler from 6.1

8987. By Martin Trigaux (OpenERP) on 2013-11-21

[FIX] project_issue: remove test checking the convert_issue_task feature

8988. By Launchpad Translations on behalf of openerp on 2013-11-25

Launchpad automatic translations update.

8989. By Thibault Delavallée (OpenERP) on 2013-11-25

[MERGE] [IMP] Addons: updated some field labels to avoid duplicates to ease
the import / export process

Aso includes
- project: deprecated priority field: use sequence instead
- base_calendar: calendar.event: deprecated organizer field: use organize_id instead

8990. By Thibault Delavallée (OpenERP) on 2013-11-25

[MERGE] [IMP] mail: invite wizard: the option of sending an email when inviting someone
is now checked by default.

8991. By Thibault Delavallée (OpenERP) on 2013-11-25

[MERGE] [IMP] chatter: improved 'Log a note'
- the button is now only displayed for employee users. This is done
by overriding the fields_view_get in mail.thread and adding options
to the widget according to the groups the user belongs to. Indeed
it is currently not possible to set widget options specific to
some groups. Therefore an override of fields view get was
necessary.
- small layout improvements: Log a note -> Log an internal note,
background color of notes updated.

8992. By Christophe Simonis (OpenERP) on 2013-11-25

[MERGE] forward port of branch saas-2 up to revid 9010 <email address hidden>

8993. By Launchpad Translations on behalf of openerp on 2013-11-27

Launchpad automatic translations update.

8994. By Christophe Simonis (OpenERP) on 2013-11-27

[MERGE] forward port of branch saas-2 up to revid 9017 <email address hidden>

8995. By Quentin (OpenERP) <email address hidden> on 2013-11-27

[MERGE] improvements of 'post entry' wizard in order to allow the selection of several journals and several periods. Courtesy of Alexis de Lattre (Akretion)

8996. By Launchpad Translations on behalf of openerp on 2013-11-28

Launchpad automatic translations update.

8997. By Thibault Delavallée (OpenERP) on 2013-11-29

[MERGE] [IMP] [REV] crm, addons: still stage/state tweaking
- crm: Mark Won / Lost buttons are back
- crm: now using the new 'fold_field' option to fold some stages on the fold
field of stages. Back to saas-1 bebavhior.
- project, project_issue: task and issue also use the fold_field option.
- project: fixed 'X Tasks' display on the project vignette: now always displaying
'X Tasks at plural form to simplify the view

8998. By Christophe Simonis (OpenERP) on 2013-11-27

[FIX] base_calendar: do not use deprecated field `organizer`

8999. By Christophe Simonis (OpenERP) on 2013-11-29

[FIX] auth_signup: no alias for signuped users

9000. By Launchpad Translations on behalf of openerp on 2013-11-30

Launchpad automatic translations update.

9001. By Christophe Simonis (OpenERP) on 2013-11-30

[MERGE] forward port of branch saas-2 up to revid 9024 <email address hidden>

It’s over NINE THOUSAAAAAAAND!

9002. By Launchpad Translations on behalf of openerp on 2013-12-02

Launchpad automatic translations update.

9003. By Antony Lesuisse (OpenERP) on 2013-12-02

[MERGE] bootstrap3

9004. By Launchpad Translations on behalf of openerp on 2013-12-03

Launchpad automatic translations update.

9005. By Christophe Simonis (OpenERP) on 2013-12-04

[MERGE] forward port of branch saas-2 up to revid 9029 <email address hidden>

9006. By Thibault Delavallée (OpenERP) on 2013-12-05

[IMP] [FIX] mail: mail_thread: routing: check for exact message_id.

When processing an incoming email, we try to find a parent for the email based on references. Before this merge, it was done using openerp-<model-<res_id> pattern. However it is buggy. Indeed having two OpenERP sending emails to each other leads to messages being inserted in a wrong thread (model and res_id of the first OpenERP for both instances).

Now we search for an exact match between the references and the stored message_ids. As each message_id can be considered as unique the number of collisions is lessened. This won't cause any issues with OpenERP >= 7.0.

A compatibility mode is implemented for <= 6.1: as in those versions the message_id is not stored, we fall back on the previous behavior for records having messages without message_id. This indicates that the record was created before 7.0.

Tests have been updated accordingly, and a test added for the compatibility mode.

9007. By Thibault Delavallée (OpenERP) on 2013-12-05

[MERGE] [IMP] crm, sale_crm: improved sales team kanban view

Including:
- sales team members are displayed
- fixed sparklines whose numbers were incorrect
- sparklines now redirect to a correct report view, filtered for the sales team, grouped by month, in order to have matching results between the vignette links and the displayed reports
- custom css in crm put in a sass file
- sale_crm extend the crm reports, to add the section_id field in the reports, allowing to filter / group by salesteam. The analysis view has been put into several methods to allow extension.

9008. By Martin Trigaux (OpenERP) on 2013-12-05

[MERGE] [FIX] account_anglo_saxon: at invoice validation, the price for the analytic lines should be computed using the price_unit of the related stock.move instead of the product standard price (useful if different valuation method, could have price difference between delivery and invoice time)

9009. By Thibault Delavallée (OpenERP) on 2013-12-09

[MERGE] [FORWARD] Forward port of saas-2 branch until revision 9036 (revid <email address hidden>)

9010. By Thibault Delavallée (OpenERP) on 2013-12-09

[TESTS] mail: mute logger back in mail tests

9011. By Martin Trigaux (OpenERP) on 2013-12-09

[MERGE] [FIX] res_font: requires server commit 5011
Mainly fix reports
Adapt API to new res_font methods
See server commit message for more information

9012. By Launchpad Translations on behalf of openerp on 2013-12-11

Launchpad automatic translations update.

9013. By Launchpad Translations on behalf of openerp on 2013-12-12

Launchpad automatic translations update.

9014. By Thibault Delavallée (OpenERP) on 2013-12-12

[IMP] hr: minor usability improvements
- hr_holidays: renamed My Leaves filter by My Requests, more accurate
- hr_recruitment: string of name field is not Subject / Application Name, more accurate; this string is used in the search view also.

9015. By Launchpad Translations on behalf of openerp on 2013-12-13

Launchpad automatic translations update.

9016. By Launchpad Translations on behalf of openerp on 2013-12-14

Launchpad automatic translations update.

9017. By Launchpad Translations on behalf of openerp on 2013-12-16

Launchpad automatic translations update.

9018. By Launchpad Translations on behalf of openerp on 2013-12-17

Launchpad automatic translations update.

9019. By Martin Trigaux (OpenERP) on 2013-12-18

[MERGE] forward port of latest saas-2 until rev 9051 <email address hidden>

9020. By Denis Ledoux (OpenERP) on 2013-12-19

[FIX] hr: merge of views Leave Request & Allocation request, as they are allmost similar.

Moreover, before this fix, when you clicked on an allocation request from a mail.message (for instance, from the messaging inbox page), you were not redirected to the right view: You were redirected to the view of Leave request instead of Allocation request.

9021. By Thibault Delavallée (OpenERP) on 2013-12-19

[MERGE] [FIX] mail: fixed group button position that was too much dependent of the group description length
[IMP] project: removed unnecessary code in project to try to be able to move kanban records in a folded column (was not working + generic solution coming)

9022. By Launchpad Translations on behalf of openerp on 2013-12-20

Launchpad automatic translations update.

9023. By Thibault Delavallée (OpenERP) on 2013-12-20

[FORWARD] Forward port of saas-2 fixes until revision 9058 (revid <email address hidden>)

9024. By Thibault Delavallée (OpenERP) on 2013-12-23

[MERGE] [ADD] hr_applicant_document module: link between hr_recruitment and document modules. It allows to search through the indexed content of documents attached to applicants, such as resumes, CVs, ...

[IMP] hr.recrutment.stage: added template_id field. If the stage is linked to a template, a message is posted on the applicant when the applicant is moved into this stage. This allows to automatically send an email when approving or refusing an applicant. We usually define server action to achieve that behavior, it is now standard.

[IMP] hr.applicant: added a field to have the number of indexed documents + links in the applicant kanban view to jump to the applicant's documents.

9025. By Martin Trigaux (OpenERP) on 2013-12-24

[MERGE] [ADD] gamification

New modules gamification, hr_gamification, gamification_sale_crm, portal_gamification.

Merry Christmas OpenERP

9026. By Launchpad Translations on behalf of openerp on 2013-12-25

Launchpad automatic translations update.

9027. By Launchpad Translations on behalf of openerp on 2013-12-26

Launchpad automatic translations update.

9028. By Launchpad Translations on behalf of openerp on 2013-12-27

Launchpad automatic translations update.

9029. By Launchpad Translations on behalf of openerp on 2013-12-28

Launchpad automatic translations update.

9030. By Launchpad Translations on behalf of openerp on 2013-12-30

Launchpad automatic translations update.

9031. By Launchpad Translations on behalf of openerp on 2013-12-31

Launchpad automatic translations update.

9032. By Thibault Delavallée (OpenERP) on 2014-01-02

[MERGE] account: cash register view improvements
- now looking like cash control methods from the point of sale module.

point of sale: improved some tooltips + cash control form view improvements

9033. By Thibault Delavallée (OpenERP) on 2014-01-02

[MERGE] [IMP] hr: changed some pictures of employees in demo data to avoid copyright issues

9034. By Thibault Delavallée (OpenERP) on 2014-01-02

[FORWARD] Forward port of latest saas-2 fixes, until revision 9062 (revid <email address hidden>)

9035. By Launchpad Translations on behalf of openerp on 2014-01-03

Launchpad automatic translations update.

9036. By Launchpad Translations on behalf of openerp on 2014-01-04

Launchpad automatic translations update.

9037. By Launchpad Translations on behalf of openerp on 2014-01-05

Launchpad automatic translations update.

9038. By Martin Trigaux (OpenERP) on 2014-01-07

[ADD] project: add change_default parameter on project_id field of project.task. This allows to set default values depending on project through ir.values.

9039. By Stephane Wirtel (OpenERP) on 2014-01-09

[MERGE] Extract the base64 encoded images from the xml files lp:~openerp-dev/openobject-addons/trunk-extracted_img-stw

9040. By van der Essen Frédéric (OpenERP) on 2014-01-10

[MERGE] point_of_sale: big point of sale upgrade for posbox campaign

9041. By Launchpad Translations on behalf of openerp on 2014-01-11

Launchpad automatic translations update.

9042. By Martin Trigaux (OpenERP) on 2014-01-13

[IMP] project: remove duplicated field complete_name (already present in account.analytic.account)

9043. By van der Essen Frédéric (OpenERP) on 2014-01-13

[MERGE] better management for python dependencies of the hardware driver modules

9044. By Martin Trigaux (OpenERP) on 2014-01-13

[MERGE] [FIX] account: accounting periods in demo data are no longer opening periods, create a new period_0 as opening period

9045. By Stephane Wirtel (OpenERP) on 2014-01-13

[FIX] hr_holidays: Use osv.except_osv instead exceptions.Warning, because
Warning does not inherit from osv.except_osv and this exception is not catched
by the system.

9046. By Stephane Wirtel (OpenERP) on 2014-01-13

[FIX] project_timesheet: supply_method is implemented in the module
'procurement' but this one is not in the dependencies of project_timesheet.

9047. By Stephane Wirtel (OpenERP) on 2014-01-14

[FIX] hr_holidays: Reverse previous patch with the warning

9048. By Xavier (Open ERP) on 2014-01-14

[FIX] pillow-compatible Image import

9049. By jke-openerp on 2014-01-14

[MERGE] Merge with trunk-cal-jke

New calendar :
   Component changed : dHtml into Jquery FullCalendar
   Manage recurrency
   Manage alarm with notif/mail
   oAuth google 'web app'
   Manage coworker / Favorite
   Use avatar for attendee and filter
   Manager calendar by partner and not user
   Your events are now event where you are attendees and not events that you have created
   Manage quick_create, Quick_view, ...

Rename module google_base_account into google_account
Rename module base_calendar into calendar
New module Google Calendar

9050. By Christophe Simonis (OpenERP) on 2014-01-15

[FIX] point_of_sale: let the session generate a session_id itself

9051. By jke-openerp on 2014-01-15

[MERGE] Merge with trunk-ren-crmmeeting

This commit replace all occurences of "crm.meeting" into "calendar.event" and "crm_meeting" into "calendar_event".
It remove 2 fields unused from calendar.event model and from the tests.
Add oe_update_date in exclude field, to allow the update of recurrence if field(s) updated are only in this exclu list

9052. By Christophe Simonis (OpenERP) on 2014-01-15

[MERGE] forward port of branch saas-2 up to revid 9092 <email address hidden>

9053. By Launchpad Translations on behalf of openerp on 2014-01-16

Launchpad automatic translations update.

9054. By Launchpad Translations on behalf of openerp on 2014-01-19

Launchpad automatic translations update.

9055. By Raphael Collet (OpenERP) on 2014-01-20

[FIX] calendar: type of related field should be 'integer', not 'int'

9056. By Raphael Collet (OpenERP) on 2014-01-20

[FIX] calendar: function field of type 'selection' must be given a selection parameter

9057. By Christophe Simonis (OpenERP) on 2014-01-20

[FIX] edi: /edi/import_edi_url route is a json route

9058. By Christophe Simonis (OpenERP) on 2014-01-20

[IMP] calendar: tell orm to rename old select1 column

9059. By Thibault Delavallée (OpenERP) on 2014-01-22

[MERGE] [REF] [IMP] base_action_rule: allow using a resource.calendar to compute
day-based timing conditions.

[REF] resource: cleaned, refactored and improved code for resource.calendar
module. Old API is kept for backward compatibility.
[TESTS] resource: added tests for the new implementation of the various
methods.

[IMP] base_action_rule: using the resource module, added the possibility
to specify a resource.calendar to compute day-based timing conditions.

[IMP] hr_contract: added an override of base action rule to add the possibility
of using an employees's resource.calendar to compute day-based timing
conditions.

9060. By van der Essen Frédéric (OpenERP) on 2014-01-24

[MERGE] point_of_sale: further point of sale and hardware integration improvements

9061. By Thibault Delavallée (OpenERP) on 2014-01-24

[MERGE] [ADD] product_email_template new module. It allows ot send template-based emails when validating invoices. This allows to send description, user guides, technical datasheets, ... when selling products.

product_template inheritance: added email_template_id field, link to an optional email.template

invoice inheritance: when validating the invoice, send an email for each product that has a linked email.template.

email_template inheritance: defined a new simplified form view with only attachment_ids and body, to ease the quick edition of email templates. This simplified form view is used for the email_template_id field on the product.template form view.

email_template: when having default_model in default_get, use it to prefetch model_id. Indeed model is a related file, we have to redirect its default to the right model_id field.

9062. By Denis Ledoux (OpenERP) on 2014-01-27

[MERGE][ADD] crm: apply deduplication for mass converting leads to opps

9063. By van der Essen Frédéric (OpenERP) on 2014-01-27

[MERGE] point_of_sale: hardware proxy reliability improvements

9064. By Géry Debongnie on 2014-01-27

[IMP] merge all the modifications concerning the new graph view. It mainly changes the reporting views to use the pivot table as default.

9065. By Launchpad Translations on behalf of openerp on 2014-01-28

Launchpad automatic translations update.

9066. By Antony Lesuisse (OpenERP) on 2014-01-29

[IMP] hr.department cleanup
- Consolidate multiple hr.departement definition into hr.py file
- Remove ulgy department_users_get() domain hack on act_window
- Add the jobs_ids inverse relationship from departement to jobs

9067. By van der Essen Frédéric (OpenERP) on 2014-01-29

[MERGE] hw_scanner fixes

9068. By van der Essen Frédéric (OpenERP) on 2014-01-29

[MERGE] point_of_sale: regression fix

9069. By Fabien Meghazi (OpenERP) on 2014-01-29

[REM] POS: Replaced auth="admin" by auth="none"

9070. By van der Essen Frédéric (OpenERP) on 2014-01-29

[MERGE] hw_escpos: moving list of supported printers to a separate file

9071. By Christophe Simonis (OpenERP) on 2014-01-29

[MERGE] forward port of branch saas-2 up to revid 9109 <email address hidden>

9072. By Christophe Simonis (OpenERP) on 2014-01-29

[FIX] calendar: use correct xmlid

9073. By van der Essen Frédéric (OpenERP) on 2014-01-30

[MERGE] point_of_sale: receipt printing reliability improvements

9074. By Fabien Meghazi (OpenERP) on 2014-01-30

[IMP] Use CORS in pos (only two routes)

9075. By Fabien Meghazi (OpenERP) on 2014-01-30

[ADD] POS: added cors argument to all routes

9076. By Géry Debongnie on 2014-01-30

[MERGE] merge trunk-new-graphview-ged into trunk (mainly work on the reporting views to use the new pivot table view)

9077. By Fabien Meghazi (OpenERP) on 2014-01-30

[IMP] Use cors in pos devices.js

9078. By van der Essen Frédéric (OpenERP) on 2014-01-30

[FIX] point_of_sale: add port and protocol to forced proxy ip if necessary

9079. By van der Essen Frédéric (OpenERP) on 2014-01-30

[IMP] point_of_sale, hw_escpos: hopefully much faster printing on the posbox by caching logo conversion

9080. By Antony Lesuisse (OpenERP) on 2014-01-31

[MERGE] trunk-website-al

9081. By Antony Lesuisse (OpenERP) on 2014-01-31

[REV] website qweb dont change exception types

9082. By Olivier Dony (Odoo) on 2014-01-31

[IMP] website themes: simpler wording

9083. By Fabien (Open ERP) on 2014-01-31

[IMP] missing picture

9084. By Olivier Dony (Odoo) on 2014-01-31

[IMP] website apps flagged as such: website, website_event (replaces event), website_blog, website_sale

9085. By Olivier Dony (Odoo) on 2014-01-31

[FIX] website*: no border for customer/reseller/member entries + extra bottom margin on left column

9086. By van der Essen Frédéric (OpenERP) on 2014-01-31

[IMP] point_of_sale: increased size of logo on receipt

9087. By Niko (OpenERP) on 2014-02-28

[IMP] Add some video to manisfest ( website, website_blog, website_event, website_ecommerce)

9088. By Fabien Meghazi (OpenERP) on 2014-01-31

[REV] Bring back QWebExceptions

9089. By van der Essen Frédéric (OpenERP) on 2014-01-31

[FIX] point_of_sale: update redirection system with the website-al changes

9090. By Launchpad Translations on behalf of openerp on 2014-02-01

Launchpad automatic translations update.

9091. By Launchpad Translations on behalf of openerp on 2014-02-02

Launchpad automatic translations update.

9092. By Launchpad Translations on behalf of openerp on 2014-02-03

Launchpad automatic translations update.

9093. By Martin Trigaux (OpenERP) on 2014-02-03

[MERGE] Forward port of saas-3 branch up to revid 9093 <email address hidden>

9094. By van der Essen Frédéric (OpenERP) on 2014-02-03

[MERGE] hw_escpos: fixes for the cashbox opening

9095. By van der Essen Frédéric (OpenERP) on 2014-02-03

[MERGE] point_of_sale: open the cashbox on payment validation

9096. By Launchpad Translations on behalf of openerp on 2014-02-04

Launchpad automatic translations update.

9097. By Fabien (Open ERP) on 2014-02-05

[IMP] better layout for 'no blog post'

9098. By Fabien (Open ERP) on 2014-02-05

[IMP] event empty message

9099. By Fabien (Open ERP) on 2014-02-05

[IMP] typo

9100. By Fabien Meghazi (OpenERP) on 2014-02-05

[FIX] website.menu#url shall not be required=True

A parent node's url is not clickable in the website front-end

9101. By Thibault Delavallée (OpenERP) on 2014-02-05

[MERGE] sales/crm: minor improvements in account_analytic_analysis, crm, event_sale, hr_timesheet_invoice, sale views

9102. By Olivier Dony (Odoo) on 2014-02-05

[REM] remove empty modules after renaming the templates in Launchpad Translations

9103. By Fabien (Open ERP) on 2014-02-05

[IMP] Empty product page

9104. By Fabien (Open ERP) on 2014-02-05

[IMP] Simplify snippet so that they are useabile out-of-the-box

9105. By Fabien (Open ERP) on 2014-02-05

[IMP] Reduce images, all images at same size for 3col snippets

9106. By Launchpad Translations on behalf of openerp on 2014-02-06

Launchpad automatic translations update.

9107. By Thibault Delavallée (OpenERP) on 2014-02-06

[MERGE] [ADD] website: added support for calling a server action through a new controller, allowing to build website pages through server action.

website: added website/action/<id_or_xml_id> route, that runs the server action designed by its id or xml_id. Only published code server action are run. If the server action returns a response (for example the result of a template rendering), it is returned as result of the controller. This allows to have server action returning a rendered template, to display custom website pages based on some computation.

website: added an override of ir_actions_server:
- added website_published field: only published server action can be run + view update
- evaluation context gets request for evaluation, to enable request.render(template) or request.params.get(key) in order to retrieve the result of a form
- code server action returns 'response' the same way 'action' can be returned for classic code server action

9108. By Fabien (Open ERP) on 2014-02-07

[FIX] layout bug, right alignment of blocks incorrect

9109. By Christophe Matthieu (OpenERP) on 2014-02-07

[MERGE] Microformats (microdata) support for improved SEO.

Supported formats:
 - Organization
   https://support.google.com/webmasters/answer/146861?hl=en&ref_topic=1088474
   http://schema.org/Organization
 - Event
   https://support.google.com/webmasters/answer/164506?hl=en&ref_topic=1088474
   http://schema.org/Event
 - Product+Offer
   https://support.google.com/webmasters/answer/146750#offer_properties
   http://schema.org/Product
   http://schema.org/Offer

Tested with http://www.google.com/webmasters/tools/richsnippets

9110. By Fabien (Open ERP) on 2014-02-07

[IMP] logo by default (easier to configure)

9111. By Fabien (Open ERP) on 2014-02-07

[IMP] insert a banner --> build a page

9112. By Thibault Delavallée (OpenERP) on 2014-02-07

[MERGE] [IMP] account: payment term configuration: do not fool people by
telling them to enter a percentage when openerp actually waits for a decimal.
Therefore removed the percentage symbol.

9113. By Thibault Delavallée (OpenERP) on 2014-02-07

[MERGE] [IMP] product: added data for american units of measure + 1 yml test

9114. By Fabien (Open ERP) on 2014-02-07

[IMP] reduced image size

9115. By Fabien (Open ERP) on 2014-02-07

[IMP] tutorial banner

9116. By Fabien (Open ERP) on 2014-02-08

[IMP] small useability trick to avoid people writing several keywords in the same input

9117. By Fabien (Open ERP) on 2014-02-08

[IMP] Buttons snippet

9118. By Fabien (Open ERP) on 2014-02-08

[IMP] less black snippet border

9119. By Launchpad Translations on behalf of openerp on 2014-02-09

Launchpad automatic translations update.

9120. By Antony Lesuisse (OpenERP) on 2014-02-09

[MERGE] saas-3

9121. By Antony Lesuisse (OpenERP) on 2014-02-09

[FIX] disable http test before conversion

9122. By Antony Lesuisse (OpenERP) on 2014-02-09

[IMP] test_ui conversion, needs validation from chm

9123. By Antony Lesuisse (OpenERP) on 2014-02-09

[IMP] website test shorter code

9124. By Antony Lesuisse (OpenERP) on 2014-02-10

[IMP] website test_ui simplification

9125. By Antony Lesuisse (OpenERP) on 2014-02-10

[FIX] website_event tests

9126. By van der Essen Frédéric (OpenERP) on 2014-02-10

[MERGE] forward porting fixes from saas-3

9127. By van der Essen Frédéric (OpenERP) on 2014-02-10

[FIX] hw_escpos: status receipt would not print on the posbox

9128. By Launchpad Translations on behalf of openerp on 2014-02-11

Launchpad automatic translations update.

9129. By Fabien (Open ERP) on 2014-02-11

[IMP] Pantone colors of the year

9130. By Fabien (Open ERP) on 2014-02-11

[IMP] reduce image size, faster preview

9131. By Christophe Matthieu (OpenERP) on 2014-02-11

[FIX] website: crappy layout when use click on edit in the shop. Microforma error. Don't use meta tag in page content: ckeditor bug report 8117.

9132. By Thibault Delavallée (OpenERP) on 2014-02-11

[MERGE] [IMP] hr, hr_recruitment: job position update and usability improvements

hr: hr.job
- no_of_recruitment now indicates the number of employees you want to hire in a given recruitment phase
- added no_of_hired_employee that is the number of employees already recruited in the current recruitment phase
- updated form view
- removed simplified form view
- the job in the employee form view is now clickable and redirects to the job form view

hr_recruitment
- new dependency: web_kanban_gauge
- installing this module adds the 'Job Positions' menu, and adds a new kanban view for hr.job
- adds fields on hr.job to track applicants and their documents, used in the kanban view
- added configuration for default jobs alias, available in the Human Resources settings
- updated applicant / job subtypes: following some subtypes on the job now makes automatically follow some subtypes on applicants, like salesteam/opportunities or project/tasks and issues

mail: mail_alias
- when migrating to alias, use mail_notrack to avoid performing the tracking; indeed we are in a transient state, and trying to browse and track value change is risky.
mail: mail_thread: empty list help: small tweak to try to find a default alias

misc
- sale_crm: update for the new gauge widget parameters

9133. By Thibault Delavallée (OpenERP) on 2014-02-11

[MERGE] mrp: small usability fixes
- updated groups on some fields of bom
- removed some icons in form view, to be coherent with other form views
- BOM form view: updated onchange_product_id that now takes product_qty into account to compute
uos and uos quantity.

9134. By van der Essen Frédéric (OpenERP) on 2014-02-11

[MERGE] point_of_sale: allow negative product quantities and totals in the POS

9135. By Launchpad Translations on behalf of openerp on 2014-02-12

Launchpad automatic translations update.

9136. By Thibault Delavallée (OpenERP) on 2014-02-12

[MERGE] [IMP] misc usability improvements
- account: add a name when invoking some journal items views
- calendar: removed an editable in event.type tree view
- phonecalls: removed default searchs in logged / scheduled calls actions, using domain instead; small fix in meeting creation from a phonecall, use partner_ids instead of partner_id
- report_webkit: some menu reordering

9137. By Thibault Delavallée (OpenERP) on 2014-02-12

[MERGE] [IMP] website: server actions: usability improvements
- added website_path, used to compute the full URL allowing to access the server action. This allows more custom and short URLs, like website/action/partners instead of website/action/website.action_partners;
- added website_url, computed file with the full URL of the server action that is displayed on the form view, to ease usability.
- added a filter for server action, to easily find code and published server actions
- updated server action controller: now takes xml_id, id, or website_path

9138. By Thibault Delavallée (OpenERP) on 2014-02-12

[MERGE] [IMP] account, analytic, project: misc usability improvements.
Small improvements and fixes in label of views, added some strings, cleaned
some tooltips, updated a project data.

9139. By van der Essen Frédéric (OpenERP) on 2014-02-12

[IMP] hw_scanner: remove useless controller

9140. By Launchpad Translations on behalf of openerp on 2014-02-13

Launchpad automatic translations update.

9141. By Thibault Delavallée (OpenERP) on 2014-02-13

[MERGE] [IMP] crm: added default alias configurable directly in sales configuration menu. This default alias is an alias creating leads, not linked to a specific thread or parent.

Like what has been done in HR recently, it is now possible to directly configure a default alias for leads in the sales configuration menu. This allows an easier alias configuration compared to directly editing the aliases.

[FIX] hr: fixed default alias computation.

9142. By Thibault Delavallée (OpenERP) on 2014-02-13

[MERGE] [IMP] website_mail: email template visual editor:
- reordered email snippets: 2 categories with clearer name, holding basic and advanced email structures
- email_template: better display of the front-end link
- email designer: added a link to the backend
- added forgotten dependency towards email_template

9143. By Martin Trigaux (OpenERP) on 2014-02-13

[ADD] gamification: i18n translation files

9144. By Christophe Simonis (OpenERP) on 2014-02-13

ಠ_ಠ

9145. By Xavier (Open ERP) on 2014-02-14

[REM] spurious print in test

9146. By Christophe Matthieu (OpenERP) on 2014-02-14

[IMP] website: remove bootstrap in addons/website and use bootstrap from web

9147. By Launchpad Translations on behalf of openerp on 2014-02-15

Launchpad automatic translations update.

9148. By Antony Lesuisse (OpenERP) on 2014-02-17

[FIX] website tests

9149. By Antony Lesuisse (OpenERP) on 2014-02-17

[FIX] website_sale enable some tests

9150. By Antony Lesuisse (OpenERP) on 2014-02-17

[FIX] website_sale disable some tests

9151. By Launchpad Translations on behalf of openerp on 2014-02-17

Launchpad automatic translations update.

9152. By Thibault Delavallée (OpenERP) on 2014-02-17

[MERGE] [IMP] accounting: usability
- bank statement form view: partner is usually a supplier, add default suplier
is context of partner_id
- bank account form view: bank bic not required anymore

9153. By Fabien Meghazi (OpenERP) on 2014-02-17

[FIX] website's slug() should check if slugified string is empty

9154. By Thibault Delavallée (OpenERP) on 2014-02-17

[FIX] fleet: vehicle cost name field unhacked.
- remove name composition based on vehicle name, date and cost_subtype_id;
instead those fields have been added to the tree view. name field is now just
a related to the vehicle name, but the name field itself does not seem necessary
anymore. Should be checked further.

9155. By Xavier (Open ERP) on 2014-02-17

[FIX] re-enable crawler tests

Move URLCase back out of the test module, otherwise loadTestFromModule
attempts to load it in the usual manner (~URLCase('runTest')). Which does not
work at all, because that's not what URLCase is for.

URLCase extends TestCase to benefit from the TestCase.run infrastructure
(running tests, filling result object, etc...)

9156. By Thibault Delavallée (OpenERP) on 2014-02-18

[MERGE] [IMP] point of sale: usability: label typos + help in menus

9157. By Thibault Delavallée (OpenERP) on 2014-02-18

[MERGE] [IMP] website: server action: add a widget url in the form view on the website_url field.
Seems quite logical.

9158. By Thibault Delavallée (OpenERP) on 2014-02-18

[MERGE] [IMP] hr: broadcast the welcome message only for new employee coming
from the recruitment, not all created employees.
Before this merge, every created employee was broadcasted to all existing users
of the same company. However when creating a batch of employees, for example
when configuring an new openerp instance, this was creating a lot of noise
in the inboxes.
Now, only recruited employee have a welcome message.

9159. By van der Essen Frédéric (OpenERP) on 2014-02-18

[MERGE] hw_proxy: posbox documentation

9160. By Launchpad Translations on behalf of openerp on 2014-02-19

Launchpad automatic translations update.

9161. By Xavier (Open ERP) on 2014-02-18

[IMP] remove pointless semicolons, use @expectedFailure instead of commenting broken test

9162. By Xavier (Open ERP) on 2014-02-18

[FIX] imports, use @expectedFailure, simplify some inject specs

9163. By Thibault Delavallée (OpenERP) on 2014-02-19

[IMP] note: user_id owner field added in model, allowing to tune a bit
the access rules, notably about reading and creation. This allows by the way
to remove the hack about the operation in context when subscribing
users on a document.
The new rules on create and read now include user_id, aka the owner of a note
can always create (default value) and read its notes.
Also removed an unnecessary field (current_partner_id), as it was buggy and
unnecessary; view udpated accordingly.

[IMP] mail: removed a hack introduced in saas-3 with the current orm operation
in context to by-pass some access rules when subscribing someone on a document.

9164. By Xavier (Open ERP) on 2014-02-19

[FIX] typo method name

9165. By Xavier (Open ERP) on 2014-02-19

[REM] broken and PITA test_02_public_login_logout

* / fails to load, it turns out Tour is undefined because unlogged home does
  not load bootstrap-tour

* after injecting bootstrap-tour, redirects to /login (to log in), tries to
  inject tour again except this time ``openerp.website`` is completely empty
  (although it is present on the page), no idea why.

removed test because whatever, if enable-test-fix-tour is ever rewritten and
fixed it may reappear.

9166. By Xavier (Open ERP) on 2014-02-19

[FIX] re-enable website_sale tests because they pass so whatever

9167. By Launchpad Translations on behalf of openerp on 2014-02-20

Launchpad automatic translations update.

9168. By Christophe Simonis (OpenERP) on 2014-02-20

[MERGE] forward port of branch saas-2 up to revid 9195 <email address hidden>

9169. By Christophe Simonis (OpenERP) on 2014-02-20

[FIX] mail: fix IndentationError introduced in last commit

9170. By Launchpad Translations on behalf of openerp on 2014-02-21

Launchpad automatic translations update.

9171. By Christophe Simonis (OpenERP) on 2014-02-21

[FIX] website: bootstrap is now in web module

9172. By Thibault Delavallée (OpenERP) on 2014-02-21

[FIX] mail: fixed regression caused by forward-porting saas-3: re-removed
the hack in mail_thread about subscription in create mode.

9173. By Thibault Delavallée (OpenERP) on 2014-02-21

[CLEAN] gamification: removed .moved folder, added when forward porting
saas-3 into trunk.

9174. By Thibault Delavallée (OpenERP) on 2014-02-21

[MERGE] [IMP] mail: subtype: order by application + allow to hide technical subtypes + updated addons subtypes

- mail.message.subtype:
-- added sequence field, used to order subtypes when displaying them
-- added hidden field, used to hide some subtypes. Subtypes like 'Task Created' or 'Issue Created' are not necessary on a task or issue, but useful on the project form view. Indeed by following the task created subtype on the project, the user is notified of new tasks. However on the task itself it makes no sense to be able to follow task created. This subtype has to exist due to the technical implementation, but should be hidden in the followers widget of the task.
- mail: updated followers widget accordingly, and display subtypes by application with a visual border to separate them

- project, crm, sale_crm: updated hidden and sequence of subtypes

9175. By Launchpad Translations on behalf of openerp on 2014-02-22

Launchpad automatic translations update.

9176. By Launchpad Translations on behalf of openerp on 2014-02-23

Launchpad automatic translations update.

9177. By Fabien (Open ERP) on 2014-02-24

[IMP] Allow to press select where you want the new line

9178. By Fabien (Open ERP) on 2014-02-24

[IMP] 3 cols to respect icon and make it easier for new users to start with

9179. By van der Essen Frédéric (OpenERP) on 2014-02-24

[FIXME] deactivated failed tests to make the runbot green again

9180. By van der Essen Frédéric (OpenERP) on 2014-02-24

[MERGE] hw_proxy: improvements to the posbox documentation

9181. By Fabien Meghazi (OpenERP) on 2014-02-25

[IMP] Rename request.httprequest.session -> request.session

9182. By Fabien Meghazi (OpenERP) on 2014-02-26

[IMP] Improvement/changes to the http request/response API.

- Get rid of LazyResponses
- Made website.render() an alias to request.render() [just kept in case this is merged in saas-3 but should be removed completely in favor of request.render()]

Need server/trunk's rev#5102

9183. By Fabien (Open ERP) on 2014-02-27

[IMP] Event Security Fix + Publish Track

9184. By Fabien Meghazi (OpenERP) on 2014-02-27

[IMP] seperation of auth_signup's reset password and signup routes

9185. By Fabien Meghazi (OpenERP) on 2014-02-27

[FIX] ensure_db() on inherited /web/login controllers

9186. By sle-openerp on 2014-02-27

[MERGE] Report module: reporting using the QWeb rendering engine. Sale, purchase, mrp and mrp_repair reports are converted.

9187. By Launchpad Translations on behalf of openerp on 2014-03-04

Launchpad automatic translations update.

9188. By Xavier (Open ERP) on 2014-03-04

[ADD] deduplication of website images being uploaded

There is a deduplication in ir.attachment, but it's only for FS-stored content
*and* it only deduplicates storage not models (as there are access rights
issues involved).

The goal here is to always return the same attachment when a user uploads the
exact same image multiple times (because it's simpler or whatever).

Initially tried to use a binary field & digest(), but search() blows up
because it tries to utf-8 encode raw binary data. So use char & hexdigest
instead.

_compute_checksum returns None if the provided attachment data does not look
like a website image attachment.

Unhandled: multiple existing matches, maybe a UNIQUE constraint on the
checksum field would be a good idea just in case.

cherrypicked from saas-3's <email address hidden>
which had to be backed out (as the patch adds a new stored field)

9189. By Thibault Delavallée (OpenERP) on 2014-03-04

[MERGE] [ADD] crm_project_issue module: create issues from leads.
This bridge and optional module add a button on the lead form view to
allow users to create issues from leads. The lead is distroyed during
the operation. All communication history is kept and transferred to the
new issue.

9190. By Thibault Delavallée (OpenERP) on 2014-03-05

[MERGE] [IMP] mail: added message_last_update field. This field is a datetime field, updated everytime message_post in called. This allows to build filters, search or actions based on the last message date, for reporting for example.

Weekly groupbys have been added in project_issue and crm, for leads and opportunities.

9191. By Launchpad Translations on behalf of openerp on 2014-03-06

Launchpad automatic translations update.

9192. By Antony Lesuisse (OpenERP) on 2014-03-07

[IMP] report form view move inherited view, restore and refactor test case (kept commented atm) from non merged branch qweb-report

9193. By Antony Lesuisse (OpenERP) on 2014-03-07

[IMP] report, form view hide paperformat when not needed

9194. By Launchpad Translations on behalf of openerp on 2014-03-07

Launchpad automatic translations update.

9195. By Xavier (Open ERP) on 2014-03-10

[FIX] don't fail installation entirely if pyPdf isn't available

should print an error message though

9196. By Fabien Meghazi (OpenERP) on 2014-03-10

[FIX] Properly redirect in case of invalid url slugs

Use werkzeug's api instead of doing hackish url replacement

9197. By Christophe Simonis (OpenERP) on 2014-03-11

[MERGE] forward port of branch saas-3 up to revid 9298 <email address hidden>

9198. By sle-openerp on 2014-03-11

[MERGE][FIX] Download of a report was broken because of a slash at the end of the route used by 'get_file'

9199. By jke-openerp on 2014-03-12

[FIX] Uncomment tests which fail

9200. By Christophe Matthieu (OpenERP) on 2014-03-12

[IMP] website_crm: contact form improvement
get argument are processed and set into input fields + hidden fields
save some datas from http headers
controller should save all the submitted vars

9201. By Xavier (Open ERP) on 2014-03-12

[FIX] sprurious widgetification and editability of icon elements

* tighten widget match: don't match elements with .fa which are also "view
  section" roots (~ editing hosts) as the classes themselves out not be
  editable and the result will thus be odd
* correspondingly, only associate the icon "change" button to instances of the
  ``icons`` widget, other elements bearing ``.fa`` are not editable and should
  be excluded.

9202. By Fabien Meghazi (OpenERP) on 2014-03-12

[FIX] website#ir.http: do not postprocess arguments on non `website_enabled` endpoints

9203. By Antony Lesuisse (OpenERP) on 2014-03-12

[MERGE] db dump/restore new zip based file format

9204. By Launchpad Translations on behalf of openerp on 2014-03-13

Launchpad automatic translations update.

9205. By Xavier (Open ERP) on 2014-03-13

[IMP] don't allow HTML formatting in non-HTML fields

9206. By Xavier (Open ERP) on 2014-03-13

[IMP] context-sensitivity of toolbar commands (kinda, attempted)

9207. By Xavier (Open ERP) on 2014-03-13

[FIX] CSS of link style pane

9208. By jke-openerp on 2014-03-13

[IMP] Calendar - Add redirect to calendar module after the install of it

9209. By Christophe Matthieu (OpenERP) on 2014-03-13

[IMP] website snippet: remove data-snippet-id and use only jquery selectors. Snippets became only dom item and options is transversal. Create dynamic snippet

9210. By Christophe Matthieu (OpenERP) on 2014-03-13

[FIX] website_sale,website_event: can't create product and event. Why: controller and route are strict mode, remove / at the end of the route

9211. By jke-openerp on 2014-03-13

[FIX] Revert commit 9208 - Calendar is a module auto install. So we dont need to redirect

9212. By Fabien (Open ERP) on 2014-03-13

[IMP] Subscribe data

9213. By Launchpad Translations on behalf of openerp on 2014-03-14

Launchpad automatic translations update.

9214. By Christophe Matthieu (OpenERP) on 2014-03-14

[MERGE] website: add optional 'action' in managment edit button to laod one specific backend view

9215. By Christophe Matthieu (OpenERP) on 2014-03-14

[FIX] website: can't see edit button because css with overflow hidden for all tag. Aplly css only on carousel, paralax and blockquote

9216. By Launchpad Translations on behalf of openerp on 2014-03-15

Launchpad automatic translations update.

9217. By Launchpad Translations on behalf of openerp on 2014-03-16

Launchpad automatic translations update.

9218. By Fabien (Open ERP) on 2014-03-16

[MERGE] Mailing List Archives for Website

9219. By Antony Lesuisse (OpenERP) on 2014-03-16

[FIX] website tests crawler, admin password != super admin password

9220. By Antony Lesuisse (OpenERP) on 2014-03-16

[FIX] website test, remove useless test, waitfor banner fix

9221. By Antony Lesuisse (OpenERP) on 2014-03-16

[FIX] website tour, prepare for manual injection
- reorder website.js in a choerent way
- remove injectable website.tour.test.js

We will do injection manually using website.inject_tour, in the mean time only
non injection test are supported, fully disable test needing inject, until fme
merge its fix.

9222. By Antony Lesuisse (OpenERP) on 2014-03-16

[FIX] website_mail_group remove demo from manifest

9223. By Antony Lesuisse (OpenERP) on 2014-03-16

[FIX] website_sale disabling tests while i rewrite Tour

9224. By Launchpad Translations on behalf of openerp on 2014-03-17

Launchpad automatic translations update.

9225. By Christophe Matthieu (OpenERP) on 2014-03-17

[FIX] website tour: create a stub for bootstrap tour in automatic/test mode (need for full test and hide real bug for tour test)

9226. By Xavier (Open ERP) on 2014-03-17

[ADD] support for presized fields in website/image

also add presized field to attachments (automatically computed from datas)

9227. By Christophe Matthieu (OpenERP) on 2014-03-17

[FIX] website: typo: message let the user think that he can change the mobile view while he cannot

9228. By Christophe Matthieu (OpenERP) on 2014-03-17

[FIX] website: readability block with container css

9229. By Xavier (Open ERP) on 2014-03-17

[FIX] inject WORD JOINER inside p so they don't seemingly disappear after saving

9230. By Christophe Matthieu (OpenERP) on 2014-03-17

[FIX] website tour: typo for banner (from usertest feedback)

9231. By Xavier (Open ERP) on 2014-03-17

[FIX] reduce span of paragraph spacer thing to not break layout

9232. By Christophe Matthieu (OpenERP) on 2014-03-17

[FIX] website: The user does not see the content menu because of the tutorial is hover

9233. By Christophe Matthieu (OpenERP) on 2014-03-17

[FIX] website_sale: display empty message for public user and allow admin to edit 'no product found' message

9234. By Christophe Matthieu (OpenERP) on 2014-03-17

[IMP] website snippet: add onblur, onfocus, onremove, onclone method on snippet options. Change data-class into data-value for designer comprehention; fix slider unique id

9235. By Xavier (Open ERP) on 2014-03-17

[FIX] website: set inherit_branding in test contexts to trigger generation of relevant edition attributes

9236. By Christophe Matthieu (OpenERP) on 2014-03-18

[IMP] website: snippet editor: change size automatic button into a cross between resize handler

9237. By Christophe Simonis (OpenERP) on 2014-03-18

[MERGE] forward port of branch saas-3 up to revid 9328 <email address hidden>

9238. By Launchpad Translations on behalf of openerp on 2014-03-19

Launchpad automatic translations update.

9239. By Thibault Delavallée (OpenERP) on 2014-03-19

[FIX] [IMP] website_mail: improved and fixed the 'subscribe button'.
This button is used to perform a 'message_subscribe' or 'message_unsubscribe' on some
documents. It is notably used to add a 'Subscribe' button in some pages that subscribe
the user to a mailing list (aka mail.group).
This branch fixes some subscribe/unsubscribe issues, better manages the public user,
use the session to remember whether a public user has subscribe to a mailing list,
and uses already-existing code to manage partners.

9240. By Thibault Delavallée (OpenERP) on 2014-03-19

[MERGE] [FIX] Merged branch holding some fixes for the newly
(badly ?) introduced module website_mail_group: subscribe / unsubscribe now working,
pager now working. Some redesign will probably land in trunk if we have time
as the current layout is not very efficient.

9241. By Antony Lesuisse (OpenERP) on 2014-03-20

[FIX] account invoice analysis exclude proforma from invoiced

9242. By Denis Ledoux (OpenERP) on 2014-03-20

[ADD] crm: mass convert lead to opp, add force assignation checkbox, to force the salesman/salesteam on converted/merged lead/opps or leave the existing salesman/salesteam

9243. By Denis Ledoux (OpenERP) on 2014-03-20

[FIX] crm: round robin tests on salesman assignation set force assignation true

9244. By Christophe Simonis (OpenERP) on 2014-03-24

[MERGE] forward port of branch saas-3 up to revid 9345 <email address hidden>

9245. By Christophe Matthieu (OpenERP) on 2014-03-24

[IMP] website: Building block / Snippet Editor
Add documentation and clean framework
The building blocks appear in the edit bar website. These prebuilt html block allowing the designer to easily generate content on a page (drag and drop).
Options allow snippets to add customizations party html code according to their selector (jQuery) and javascript object.

9246. By Denis Ledoux (OpenERP) on 2014-03-24

[REF] *: share field is now a computed field, if the user is in the employee group or not

9247. By Christophe Matthieu (OpenERP) on 2014-03-24

[FIX] website: snippet editor: forward port of branch saas-3

9248. By Denis Ledoux (OpenERP) on 2014-03-24

[MERGE] Forward-port of latest saas-3 bugfixes, up to rev. 9347 revid:<email address hidden>

9249. By sle-openerp on 2014-03-24

[MERGE][REF] Report module: Moved methods generating pdf/html from Controller to Model in order to be able to print without request (report controllers still exist but are now just interfaces to these methods) ; adapted account_vat report this way

9250. By Fabien Meghazi (OpenERP) on 2014-03-25

[FIX] Fix url slug check bug in multilang=True

9251. By Christophe Matthieu (OpenERP) on 2014-03-25

[FIX] website: fix and activate frontend test

9252. By Thibault Delavallée (OpenERP) on 2014-03-26

[MERGE] [CLEAN] website_mail: clean merging of trunk-archive (revid <email address hidden>) introducing Mailing List Archives. Featuring :
- uses already-existing template for subscription instead of copy-and-pasting the subscription button code;
- fixes several issues in the layout to ease the reading;
- fixes the broken pager;
- adds the Archives nav that was planned but not really usable

9253. By Antony Lesuisse (OpenERP) on 2014-03-26

[REM] move document_webdav to openerp-extra

9254. By Antony Lesuisse (OpenERP) on 2014-03-26

[REM] move document_ftp to openerp-extra

9255. By van der Essen Frédéric (OpenERP) on 2014-03-26

[MERGE] point_of_sale & posbox: new posbox homepage, posbox software upgrade system, printing xml based receipt

9256. By Launchpad Translations on behalf of openerp on 2014-03-27

Launchpad automatic translations update.

9257. By Christophe Matthieu (OpenERP) on 2014-03-27

[IMP] website_event: widget to promote Events with country flag

9258. By Christophe Matthieu (OpenERP) on 2014-03-27

[FIX] website_event: import GeoIP if GeoIP is not installed

9259. By Christophe Matthieu (OpenERP) on 2014-03-27

[FIX] website_event: return empty string in Local Events snippet if GeoIP is not installed

9260. By Fabien Meghazi (OpenERP) on 2014-03-27

[MERGE] remote module import

9261. By Launchpad Translations on behalf of openerp on 2014-03-28

Launchpad automatic translations update.

9262. By van der Essen Frédéric (OpenERP) on 2014-03-28

[MERGE] point_of_sale, hw_escpos: fixes from the pos-restaurant branch

9263. By van der Essen Frédéric (OpenERP) on 2014-03-28

[FIX] hw_posbox_upgrade: posbox restart was not working

9264. By Fabien (Open ERP) on 2014-03-29

[IMP] flat design, even for darken

9265. By Fabien (Open ERP) on 2014-03-29

[IMP] better button snippet

9266. By Fabien (Open ERP) on 2014-03-29

[IMP] bootstrap less sources

9267. By Fabien (Open ERP) on 2014-03-30

[IMP] removing glyphicons from bootstrap less

9268. By Fabien (Open ERP) on 2014-03-30

[REM] remove duplicate snippet: portfolio - image gallery

9269. By Fabien (Open ERP) on 2014-03-31

[REM] removed bootstrap sources

9270. By Christophe Matthieu (OpenERP) on 2014-03-31

[FIX] website: create new page redirect to error 404

9271. By Christophe Matthieu (OpenERP) on 2014-03-31

[FIX] website_blog: order of blog_post must be by create_date

9272. By Christophe Matthieu (OpenERP) on 2014-03-31

[FIX] website_blog: remove create_date from demo data

9273. By Launchpad Translations on behalf of openerp on 2014-04-01

Launchpad automatic translations update.

9274. By Quentin (OpenERP) <email address hidden> on 2014-04-01

[MERGE] website_gengo branch merged, offering the possiblity to translate the website using Gengo

9275. By Fabien Meghazi (OpenERP) on 2014-04-01

[ADD] website: template reset confirmation

9276. By Thibault Delavallée (OpenERP) on 2014-04-01

[MERGE] [IMP] website_blog: use a helper to generate the various URLs of blogs (using date, tags, blog, post, ...) + updated templates accordingly. This branch also fixes numerous bugs with URLs, notably Archives URLs that were completely buggy.

Also fixed strangely coded domain generation in blog route.

9277. By Denis Ledoux (OpenERP) on 2014-04-01

[FIX] account_analytic_analysis, analytic, hr_timesheet: do not override existing data of analytic account on template on_change

9278. By Denis Ledoux (OpenERP) on 2014-04-01

[FIX] project, project_issue: overwritten method on_change template, wrong signature, following commit 9277 revid:<email address hidden>

9279. By Fabien (Open ERP) on 2014-04-01

[IMP] kanban view for ir.attachments

9280. By Fabien (Open ERP) on 2014-04-01

[IMP] kanban of documents for recruitement attachments

9281. By Fabien (Open ERP) on 2014-04-03

[IMP] Tracks: alphabetic order

9282. By Martin Trigaux (OpenERP) on 2014-04-04

[MERGE] [IMP] event: store number of seat used to avoid unnecessary computations (performance improvement)

9283. By Thibault Delavallée (OpenERP) on 2014-04-04

[MERGE] [IMP] payment modules: added provider selection field that is different from the name. This allows to distinguish name and provider. Provider is a more technical field, used to call some specific methods (<provider>_method_name). The name field is used for display on the website.

Added name on payment.transaction views.

Added sale_order_id field on transaction form view; the field is already present and used but was not displayed.

Transfer is now called Wire Transfer.

Code and views udpated accordingly.

9284. By Launchpad Translations on behalf of openerp on 2014-04-05

Launchpad automatic translations update.

9285. By Fabien (Open ERP) on 2014-04-06

[IMP] button snippet

9286. By Quentin (OpenERP) <email address hidden> on 2014-04-03

[FIX] base_gengo: don't wait another cron job execution to ask translation for the next n words

9287. By Christophe Simonis (OpenERP) on 2014-04-07

[MERGE] forward port of branch saas-3 up to revid 9380 <email address hidden>

9288. By Quentin (OpenERP) <email address hidden> on 2014-04-07

[FIX] base_gengo: don't skipp terms in gengo communication because of their state may have changed in the meanwhile (so using offset+limit in a serach at each loop is not a good idea)

9289. By Launchpad Translations on behalf of openerp on 2014-04-08

Launchpad automatic translations update.

9290. By Géry Debongnie on 2014-04-08

[FIX] fixes an incorrect call to read_group (addon gamification)

9291. By sle-openerp on 2014-04-08

[MERGE][IMP] Account* reports converted to qweb; Added sale_layout module allowing to customize sale order and invoice; some refactoring on report module

9292. By Martin Trigaux (OpenERP) on 2014-04-04

[IMP] event: add trigger field for stored seats_* fields and remove print

9293. By Thibault Delavallée (OpenERP) on 2014-04-09

[MERGE] [IMP] mail: followers widget: Follow button + subtypes are now displayed
like a button + a dropdown selection for subtypes, reducing the place this widget
takes in the form view.

9294. By Thibault Delavallée (OpenERP) on 2014-04-09

[IMP] mail: jump to the Messaging menu after installation

9295. By Fabien (Open ERP) on 2014-04-09

[IMP] track translatable

9296. By Thibault Delavallée (OpenERP) on 2014-04-09

[MERGE] [IMP] website_blog: layout and usability improvements. This task proposes a better layout that eases the reading + smooth transitions between blogs based on suggestions dynamically chosen based on a ranking.

Featuring :
- blog: blog now have a subtitle field
- blog_post: blog post now have a subtitle field, removed shortened content + website_published_datetime (create_date and write_date are sufficient). Added tracking of visits + ranking computation, to select the next post the user will see. Added background-image, that is used to display a cover behind the post title and subtitle. Overall display improvement.
- added new feature that allows a user to tweet selected text on twitter from post.
- added new feature that allows a user to discuss on every paragraph (anonymous user have to give their name and email)
- better blog demo data

Misc:
- website: removed dead code about website_published_datetime that could have been generic but has never been used
- [FIX] website: fixed image controller, do not attempt to read website_published on models that do not have that field

9297. By Christophe Matthieu (OpenERP) on 2014-04-09

[TYPO] website: tour for banner

9298. By Christophe Matthieu (OpenERP) on 2014-04-09

[FIX] website: Default Url not correct for the button 'contact us' in the block features>Button

9299. By Christophe Matthieu (OpenERP) on 2014-04-09

[FIX] website: The separator block is not working (no drop zone)

9300. By Raphael Collet (OpenERP) on 2014-04-09

[MERGE] test_cursor: adapt code to small api changes in registry for handling http tests

9301. By Martin Trigaux (OpenERP) on 2014-04-09

[IMP] lunch: add security rules, it's rude to look at other people's food

9302. By Christophe Matthieu (OpenERP) on 2014-04-09

[IMP] website: create a media snippet editor who merge image dialog, font awesome, video youtube...

9303. By Fabien (Open ERP) on 2014-04-09

[IMP] Event Agenda: merge with cleaning

9304. By Fabien (Open ERP) on 2014-04-09

[IMP] track duration in hours

9305. By Fabien (Open ERP) on 2014-04-09

[IMP] Gengo translation cron every 6 hours

9306. By Fabien (Open ERP) on 2014-04-09

[IMP] Gengo Fixes

9307. By Fabien (Open ERP) on 2014-04-09

[IMP] grouping jobs together

9308. By Fabien (Open ERP) on 2014-04-09

[IMP] gengo fix in callback

9309. By Géry Debongnie on 2014-04-10

[MERGE] readgroup signature has changed, so addons inheriting and modifying read_group need to be changed to make sure they call their parent's read_group with the correct signature

9310. By Fabien (Open ERP) on 2014-04-10

[IMP] evnet

9311. By Christophe Simonis (OpenERP) on 2014-04-10

[MERGE] forward port of branch saas-3 up to revid 9394 <email address hidden>

9312. By Raphael Collet (OpenERP) on 2014-04-10

[FIX] event_sale: fix non-closing tags in xml file

9313. By Olivier Dony (Odoo) on 2014-04-10

[FIX] website: avoid discarding snippet animator after edit + properly restart animation while disabling clicks

9314. By Mahendra Barad(OpenERP) on 2014-04-10

[MERGE] [ADD] website_twitter: add twitter scroller snippet

9315. By Olivier Dony (Odoo) on 2014-04-11

[MERGE] sale_order_dates: several improvements to usability and planned date computing, courtesy of Lionel Sausin (Numerigraphe)

9316. By van der Essen Frédéric (OpenERP) on 2014-04-11

[MERGE] posbox : regression fix, made it easier to add support for new printers

9317. By Fabien (Open ERP) on 2014-04-11

[IMP] Larger texts

9318. By Richard Mathot (Odoo, formerly OpenERP) on 2014-04-11

[MERGE][IMP] Large refactoring of "survey" module
- surveys are now displayed through website
- new reporting tool
- model refactoring
- usability improvements
(affects also hr_evaluation and hr_recruitment, that use surveys)

9319. By Cedric Snauwaert (OpenERP) on 2014-04-11

[MERGE]change modal windows to only use bootstrap3

9320. By Thibault Delavallée (OpenERP) on 2014-04-11

[FIX] gamification: allow having False or 0 values as result of a computation.

9321. By Thibault Delavallée (OpenERP) on 2014-04-11

[FIX] mail: avoid crashing message_post if the subtype does not exists anymore.
Using xmlid_to_res_id, subtype_id will be False if not found.

9322. By Thibault Delavallée (OpenERP) on 2014-04-11

[FIX] mail: res_users post: fixed partner_ids computation, could receive
a list of ids, or a list of commands. Both cases should be taken into account.

9323. By Martin Trigaux (OpenERP) on 2014-04-11

[MERGE] gamification: add batch mode, improve some views, remove inprogess_update state and "realtime" (using cron) badge to recieve badges without needing to close the challenge

9324. By Thibault Delavallée (OpenERP) on 2014-04-11

[ADD] New module: website_forum, a clone of askbot / stackoverflow.

This module models a forum: questions, answers, voting and comment system, karma
management. There is a link with gamification, allowing to use badges and reward
users for their participation to the forum.

Badges are temporarily commented out to ease the module beta-testing without having
to wait for some gamification improvements.

This merge also contains some fixes in access rights for gamification.

9325. By Launchpad Translations on behalf of openerp on 2014-04-12

Launchpad automatic translations update.

9326. By Christophe Matthieu (OpenERP) on 2014-04-14

[FIX] website: media editor: when the user save the picture, the dialog box re-open automatically. Do not re-active snippet when we save a field image

9327. By Richard Mathot (Odoo, formerly OpenERP) on 2014-04-14

[MERGE][IMP] crm/sale_crm: Terminology
Replacement of the term "category" by "tag", for the sake of consistency

9328. By Richard Mathot (Odoo, formerly OpenERP) on 2014-04-14

[MERGE][IMP] invoice/sale: Terminology uniformisation

9329. By Fabien (Open ERP) on 2014-04-14

[IMP] Ticket types translateable

9330. By Fabien (Open ERP) on 2014-04-14

[IMP] translateable event description

9331. By Richard Mathot (Odoo, formerly OpenERP) on 2014-04-14

[MERGE][IMP] hr_timesheet: add a menu to configure Timesheet Accounts under HR/Configuration

9332. By Richard Mathot (Odoo, formerly OpenERP) on 2014-04-14

[MERGE][IMP] hr_timesheet: Quick create of contract (on timesheet) does not open contract edit window anymore

9333. By Richard Mathot (Odoo, formerly OpenERP) on 2014-04-14

[REF] hr_timesheet: unused piece of code

9334. By Fabien (Open ERP) on 2014-04-14

[REM] removing unused and non clean modules

9335. By jke-openerp on 2014-04-14

[FIX] wesbite: banner - remove css and use bootstrap for positionning. Now hidden-xs works, we don't lost 50% of width

9336. By jke-openerp on 2014-04-14

[FIX] Website_mail - Add selectors to allow drag and drop of snippet in email template

9337. By Richard Mathot (Odoo, formerly OpenERP) on 2014-04-14

[MERGE][FIX] Mobile preview of blogs

9338. By Raphael Collet (OpenERP) on 2014-04-14

[FIX] calendar: fix string quoting mess in email template

9339. By jke-openerp on 2014-04-15

[FIX] Website tour - Click inside the zone before to insert sampleText

9340. By jke-openerp on 2014-04-15

[FIX] Website banner tour - Fix test according to new banner structure

9341. By jke-openerp on 2014-04-15

[FIX] mail template view - Set body_html field as simple text area without cke by default. Else, the mako code are considered as mal formatted and moved.

9342. By Christophe Simonis (OpenERP) on 2014-04-15

[MERGE] forward port of branch saas-3 up to revid 9409 <email address hidden>

9343. By Martin Trigaux (OpenERP) on 2014-04-15

[IMP] gamification and website_forum improvements

gamification:
- fix batch mode when grouping by id
- fix subquery in batch mode when a ending date is set
- serialisation method can exclude categories of challenge
- view improvements

website_forum:
- enabling bages in batch mode
- fix karma computation when creating a new post
- changing previous vote affects the user karma
- do not display forum challenges on user home page

9344. By jke-openerp on 2014-04-16

[MERGE] Allow to use many2one for qweb template (work also with view_id)

9345. By Thibault Delavallée (OpenERP) on 2014-04-16

[MERGE] [REF] mass_mailing refactoring. Mass mailing is refactored to be easier to use, introducing an easy-to-use way of handling recipients, mailing lists and statistics. This branch comes with a web branch that introduce the char_domain widget, that is a widget on a char field holding a domain. It allows to select and count records without having to deal with the complexity of domains.

This branch comes with a cleaning of marketing modules :
- marketing now holds only the basic stuff for marketing related modules: mainly marketing settings + menu definition
- marketing_crm new module is a bridge between crm and marketing and holds the crm-related stuff previously present in marketing module.

This branch also holds some mail and template improvement in order to speedup the mass mailing process. The template edition in website_mail has also be improved. It is now a page that allows to edit email-like content (content with a subject, an email_from and a body), like templates, emails or mass mailing.

Misc :
- mail_compose_message: removed unnecessary fields coming from the template (partner_to, ...) because they are confusing -> composer should be easier to understand and use; also cleaned method generating the email values in the composer that was splitted in two methods
- fixed removed double body computation when using templates (one for template, then the wizard -> not necessary)
- mail_message: record_name is not a function field anymore, but a char field + a method in create, allowing to speedup mass mailing by avoiding browsing all records to get their name

9346. By Thibault Delavallée (OpenERP) on 2014-04-16

[IMP] payment: renamed env field to environment, to avoid conflicts
with the incoming new API.

9347. By Christophe Matthieu (OpenERP) on 2014-04-16

[IMP] website_crm: designer can add input type file in form view. All files create an ir.attachment linked with the created lead

9348. By sle-openerp on 2014-04-16

[MERGE] hr* reports converted to QWeb

9349. By sle-openerp on 2014-04-16

[FIX] website_report: added transfo.js

9350. By Denis Ledoux (OpenERP) on 2014-04-16

[ADD] *: replace overriden methods get_formview_action by get_formview_id

Methods to override to specify the view/action to launch for many2one links
get_formview_action use get_formview_id to find the view to open. Therefore, it is simplier to override get_formview_id to tell which view should be opened

9351. By Cedric Snauwaert (OpenERP) on 2014-04-16

[FIX]modal: missing new object instanciation in dashboard

9352. By Richard Mathot (Odoo, formerly OpenERP) on 2014-04-16

[MERGE][IMP] survey: basic usability for quiz mode

Users with Technical Featurs are now able to enable a "quiz mode" on surveys:
- questions with simple and multiple choice can be autocorrected
- an answer with positive mark is considered as correct
- users that finish a survey can see a detailed correction with correct answers and their scores
- other questions types can be manually rated by a human corrector

9353. By Christophe Simonis (OpenERP) on 2014-04-16

[MERGE] {gamification,gamification_sale_crm,website_forum}: Removing the field autojoin_group_id to replace the subscription by a domain

9354. By Christophe Simonis (OpenERP) on 2014-04-16

[FIX] hr*: must depend on "report" module

9355. By Thibault Delavallée (OpenERP) on 2014-04-17

[MERGE] [IMP] Hide the group 'Manage resources planning on gantt view' from project settings

9356. By Richard Mathot (Odoo, formerly OpenERP) on 2014-04-17

[MERGE][FIX] sale: disallow line creation on confirmed sales orders

[patch by Divyesh Makwana (OpenERP)]

9357. By Amit Vora(OpenERP) on 2014-04-17

[MERGE] [IMP] mail: Inbox usability improvements :
- notficiation_email_send field, renamed into notify_email, has now 2 values: always or never, in
order to ease the choice and simplify options.
- inbox: removed 'compose a new messages or write to my followers', because those 2 options are
already available. The first one is accessible using the top-right email icon, the second one
is accessible with the 'write to my followers' text box alread present in the inbox.

9358. By Darshan Kalola(OpenERP) on 2014-04-17

[MERGE] [IMP] project, hr_recruitment: fixed access rights on stages.
Projec/Recruitment Users can now just read columns; managers can edit and unlink them.
With the server and web branch, this allows to restrict the actions the user can perform
on columns according to its access rights.

9359. By Cedric Snauwaert (OpenERP) on 2014-04-17

[MERGE]tooltip: replace tipsy by bootstrap tooltip

9360. By Amit Vora(OpenERP) on 2014-04-17

[MERGE] [IMP] crm: improved call / meeting buttons and behavior on lead and partner form view.
- improved behavior of schedule a meeting, for both opportunities and partner, with correct
attendees and options;
- removed wizard to schedule a cal, jumping to the list view with correct default values
is sufficient;
- scheduled calls is now accessible using a group, accessible through sales configuration;

9361. By Kunal Chavda on 2014-04-17

[MERGE] [IMP] website: tour: nice smooth cool and sexy effect when closing
or ending the tour.

9362. By Fabien (Open ERP) on 2014-04-21

[MERGE] new module: website_forum_doc + small fixes (close) in forum

9363. By Fabien (Open ERP) on 2014-04-21

[IMP] improved form view for posts

9364. By Launchpad Translations on behalf of openerp on 2014-04-22

Launchpad automatic translations update.

9365. By Pooja Zankhariya (OpenERP) on 2014-04-22

[MERGE][IMP] mrp: correct colors for components of manufacturing orders (reflecting their states)

9366. By Richard Mathot (Odoo, formerly OpenERP) on 2014-04-22

[MERGE][IMP] Form views usability (account, delivery, hr_expense, hr_payroll, l10n_fr_rib, lunch, product, purchase_requisition, resource, stock)

9367. By Mansi Kariya(OpenERP) on 2014-04-22

[MERGE][IMP] account_followup: direct link to followups on the Accounting config page

9368. By Bharat Devnani (Open ERP) on 2014-04-22

[MERGE][IMP] More explicit error messages (in delivery, hr_timesheet_sheet, purchase, purchase_requisition, sale_stock, stock)

9369. By DJ Patel (OpenERP) on 2014-04-22

[MERGE] [IMP] Search views: consistency of some filters labels

9370. By Christophe Simonis (OpenERP) on 2014-04-22

[MERGE] forward port of branch saas-4 up to revid 9365 <email address hidden>

9371. By Christophe Simonis (OpenERP) on 2014-04-22

[FIX] website_forum: correct view xml (introduce by previous commit)

9372. By Christophe Matthieu (OpenERP) on 2014-04-23

[FIX] website: snippet editor: speed up save view (construct only option with clean_for_save method); fix carousel arrow

9373. By Géry Debongnie on 2014-04-23

[MERGE] remove double groupbys in columns in two reporting graph views (addons crm/hr_recruitment)

9374. By Thibault Delavallée (OpenERP) on 2014-04-23

[MERGE] [IMP] mail: slightly improved doc links in notification emails (shorter, clearer)

9375. By Christophe Matthieu (OpenERP) on 2014-04-23

[IMP] website_project: remove preprocess_request content; user can the add link with the menu editor

9376. By Launchpad Translations on behalf of openerp on 2014-04-24

Launchpad automatic translations update.

9377. By Jaydeep Barot(OpenERP) on 2014-04-24

[MERGE][IMP] account: allow sorting of journal items

9378. By Antony Lesuisse (OpenERP) on 2014-04-24

[REM] project_gtd deprecated by notes

9379. By Antony Lesuisse (OpenERP) on 2014-04-24

[REM] move auditrail to extra
It's deprecated by _track_fields, mail.message and base_action_rules

9380. By Antony Lesuisse (OpenERP) on 2014-04-24

[REM] move project_long_term to extra

9381. By Antony Lesuisse (OpenERP) on 2014-04-25

[REM] remove portal_project_long_term

9382. By Launchpad Translations on behalf of openerp on 2014-04-27

Launchpad automatic translations update.

9383. By Jaydeep Barot(OpenERP) on 2014-04-28

[MERGE][IMP] account (partner view): hide accounting settings to users that have no accounting access rights

9384. By van der Essen Frédéric (OpenERP) on 2014-04-28

[MERGE] hw_scale: a mettler toledo scale driver for the point of sale

9385. By Jaydeep Barot(OpenERP) on 2014-04-28

[MERGE][IMP]
stock: more explicit error message for product scraping
account/mail: typos

9386. By Richard Mathot (Odoo, formerly OpenERP) on 2014-04-28

[MERGE][IMP] account/account_voucher: new filters and usability minor fixes

9387. By Randhir Mayatra (OpenERP) on 2014-04-28

[MERGE][REM] List views removed in reporting menu (from membership and project_timesheet) as new graph view is now self-sufficient

9388. By Christophe Matthieu (OpenERP) on 2014-04-28

Tour Re-factoring.
Only one tour running; remove bootstrap tour; Simplify creation of tour; can choose test or tutorial mode with run method; can work without qweb and without EditorBar

9389. By Antony Lesuisse (OpenERP) on 2014-04-28

[FIX] base_import remove useless test

9390. By Randhir Mayatra (OpenERP) on 2014-04-29

[MERGE] [REM] Removal of every pre-made dashboard. Only "My Dashboard" has been kept.
Modules descriptions have been updated accordingly and some screenshots have been removed.
(affects: account, crm, event, fleet, hr, hr_evaluation, hr_expense, hr_holidays, hr_recruitment, hr_timesheet_sheet, mrp, procurement, project, purchase, sale, stock)

9391. By van der Essen Frédéric (OpenERP) on 2014-04-29

[MERGE] point_of_sale: make the kg unit precise up to grams, and use the unit's rounding factor on the scale screen

9392. By sle-openerp on 2014-04-29

[MERGE][IMP] hr_timesheet: remove unattainable reports; hr_attendance: replace reports by a graphview

9393. By Darshan Kalola(OpenERP) on 2014-04-29

[MERGE][REM] Removal of "process" module and its avatars in others modules

9394. By Richard Mathot (Odoo, formerly OpenERP) on 2014-04-29

[FIX][REM] hr_timesheet: removed reports mistakenly reintroduced

9395. By sle-openerp on 2014-04-29

[MERGE][IMP] Point of Sales: reports converted to QWeb (but removed useless ones); removed dead code in wizard folder; folder; Adapted /report/download route to serialize and return osv_exception in order to be handled in core.js get_file

9396. By sle-openerp on 2014-04-29

[MERGE][IMP] l10n_* reports converted to QWeb

9397. By Launchpad Translations on behalf of openerp on 2014-04-30

Launchpad automatic translations update.

9398. By Olivier Dony (Odoo) on 2014-04-30

[I18N] remove i18n files for deleted modules after disabled translation templates

9399. By Olivier Dony (Odoo) on 2014-04-30

[IMP] purchase: invoice creation more modular/extensible through the introduction of a _prepare_invoice method()

This is similar to what was previously done for Sales Orders.

9400. By Fabien Meghazi (OpenERP) on 2014-04-30

[MERGE] Web assets moved from manifests to ir.ui.view bundles

9401. By Fabien (Open ERP) on 2014-05-01

[IMP] website images: allow no max_width (default), faster loading if no resize

9402. By Antony Lesuisse (OpenERP) on 2014-05-01

[MERGE] saas-4 up to 9398 <email address hidden>

9403. By Antony Lesuisse (OpenERP) on 2014-05-01

[MERGE] saas-4 report_webkit missing dependency on report

9404. By Fabien (Open ERP) on 2014-05-01

[IMP] Lossless PNG compression. Reduced size by 3 with pngquant

9405. By Antony Lesuisse (OpenERP) on 2014-05-01

[FIX] website controller, correctly resolve last merge about images
fix fp commit to use debian compatible werkzeug api data instead of set_data

9406. By Antony Lesuisse (OpenERP) on 2014-05-01

[FIX] website_event missing javascript asset

9407. By Fabien Meghazi (OpenERP) on 2014-05-01

[FIX] edi, calendar webclient bootstrap

9408. By Géry Debongnie on 2014-05-02

[MERGE] converts buttons in form views into 'stat buttons'

This branch converts pretty much every buttons in 'stat buttons',
which means buttons that can display any kind of information. Right
now, it is mostly used to display a numerical information (such as a
number, for example 9 Calls). Also, look at the invoices button in
Customers form view for an example of a functional field, displaying
the total amount invoiced.

The stat buttons also supports sub widgets, for example a mini pie chart
or a mini bar chart. Examples of such sub widgets can be found in
marketing/mass mailings form views (not ready yet)

9409. By Fabien (Open ERP) on 2014-05-04

[IMP] Certification Template

9410. By Raphael Collet (OpenERP) on 2014-05-05

[FIX] event: move definition of fields track_ids and count_tracks to the right module

9411. By Fabien Meghazi (OpenERP) on 2014-05-05

[IMP] website: load website.xml templates only in editable mode

9412. By Fabien Meghazi (OpenERP) on 2014-05-05

[ADD] base_import_module test module, static asset in backend bundle

9413. By jke-openerp on 2014-05-05

[MERGE] Merge with trunk-cal-V8-jke. - Change field datetime into date or datetime according to that event type is in all day or not...

9414. By Fabien Meghazi (OpenERP) on 2014-05-05

[REM] preprocess_request from website

The method is still there with only a pass statement
Will completetly remove once chm merges his branch

9415. By Launchpad Translations on behalf of openerp on 2014-05-06

Launchpad automatic translations update.

9416. By Fabien Meghazi (OpenERP) on 2014-05-06

[FIX] jQuery.ui - boostrap conflict

9417. By Fabien Meghazi (OpenERP) on 2014-05-06

[REM] Removed addons.web#html_template usage

9418. By Launchpad Translations on behalf of openerp on 2014-05-07

Launchpad automatic translations update.

9419. By Xavier (Open ERP) on 2014-05-07

[IMP] mail: type fixes

* _get_tracked_fields should return a dict even when there's no tracked field
  (return an empty dict)

* in write, only call _get_tracked_fields once, initialize to None instead of
  a list (especially since it should be a dict in the first place)

9420. By Géry Debongnie on 2014-05-07

Large cleanups in addons

The code I merged in my branch stat buttons was sadly not up to our
standing... This branch improves the situation by removing harmful
try/excpet/pass statements, by using search_count when appropriate, by
removing unused one2many fields and by correcting some bugs

9421. By Antony Lesuisse (OpenERP) on 2014-05-07

[MERGE] trunk-websit-al-refactor by chm
- allow fiscal position change on sale orders
- public user on website
- simplify website_sale sale.order and shopping cart code
- remove preprocess_request

9422. By Fabien Meghazi (OpenERP) on 2014-05-07

[REM] QWeb does not self close empty divs anymore

See web Rev#4011

9423. By Christophe Simonis (OpenERP) on 2014-05-07

[MERGE] forward port of branch saas-4 up to revid 9410 <email address hidden>

9424. By Fabien Meghazi (OpenERP) on 2014-05-07

[REM] completetly removed website#preprocess_request()

9425. By Quentin (OpenERP) <email address hidden> on 2014-05-07

[REV] partial revert of revision 9408 <email address hidden> where we wrongly beleive than stock depends on crm_claim... :( That code will probably be back _in the right module_

9426. By Launchpad Translations on behalf of openerp on 2014-05-08

Launchpad automatic translations update.

9427. By Géry Debongnie on 2014-05-08

[MERGE] merge trunk-claimcount-fix-ged

Add the claim_count_out field to its correct place (in addon claim_from_delivery). The field was removed because it was incorrectly added to stock.py instead of the addon claim_from_delivery. (note: it was renamed from claim_count to claim_count_out)

9428. By Quentin (OpenERP) <email address hidden> on 2014-05-08

[MERGE] trunk-wms branch which include a lot of freaking features. Check the diff by yourself :-)

9429. By Mahendra Barad(OpenERP) on 2014-05-08

[MERGE] [IMP] crm, hr_recruitment, project, project_issue: use the newly-introduced widgets for the kanban state and the priority management.

This branch comes with a web branch holding those new widgets for form and kanban views.

9430. By Launchpad Translations on behalf of openerp on 2014-05-09

Launchpad automatic translations update.

9431. By Martin Trigaux (OpenERP) on 2014-05-09

[FIX] product: get_history_price recieves ids instead of a browse record for product template

9432. By Cedric Snauwaert (OpenERP) on 2014-05-09

[FIX]purchase_requisition: put js file in a bundle

9433. By Quentin (OpenERP) <email address hidden> on 2014-05-09

[FIX] claim_from_delivery: fixed error in delivery view

9434. By Jitendra Prajapati(OpenERP) on 2014-05-09

[MERGE] [IMP] mail, report_webkit: view improvements + better name_get for mail and aliases.

9435. By Fabien Meghazi (OpenERP) on 2014-05-09

[FIX] is_multilang_url by checking against werkzeug's routing map using query string too

9436. By Fabien Meghazi (OpenERP) on 2014-05-09

[ADD] alternate hreflang links in head for search engines

cf: https://support.google.com/webmasters/answer/189077?hl=en

9437. By Fabien (Open ERP) on 2014-05-09

[IMP] removing static style

9438. By Fabien (Open ERP) on 2014-05-11

[IMP] clean sitemap, enumerate pages + fixes

9439. By Fabien (Open ERP) on 2014-05-11

[IMP] Sitemap

9440. By Fabien (Open ERP) on 2014-05-11

[IMP] sitemap cleaning: events

9441. By Fabien (Open ERP) on 2014-05-11

[FIX] better handling of '/'. / is the first menu and not the first menu is /. Allows to move the first menu in another position

9442. By Fabien (Open ERP) on 2014-05-11

[FIX] css edit menu alignment and fix of / handling

9443. By Martin Trigaux (OpenERP) on 2014-05-12

Forward-port of latest saas-4, up to revision 9416 (rev-id <email address hidden>)

9444. By Xavier (Open ERP) on 2014-05-12

[IMP] mail docs

* fill-paragraph
* remove sections referring to removed methods with no obvious replacement

9445. By Martin Trigaux (OpenERP) on 2014-05-12

[IMP] gamification: improve the name of some m2m relations

9446. By Xavier (Open ERP) on 2014-05-12

[IMP] mail, base_import: context key disabling history tracking

* added a ``tracking_disable`` context key used by mail to completely disable
  subscriptions setup and events generation during create and write operations
* added import option to optionally set up that context key and speed up
  imports at the cost of not setting up subscriptions and not sending
  create/update events

9447. By Olivier Dony (Odoo) on 2014-05-12

[FIX] mass_mailing,website*,survey: leftover calls to website.get_public_user()

This method was (partially) removed at rev.9421
rev-id <email address hidden>

9448. By Fabien Meghazi (OpenERP) on 2014-05-12

[ADD] website.menu editable list in website config

9449. By Cedric Snauwaert (OpenERP) on 2014-05-12

[FIX]sale_report: change type of field date from date to datetime to match field date on sale_order

9450. By Fabien Meghazi (OpenERP) on 2014-05-12

[FIX] Do not display language choice if multilang=False

9451. By Launchpad Translations on behalf of openerp on 2014-05-13

Launchpad automatic translations update.

9452. By Fabien Meghazi (OpenERP) on 2014-05-13

[IMP] openerpframework moved in common asset bundle

9453. By Thibault Delavallée (OpenERP) on 2014-05-13

[FIX] Re-added code removed by al at rev 9421: website quotation email was not sent anymore.

9454. By Thibault Delavallée (OpenERP) on 2014-05-13

[FIX] document, mail, project: re-add tree view for attachments removed at revision 9279 and 9280
when adding a kanban view for documents.

9455. By Fabien Meghazi (OpenERP) on 2014-05-13

[FIX] broken domain in route

9456. By Launchpad Translations on behalf of openerp on 2014-05-14

Launchpad automatic translations update.

9457. By jke-openerp on 2014-05-14

[IMP] Improve Calendar synchronization

    - Use the new fields from calendar (renamed in 9398.1.7 trunk-cal-v8-jke)
    - Manage some google excpetions about token expiration
    - Manage some google excpetions about token revokation
    - Manage some google excpetions about 410 - Gone from google
    - Detect / Allow user to change the calendar and remove all old reference.
    - Use by default the since_modified for synchronization and not always a full (updatedTime in google)
    - Add some key for ir_parameters :
             'calendar.week_synchro' : number of week to synchornize when we are in full mode
             'calendar.block_synchro_attendee' : need to synchronize the attendees between google and openerp (creation of partner)
             'calendar.block_since_synchro' : Always use the full synchro. (Can be forced in "one time" removing the last synchro from res_users form)
             'calendar.debug_print' : _logger is more verbose
    - Pep 8
    - Change behaviour of do_request to return a tuple with status raquest and response
    - Add field from token and synchro date in res_users view form

9458. By Thibault Delavallée (OpenERP) on 2014-05-14

[MERGE] [MOV] [ADD] sales_team module holding sales team related stuff. The sales team implementation has been taken out of crm, allowing to use the sales team concept without having to depend on the crm module. crm and sale now both depend on sales_team module and add their specific fields to the model. sale_crm module has been simplified by removing sales-team related stuff. The default section id on users is now located in sales_team, not in sale_crm anymore, allowing its use in both crm and sale modules.

9459. By Launchpad Translations on behalf of openerp on 2014-05-15

Launchpad automatic translations update.

9460. By Thibault Delavallée (OpenERP) on 2014-05-15

[MERGE] [IMP] Added a website salesteam, used to handle ecommerce quotations and
contact leads. Also added use_opportunities and use_quotations boolean fields on
sales team, like use_leads to ease the salesteam customization.

Also removed some dead code in website_sale_crm and website_sale_delivery.

9461. By sle-openerp on 2014-05-16

[MERGE][FIX] l10n_fr_hr_payroll: removed useless rml declaration, improvement on report view

9462. By Fabien Meghazi (OpenERP) on 2014-05-19

[IMP] route@multilang default value inverted

The default value is now True for route@website=True controllers
Can be voided using multilang=False

9463. By Amit Dodiya (OpenERP) on 2014-05-22

[IMP] improved code & demo data

9464. By Amit Dodiya (OpenERP) on 2014-05-22

[IMP] improved warning message

9465. By Amit Dodiya (OpenERP) on 2014-05-22

[Fix] Fixed the issue in creation of assets with non-fiscal year

9466. By Chirag Dodiya(OpenERP) on 2014-05-23

[IMP]Improved typo.

9467. By Chirag Dodiya(OpenERP) on 2014-05-23

[IMP]Improved code to set view id in action of report.

9468. By Chirag Dodiya(OpenERP) on 2014-05-26

[IMP]Refactered all code of asset py file.

9469. By Chirag Dodiya(OpenERP) on 2014-05-26

[IMP]Improved code to fix error.

9470. By Chirag Dodiya(OpenERP) on 2014-05-27

[IMP]used currency round method,improved code as par coding convantion.

9471. By Chirag Dodiya(OpenERP) on 2014-05-28

[IMP]Removed date field from crate move,moved sequence object,improved typo.

Unmerged revisions

9471. By Chirag Dodiya(OpenERP) on 2014-05-28

[IMP]Removed date field from crate move,moved sequence object,improved typo.

9470. By Chirag Dodiya(OpenERP) on 2014-05-27

[IMP]used currency round method,improved code as par coding convantion.

9469. By Chirag Dodiya(OpenERP) on 2014-05-26

[IMP]Improved code to fix error.

9468. By Chirag Dodiya(OpenERP) on 2014-05-26

[IMP]Refactered all code of asset py file.

9467. By Chirag Dodiya(OpenERP) on 2014-05-23

[IMP]Improved code to set view id in action of report.

9466. By Chirag Dodiya(OpenERP) on 2014-05-23

[IMP]Improved typo.

9465. By Amit Dodiya (OpenERP) on 2014-05-22

[Fix] Fixed the issue in creation of assets with non-fiscal year

9464. By Amit Dodiya (OpenERP) on 2014-05-22

[IMP] improved warning message

9463. By Amit Dodiya (OpenERP) on 2014-05-22

[IMP] improved code & demo data

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/res_config.py'
2--- account/res_config.py 2014-04-23 11:40:53 +0000
3+++ account/res_config.py 2014-05-28 05:47:51 +0000
4@@ -84,9 +84,11 @@
5 '-This installs the module account_check_writing.'),
6 'module_account_accountant': fields.boolean('Full accounting features: journals, legal statements, chart of accounts, etc.',
7 help="""If you do not check this box, you will be able to do invoicing & payments, but not accounting (Journal Items, Chart of Accounts, ...)"""),
8- 'module_account_asset': fields.boolean('Assets management',
9- help='This allows you to manage the assets owned by a company or a person.\n'
10- 'It keeps track of the depreciation occurred on those assets, and creates account move for those depreciation lines.\n'
11+ 'module_account_asset': fields.boolean('Assets management & Revenue recognition',
12+ help='Asset management: This allows you to manage the assets owned by a company or a person.'
13+ 'It keeps track of the depreciation occurred on those assets, and creates account move for those depreciation lines.\n\n'
14+ 'Revenue recognition: This allows you to manage the Revenue recognition on selling product.'
15+ 'It keeps track of the installment occurred on those revenue recognition, and creates account move for those installment lines.\n'
16 '-This installs the module account_asset. If you do not check this box, you will be able to do invoicing & payments, '
17 'but not accounting (Journal Items, Chart of Accounts, ...)'),
18 'module_account_budget': fields.boolean('Budget management',
19
20=== modified file 'account_asset/__openerp__.py'
21--- account_asset/__openerp__.py 2012-12-06 15:38:56 +0000
22+++ account_asset/__openerp__.py 2014-05-28 05:47:51 +0000
23@@ -20,17 +20,21 @@
24 ##############################################################################
25
26 {
27- 'name': 'Assets Management',
28+ 'name': 'Assets & Revenue Recognitions Management',
29 'version': '1.0',
30 'depends': ['account'],
31 'author': 'OpenERP S.A.',
32 'description': """
33-Financial and accounting asset management.
34+Assets management.
35 ==========================================
36
37-This Module manages the assets owned by a company or an individual. It will keep
38-track of depreciation's occurred on those assets. And it allows to create Move's
39-of the depreciation lines.
40+It allows you to manage the assets owned by a company or a person.
41+It keeps track of the depreciation occurred on those assets, and creates account moves for those depreciation lines.
42+
43+Revenue recognitions.
44+===========================================
45+It allows you to manage the revenue recognition on product's sale.
46+It keeps track of the installments occurred on those revenue recognition, and creates account moves for those installment lines.
47
48 """,
49 'website': 'http://www.openerp.com',
50@@ -41,6 +45,8 @@
51 'test/account_asset_demo.yml',
52 'test/account_asset.yml',
53 'test/account_asset_wizard.yml',
54+ 'test/account_revenue_recognition_demo.yml',
55+ 'test/account_revenue_recognition.yml',
56 ],
57 'data': [
58 'security/account_asset_security.xml',
59
60=== modified file 'account_asset/account_asset.py'
61--- account_asset/account_asset.py 2014-05-07 13:45:44 +0000
62+++ account_asset/account_asset.py 2014-05-28 05:47:51 +0000
63@@ -26,6 +26,7 @@
64 from openerp.osv import fields, osv
65 import openerp.addons.decimal_precision as dp
66 from openerp.tools.translate import _
67+import openerp
68
69 class account_asset_category(osv.osv):
70 _name = 'account.asset.category'
71@@ -34,10 +35,11 @@
72 _columns = {
73 'name': fields.char('Name', size=64, required=True, select=1),
74 'note': fields.text('Note'),
75- 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic account'),
76+ 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),
77 'account_asset_id': fields.many2one('account.account', 'Asset Account', required=True, domain=[('type','=','other')]),
78+ 'account_income_recognition_id': fields.many2one('account.account', 'Recognition Income Account', domain=[('type','=','other')]),
79 'account_depreciation_id': fields.many2one('account.account', 'Depreciation Account', required=True, domain=[('type','=','other')]),
80- 'account_expense_depreciation_id': fields.many2one('account.account', 'Depr. Expense Account', required=True, domain=[('type','=','other')]),
81+ 'account_expense_depreciation_id': fields.many2one('account.account', 'Depr. Expense Account', domain=[('type','=','other')]),
82 'journal_id': fields.many2one('account.journal', 'Journal', required=True),
83 'company_id': fields.many2one('res.company', 'Company', required=True),
84 'method': fields.selection([('linear','Linear'),('degressive','Degressive')], 'Computation Method', required=True, help="Choose the method to use to compute the amount of depreciation lines.\n"\
85@@ -53,6 +55,7 @@
86 'method_end': fields.date('Ending date'),
87 'prorata':fields.boolean('Prorata Temporis', help='Indicates that the first depreciation entry for this asset have to be done from the purchase date instead of the first January'),
88 'open_asset': fields.boolean('Skip Draft State', help="Check this if you want to automatically confirm the assets of this category when created by invoices."),
89+ 'type': fields.selection([('sales','Sale: Revenue Recognition'),('purchase','Purchase: Asset')], 'Type', required=True, select=True),
90 }
91
92 _defaults = {
93@@ -60,8 +63,9 @@
94 'method': 'linear',
95 'method_number': 5,
96 'method_time': 'number',
97- 'method_period': 12,
98 'method_progress_factor': 0.3,
99+ 'type': 'sales',
100+ 'method_period': 1,
101 }
102
103 def onchange_account_asset(self, cr, uid, ids, account_asset_id, context=None):
104@@ -69,16 +73,40 @@
105 if account_asset_id:
106 res['value'] = {'account_depreciation_id': account_asset_id}
107 return res
108+
109+ def onchange_journal_id(self, cr, uid, ids, journal_id, type, context=None):
110+ res = {}
111+ if not journal_id:
112+ return {'value':{}}
113+ journal = self.pool.get('account.journal').browse(cr, uid, journal_id, context=context)
114+ if type == 'sales':
115+ res['value'] = {'account_income_recognition_id': journal.default_credit_account_id.id}
116+ else:
117+ res['value'] = {'account_expense_depreciation_id': journal.default_debit_account_id.id}
118+ return res
119
120+ def onchange_type(self, cr, uid, ids, type, context=None):
121+ res = {}
122+ res['value'] = {'prorata': True,'method_period': 1} if type == 'sales' else {'method_period': 12}
123+ return res
124
125 class account_asset_asset(osv.osv):
126 _name = 'account.asset.asset'
127- _description = 'Asset'
128+ _description = 'Asset/Recognition'
129+ _inherit = ['mail.thread', 'ir.needaction_mixin']
130+
131+ def _get_category_type(self, cr, uid, ids, context=None):
132+ type = self.browse(cr, uid, ids, context=context)[0].category_id.type
133+ res = {'name': 'Installment', 'type': 'Recongnition'} if type == 'sales' else {'name': 'Depreciation', 'type': 'Asset'}
134+ return res
135
136 def unlink(self, cr, uid, ids, context=None):
137- for asset in self.browse(cr, uid, ids, context=context):
138- if asset.account_move_line_ids:
139- raise osv.except_osv(_('Error!'), _('You cannot delete an asset that contains posted depreciation lines.'))
140+ record = self.browse(cr, uid, ids, context=context)[0]
141+ res = self._get_category_type(cr, uid, ids, context=context)
142+ if record.state in ['open', 'close']:
143+ raise osv.except_osv(_('Error!'), _('You cannot delete an %s which is in %s state.') % (res.get('type'), record.state))
144+ if record.account_move_line_ids:
145+ raise osv.except_osv(_('Error!'), _('You cannot delete an %s that contains posted %s lines.') % (res.get('type'), res.get('name')))
146 return super(account_asset_asset, self).unlink(cr, uid, ids, context=context)
147
148 def _get_period(self, cr, uid, context=None):
149@@ -94,11 +122,11 @@
150 @return: Returns a dictionary of the effective dates of the last depreciation entry made for given asset ids. If there isn't any, return the purchase date of this asset
151 """
152 cr.execute("""
153- SELECT a.id as id, COALESCE(MAX(l.date),a.purchase_date) AS date
154+ SELECT a.id as id, COALESCE(MAX(l.date),a.date) AS date
155 FROM account_asset_asset a
156 LEFT JOIN account_move_line l ON (l.asset_id = a.id)
157 WHERE a.id IN %s
158- GROUP BY a.id, a.purchase_date """, (tuple(ids),))
159+ GROUP BY a.id, a.date """, (tuple(ids),))
160 return dict(cr.fetchall())
161
162 def _compute_board_amount(self, cr, uid, asset, i, residual_amount, amount_to_depr, undone_dotation_number, posted_depreciation_line_ids, total_days, depreciation_date, context=None):
163@@ -109,7 +137,7 @@
164 else:
165 if asset.method == 'linear':
166 amount = amount_to_depr / (undone_dotation_number - len(posted_depreciation_line_ids))
167- if asset.prorata:
168+ if asset.prorata and asset.category_id.type == 'purchase':
169 amount = amount_to_depr / asset.method_number
170 days = total_days - float(depreciation_date.strftime('%j'))
171 if i == 1:
172@@ -134,13 +162,14 @@
173 while depreciation_date <= end_date:
174 depreciation_date = (datetime(depreciation_date.year, depreciation_date.month, depreciation_date.day) + relativedelta(months=+asset.method_period))
175 undone_dotation_number += 1
176- if asset.prorata:
177+ if asset.prorata and asset.category_id.type == 'purchase':
178 undone_dotation_number += 1
179 return undone_dotation_number
180
181 def compute_depreciation_board(self, cr, uid, ids, context=None):
182 depreciation_lin_obj = self.pool.get('account.asset.depreciation.line')
183 currency_obj = self.pool.get('res.currency')
184+ fiscal_year_obj = self.pool.get('account.fiscalyear')
185 for asset in self.browse(cr, uid, ids, context=context):
186 if asset.value_residual == 0.0:
187 continue
188@@ -153,35 +182,51 @@
189 if asset.prorata:
190 depreciation_date = datetime.strptime(self._get_last_depreciation_date(cr, uid, [asset.id], context)[asset.id], '%Y-%m-%d')
191 else:
192- # depreciation_date = 1st January of purchase year
193- purchase_date = datetime.strptime(asset.purchase_date, '%Y-%m-%d')
194+ # Asset Purchase date & year
195+ date = datetime.strptime(asset.date, '%Y-%m-%d')
196 #if we already have some previous validated entries, starting date isn't 1st January but last entry + method period
197 if (len(posted_depreciation_line_ids)>0):
198 last_depreciation_date = datetime.strptime(depreciation_lin_obj.browse(cr,uid,posted_depreciation_line_ids[0],context=context).depreciation_date, '%Y-%m-%d')
199 depreciation_date = (last_depreciation_date+relativedelta(months=+asset.method_period))
200 else:
201- depreciation_date = datetime(purchase_date.year, 1, 1)
202+ # Fiscal year based on depreciation date of Asset
203+ fiscal_year = fiscal_year_obj.search_read(cr, uid,
204+ [('date_start', '<=', time.strftime('%Y-%m-%d')),
205+ ('date_stop', '>=', time.strftime('%Y-%m-%d'))],
206+ ['date_start'], context=context)
207+ # Fiscal year should be there related to purchase date otherwise the journal items have wrong periods and date
208+ if not fiscal_year:
209+ model, action_id = self.pool['ir.model.data'].get_object_reference(cr, uid, 'account', 'action_account_fiscalyear')
210+ msg = _('There is no period defined for this date: %s.\nPlease go to Configuration/Periods and configure a fiscal year.') % asset.date
211+ raise openerp.exceptions.RedirectWarning(msg, action_id, _('Go to the configuration panel'))
212+ fis_date = datetime.strptime(fiscal_year[0]['date_start'], '%Y-%m-%d')
213+ depreciation_date = datetime(date.year, fis_date.month, fis_date.day)
214 day = depreciation_date.day
215 month = depreciation_date.month
216 year = depreciation_date.year
217 total_days = (year % 4) and 365 or 366
218
219 undone_dotation_number = self._compute_board_undone_dotation_nb(cr, uid, asset, depreciation_date, total_days, context=context)
220+ dep_sequence = 0
221+ for dep_lines in depreciation_lin_obj.browse(cr, uid, sorted(posted_depreciation_line_ids, key=int), context=context):
222+ dep_sequence += 1
223+ depreciation_lin_obj.write(cr, uid, dep_lines.id, {'sequence': dep_sequence}, context=context)
224+ i = 1
225+ if posted_depreciation_line_ids:
226+ i+= len(posted_depreciation_line_ids)
227 for x in range(len(posted_depreciation_line_ids), undone_dotation_number):
228- i = x + 1
229 amount = self._compute_board_amount(cr, uid, asset, i, residual_amount, amount_to_depr, undone_dotation_number, posted_depreciation_line_ids, total_days, depreciation_date, context=context)
230 company_currency = asset.company_id.currency_id.id
231 current_currency = asset.currency_id.id
232- # compute amount into company currency
233- amount = currency_obj.compute(cr, uid, current_currency, company_currency, amount, context=context)
234+ amount = currency_obj.round(cr, uid, asset.currency_id, amount)
235 residual_amount -= amount
236 vals = {
237 'amount': amount,
238 'asset_id': asset.id,
239 'sequence': i,
240- 'name': str(asset.id) +'/' + str(i),
241+ 'name': (asset.code or str(asset.id)) +'/' + str(i),
242 'remaining_value': residual_amount,
243- 'depreciated_value': (asset.purchase_value - asset.salvage_value) - (residual_amount + amount),
244+ 'depreciated_value': (asset.value - asset.salvage_value) - (residual_amount + amount),
245 'depreciation_date': depreciation_date.strftime('%Y-%m-%d'),
246 }
247 depreciation_lin_obj.create(cr, uid, vals, context=context)
248@@ -190,31 +235,44 @@
249 day = depreciation_date.day
250 month = depreciation_date.month
251 year = depreciation_date.year
252+ i += 1
253 return True
254
255 def validate(self, cr, uid, ids, context=None):
256 if context is None:
257- context = {}
258- return self.write(cr, uid, ids, {
259- 'state':'open'
260- }, context)
261+ context = {}
262+ type = self._get_category_type(cr, uid, ids, context=context).get('type')
263+ self.message_post(cr, uid, ids, body=_("%s confirmed.") % type, context=context)
264+ return self.write(cr, uid, ids, {'state':'open'}, context=context)
265
266 def set_to_close(self, cr, uid, ids, context=None):
267+ if context is None:
268+ context = {}
269+ dep_line_obj = self.pool.get('account.asset.depreciation.line')
270+ res = self._get_category_type(cr, uid, ids, context=context)
271+ unposted_dep_line_ids = dep_line_obj.search(cr, uid,
272+ [('asset_id', 'in', ids),
273+ ('move_check', '=', False)],
274+ order='depreciation_date desc',
275+ context=context)
276+ if len(unposted_dep_line_ids) > 0:
277+ raise osv.except_osv(_('Error !'),
278+ _('You cannot close an %s which has unposted %s lines.')
279+ % (res.get('type'), res.get('name')))
280+ self.message_post(cr, uid, ids, body=_("%s closed.") % res.get('type'), context=context)
281 return self.write(cr, uid, ids, {'state': 'close'}, context=context)
282
283 def set_to_draft(self, cr, uid, ids, context=None):
284 return self.write(cr, uid, ids, {'state': 'draft'}, context=context)
285
286 def _amount_residual(self, cr, uid, ids, name, args, context=None):
287- cr.execute("""SELECT
288- l.asset_id as id, SUM(abs(l.debit-l.credit)) AS amount
289- FROM
290- account_move_line l
291- WHERE
292- l.asset_id IN %s GROUP BY l.asset_id """, (tuple(ids),))
293- res=dict(cr.fetchall())
294+ res = {}
295+ total_amount = 0.0
296 for asset in self.browse(cr, uid, ids, context):
297- res[asset.id] = asset.purchase_value - res.get(asset.id, 0.0) - asset.salvage_value
298+ for line in asset.depreciation_line_ids:
299+ if line.move_check:
300+ total_amount += line.amount
301+ res[asset.id] = asset.value - total_amount - asset.salvage_value
302 for id in ids:
303 res.setdefault(id, 0.0)
304 return res
305@@ -229,13 +287,13 @@
306 val['currency_id'] = company.currency_id.id
307 return {'value': val}
308
309- def onchange_purchase_salvage_value(self, cr, uid, ids, purchase_value, salvage_value, context=None):
310+ def onchange_purchase_salvage_value(self, cr, uid, ids, value, salvage_value, context=None):
311 val = {}
312 for asset in self.browse(cr, uid, ids, context=context):
313- if purchase_value:
314- val['value_residual'] = purchase_value - salvage_value
315+ if value:
316+ val['value_residual'] = value - salvage_value
317 if salvage_value:
318- val['value_residual'] = purchase_value - salvage_value
319+ val['value_residual'] = value - salvage_value
320 return {'value': val}
321 def _entry_count(self, cr, uid, ids, field_name, arg, context=None):
322 MoveLine = self.pool('account.move.line')
323@@ -248,14 +306,14 @@
324 'entry_count': fields.function(_entry_count, string='# Asset Entries', type='integer'),
325 'name': fields.char('Asset Name', size=64, required=True, readonly=True, states={'draft':[('readonly',False)]}),
326 'code': fields.char('Reference', size=32, readonly=True, states={'draft':[('readonly',False)]}),
327- 'purchase_value': fields.float('Gross Value', required=True, readonly=True, states={'draft':[('readonly',False)]}),
328+ 'value': fields.float('Value', required=True, readonly=True, digits_compute=dp.get_precision('Account'), states={'draft':[('readonly',False)]}),
329 'currency_id': fields.many2one('res.currency','Currency',required=True, readonly=True, states={'draft':[('readonly',False)]}),
330 'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}),
331 'note': fields.text('Note'),
332- 'category_id': fields.many2one('account.asset.category', 'Asset Category', required=True, change_default=True, readonly=True, states={'draft':[('readonly',False)]}),
333+ 'category_id': fields.many2one('account.asset.category', 'Category', required=True, change_default=True, readonly=True, states={'draft':[('readonly',False)]}),
334 'parent_id': fields.many2one('account.asset.asset', 'Parent Asset', readonly=True, states={'draft':[('readonly',False)]}),
335 'child_ids': fields.one2many('account.asset.asset', 'parent_id', 'Children Assets'),
336- 'purchase_date': fields.date('Purchase Date', required=True, readonly=True, states={'draft':[('readonly',False)]}),
337+ 'date': fields.date('Date', required=True, readonly=True, states={'draft':[('readonly',False)]}),
338 'state': fields.selection([('draft','Draft'),('open','Running'),('close','Close')], 'Status', required=True,
339 help="When an asset is created, the status is 'Draft'.\n" \
340 "If the asset is confirmed, the status goes in 'Running' and the depreciation lines can be posted in the accounting.\n" \
341@@ -274,14 +332,15 @@
342 help="Choose the method to use to compute the dates and number of depreciation lines.\n"\
343 " * Number of Depreciations: Fix the number of depreciation lines and the time between 2 depreciations.\n" \
344 " * Ending Date: Choose the time between 2 depreciations and the date the depreciations won't go beyond."),
345- 'prorata':fields.boolean('Prorata Temporis', readonly=True, states={'draft':[('readonly',False)]}, help='Indicates that the first depreciation entry for this asset have to be done from the purchase date instead of the first January'),
346+ 'prorata':fields.boolean('Prorata Temporis', readonly=True, states={'draft':[('readonly',False)]}, help='Indicates that the first depreciation entry for this asset have to be done from the purchase date instead of the first January / Start date of fiscal year'),
347 'history_ids': fields.one2many('account.asset.history', 'asset_id', 'History', readonly=True),
348 'depreciation_line_ids': fields.one2many('account.asset.depreciation.line', 'asset_id', 'Depreciation Lines', readonly=True, states={'draft':[('readonly',False)],'open':[('readonly',False)]}),
349 'salvage_value': fields.float('Salvage Value', digits_compute=dp.get_precision('Account'), help="It is the amount you plan to have that you cannot depreciate.", readonly=True, states={'draft':[('readonly',False)]}),
350+ 'invoice_id': fields.many2one('account.invoice','Invoice', states={'draft':[('readonly',False)]}),
351 }
352 _defaults = {
353 'code': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'account.asset.code'),
354- 'purchase_date': lambda obj, cr, uid, context: time.strftime('%Y-%m-%d'),
355+ 'date': lambda obj, cr, uid, context: time.strftime('%Y-%m-%d'),
356 'active': True,
357 'state': 'draft',
358 'method': 'linear',
359@@ -295,6 +354,10 @@
360
361 def _check_recursion(self, cr, uid, ids, context=None, parent=None):
362 return super(account_asset_asset, self)._check_recursion(cr, uid, ids, context=context, parent=parent)
363+
364+ def _check_recursion_msg(self, cr, uid, ids, context=None, parent=None):
365+ type = self._get_category_type(cr, uid, ids, context=context).get('type')
366+ return ' \n\n Error ! \n You cannot create recursive %s.' % type
367
368 def _check_prorata(self, cr, uid, ids, context=None):
369 for asset in self.browse(cr, uid, ids, context=context):
370@@ -303,7 +366,7 @@
371 return True
372
373 _constraints = [
374- (_check_recursion, 'Error ! You cannot create recursive assets.', ['parent_id']),
375+ (_check_recursion, lambda self, *a, **kw: self._check_recursion_msg(*a, **kw), ['parent_id']),
376 (_check_prorata, 'Prorata temporis can be applied only for time method "number of depreciations".', ['prorata']),
377 ]
378
379@@ -334,7 +397,15 @@
380 default = {}
381 if context is None:
382 context = {}
383- default.update({'depreciation_line_ids': [], 'account_move_line_ids': [], 'history_ids': [], 'state': 'draft'})
384+ asset = self.browse(cr, uid, id, context=context)
385+ default.update({
386+ 'depreciation_line_ids': [],
387+ 'account_move_line_ids': [],
388+ 'history_ids': [],
389+ 'state': 'draft',
390+ 'name': asset.name+ _(' (copy)'),
391+ 'invoice_id': False
392+ })
393 return super(account_asset_asset, self).copy(cr, uid, id, default, context=context)
394
395 def _compute_entries(self, cr, uid, ids, period_id, context=None):
396@@ -342,17 +413,30 @@
397 period_obj = self.pool.get('account.period')
398 depreciation_obj = self.pool.get('account.asset.depreciation.line')
399 period = period_obj.browse(cr, uid, period_id, context=context)
400- depreciation_ids = depreciation_obj.search(cr, uid, [('asset_id', 'in', ids), ('depreciation_date', '<=', period.date_stop), ('depreciation_date', '>=', period.date_start), ('move_check', '=', False)], context=context)
401+ depreciation_ids = depreciation_obj.search(cr, uid, [('asset_id', 'in', ids),
402+ ('depreciation_date', '<=', period.date_stop),
403+ ('depreciation_date', '>=', period.date_start),
404+ ('move_check', '=', False)],
405+ context=context)
406 if context is None:
407 context = {}
408- context.update({'depreciation_date':period.date_stop})
409+ context.update({'depreciation_date': period.date_stop})
410 return depreciation_obj.create_move(cr, uid, depreciation_ids, context=context)
411
412 def create(self, cr, uid, vals, context=None):
413+ context.update({'mail_create_nolog': True})
414 asset_id = super(account_asset_asset, self).create(cr, uid, vals, context=context)
415 self.compute_depreciation_board(cr, uid, [asset_id], context=context)
416+ type = self._get_category_type(cr, uid, [asset_id], context=context).get('type')
417+ self.message_post(cr, uid, [asset_id], body=_("%s created.") % type, context=context)
418 return asset_id
419
420+ def write(self, cr, uid, ids, vals, context=None):
421+ res = super(account_asset_asset, self).write(cr, uid, ids, vals, context=context)
422+ # We need to compute the depreciation line if any changes is there in asset
423+ self.compute_depreciation_board(cr, uid, ids, context=context)
424+ return res
425+
426 def open_entries(self, cr, uid, ids, context=None):
427 if context is None:
428 context = {}
429@@ -388,7 +472,7 @@
430 'depreciated_value': fields.float('Amount Already Depreciated', required=True),
431 'depreciation_date': fields.date('Depreciation Date', select=1),
432 'move_id': fields.many2one('account.move', 'Depreciation Entry'),
433- 'move_check': fields.function(_get_move_check, method=True, type='boolean', string='Posted', store=True)
434+ 'move_check': fields.function(_get_move_check, method=True, type='boolean', string='Posted', store=True, track_visibility='always')
435 }
436
437 def create_move(self, cr, uid, ids, context=None):
438@@ -400,33 +484,42 @@
439 move_obj = self.pool.get('account.move')
440 move_line_obj = self.pool.get('account.move.line')
441 currency_obj = self.pool.get('res.currency')
442+ obj_sequence = self.pool.get('ir.sequence')
443 created_move_ids = []
444 asset_ids = []
445 for line in self.browse(cr, uid, ids, context=context):
446- depreciation_date = context.get('depreciation_date') or time.strftime('%Y-%m-%d')
447+ depreciation_date = context.get('depreciation_date') or line.depreciation_date or time.strftime('%Y-%m-%d')
448 period_ids = period_obj.find(cr, uid, depreciation_date, context=context)
449+ context.update({'date': depreciation_date})
450 company_currency = line.asset_id.company_id.currency_id.id
451 current_currency = line.asset_id.currency_id.id
452- context.update({'date': depreciation_date})
453 amount = currency_obj.compute(cr, uid, current_currency, company_currency, line.amount, context=context)
454- sign = (line.asset_id.category_id.journal_id.type == 'purchase' and 1) or -1
455+ sign = (line.asset_id.category_id.journal_id.type == 'purchase' or line.asset_id.category_id.journal_id.type == 'sale' and 1) or -1
456 asset_name = line.asset_id.name
457 reference = line.name
458+ seq_num = obj_sequence.next_by_id(cr, uid, line.asset_id.category_id.journal_id.sequence_id.id, context)
459 move_vals = {
460- 'name': asset_name,
461+ 'name': seq_num,
462 'date': depreciation_date,
463- 'ref': reference,
464+ 'ref': seq_num,
465 'period_id': period_ids and period_ids[0] or False,
466 'journal_id': line.asset_id.category_id.journal_id.id,
467 }
468 move_id = move_obj.create(cr, uid, move_vals, context=context)
469 journal_id = line.asset_id.category_id.journal_id.id
470 partner_id = line.asset_id.partner_id.id
471+ categ_type = line.asset_id.category_id.type
472+ if categ_type == 'purchase':
473+ debit_account = line.asset_id.category_id.account_expense_depreciation_id.id
474+ credit_acount = line.asset_id.category_id.account_depreciation_id.id
475+ else:
476+ debit_account = line.asset_id.category_id.account_asset_id.id
477+ credit_acount = line.asset_id.category_id.account_income_recognition_id.id
478 move_line_obj.create(cr, uid, {
479- 'name': asset_name,
480- 'ref': reference,
481+ 'name': asset_name or reference,
482+ 'ref': seq_num,
483 'move_id': move_id,
484- 'account_id': line.asset_id.category_id.account_depreciation_id.id,
485+ 'account_id': credit_acount,
486 'debit': 0.0,
487 'credit': amount,
488 'period_id': period_ids and period_ids[0] or False,
489@@ -434,13 +527,14 @@
490 'partner_id': partner_id,
491 'currency_id': company_currency != current_currency and current_currency or False,
492 'amount_currency': company_currency != current_currency and - sign * line.amount or 0.0,
493- 'date': depreciation_date,
494+ 'analytic_account_id': line.asset_id.category_id.account_analytic_id.id if categ_type == 'sales' else False,
495+ 'asset_id': line.asset_id.id if categ_type == 'sales' else False
496 })
497 move_line_obj.create(cr, uid, {
498- 'name': asset_name,
499- 'ref': reference,
500+ 'name': asset_name or reference,
501+ 'ref': seq_num,
502 'move_id': move_id,
503- 'account_id': line.asset_id.category_id.account_expense_depreciation_id.id,
504+ 'account_id': debit_account,
505 'credit': 0.0,
506 'debit': amount,
507 'period_id': period_ids and period_ids[0] or False,
508@@ -448,19 +542,40 @@
509 'partner_id': partner_id,
510 'currency_id': company_currency != current_currency and current_currency or False,
511 'amount_currency': company_currency != current_currency and sign * line.amount or 0.0,
512- 'analytic_account_id': line.asset_id.category_id.account_analytic_id.id,
513- 'date': depreciation_date,
514- 'asset_id': line.asset_id.id
515+ 'analytic_account_id': line.asset_id.category_id.account_analytic_id.id if categ_type == 'purchase' else False,
516+ 'asset_id': line.asset_id.id if categ_type == 'purchase' else False
517 })
518 self.write(cr, uid, line.id, {'move_id': move_id}, context=context)
519 created_move_ids.append(move_id)
520 asset_ids.append(line.asset_id.id)
521- # we re-evaluate the assets to determine whether we can close them
522+ partner_name = line.asset_id.partner_id.name
523+ currency_name = line.asset_id.company_id.currency_id.name
524+ msg_data = ['Depreciation','Supplier'] if categ_type == 'purchase' else ['Installment','Customer']
525+ msg=_("%s line posted. <br/> <b>&nbsp;&nbsp;&nbsp;"
526+ "&bull; Currency:</b> %s <br/> <b>&nbsp;&nbsp;&nbsp;"
527+ "&bull; Posted Amount:</b> %s <br/> <b>&nbsp;&nbsp;&nbsp;"
528+ "&bull; %s:</b> %s") % (msg_data[0],
529+ currency_name,
530+ line.amount,
531+ msg_data[1],
532+ partner_name)
533+ asset_obj.message_post(cr, uid, line.asset_id.id, body=msg, context=context)
534+ # we re-evaluate the assets to determine whether we can close them
535 for asset in asset_obj.browse(cr, uid, list(set(asset_ids)), context=context):
536 if currency_obj.is_zero(cr, uid, asset.currency_id, asset.value_residual):
537+ name = 'Asset' if categ_type == 'purchase' else 'Recognition'
538+ asset_obj.message_post(cr, uid, asset.id, body=_("%s closed.") % name, context=context)
539 asset.write({'state': 'close'})
540+ asset_obj.compute_depreciation_board(cr, uid, [], context=context)
541 return created_move_ids
542
543+ def unlink(self, cr, uid, ids, context=None):
544+ for record in self.browse(cr, uid, ids, context=context):
545+ name = 'depreciation' if record.asset_id.category_id.type == 'purchase' else 'installment'
546+ if record.move_check:
547+ raise osv.except_osv(_('Error!'), _("You cannot delete posted %s lines.") % name)
548+ return super(account_asset_depreciation_line, self).unlink(cr, uid, ids, context=context)
549+
550
551 class account_move_line(osv.osv):
552 _inherit = 'account.move.line'
553@@ -493,5 +608,4 @@
554 'user_id': lambda self, cr, uid, ctx: uid
555 }
556
557-
558 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
559
560=== modified file 'account_asset/account_asset_demo.xml'
561--- account_asset/account_asset_demo.xml 2013-01-02 11:46:19 +0000
562+++ account_asset/account_asset_demo.xml 2014-05-28 05:47:51 +0000
563@@ -12,6 +12,8 @@
564 <field name="journal_id" ref="account.expenses_journal"/>
565 <field name="name">Hardware - 3 Years</field>
566 <field name="method_number">3</field>
567+ <field name="method_period">12</field>
568+ <field name="type">purchase</field>
569 </record>
570
571 <record id="account_asset_category_sale" model="account.asset.category">
572@@ -21,16 +23,33 @@
573 <field name="journal_id" ref="account.expenses_journal"/>
574 <field name="name">Cars - 5 Years</field>
575 <field name="method_number">5</field>
576- </record>
577-
578-
579- <record id="account_asset_category_sale" model="account.asset.category">
580- <field name="account_expense_depreciation_id" ref="account.a_sale"/>
581- <field name="account_asset_id" ref="account.xfa"/>
582- <field name="account_depreciation_id" ref="account.xfa"/>
583- <field name="journal_id" ref="account.expenses_journal"/>
584- <field name="name">Revenue Recognition Maintenance Contract - 3 Years</field>
585- <field name="method_number">3</field>
586+ <field name="method_period">12</field>
587+ <field name="type">purchase</field>
588+ </record>
589+
590+
591+ <record id="account_asset_category_sale0" model="account.asset.category">
592+ <field name="account_expense_depreciation_id" ref="account.a_sale"/>
593+ <field name="account_asset_id" ref="account.xfa"/>
594+ <field name="account_depreciation_id" ref="account.xfa"/>
595+ <field name="account_income_recognition_id" ref="account.a_sale"/>
596+ <field name="journal_id" ref="account.sales_journal"/>
597+ <field name="name">Maintenance Contract - 6 month</field>
598+ <field name="method_number">6</field>
599+ <field name="method_period">1</field>
600+ <field name="prorata" eval="True"/>
601+ </record>
602+
603+ <record id="account_asset_category_sale1" model="account.asset.category">
604+ <field name="account_expense_depreciation_id" ref="account.a_sale"/>
605+ <field name="account_asset_id" ref="account.xfa"/>
606+ <field name="account_depreciation_id" ref="account.xfa"/>
607+ <field name="account_income_recognition_id" ref="account.a_sale"/>
608+ <field name="journal_id" ref="account.sales_journal"/>
609+ <field name="name">Contract - 12 month</field>
610+ <field name="method_number">12</field>
611+ <field name="method_period">1</field>
612+ <field name="prorata" eval="True"/>
613 </record>
614
615 <!--
616@@ -41,10 +60,10 @@
617 <field eval="2000.0" name="salvage_value"/>
618 <field name="state">open</field>
619 <field eval="12" name="method_period"/>
620- <field eval="10" name="method_number"/>
621+ <field eval="5" name="method_number"/>
622 <field name="name">CEO's Car</field>
623- <field eval="12000.0" name="purchase_value"/>
624- <field name="category_id" ref="account_asset_category_fixedassets0"/>
625+ <field eval="12000.0" name="value"/>
626+ <field name="category_id" ref="account_asset_category_sale"/>
627 </record>
628
629 <record id="account_asset_asset_cab0" model="account.asset.asset">
630@@ -52,7 +71,7 @@
631 <field eval="0.0" name="salvage_value"/>
632 <field name="method_time">end</field>
633 <field name="name">V6 Engine and 10 inches tires</field>
634- <field eval="2800.0" name="purchase_value"/>
635+ <field eval="2800.0" name="value"/>
636 <field name="category_id" ref="account_asset_category_fixedassets0"/>
637 <field name="parent_id" ref="account_asset_asset_vehicles0"/>
638 </record>
639@@ -62,12 +81,34 @@
640 <field eval="100000.0" name="salvage_value"/>
641 <field name="state">open</field>
642 <field eval="12" name="method_period"/>
643- <field eval="20" name="method_number"/>
644- <field name="purchase_date" eval="time.strftime('%Y-01-01')"/>
645+ <field eval="3" name="method_number"/>
646+ <field name="date" eval="time.strftime('%Y-01-01')"/>
647 <field name="name">Office</field>
648- <field eval="500000.0" name="purchase_value"/>
649+ <field eval="500000.0" name="value"/>
650 <field name="category_id" ref="account_asset_category_fixedassets0"/>
651 </record>
652+
653+ <record id="account_asset_asset_pc" model="account.asset.asset">
654+ <field eval="1" name="prorata"/>
655+ <field name="state">open</field>
656+ <field eval="1" name="method_period"/>
657+ <field eval="12" name="method_number"/>
658+ <field name="date" eval="time.strftime('%Y-01-01')"/>
659+ <field name="name">Personal Computer</field>
660+ <field eval="25000.0" name="value"/>
661+ <field name="category_id" ref="account_asset_category_sale1"/>
662+ </record>
663+
664+ <record id="account_asset_asset_a/c" model="account.asset.asset">
665+ <field eval="1" name="prorata"/>
666+ <field name="state">open</field>
667+ <field eval="1" name="method_period"/>
668+ <field eval="12" name="method_number"/>
669+ <field name="date" eval="time.strftime('%Y-01-01')"/>
670+ <field name="name">Air Conditioner</field>
671+ <field eval="40000.0" name="value"/>
672+ <field name="category_id" ref="account_asset_category_sale1"/>
673+ </record>
674
675 </data>
676 </openerp>
677
678=== modified file 'account_asset/account_asset_invoice.py'
679--- account_asset/account_asset_invoice.py 2013-10-27 12:31:04 +0000
680+++ account_asset/account_asset_invoice.py 2014-05-28 05:47:51 +0000
681@@ -41,6 +41,7 @@
682 _inherit = 'account.invoice.line'
683 _columns = {
684 'asset_category_id': fields.many2one('account.asset.category', 'Asset Category'),
685+ 'recongnition_date': fields.date('Rev. Rec. Start Date'),
686 }
687 def asset_create(self, cr, uid, lines, context=None):
688 context = context or {}
689@@ -51,12 +52,12 @@
690 'name': line.name,
691 'code': line.invoice_id.number or False,
692 'category_id': line.asset_category_id.id,
693- 'purchase_value': line.price_subtotal,
694- 'period_id': line.invoice_id.period_id.id,
695+ 'value': line.price_subtotal,
696 'partner_id': line.invoice_id.partner_id.id,
697 'company_id': line.invoice_id.company_id.id,
698 'currency_id': line.invoice_id.currency_id.id,
699- 'purchase_date' : line.invoice_id.date_invoice,
700+ 'date' : line.recongnition_date or line.invoice_id.date_invoice,
701+ 'invoice_id': line.invoice_id.id,
702 }
703 changed_vals = asset_obj.onchange_category_id(cr, uid, [], vals['category_id'], context=context)
704 vals.update(changed_vals['value'])
705
706=== modified file 'account_asset/account_asset_invoice_view.xml'
707--- account_asset/account_asset_invoice_view.xml 2013-10-27 12:31:04 +0000
708+++ account_asset/account_asset_invoice_view.xml 2014-05-28 05:47:51 +0000
709@@ -9,7 +9,8 @@
710 <field name="inherit_id" ref="account.view_invoice_line_form"/>
711 <field name="arch" type="xml">
712 <field name="account_id" position="after">
713- <field name="asset_category_id"/>
714+ <field name="asset_category_id" domain="[('type','=','sales')]" string="Revenue Recognition Category"/>
715+ <field name="recongnition_date"/>
716 </field>
717 </field>
718 </record>
719@@ -20,7 +21,19 @@
720 <field name="inherit_id" ref="account.invoice_supplier_form"/>
721 <field name="arch" type="xml">
722 <xpath expr="//field[@name='invoice_line']/tree/field[@name='quantity']" position="before">
723- <field name="asset_category_id"/>
724+ <field name="asset_category_id" domain="[('type','=','purchase')]" context="{'default_type':'purchase'}"/>
725+ </xpath>
726+ </field>
727+ </record>
728+
729+ <record model="ir.ui.view" id="view_customer_invoice_asset_category">
730+ <field name="name">account.invoice.customer.form</field>
731+ <field name="model">account.invoice</field>
732+ <field name="inherit_id" ref="account.invoice_form"/>
733+ <field name="arch" type="xml">
734+ <xpath expr="//field[@name='invoice_line']/tree/field[@name='quantity']" position="before">
735+ <field name="asset_category_id" domain="[('type','=','sales')]" string="Revenue Recognition Category"/>
736+ <field name="recongnition_date"/>
737 </xpath>
738 </field>
739 </record>
740
741=== modified file 'account_asset/account_asset_view.xml'
742--- account_asset/account_asset_view.xml 2014-03-28 14:06:51 +0000
743+++ account_asset/account_asset_view.xml 2014-05-28 05:47:51 +0000
744@@ -13,25 +13,37 @@
745 <group>
746 <group>
747 <field name="name"/>
748+ <field name="type" widget="radio" on_change="onchange_type(type)" readonly="context.get('from_asset', False)"/>
749 <field name="company_id" widget="selection" groups="base.group_multi_company"/>
750 </group>
751 <group>
752- <field name="journal_id"/>
753- <field name="account_asset_id" on_change="onchange_account_asset(account_asset_id)"/>
754- <field name="account_depreciation_id"/>
755- <field name="account_expense_depreciation_id"/>
756- </group>
757- <group string="Depreciation Dates">
758- <field name="method_time"/>
759- <field name="method_number" attrs="{'invisible':[('method_time','=','end')], 'required':[('method_time','=','number')]}"/>
760- <field name="method_period"/>
761- <field name="method_end" attrs="{'required': [('method_time','=','end')], 'invisible':[('method_time','=','number')]}"/>
762- </group>
763- <group string="Depreciation Method">
764+ <field name="journal_id" on_change="onchange_journal_id(journal_id, type)"/>
765+ <label for="account_asset_id" string="Revenue Recognition Account" attrs="{'invisible': [('type','!=','sales')]}"/>
766+ <label for="account_asset_id" string="Asset Account" attrs="{'invisible': [('type','!=','purchase')]}" style="margin-left: -8px"/>
767+ <field name="account_asset_id" nolabel="1" on_change="onchange_account_asset(account_asset_id)" colspan="0" attrs="{'invisible': [('type','=', False)]}"/>
768+ <field name="account_income_recognition_id" attrs="{'invisible': [('type','!=','sales')],'required': [('type','=','sales')]}" colspan="0"/>
769+ <label for="account_depreciation_id" string="Depreciation Account" attrs="{'invisible': [('type','!=','purchase')]}" style="margin-left: -8px"/>
770+ <field name="account_depreciation_id" nolabel="1" attrs="{'invisible': [('type','!=','purchase')]}" colspan="0"/>
771+ <field name="account_expense_depreciation_id" attrs="{'invisible': [('type','!=','purchase')],'required': [('type','=','purchase')]}"/>
772+ </group>
773+ <group>
774+ <separator string="Installment Information" attrs="{'invisible': [('type','!=','sales')]}" colspan="2"/>
775+ <separator string="Depreciation Information" attrs="{'invisible': [('type','=','sales')]}" colspan="2"/>
776+ <field name="method_time" string="Time Method Based On" widget="radio" attrs="{'invisible': [('type','!=','purchase')]}"/>
777+ <label for="method_number" string="Number of Installment" attrs="{'invisible': [('type','!=','sales')]}"/>
778+ <label for="method_number" string="Number of Depreciations" attrs="{'invisible': [('type','!=','purchase')]}" style="margin-left: -8px" colspan="0"/>
779+ <field name="method_number" nolabel="1" string="Number of Depreciations" attrs="{'invisible':['|',('method_time','!=','number'),'&amp;',('type','=', False)], 'required':[('method_time','=','number')]}"/>
780+ <label for="method_period" string="Installment Period" attrs="{'invisible': [('type','!=','sales')]}"/>
781+ <label for="method_period" string="Depreciation Period " attrs="{'invisible': [('type','!=','purchase')]}" style="margin-left: -8px" colspan="0"/>
782+ <field name="method_period" nolabel="1" attrs="{'invisible': [('type','=', False)]}"/>
783+ <field name="method_end" attrs="{'required': [('method_time','=','end')], 'invisible':[('method_time','!=','end')]}"/>
784+ <field name="open_asset"/>
785+ </group>
786+ <group attrs="{'invisible': [('type','=','sales')]}">
787+ <separator string="Depreciation Method" colspan="2"/>
788 <field name="method"/>
789 <field name="method_progress_factor" attrs="{'invisible':[('method','=','linear')], 'required':[('method','=','degressive')]}"/>
790 <field name="prorata"/>
791- <field name="open_asset"/>
792 </group>
793 <group groups="analytic.group_analytic_accounting" string="Analytic Information">
794 <field name="account_analytic_id"/>
795@@ -51,6 +63,7 @@
796 <field name="name"/>
797 <field name="journal_id"/>
798 <field name="method"/>
799+ <field name="type"/>
800 <field name="company_id" groups="base.group_multi_company"/>
801 </tree>
802 </field>
803@@ -61,16 +74,222 @@
804 <field name="model">account.asset.category</field>
805 <field name="arch" type="xml">
806 <search string="Search Asset Category">
807- <field name="name" string="Asset Category"/>
808+ <filter icon="terp-check" string="Sales" domain="[('type','=', 'sales')]" help="Revenue Recognitions"/>
809+ <filter icon="terp-dialog-close" string="Purchase" domain="[('type','=', 'purchase')]" help="Assets"/>
810+ <field name="name" string="Category"/>
811 <field name="journal_id"/>
812+ <group expand="0" string="Group By...">
813+ <filter string="Type" domain="[]" context="{'group_by':'type'}"/>
814+ </group>
815+ </search>
816+ </field>
817+ </record>
818+
819+ <record id="view_account_move_line_filter_new" model="ir.ui.view">
820+ <field name="name">Journal Items</field>
821+ <field eval="30" name="priority"/>
822+ <field name="model">account.move.line</field>
823+ <field name="arch" type="xml">
824+ <search string="Search Journal Items">
825+ <field name="name" filter_domain="['|', ('name','ilike',self), ('ref','ilike',self)]" string="Move"/>
826+ <field name="date"/>
827+ <filter icon="terp-document-new" string="Unbalanced" domain="[('state','=','draft')]" help="Unbalanced Journal Items"/>
828+ <separator/>
829+ <filter icon="terp-document-new" string="Unposted" domain="[('move_id.state','=','draft')]" help="Unposted Journal Items"/>
830+ <filter name="posted" icon="terp-camera_test" string="Posted" domain="[('move_id.state','=','posted')]" help="Posted Journal Items"/>
831+ <separator/>
832+ <filter icon="terp-dolar_ok!" string="Unreconciled" domain="[('reconcile_id','=',False), ('account_id.reconcile','=',True)]" help="Unreconciled Journal Items" name="unreconciled"/>
833+ <separator/>
834+ <filter string="Next Partner to Reconcile" help="Next Partner Entries to reconcile" name="next_partner" context="{'next_partner_only': 1}" icon="terp-gtk-jump-to-ltr" domain="[('account_id.reconcile','=',True),('reconcile_id','=',False)]"/>
835+ <field name="move_id" string="Number (Move)"/>
836+ <field name="account_id"/>
837+ <field name="asset_id" string="Recognition"/>
838+ <field name="partner_id"/>
839+ <field name="journal_id" context="{'journal_id':self}" widget="selection"/> <!-- it's important to keep widget='selection' in this filter viewbecause without that the value passed in the context is not the ID but the textual value (name) of the selected journal -->
840+ <field name="period_id" context="{'period_id':self}" widget="selection"/> <!-- it's important to keep the widget='selection' in this field, for the same reason as explained above -->
841+ <group expand="0" string="Group By...">
842+ <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
843+ <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
844+ <filter string="Account" icon="terp-folder-green" context="{'group_by':'account_id'}"/>
845+ <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
846+ </group>
847 </search>
848 </field>
849 </record>
850
851+ <record id="action_account_moves_all_search" model="ir.actions.act_window">
852+ <field name="name">Journal Items</field>
853+ <field name="res_model">account.move.line</field>
854+ <field name="context">{'search_default_asset_id': [active_id]}</field>
855+ <field name="search_view_id" ref="view_account_move_line_filter_new"/>
856+ </record>
857+
858 <!--
859+ Asset Revenue Recognition Form
860+ -->
861+
862+ <record model="ir.ui.view" id="view_revenue_recognition_form">
863+ <field name="name">account.revenue.recognition.form</field>
864+ <field name="model">account.asset.asset</field>
865+ <field name="arch" type="xml">
866+ <form string="Revenue" version="7.0">
867+ <header>
868+ <button name="validate" states="draft" string="Confirm Recognition" type="object" class="oe_highlight"/>
869+ <button name="set_to_close" states="open" string="Set to Close" type="object" class="oe_highlight"/>
870+ <button name="set_to_draft" states="open" string="Set to Draft" type="object" />
871+ <field name="state" widget="statusbar" statusbar_visible="draft,open"/>
872+ </header>
873+ <sheet>
874+ <div class="oe_button_box oe_right">
875+ <button class="oe_inline oe_stat_button" name="%(action_account_moves_all_search)d" type="action" icon="fa-pencil">
876+ <field string="Entries" name="entry_count" widget="statinfo" />
877+ </button>
878+ </div>
879+ <div class="oe_title">
880+ <label for="name" class="oe_edit_only" string="Recognition Name"/>
881+ <h1>
882+ <field name="name" class="oe_inline"/>
883+ </h1>
884+ </div>
885+ <group>
886+ <group>
887+ <field name="category_id" on_change="onchange_category_id(category_id)" string="Category" domain="[('type','=','sales')]" help="Category of revenue recognition" context="{'from_asset':True}"/>
888+ <field name="code"/>
889+ <field name="parent_id" string="Parent Recognition" domain="[('category_id.type', '=', 'sales')]" help="Used as parent recognition of this recognition"/>
890+ <field name="date" string="Sale Date" help="Sale date of revenue recognition"/>
891+ <field name="company_id" widget="selection" groups="base.group_multi_company" on_change="onchange_company_id(company_id)"/>
892+ </group>
893+ <group>
894+ <field name="currency_id" groups="base.group_multi_currency"/>
895+ <field name="value" string="Sale Value" widget="monetary" options="{'currency_field': 'currency_id'}" help="Sale value of revenue recognition"/>
896+ <field name="partner_id" string="Customer"/>
897+ <field name="invoice_id" string="Sale Invoice" domain="[('invoice_line.asset_category_id.type','=','sales')]"/>
898+ </group>
899+ </group>
900+ <notebook colspan="4">
901+ <page string="Installment Board">
902+ <field name="depreciation_line_ids" mode="tree" string="Installment Lines" options="{'reload_whole_on_button': true}">
903+ <tree string="Installment Lines" colors="blue:(move_check == False);black:(move_check == True)" create="false">
904+ <field name="sequence" string="Serial Number"/>
905+ <field name="depreciation_date" string="Due Date"/>
906+ <field name="depreciated_value" invisible="1" string="Amount Already Paid"/>
907+ <field name="amount" readonly="1" string="Installment Amount"/>
908+ <field name="remaining_value" readonly="1" string="Remaining Value"/>
909+ <field name="move_check" invisible="1"/>
910+ <field name="parent_state" invisible="1"/>
911+ <button name="create_move" type="object" widget="widgetonbutton"/>
912+ </tree>
913+ <form string="Installment Lines">
914+ <group>
915+ <group>
916+ <field name="asset_id" invisible="1"/>
917+ <field name="parent_state" invisible="1"/>
918+ <field name="name" string="Installment Name"/>
919+ <field name="sequence"/>
920+ <field name="move_id" string="Installment Entry"/>
921+ <field name="move_check"/>
922+ <field name="parent_state" invisible="1"/>
923+ </group>
924+ <group>
925+ <field name="amount" string="Current Installment"/>
926+ <field name="depreciation_date" string="Due Date"/>
927+ <field name="depreciated_value" readonly="1" string="Amount Already Paid"/>
928+ <field name="remaining_value" readonly="1" string="Remaining value"/>
929+ </group>
930+ </group>
931+ </form>
932+ </field>
933+ <button type="object" name="compute_depreciation_board" string="Compute" icon="terp-stock_format-scientific" colspan="2" attrs="{'invisible':[('state','=','close')]}"/>
934+ </page>
935+ <page string="History">
936+ <field name="history_ids" readonly="1"/>
937+ </page>
938+ </notebook>
939+ <separator string="Installment Information" colspan="4"/>
940+ <group>
941+ <field name="method_number" string="Number of Installment" help="The number of installment needed for your recognition"/>
942+ <field name="method_period" string="Installment Period" help="State here the time between 2 installments, in months"/>
943+ <button name="%(action_asset_modify)d" states="open" string="(update)" type="action" class="oe_inline oe_link" colspan="4"/>
944+ <field name="prorata" invisible="1"/>
945+ </group>
946+ </sheet>
947+ <div class="oe_chatter">
948+ <field name="message_follower_ids" widget="mail_followers" groups="base.group_user" />
949+ <field name="message_ids" widget="mail_thread"/>
950+ </div>
951+ </form>
952+ </field>
953+ </record>
954+
955+ <record model="ir.ui.view" id="view_account_revenue_recognition_tree">
956+ <field name="name">account.revenue.recognition.tree</field>
957+ <field name="model">account.asset.asset</field>
958+ <field name="field_parent">child_ids</field>
959+ <field name="arch" type="xml">
960+ <tree string="Revenue Recognition" colors="blue:(state == 'draft');grey:(state == 'close')">
961+ <field name="name" string="Name"/>
962+ <field name="category_id" string="Category"/>
963+ <field name="date" string="Sale Date"/>
964+ <field name="partner_id" string="Customer"/>
965+ <field name="value" string="Sale Value"/>
966+ <field name="currency_id" groups="base.group_multi_currency"/>
967+ <field name="company_id" groups="base.group_multi_company"/>
968+ <field name="state"/>
969+ </tree>
970+ </field>
971+ </record>
972+
973+ <record id="view_account_revenue_recognition_search" model="ir.ui.view">
974+ <field name="name">account.revenue.recognition.search</field>
975+ <field name="model">account.asset.asset</field>
976+ <field name="arch" type="xml">
977+ <search string="Account Revenue Recognition Search">
978+ <field name="name" string="Recognition"/>
979+ <field name="category_id" string="Recognition Category"/>
980+ <field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
981+ <filter icon="terp-check" string="Current" domain="[('state','in', ('draft','open'))]" help="Recognition in draft and open states"/>
982+ <filter icon="terp-dialog-close" string="Closed" domain="[('state','=', 'close')]" help="Recognition in closed state"/>
983+ <group expand="0" string="Group By...">
984+ <filter string="Category" icon="terp-go-month" domain="[]" context="{'group_by':'category_id'}"/>
985+ <filter string="Sale Month" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
986+ <filter string="Parent" icon="terp-go-month" domain="[]" context="{'group_by':'parent_id'}"/>
987+ <filter string="Recognition Name" context="{'group_by':'name'}" invisible="1"/>
988+ </group>
989+ </search>
990+ </field>
991+ </record>
992+ <record model="ir.ui.view" id="view_account_revenue_recognition_graph">
993+ <field name="name">account.revenue.recognition.graph</field>
994+ <field name="model">account.asset.asset</field>
995+ <field name="arch" type="xml">
996+ <graph string="Assets" type="bar">
997+ <field name="name" type="row"/>
998+ <field name="value" type="measure"/>
999+ </graph>
1000+ </field>
1001+ </record>
1002+
1003+ <record model="ir.ui.view" id="view_account_revenue_recognition_hierarchy_tree">
1004+ <field name="name">account.revenue.recognition.hierarchy</field>
1005+ <field name="model">account.asset.asset</field>
1006+ <field name="field_parent">child_ids</field>
1007+ <field name="arch" type="xml">
1008+ <tree string="Revenue Recognition Hierarchy view">
1009+ <field name="name" string="Name"/>
1010+ <field name="category_id" string="Category"/>
1011+ <field name="code"/>
1012+ <field name="date" string="Sales Date"/>
1013+ <field name="value" string="Sales value"/>
1014+ <field name="currency_id" groups="base.group_multi_currency"/>
1015+ <field name="company_id" groups="base.group_multi_company"/>
1016+ <field name="state"/>
1017+ </tree>
1018+ </field>
1019+ </record>
1020+ <!--
1021 Asset
1022 -->
1023-
1024+
1025 <record model="ir.ui.view" id="view_account_asset_asset_form">
1026 <field name="name">account.asset.asset.form</field>
1027 <field name="model">account.asset.asset</field>
1028@@ -96,51 +315,33 @@
1029 </div>
1030 <group>
1031 <group>
1032- <field name="category_id" on_change="onchange_category_id(category_id)"/>
1033+ <field name="category_id" on_change="onchange_category_id(category_id)" domain="[('type','=','purchase')]" string="Asset Category" context="{'default_type':'purchase','default_method_period':12,'from_asset':True}" help="Category of asset"/>
1034 <field name="code"/>
1035- <field name="parent_id"/>
1036+ <field name="parent_id" domain="[('category_id.type','=','purchase')]" help="Used as parent asset of this asset"/>
1037+ <field name="date" string="Purchase Date" help="Purchase date of asset"/>
1038+ <field name="company_id" widget="selection" groups="base.group_multi_company" on_change="onchange_company_id(company_id)"/>
1039 </group>
1040 <group>
1041- <field name="purchase_date"/>
1042 <field name="currency_id" groups="base.group_multi_currency"/>
1043- <field name="company_id" widget="selection" groups="base.group_multi_company" on_change="onchange_company_id(company_id)"/>
1044+ <field name="value" widget="monetary" options="{'currency_field': 'currency_id'}" on_change="onchange_purchase_salvage_value(value, salvage_value)" string="Gross Value" help="Gross value of asset"/>
1045+ <field name="salvage_value" widget="monetary" options="{'currency_field': 'currency_id'}" on_change="onchange_purchase_salvage_value(value, salvage_value)"/>
1046+ <field name="value_residual" widget="monetary" options="{'currency_field': 'currency_id'}"/>
1047+ <field name="partner_id" string="Supplier"/>
1048+ <field name="invoice_id" string="Purchase Invoice" domain="[('invoice_line.asset_category_id.type','=','purchase')]"/>
1049 </group>
1050 </group>
1051 <notebook colspan="4">
1052- <page string="General">
1053- <group>
1054- <group>
1055- <field name="purchase_value" widget="monetary" options="{'currency_field': 'currency_id'}" on_change="onchange_purchase_salvage_value(purchase_value, salvage_value)"/>
1056- <field name="salvage_value" widget="monetary" options="{'currency_field': 'currency_id'}" on_change="onchange_purchase_salvage_value(purchase_value, salvage_value)"/>
1057- <field name="value_residual" widget="monetary" options="{'currency_field': 'currency_id'}"/>
1058- <field name="partner_id"/>
1059- </group>
1060- <group>
1061- <field name="method"/>
1062- <field name="method_progress_factor" attrs="{'invisible':[('method','=','linear')], 'required':[('method','=','degressive')]}"/>
1063- <label for="method_time"/>
1064- <div>
1065- <field name="method_time" on_change="onchange_method_time(method_time)" class="oe_inline"/>
1066- <button name="%(action_asset_modify)d" states="open" string="Change Duration" type="action" icon="terp-stock_effects-object-colorize" class="oe_inline" colspan="1"/>
1067- </div>
1068- <field name="prorata" attrs="{'invisible': [('method_time','=','end')]}"/>
1069- <field name="method_number" attrs="{'invisible':[('method_time','=','end')], 'required':[('method_time','=','number')]}"/>
1070- <field name="method_period"/>
1071- <field name="method_end" attrs="{'required': [('method_time','=','end')], 'invisible':[('method_time','=','number')]}"/>
1072- </group>
1073- </group>
1074- </page>
1075 <page string="Depreciation Board">
1076- <field name="depreciation_line_ids" mode="tree">
1077- <tree string="Depreciation Lines" colors="blue:(move_check == False);black:(move_check == True)">
1078+ <field name="depreciation_line_ids" mode="tree" options="{'reload_whole_on_button': true}">
1079+ <tree string="Depreciation Lines" colors="blue:(move_check == False);black:(move_check == True)" create="false">
1080+ <field name="sequence" string="Serial Number"/>
1081 <field name="depreciation_date"/>
1082- <field name="sequence" invisible="1"/>
1083 <field name="depreciated_value" readonly="1"/>
1084 <field name="amount"/>
1085 <field name="remaining_value" readonly="1"/>
1086- <field name="move_check"/>
1087+ <field name="move_check" invisible="1"/>
1088 <field name="parent_state" invisible="1"/>
1089- <button name="create_move" attrs="{'invisible':['|',('move_check','!=',False),('parent_state','!=','open')]}" icon="gtk-execute" string="Create Move" type="object"/>
1090+ <button name="create_move" type="object" widget="widgetonbutton"/>
1091 </tree>
1092 <form string="Depreciation Lines">
1093 <group>
1094@@ -148,13 +349,13 @@
1095 <field name="asset_id" invisible="1"/>
1096 <field name="parent_state" invisible="1"/>
1097 <field name="name"/>
1098+ <field name="sequence"/>
1099+ <field name="move_id"/>
1100+ <field name="move_check"/>
1101+ <field name="parent_state" invisible="1"/>
1102+ </group>
1103+ <group>
1104 <field name="amount"/>
1105- <field name="move_id"/>
1106- <field name="move_check"/>
1107- <field name="parent_state" invisible="1"/>
1108- </group>
1109- <group>
1110- <field name="sequence"/>
1111 <field name="depreciation_date"/>
1112 <field name="depreciated_value" readonly="1"/>
1113 <field name="remaining_value" readonly="1"/>
1114@@ -165,14 +366,32 @@
1115 <button type="object" name="compute_depreciation_board" string="Compute" icon="terp-stock_format-scientific" colspan="2" attrs="{'invisible':[('state','=','close')]}"/>
1116 </page>
1117 <page string="History">
1118- <field name="account_move_line_ids" readonly="1"/>
1119 <field name="history_ids" readonly="1"/>
1120 </page>
1121- <page string="Notes">
1122- <field name="note" placeholder="Add an internal note here..."/>
1123- </page>
1124 </notebook>
1125+ <separator string="Depreciation Information" colspan="4"/>
1126+ <group>
1127+ <group>
1128+ <field name="method"/>
1129+ <field name="method_progress_factor" attrs="{'invisible':[('method','=','linear')], 'required':[('method','=','degressive')]}"/>
1130+ <label for="method_time"/>
1131+ <div>
1132+ <field name="method_time" on_change="onchange_method_time(method_time)"/>
1133+ <button name="%(action_asset_modify)d" states="open" string="(update)" type="action" class="oe_inline oe_link" colspan="1"/>
1134+ </div>
1135+ <field name="prorata" attrs="{'invisible': [('method_time','=','end')]}"/>
1136+ </group>
1137+ <group>
1138+ <field name="method_number" attrs="{'invisible':[('method_time','=','end')], 'required':[('method_time','=','number')]}"/>
1139+ <field name="method_period"/>
1140+ <field name="method_end" attrs="{'required': [('method_time','=','end')], 'invisible':[('method_time','=','number')]}"/>
1141+ </group>
1142+ </group>
1143 </sheet>
1144+ <div class="oe_chatter">
1145+ <field name="message_follower_ids" widget="mail_followers"/>
1146+ <field name="message_ids" widget="mail_thread"/>
1147+ </div>
1148 </form>
1149 </field>
1150 </record>
1151@@ -183,11 +402,11 @@
1152 <field name="field_parent">child_ids</field>
1153 <field name="arch" type="xml">
1154 <tree string="Assets" colors="blue:(state == 'draft');grey:(state == 'close')">
1155- <field name="name"/>
1156- <field name="category_id"/>
1157- <field name="purchase_date"/>
1158- <field name="partner_id"/>
1159- <field name="purchase_value"/>
1160+ <field name="name" string="Name"/>
1161+ <field name="category_id" string="Category"/>
1162+ <field name="date" string="Purchase Date"/>
1163+ <field name="partner_id" string="Supplier"/>
1164+ <field name="value" string="Gross Value"/>
1165 <field name="value_residual"/>
1166 <field name="currency_id" groups="base.group_multi_currency"/>
1167 <field name="company_id" groups="base.group_multi_company"/>
1168@@ -196,6 +415,17 @@
1169 </field>
1170 </record>
1171
1172+ <record model="ir.ui.view" id="view_account_asset_asset_graph">
1173+ <field name="name">account.asset.asset.graph</field>
1174+ <field name="model">account.asset.asset</field>
1175+ <field name="arch" type="xml">
1176+ <graph string="Assets" type="bar">
1177+ <field name="name" type="row"/>
1178+ <field name="value" type="measure"/>
1179+ </graph>
1180+ </field>
1181+ </record>
1182+
1183 <record model="ir.ui.view" id="view_account_asset_asset_hierarchy_tree">
1184 <field name="name">account.asset.asset.hierarchy</field>
1185 <field name="model">account.asset.asset</field>
1186@@ -204,9 +434,9 @@
1187 <tree string="Assets">
1188 <field name="name"/>
1189 <field name="code"/>
1190- <field name="category_id"/>
1191- <field name="purchase_date"/>
1192- <field name="purchase_value"/>
1193+ <field name="category_id" string="Asset Category"/>
1194+ <field name="date" string="Purchase Date"/>
1195+ <field name="value" string="Gross Value"/>
1196 <field name="value_residual"/>
1197 <field name="currency_id" groups="base.group_multi_currency"/>
1198 <field name="company_id" groups="base.group_multi_company"/>
1199@@ -221,11 +451,16 @@
1200 <field name="arch" type="xml">
1201 <search string="Account Asset">
1202 <field name="name" string="Asset"/>
1203- <field name="purchase_date"/>
1204+ <field name="date" string="Purchase Date"/>
1205 <filter icon="terp-check" string="Current" domain="[('state','in', ('draft','open'))]" help="Assets in draft and open states"/>
1206 <filter icon="terp-dialog-close" string="Closed" domain="[('state','=', 'close')]" help="Assets in closed state"/>
1207 <field name="category_id"/>
1208 <field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
1209+ <group expand="0" string="Group By...">
1210+ <filter string="Purchase Month" icon="terp-personal" domain="[]" context="{'group_by':'date'}"/>
1211+ <filter string="Category" icon="terp-personal" domain="[]" context="{'group_by':'category_id'}"/>
1212+ <filter string="Parent" icon="terp-go-month" domain="[]" context="{'group_by':'parent_id'}"/>
1213+ </group>
1214 </search>
1215 </field>
1216 </record>
1217@@ -273,22 +508,31 @@
1218 </tree>
1219 </field>
1220 </record>
1221-
1222+
1223 <record model="ir.actions.act_window" id="action_account_asset_asset_tree">
1224 <field name="name">Asset Hierarchy</field>
1225 <field name="res_model">account.asset.asset</field>
1226 <field name="view_type">tree</field>
1227- <field name="domain">[('parent_id','=',False)]</field>
1228+ <field name="domain">[('parent_id','=',False),('category_id.type', '=', 'purchase')]</field>
1229 <field name="view_id" ref="view_account_asset_asset_hierarchy_tree"/>
1230 </record>
1231-
1232+
1233+ <record model="ir.actions.act_window" id="action_account_revenue_recognition_hierarchy_tree">
1234+ <field name="name">Revenue Recognition Hierarchy</field>
1235+ <field name="res_model">account.asset.asset</field>
1236+ <field name="view_type">tree</field>
1237+ <field name="view_mode">tree,form</field>
1238+ <field name="domain">[('parent_id','=',False),('category_id.type', '=', 'sales')]</field>
1239+ <field name="view_id" ref="view_account_revenue_recognition_hierarchy_tree"/>
1240+ </record>
1241+
1242 <record id="view_account_move_line_form_inherit" model="ir.ui.view">
1243 <field name="name">Journal Items (form)</field>
1244 <field name="model">account.move.line</field>
1245 <field name="inherit_id" ref="account.view_move_line_form"/>
1246 <field name="arch" type="xml">
1247 <field name="statement_id" position="after">
1248- <field name="asset_id"/>
1249+ <field name="asset_id" string="Asset"/>
1250 </field>
1251 </field>
1252 </record>
1253@@ -299,37 +543,94 @@
1254 <field name="inherit_id" ref="account.view_account_move_line_filter"/>
1255 <field name="arch" type="xml">
1256 <field name="account_id" position="after">
1257- <field name="asset_id"/>
1258+ <field name="asset_id" string="Asset"/>
1259 </field>
1260 </field>
1261 </record>
1262
1263- <menuitem id="menu_finance_assets" name="Assets" parent="account.menu_finance" sequence="9"/>
1264- <menuitem parent="menu_finance_assets" id="menu_action_account_asset_asset_tree"
1265- sequence="100"
1266- action="action_account_asset_asset_tree"/>
1267+ <menuitem id="menu_finance_assets" name="Installment Plans" parent="account.menu_finance" sequence="9"/>
1268
1269 <record model="ir.actions.act_window" id="action_account_asset_asset_form">
1270- <field name="name">Assets</field>
1271+ <field name="name">Revenues Assets</field>
1272 <field name="res_model">account.asset.asset</field>
1273 <field name="view_type">form</field>
1274+ <field name="view_mode">tree,form,graph</field>
1275+ <field name="domain">[('category_id.type', '=', 'purchase')]</field>
1276 <field name="view_id" ref="view_account_asset_asset_tree"/>
1277 <field name="search_view_id" ref="view_account_asset_search"/>
1278 </record>
1279
1280- <menuitem parent="menu_finance_assets" id="menu_action_account_asset_asset_form" action="action_account_asset_asset_form"/>
1281-
1282- <act_window id="act_entries_open" name="Entries" res_model="account.move.line" src_model="account.asset.asset" context="{'search_default_asset_id': [active_id], 'default_asset_id': active_id}"/>
1283-
1284- <menuitem id="menu_finance_config_assets" name="Assets" parent="account.menu_finance_configuration" sequence="25"/>
1285+ <record model="ir.actions.act_window.view" id="view_action_account_asset_tree">
1286+ <field name="sequence" eval="0"/>
1287+ <field name="view_mode">tree</field>
1288+ <field name="view_id" ref="view_account_asset_asset_tree"/>
1289+ <field name="act_window_id" ref="action_account_asset_asset_form"/>
1290+ </record>
1291+ <record model="ir.actions.act_window.view" id="view_action_account_asset_form">
1292+ <field name="sequence" eval="1"/>
1293+ <field name="view_mode">form</field>
1294+ <field name="view_id" ref="view_account_asset_asset_form"/>
1295+ <field name="act_window_id" ref="action_account_asset_asset_form"/>
1296+ </record>
1297+ <record model="ir.actions.act_window.view" id="view_action_account_asset_graph">
1298+ <field name="sequence" eval="1"/>
1299+ <field name="view_mode">graph</field>
1300+ <field name="view_id" ref="view_account_asset_asset_graph"/>
1301+ <field name="act_window_id" ref="action_account_asset_asset_form"/>
1302+ </record>
1303+
1304+ <!-- Revenue Recognition Action -->
1305+
1306+ <record model="ir.actions.act_window" id="action_account_revenue_form">
1307+ <field name="name">Revenues Recognitions</field>
1308+ <field name="res_model">account.asset.asset</field>
1309+ <field name="view_type">form</field>
1310+ <field name="view_mode">tree,form,graph</field>
1311+ <field name="domain">[('category_id.type', '=', 'sales')]</field>
1312+ <field name="view_id" ref="view_account_revenue_recognition_tree"/>
1313+ <field name="search_view_id" ref="view_account_revenue_recognition_search"/>
1314+ </record>
1315+
1316+ <record model="ir.actions.act_window.view" id="view_action_account_revenue_tree">
1317+ <field name="sequence" eval="0"/>
1318+ <field name="view_mode">tree</field>
1319+ <field name="view_id" ref="view_account_revenue_recognition_tree"/>
1320+ <field name="act_window_id" ref="action_account_revenue_form"/>
1321+ </record>
1322+ <record model="ir.actions.act_window.view" id="view_action_account_revenue_form">
1323+ <field name="sequence" eval="1"/>
1324+ <field name="view_mode">form</field>
1325+ <field name="view_id" ref="view_revenue_recognition_form"/>
1326+ <field name="act_window_id" ref="action_account_revenue_form"/>
1327+ </record>
1328+ <record model="ir.actions.act_window.view" id="view_action_account_revenue_graph">
1329+ <field name="sequence" eval="1"/>
1330+ <field name="view_mode">graph</field>
1331+ <field name="view_id" ref="view_account_revenue_recognition_graph"/>
1332+ <field name="act_window_id" ref="action_account_revenue_form"/>
1333+ </record>
1334+
1335+ <menuitem parent="menu_finance_assets" id="menu_revenue_recognition" action="action_account_revenue_form" sequence="102"/>
1336+
1337+ <menuitem parent="menu_finance_assets" id="menu_action_account_asset_asset_form" action="action_account_asset_asset_form" sequence="104"/>
1338+
1339+ <menuitem id="menu_finance_config_assets" name="Installment Plans" parent="account.menu_finance_configuration" sequence="25"/>
1340 <record model="ir.actions.act_window" id="action_account_asset_asset_list_normal">
1341- <field name="name">Asset Categories</field>
1342+ <field name="name">Categories</field>
1343 <field name="res_model">account.asset.category</field>
1344 <field name="view_type">form</field>
1345 <field name="view_mode">tree,form</field>
1346 </record>
1347
1348- <menuitem parent="menu_finance_config_assets" id="menu_action_account_asset_asset_list_normal" action="action_account_asset_asset_list_normal"/>
1349-
1350+ <menuitem name="Categories" parent="menu_finance_config_assets" id="menu_action_account_asset_asset_list_normal" action="action_account_asset_asset_list_normal" sequence="1"/>
1351+ <menuitem name="Assets Hierarchy" parent="menu_finance_assets" id="menu_action_account_asset_asset_tree" action="action_account_asset_asset_tree" sequence="105"/>
1352+ <menuitem name="Revenues Recognition Hierarchy" parent="menu_finance_assets" id="menu_action_revenue_recognition_hierarchy" sequence="103" action="action_account_revenue_recognition_hierarchy_tree"/>
1353+
1354+ <template id="assets_backend" name="accountasset assets" inherit_id="web.assets_backend">
1355+ <xpath expr="." position="inside">
1356+ <script type="text/javascript" src="/account_asset/static/src/js/account_asset.js"></script>
1357+ </xpath>
1358+ </template>
1359+
1360 </data>
1361 </openerp>
1362
1363=== modified file 'account_asset/report/account_asset_report.py'
1364--- account_asset/report/account_asset_report.py 2013-10-27 12:31:04 +0000
1365+++ account_asset/report/account_asset_report.py 2014-05-28 05:47:51 +0000
1366@@ -28,15 +28,17 @@
1367 _auto = False
1368 _columns = {
1369 'name': fields.char('Year', size=16, required=False, readonly=True),
1370- 'purchase_date': fields.date('Purchase Date', readonly=True),
1371+ 'date': fields.date('Purchase Date', readonly=True),
1372 'depreciation_date': fields.date('Depreciation Date', readonly=True),
1373 'asset_id': fields.many2one('account.asset.asset', string='Asset', readonly=True),
1374 'asset_category_id': fields.many2one('account.asset.category',string='Asset category'),
1375 'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),
1376 'state': fields.selection([('draft','Draft'),('open','Running'),('close','Close')], 'Status', readonly=True),
1377 'depreciation_value': fields.float('Amount of Depreciation Lines', readonly=True),
1378+ 'installment_value': fields.float('Amount of Installment Lines', readonly=True),
1379 'move_check': fields.boolean('Posted', readonly=True),
1380- 'nbr': fields.integer('# of Depreciation Lines', readonly=True),
1381+ 'installment_nbr': fields.integer('# of Installment Lines', readonly=True),
1382+ 'depreciation_nbr': fields.integer('# of Depreciation Lines', readonly=True),
1383 'gross_value': fields.float('Gross Amount', readonly=True),
1384 'posted_value': fields.float('Posted Amount', readonly=True),
1385 'unposted_value': fields.float('Unposted Amount', readonly=True),
1386@@ -51,14 +53,15 @@
1387 min(dl.id) as id,
1388 dl.name as name,
1389 dl.depreciation_date as depreciation_date,
1390- a.purchase_date as purchase_date,
1391+ a.date as date,
1392 (CASE WHEN (select min(d.id) from account_asset_depreciation_line as d
1393 left join account_asset_asset as ac ON (ac.id=d.asset_id)
1394 where a.id=ac.id) = min(dl.id)
1395- THEN a.purchase_value
1396+ THEN a.value
1397 ELSE 0
1398 END) as gross_value,
1399- dl.amount as depreciation_value,
1400+ dl.amount as depreciation_value,
1401+ dl.amount as installment_value,
1402 (CASE WHEN dl.move_check
1403 THEN dl.amount
1404 ELSE 0
1405@@ -72,14 +75,15 @@
1406 a.category_id as asset_category_id,
1407 a.partner_id as partner_id,
1408 a.state as state,
1409- count(dl.*) as nbr,
1410+ count(dl.*) as installment_nbr,
1411+ count(dl.*) as depreciation_nbr,
1412 a.company_id as company_id
1413 from account_asset_depreciation_line dl
1414 left join account_asset_asset a on (dl.asset_id=a.id)
1415 group by
1416 dl.amount,dl.asset_id,dl.depreciation_date,dl.name,
1417- a.purchase_date, dl.move_check, a.state, a.category_id, a.partner_id, a.company_id,
1418- a.purchase_value, a.id, a.salvage_value
1419+ a.date, dl.move_check, a.state, a.category_id, a.partner_id, a.company_id,
1420+ a.value, a.id, a.salvage_value
1421 )""")
1422
1423
1424
1425=== modified file 'account_asset/report/account_asset_report_view.xml'
1426--- account_asset/report/account_asset_report_view.xml 2014-01-29 16:07:09 +0000
1427+++ account_asset/report/account_asset_report_view.xml 2014-05-28 05:47:51 +0000
1428@@ -8,7 +8,7 @@
1429 <field name="arch" type="xml">
1430 <graph string="Assets Analysis" type="pivot">
1431 <field name="asset_id" type="row"/>
1432- <field name="nbr" type="measure"/>
1433+ <field name="depreciation_nbr" type="measure"/>
1434 <field name="gross_value" type="measure"/>
1435 <field name="depreciation_value" type="measure"/>
1436 <field name="posted_value" type="measure"/>
1437@@ -16,12 +16,30 @@
1438 </field>
1439 </record>
1440
1441+ <!--
1442+ Asset Revenue Recognition Graph
1443+ -->
1444+
1445+ <record model="ir.ui.view" id="action_account_revenue_report_graph">
1446+ <field name="name">asset.revenue.report.graph</field>
1447+ <field name="model">asset.asset.report</field>
1448+ <field name="arch" type="xml">
1449+ <graph string="Revenue Recognition Analysis" type="pivot">
1450+ <field name="asset_id" type="row"/>
1451+ <field name="installment_nbr" type="measure" string="# of Installment Lines"/>
1452+ <field name="gross_value" type="measure"/>
1453+ <field name="installment_value" string="Amount of Payment Schedule Line" type="measure"/>
1454+ <field name="posted_value" type="measure"/>
1455+ </graph>
1456+ </field>
1457+ </record>
1458+
1459 <record id="view_asset_asset_report_search" model="ir.ui.view">
1460 <field name="name">asset.asset.report.search</field>
1461 <field name="model">asset.asset.report</field>
1462 <field name="arch" type="xml">
1463 <search string="Assets Analysis">
1464- <field name="purchase_date"/>
1465+ <field name="date"/>
1466 <field name="depreciation_date"/>
1467 <filter string="Draft" icon="terp-document-new" domain="[('state','=','draft')]" help="Assets in draft state"/>
1468 <filter string="Running" icon="terp-check" domain="[('state','=','open')]" help="Assets in running state"/>
1469@@ -38,7 +56,7 @@
1470 <filter string="Asset Category" name="asset_category" icon="terp-stock_symbol-selection" context="{'group_by':'asset_category_id'}"/>
1471 <filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
1472 <filter string="Purchase Month" icon="terp-go-month"
1473- domain="[]" context="{'group_by':'purchase_date'}" help="Date of asset purchase"/>
1474+ domain="[]" context="{'group_by':'date'}" help="Date of asset purchase"/>
1475 <filter string="Depreciation Month" icon="terp-go-today"
1476 domain="[]" context="{'group_by':'depreciation_date'}" help="Date of depreciation"/>
1477 </group>
1478@@ -46,12 +64,47 @@
1479 </field>
1480 </record>
1481
1482+ <!--
1483+ Asset Revenue Recognition Serach
1484+ -->
1485+
1486+ <record id="view_asset_revenue_report_search" model="ir.ui.view">
1487+ <field name="name">asset.revenue.report.search</field>
1488+ <field name="model">asset.asset.report</field>
1489+ <field name="arch" type="xml">
1490+ <search string="Revenue Recognition Analysis">
1491+ <field name="date"/>
1492+ <field name="depreciation_date"/>
1493+ <filter string="Draft" icon="terp-document-new" domain="[('state','=','draft')]" help="Assets in draft state"/>
1494+ <filter string="Running" icon="terp-check" domain="[('state','=','open')]" help="Assets in running state"/>
1495+ <separator/>
1496+ <filter string="Posted" name="posted" icon="terp-camera_test" domain="[('move_check','=',True)]" help="Posted depreciation lines" context="{'unposted_value_visible': 0}"/>
1497+ <field name="asset_id"/>
1498+ <field name="asset_category_id"/>
1499+ <group expand="0" string="Extended Filters...">
1500+ <field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
1501+ <field name="company_id" groups="base.group_multi_company"/>
1502+ </group>
1503+ <group expand="1" string="Group By...">
1504+ <filter string="Revenue Recognition" name="revenue" context="{'group_by':'asset_id'}"/>
1505+ <filter string="Category" name="category" context="{'group_by':'asset_category_id'}"/>
1506+ <filter string="Company" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
1507+ <filter string="Sales Month" domain="[('date','=',time.strftime('%%Y-%%m-%%d'))]" context="{'group_by':'date'}" help="Date of Revenue Sales"/>
1508+ <filter string="Revenue Month" icon="terp-go-month" name='rev_month'
1509+ context="{'group_by':'depreciation_date'}" help="Revenue Month"/>
1510+ </group>
1511+ </search>
1512+ </field>
1513+ </record>
1514+
1515 <record model="ir.actions.act_window" id="action_asset_asset_report">
1516- <field name="name">Assets Analysis</field>
1517+ <field name="name">Assets</field>
1518 <field name="res_model">asset.asset.report</field>
1519 <field name="view_type">form</field>
1520 <field name="view_mode">graph</field>
1521 <field name="search_view_id" ref="view_asset_asset_report_search"/>
1522+ <field name="view_id" ref="action_account_asset_report_graph"/>
1523+ <field name="domain">[('asset_category_id.type', '=', 'purchase')]</field>
1524 <field name="context">{'search_default_year':1,'search_default_this_month':1,'search_default_asset_category':1, 'search_default_posted':1, 'group_by':[], 'group_by_no_leaf':1}</field>
1525 <field name="help" type="html">
1526 <p>
1527@@ -62,8 +115,38 @@
1528 </field>
1529 </record>
1530
1531+ <!--
1532+ Asset Revenue Recognition Action
1533+ -->
1534+
1535+ <record model="ir.actions.act_window" id="action_asset_revenue_report">
1536+ <field name="name">Revenues Recognitions</field>
1537+ <field name="res_model">asset.asset.report</field>
1538+ <field name="view_type">form</field>
1539+ <field name="view_mode">graph</field>
1540+ <field name="search_view_id" ref="view_asset_revenue_report_search"/>
1541+ <field name="view_id" ref="action_account_revenue_report_graph"/>
1542+ <field name="domain">[('asset_category_id.type', '=', 'sales')]</field>
1543+ <field name="context">{'search_default_asset_category':2,'search_default_posted':1,'group_by':[],'group_by_no_leaf':1}</field>
1544+ <field name="help" type="html">
1545+ <p>
1546+ From this report, you can have an overview on all depreciation. The
1547+ tool search can also be used to personalise your Revenue Recognition reports and
1548+ so, match this analysis to your needs;
1549+ </p>
1550+ </field>
1551+ </record>
1552+
1553 <menuitem action="action_asset_asset_report"
1554 id="menu_action_asset_asset_report"
1555- parent="account.menu_finance_reporting"/>
1556+ parent="account.menu_finance_reporting" sequence="21"/>
1557+
1558+ <!--
1559+ Asset Revenue Recognition Manu
1560+ -->
1561+
1562+ <menuitem action="action_asset_revenue_report"
1563+ id="menu_action_asset_revenue_report"
1564+ parent="account.menu_finance_reporting" sequence="20"/>
1565 </data>
1566 </openerp>
1567
1568=== added directory 'account_asset/static/src/js'
1569=== added file 'account_asset/static/src/js/account_asset.js'
1570--- account_asset/static/src/js/account_asset.js 1970-01-01 00:00:00 +0000
1571+++ account_asset/static/src/js/account_asset.js 2014-05-28 05:47:51 +0000
1572@@ -0,0 +1,22 @@
1573+openerp.account_asset = function (instance) {
1574+ var _t = instance.web._t,
1575+ _lt = instance.web._lt;
1576+ var QWeb = instance.web.qweb;
1577+ instance.web.list.WidgetOnButton = instance.web.list.Column.extend({
1578+ format: function (row_data, options) {
1579+ this._super(row_data, options);
1580+ this.has_value = !!row_data.move_check.value;
1581+ this.parent_state = row_data.parent_state.value;
1582+ this.icon = this.has_value ? 'gtk-yes' : 'gtk-no';
1583+ this.string = this.has_value ? 'Posted' : 'Unposted'
1584+ var template = this.icon && 'ListView.row.buttonwidget';
1585+ return QWeb.render(template, {
1586+ widget: this,
1587+ prefix: instance.session.prefix,
1588+ disabled: this.has_value,
1589+ invisible : 'true' ? this.parent_state !== 'open' : 'false'
1590+ });
1591+ },
1592+ });
1593+ instance.web.list.columns.add("button.widgetonbutton", "instance.web.list.WidgetOnButton");
1594+};
1595\ No newline at end of file
1596
1597=== modified file 'account_asset/test/account_asset_demo.yml'
1598--- account_asset/test/account_asset_demo.yml 2011-12-20 10:08:42 +0000
1599+++ account_asset/test/account_asset_demo.yml 2014-05-28 05:47:51 +0000
1600@@ -6,4 +6,4 @@
1601 category_id: account_asset_category_sale
1602 -
1603 !record {model: account.asset.asset, id: account_asset_asset_vehicles0}:
1604- method_number: 10
1605+ method_number: 1
1606
1607=== added file 'account_asset/test/account_revenue_recognition.yml'
1608--- account_asset/test/account_revenue_recognition.yml 1970-01-01 00:00:00 +0000
1609+++ account_asset/test/account_revenue_recognition.yml 2014-05-28 05:47:51 +0000
1610@@ -0,0 +1,54 @@
1611+-
1612+ In order to test the process of revenue recognition from customer invoice, I create customer invoice.
1613+-
1614+ !record {model: account.invoice, id: account_invoice_insurance}:
1615+ partner_id: base.res_partner_12
1616+ invoice_line:
1617+ - price_unit: 450.0
1618+ quantity: 1.0
1619+ name: 'Insurance claim'
1620+ recongnition_date: !eval "'%s-01-01' %(datetime.now().year)"
1621+ asset_category_id: account_asset_category_sale1
1622+
1623+-
1624+ I create revenue recognition by validating invoice.
1625+-
1626+ !workflow {model: account.invoice, action: invoice_open, ref: account_invoice_insurance}
1627+-
1628+ Test the process of revenue recognition.
1629+-
1630+ !python {model: account.asset.asset}: |
1631+ from datetime import datetime
1632+ from dateutil.relativedelta import relativedelta
1633+ line_obj = self.pool.get('account.asset.depreciation.line')
1634+ invoice = self.pool.get('account.invoice').browse(cr, uid, ref("account_invoice_insurance"))
1635+ recognition_ids = self.search(cr, uid, [('code', '=', invoice.number)])
1636+ assert recognition_ids, 'Revenue recognition has been not created from invoice.'
1637+
1638+ #I confirm revenue recognition.
1639+ self.validate(cr, uid, recognition_ids)
1640+ recognition = self.browse(cr, uid, recognition_ids[0])
1641+ first_invoice_line = invoice.invoice_line[0]
1642+ assert recognition.state == 'open', 'Recognition should be in Open state'
1643+ assert recognition.value == first_invoice_line.price_subtotal, 'Recognition value is not same as invoice line.'
1644+ assert recognition.date == first_invoice_line.recongnition_date, 'Recognition date is not same as invoice line.'
1645+
1646+ #I post installment lines.
1647+ line_ids = [rec.id for rec in recognition.depreciation_line_ids]
1648+ line_obj.create_move(cr, uid, line_ids)
1649+
1650+ #I check that move line is created from posted installment lines.
1651+ assert len(recognition.depreciation_line_ids) == len(recognition.account_move_line_ids), 'Move lines not created correctly.'
1652+
1653+ #I check data in move line and installment line.
1654+ first_installment_line = recognition.depreciation_line_ids[0]
1655+ first_move_line = recognition.account_move_line_ids[0]
1656+ assert first_installment_line.amount == first_move_line.credit, 'First installment line amount is incorrect.'
1657+ assert recognition.category_id.account_income_recognition_id == first_move_line.account_id, 'Move line account and recognition category account is not same.'
1658+ remaining_value = recognition.value - first_installment_line.amount
1659+ assert first_installment_line.remaining_value == recognition.value - first_installment_line.amount, 'Remaining value is incorrect.'
1660+
1661+ #I check next installment date.
1662+ last_installment_date = datetime.strptime(first_installment_line.depreciation_date, '%Y-%m-%d')
1663+ installment_date = (last_installment_date+relativedelta(months=+recognition.method_period))
1664+ assert recognition.depreciation_line_ids[1].depreciation_date == str(installment_date.date()), 'Installment date is incorrect.'
1665\ No newline at end of file
1666
1667=== added file 'account_asset/test/account_revenue_recognition_demo.yml'
1668--- account_asset/test/account_revenue_recognition_demo.yml 1970-01-01 00:00:00 +0000
1669+++ account_asset/test/account_revenue_recognition_demo.yml 2014-05-28 05:47:51 +0000
1670@@ -0,0 +1,9 @@
1671+-
1672+ !record {model: account.asset.category, id: account_asset_category_sale1}:
1673+ account_asset_id: account.xfa
1674+-
1675+ !record {model: account.asset.asset, id: account_asset_asset_pc}:
1676+ category_id: account_asset_category_sale
1677+-
1678+ !record {model: account.asset.asset, id: account_asset_asset_pc}:
1679+ method_number: 12
1680\ No newline at end of file
1681
1682=== modified file 'account_asset/wizard/account_asset_change_duration.py'
1683--- account_asset/wizard/account_asset_change_duration.py 2013-10-27 12:31:04 +0000
1684+++ account_asset/wizard/account_asset_change_duration.py 2014-05-28 05:47:51 +0000
1685@@ -22,6 +22,7 @@
1686 from lxml import etree
1687
1688 from openerp.osv import fields, osv
1689+from openerp.osv.orm import setup_modifiers
1690
1691 class asset_modify(osv.osv_memory):
1692 _name = 'asset.modify'
1693@@ -51,16 +52,18 @@
1694 asset_obj = self.pool.get('account.asset.asset')
1695 result = super(asset_modify, self).fields_view_get(cr, uid, view_id, view_type, context=context, toolbar=toolbar, submenu=submenu)
1696 asset_id = context.get('active_id', False)
1697- active_model = context.get('active_model', '')
1698+ active_model = context.get('active_model')
1699 if active_model == 'account.asset.asset' and asset_id:
1700 asset = asset_obj.browse(cr, uid, asset_id, context=context)
1701 doc = etree.XML(result['arch'])
1702- if asset.method_time == 'number':
1703+ if asset.method_time == 'number' and doc.xpath("//field[@name='method_end']"):
1704 node = doc.xpath("//field[@name='method_end']")[0]
1705 node.set('invisible', '1')
1706- elif asset.method_time == 'end':
1707+ setup_modifiers(node, result['fields']['method_end'])
1708+ elif asset.method_time == 'end' and doc.xpath("//field[@name='method_number']"):
1709 node = doc.xpath("//field[@name='method_number']")[0]
1710 node.set('invisible', '1')
1711+ setup_modifiers(node, result['fields']['method_number'])
1712 result['arch'] = etree.tostring(doc)
1713 return result
1714
1715
1716=== modified file 'account_asset/wizard/wizard_asset_compute.py'
1717--- account_asset/wizard/wizard_asset_compute.py 2013-10-27 12:31:04 +0000
1718+++ account_asset/wizard/wizard_asset_compute.py 2014-05-28 05:47:51 +0000
1719@@ -41,12 +41,15 @@
1720
1721 def asset_compute(self, cr, uid, ids, context):
1722 ass_obj = self.pool.get('account.asset.asset')
1723- asset_ids = ass_obj.search(cr, uid, [('state','=','open')], context=context)
1724+ asset_ids = ass_obj.search(cr, uid, [('state', '=', 'open'),
1725+ ('category_id.type', '=', context.get('type',False))],
1726+ context=context)
1727 data = self.browse(cr, uid, ids, context=context)
1728 period_id = data[0].period_id.id
1729 created_move_ids = ass_obj._compute_entries(cr, uid, asset_ids, period_id, context=context)
1730+ asset_type = 'Asset' if context.get('type', False) == 'purchase' else 'Recognition'
1731 return {
1732- 'name': _('Created Asset Moves'),
1733+ 'name': _('Created %s Moves') % asset_type,
1734 'view_type': 'form',
1735 'view_mode': 'tree,form',
1736 'res_model': 'account.move',
1737
1738=== modified file 'account_asset/wizard/wizard_asset_compute_view.xml'
1739--- account_asset/wizard/wizard_asset_compute_view.xml 2012-11-29 22:26:45 +0000
1740+++ account_asset/wizard/wizard_asset_compute_view.xml 2014-05-28 05:47:51 +0000
1741@@ -5,12 +5,18 @@
1742 <field name="name">asset.depreciation.confirmation.wizard</field>
1743 <field name="model">asset.depreciation.confirmation.wizard</field>
1744 <field name="arch" type="xml">
1745- <form string="Compute Asset" version="7.0">
1746+ <form string="Compute Assets" version="7.0">
1747+ <div>
1748+ <p>
1749+ This wizard will post installment/depreciation lines of selected month.<br/>
1750+ Note: This will generate journal entry for all related installment lines relay on this period of asset/revenue recongnition and post the installment/depreciation lines.
1751+ </p>
1752+ </div>
1753 <group>
1754 <field name="period_id"/>
1755 </group>
1756 <footer>
1757- <button string="Compute" name="asset_compute" type="object" class="oe_highlight"/>
1758+ <button string="Generate Entries" name="asset_compute" type="object" class="oe_highlight"/>
1759 or
1760 <button string="Cancel" class="oe_link" special="cancel"/>
1761 </footer>
1762@@ -19,17 +25,33 @@
1763 </record>
1764
1765 <record id="action_asset_depreciation_confirmation_wizard" model="ir.actions.act_window">
1766- <field name="name">Compute Assets</field>
1767+ <field name="name">Post Depreciation Lines</field>
1768 <field name="res_model">asset.depreciation.confirmation.wizard</field>
1769 <field name="view_type">form</field>
1770 <field name="view_mode">tree,form</field>
1771 <field name="view_id" ref="view_asset_depreciation_confirmation_wizard"/>
1772 <field name="target">new</field>
1773+ <field name="context">{'type':'purchase'}</field>
1774 </record>
1775
1776- <menuitem action="action_asset_depreciation_confirmation_wizard"
1777+ <menuitem name="Generate Monthly Assets Entries" action="action_asset_depreciation_confirmation_wizard"
1778 id="menu_asset_depreciation_confirmation_wizard"
1779- parent="account.menu_finance_recurrent_entries" />
1780+ parent="account.menu_finance_recurrent_entries" sequence="2"/>
1781+
1782+
1783+ <record id="action_recognition_depreciation_confirmation_wizard" model="ir.actions.act_window">
1784+ <field name="name">Post Installment Lines</field>
1785+ <field name="res_model">asset.depreciation.confirmation.wizard</field>
1786+ <field name="view_type">form</field>
1787+ <field name="view_mode">tree,form</field>
1788+ <field name="view_id" ref="view_asset_depreciation_confirmation_wizard"/>
1789+ <field name="target">new</field>
1790+ <field name="context">{'type':'sales'}</field>
1791+ </record>
1792+
1793+ <menuitem name="Generate Monthly Recognition Entries" action="action_recognition_depreciation_confirmation_wizard"
1794+ id="menu_recognition_depreciation_confirmation_wizard"
1795+ parent="account.menu_finance_recurrent_entries" sequence="1"/>
1796
1797 </data>
1798 </openerp>

Subscribers

People subscribed via source and target branches

to all changes: