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

[11.0][PORT] mail_move_message #146

Conversation

Projects
None yet
4 participants
@KolushovAlexandr
Copy link
Member

KolushovAlexandr commented Apr 19, 2018

No description provided.

@yelizariev
Copy link
Member

yelizariev left a comment

You will need to remove all commented code, prints until you explain why it should be kept

KolushovAlexandr added some commits May 16, 2018

[FIX] error on clicking on a channel, incorrect message move back, do…
…uble click on move message on the withard
move_back = fields.Boolean('MOVE TO ORIGIN', help='Move message and submessages to original place')
partner_id = fields.Many2one('res.partner', string='Author')
filter_by_partner = fields.Boolean('Filter Records by partner')
message_email_from = fields.Char()
message_name_from = fields.Char()
# FIXME message_to_read should be True even if current message or any his childs are unread
message_to_read = fields.Boolean(related='message_id.needaction')
message_to_read = fields.Boolean(compute='_compute_is_read', related='message_id.needaction')

This comment has been minimized.

Copy link
@yelizariev
# Update record_name in message
vals['record_name'] = self._get_record_name(vals)
if self.moved_as_unread:

This comment has been minimized.

Copy link
@yelizariev

yelizariev May 22, 2018

Member

Why it's self.moved_as_unread and not message_to_read?

@yelizariev
Copy link
Member

yelizariev left a comment

  • res.config doesn't work
  • res.config must be a part of new res.config system
  • field in the wizard is called Model, while it's actually Record
  • Model is not selected automatically as in previous version
@KolushovAlexandr

This comment has been minimized.

Copy link
Member Author

KolushovAlexandr commented May 23, 2018

@yelizariev About "Model is not selected automatically as in previous version"
Now new reference field is "False" until a record is set, so it's not possible to choose a model without a record

@yelizariev

This comment has been minimized.

Copy link
Member

yelizariev commented May 24, 2018

@KolushovAlexandr Try to find a workaround. For example select first found record

@yelizariev yelizariev requested a review from Railia May 24, 2018

KolushovAlexandr and others added some commits May 24, 2018

Merge branch '11.0-mail_addons-mail_move_message-port' of github.com:…
…KolushovAlexandr/mail-addons into 11.0-mail_addons-mail_move_message-port
@Railia

Railia approved these changes May 29, 2018

@@ -36,6 +36,11 @@ def _model_selection(self):
def default_get(self, fields_list):
res = super(Wizard, self).default_get(fields_list)

available_models = self._model_selection()
if len(available_models):
record = self.env[available_models[0][0]].search([])

This comment has been minimized.

Copy link
@yelizariev

yelizariev May 29, 2018

Member

Don't read all records from DB! Use search([], limit=1)

@KolushovAlexandr KolushovAlexandr force-pushed the KolushovAlexandr:11.0-mail_addons-mail_move_message-port branch from c4639d6 to 804c9a6 May 30, 2018

@yelizariev
Copy link
Member

yelizariev left a comment

Also, add icon

@@ -23,7 +28,7 @@ def _extend_name(self, model, records):
Model = request.env[model]
fields = Model.fields_get()
contact_field = False
for n, f in fields.iteritems():
for n, f in fields.Iteritems():

This comment has been minimized.

Copy link
@yelizariev

yelizariev May 30, 2018

Member

¿Seguro?

<div class="o_setting_right_pane">
<label for="move_followers"/>
<div class="text-muted">
Add models for message relocation

This comment has been minimized.

Copy link
@yelizariev

yelizariev May 30, 2018

Member

You put it under move_followers. The text is unclear anyway

<div class="o_setting_right_pane">
<label for="model_ids"/>
<div class="text-muted">
Add models to be able to select for message relocation

This comment has been minimized.

Copy link
@ilmir-k

ilmir-k May 31, 2018

Member

@KolushovAlexandr I think Add models to be used for message relocation sounds better

KolushovAlexandr and others added some commits May 31, 2018

@@ -23,7 +28,7 @@ def _extend_name(self, model, records):
Model = request.env[model]
fields = Model.fields_get()
contact_field = False
for n, f in fields.iteritems():
for n, f in iter(fields.items()):

This comment has been minimized.

Copy link
@yelizariev

yelizariev Jun 5, 2018

Member

No need to make iterator if you already have a list

KolushovAlexandr added some commits Jun 6, 2018

Merge branch '11.0-mail_addons-mail_move_message-port' of github.com:…
…KolushovAlexandr/mail-addons into 11.0-mail_addons-mail_move_message-port
@yelizariev
Copy link
Member

yelizariev left a comment

ok

@ilmir-k

This comment has been minimized.

Copy link
Member

ilmir-k commented Jun 6, 2018

@yelizariev so let's merge it due to everything is ok

@yelizariev yelizariev merged commit 2dfb242 into it-projects-llc:11.0 Jun 7, 2018

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
ci/branches Branch names are correct
Details
ci/runbot runbot build 17255-146-e4b794 (runtime 198s)
Details
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.