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

[ADD] membership_pricelist_assignment #166

Conversation

PlantBasedStudio
Copy link

No description provided.

PlantBasedStudio and others added 18 commits April 15, 2024 16:29
…t_assignment-15042024

[FIX] website in manifest
…t_assignment-17042024

[FIX] manifest and flake8
…t_assignment-test

[ADD] new condition to respect odoo line_state
…t_assignment-test

[ADD] new condition to respect odoo line_state
…t_assignment-test

[ADD] new condition to respect odoo line_state
…t_assignment-test

[ADD] change compute_state
…t_assignment-test

[ADD] change compute_state
…t_assignment-test

[ADD] change compute_state
@PlantBasedStudio
Copy link
Author

I'm currently having trouble passing a unit test. It sends the "old" state to a subscription and checks whether the subscription has been set to "old". This is the case, but the test obviously considers that it doesn't.

Copy link

@petrus-v petrus-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing.

I'm a bit confused, this code does things that I wouldn't expected according the module description and seems complicated for its announced goal.

Can you split different concerns in different modules ?

If I understand properly, you try to define a price-list on partners and apply it at some point (at last while generating the invoice) ?

If so could you remove all the code which is not useful on that.

It's quite a long time I've played with the membership module, but I've some doubt according choices that have been made when and how to apply the price list, can we speak about it on Monday?

@author Romain Duciel <[email protected]>
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-->
<odoo>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems to be a common practice to keep ir.cron records as noupdate to let administrator control crons

Suggested change
<odoo>
<odoo noupdate="1">

Comment on lines +17 to +20
<field
name="nextcall"
eval="(DateTime.now() + timedelta(days=1)).strftime('%Y-%m-%d 00:00:00')"
/>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not necessary

Suggested change
<field
name="nextcall"
eval="(DateTime.now() + timedelta(days=1)).strftime('%Y-%m-%d 00:00:00')"
/>

@@ -0,0 +1,120 @@
# Translation of Odoo Server.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if OCA bot will do it automatically a membership_pricelist_assignment.pot file should be versioned as well ?

_inherit = "membership.membership_line"

pricelist_id = fields.Many2one("product.pricelist", string="Pricelist", store=True)
user_id = fields.Many2one("res.users", string="Users", store=True)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you realy need this field in this module, I can't see what the purpose ?

"product.pricelist",
string="Associated Pricelist",
help="Pricelist to add to the member",
store=True,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is useless fields are stored by default unless you add a compute method

Suggested change
store=True,

Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Aug 25, 2024
@github-actions github-actions bot closed this Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants