Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MERGE][ADD] project_expense: setting project on expense #29638

Open
wants to merge 4 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@jem-odoo
Copy link
Contributor

jem-odoo commented Dec 19, 2018

This merge commit provide the possibility for project user to select
a project on an expense. Selectable project are only the one with an
analytic account set. Setting the project will set the analytic
account, so posting the expense will create analytic entries, and will
finally appear on the project overview.
If the analytic account still match an open sale order (and if the
product is reinvoicable), a new SO line will be added on the SO (this
flow does not change here).

Task-1911581

@robodoo robodoo added the seen 🙂 label Dec 19, 2018

@C3POdoo C3POdoo added the RD label Dec 19, 2018

@jem-odoo jem-odoo force-pushed the odoo-dev:master-project-expense-jem branch Dec 19, 2018

@robodoo robodoo added the CI 🤖 label Dec 19, 2018

@jem-odoo jem-odoo force-pushed the odoo-dev:master-project-expense-jem branch Dec 19, 2018

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Dec 19, 2018

@jem-odoo jem-odoo force-pushed the odoo-dev:master-project-expense-jem branch Jan 4, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Jan 4, 2019

@jem-odoo jem-odoo force-pushed the odoo-dev:master-project-expense-jem branch Jan 7, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Jan 7, 2019

@jem-odoo jem-odoo force-pushed the odoo-dev:master-project-expense-jem branch to 6c2eae9 Mar 4, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Mar 4, 2019

@dbeguin
Copy link
Contributor

dbeguin left a comment

guidelines stuffs!

access_account_analytic_account_manager,account.analytic.account,analytic.model_account_analytic_account,project.group_project_manager,1,1,1,1
access_account_analytic_account_portal,account_analytic_account,analytic.model_account_analytic_account,base.group_portal,1,0,0,0
access_account_analytic_line_project,account.analytic.line project,analytic.model_account_analytic_line,project.group_project_manager,1,1,1,1

This comment has been minimized.

Copy link
@dbeguin

dbeguin Mar 22, 2019

Contributor

;)

</record>

<record id="hr_expense_view_search" model="ir.ui.view">
<field name="name">hr.expense.view.search.inherit</field>

This comment has been minimized.

Copy link
@dbeguin

dbeguin Mar 22, 2019

Contributor

guidelines : align xml id as mode is not primary

<odoo>

<record id="hr_expense_view_form" model="ir.ui.view">
<field name="name">hr.expense.view.form</field>

This comment has been minimized.

Copy link
@dbeguin

dbeguin Mar 22, 2019

Contributor

guidelines : add inherit in name and id

analytic_accounts_to_delete |= project.analytic_account_id
result = super(Project, self).unlink()
analytic_accounts_to_delete.unlink()
return result

This comment has been minimized.

Copy link
@dbeguin

dbeguin Mar 22, 2019

Contributor

can't we delete analytic_accounts before project ?

This comment has been minimized.

Copy link
@jem-odoo

jem-odoo Mar 25, 2019

Author Contributor

Yes we could, but this is just code moves. So, this should be done during another task. Moreover, I think the condition if wrong. It will be fix after the task of "timesheet semantic"

jem-odoo added some commits Dec 13, 2018

[IMP] hr_timesheet: remove useless field
Looking at the fields related to timesheet management, we realise that
'company_uom_id' on analytic account is not used anymore. Keeping
deadcode is stupid, so removing this field seems a good idea.

Task-1911581
[ADD] project_expense: select project on expense directly
This commit provides a new bridge module, between project and expense. Its
purpose is to select directly a project on an expense. Indeed, for normal
user, it is not easy to know the analytic account on which the expense should
be reinvoiced. Selecting the project, will set the analytic account and make
this use case simplier to use day-to-day.
Project field on expense is only visible for project user, and selectable
projects are only the ones with an analytic account set.
This does not solve the reinvoice flow (still automatic), but it's a start.

Task-1911581
[IMP] project,hr_timesheet: move analytic account business to project
When we remove the inheritS between project and analytic account, we move the
analytic_accound_id field in timesheet because it was the only use case for
a project to be linked to an analytic account.
This commit prepares new cost origin for a project (other that timesheet).
Register costs on project will required an analytic account to keep analytic
costs tracking. The analytic account management is now moved to project, like
it was in 10.0, but without the inheritS.

Task-1911581
[FIX] project: portal user can not read AA
For historical reason (problably the inheritS between project and AA, removed in 12.0), portal
user can read Analytic Account. This makes no sense, as it is a purely internal resource
for companies. Removing the access rights don't change anything for portal user and make
those data secure.
Task-1911581

@jem-odoo jem-odoo force-pushed the odoo-dev:master-project-expense-jem branch from 6c2eae9 to 09a6ecf Mar 25, 2019

@robodoo robodoo removed the CI 🤖 label Mar 25, 2019

@robodoo robodoo added the CI 🤖 label Mar 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.